| | |
| | | import cn.com.basic.face.discern.entity.Department;
|
| | | import cn.com.basic.face.discern.entity.Dictionary;
|
| | | import cn.com.basic.face.discern.query.condition.DictionaryQueryCondition;
|
| | | import cn.com.basic.face.service.sqlite.DepartmentDao;
|
| | | import cn.com.basic.face.util.AppApi;
|
| | |
|
| | | public class DepartmentMng extends BaseMng {
|
| | |
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DEPARTMENT_QUERY);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setDepartmentDictionaryList(getDictionaryNameList(getList(Dictionary.class)));
|
| | | }
|
| | | });
|
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DEPARTMENT_QUERY);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setDepartmentDictionaryList(getDictionaryNameList(getList(Dictionary.class)));
|
| | | }
|
| | | });
|
| | | } else {
|
| | | SelectDialog.setDepartmentDictionaryList(getDictionaryNameList(DepartmentDao.getInstance().loadDepartmentDictionary()));
|
| | | }
|
| | | }
|
| | |
|
| | | }
|