| | |
| | | package cn.com.basic.face.service;
|
| | |
|
| | | import cn.com.basic.face.base.BaseApplication;
|
| | | import cn.com.basic.face.dialog.CountryDialog;
|
| | | import cn.com.basic.face.dialog.SelectDialog;
|
| | | import cn.com.basic.face.discern.query.condition.DictionaryQueryCondition;
|
| | |
| | | }
|
| | |
|
| | | public void loadAllDictionaryData() {
|
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | loadCountries();
|
| | | loadIdTypeList();
|
| | | loadGenderList();
|
| | |
| | | }
|
| | |
|
| | | public void loadCountries() {
|
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.COUNTRY);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | |
| | | }
|
| | |
|
| | | private void sortCountries(List<Dictionary> countries) {
|
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | Collections.sort(countries, new Comparator<Dictionary>() {
|
| | | @Override
|
| | | public int compare(Dictionary t1, Dictionary t2) {
|
| | |
| | | }
|
| | |
|
| | | public void loadIdTypeList() {
|
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.ID_TYPE);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | |
| | | }
|
| | |
|
| | | private void loadGenderList() {
|
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.GENDER);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | private void loadVisitReasonList() {
|
| | | public void loadVisitReasonList() {
|
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.VISIT_REASON);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | |
| | | }
|
| | |
|
| | | private void loadVisitorTypeList() {
|
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.VISIT_TYPE);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|