| | |
| | |
|
| | | import cn.com.basic.face.dialog.CountryDialog;
|
| | | import cn.com.basic.face.dialog.SelectDialog;
|
| | | import cn.com.basic.face.fragment.RegisterFragment;
|
| | | import cn.com.basic.face.fragment.CheckInFragment;
|
| | | import cn.com.basic.face.discern.query.item.VistorTypeQueryItem;
|
| | | import cn.com.basic.face.util.AppApi;
|
| | |
|
| | | import org.xutils.http.RequestParams;
|
| | |
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import cn.com.basic.face.discern.common.BaseCommonCallBack;
|
| | | import cn.com.basic.face.discern.common.CommonVariables;
|
| | | import cn.com.basic.face.discern.entity.Dictionary;
|
| | |
|
| | | public class DictionaryMng extends BaseMng {
|
| | | public class DictionaryMng {
|
| | |
|
| | | public static DictionaryMng instance = new DictionaryMng();
|
| | |
|
| | | public static DictionaryMng getInstance() {
|
| | | return instance;
|
| | | }
|
| | |
|
| | | public Map<String, String> idMap = new HashMap<String, String>();
|
| | |
|
| | | public String getId(String name) {
|
| | | return idMap.get(name);
|
| | | }
|
| | |
|
| | | public static List<String> nationList = new ArrayList<String>();
|
| | |
| | | loadIdTypeList();
|
| | | loadGenderList();
|
| | | loadVisitReasonList();
|
| | | loadVisitorTypeList();
|
| | | }
|
| | |
|
| | | public void loadCountries() {
|
| | |
| | | return nameList;
|
| | | }
|
| | |
|
| | | private void loadVisitorTypeList() {
|
| | | RequestParams params = new RequestParams(AppApi.BASEURL+AppApi.VISITOR_TYPE_LIST);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<String> mVisitorTypeList = new ArrayList<String>();
|
| | | for (VistorTypeQueryItem item : getList(VistorTypeQueryItem.class)) {
|
| | | mVisitorTypeList.add(item.getLabel());
|
| | | idMap.put(item.getLabel(), item.getId()+"");
|
| | | }
|
| | | SelectDialog.setVisitorTypeList(mVisitorTypeList);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | }
|