git-svn-id: http://192.168.1.226/svn/proxy@814 454eff88-639b-444f-9e54-f578c98de674
| | |
| | | import cn.com.basic.face.discern.common.SqliteSqlBean;
|
| | | import cn.com.basic.face.discern.entity.Visit;
|
| | | import cn.com.basic.face.discern.entity.VisitDetail;
|
| | | import cn.com.basic.face.discern.query.condition.AttendanceQueryCondition;
|
| | | import cn.com.basic.face.discern.query.condition.CheckInQueryCondition;
|
| | | import cn.com.basic.face.fragment.CheckInFragment;
|
| | | import cn.com.basic.face.service.sqlite.CheckInDao;
|
| | |
| | | }
|
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | params.setUri(AppApi.BASE_URL +AppApi.VISIT_ADD);
|
| | | params.addBodyParameter(Visit.FieldNames.deviceCompanyId, BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | @Override
|
| | | public void success() {
|
| | |
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, CommonVariables.Page.DEFAULT_PAGE_SIZE);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | findCheckInLeftListAfterReturn(resultBean, isVisitorList, isSortByDept, append);
|
| | |
| | | }
|
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DEPARTMENT_QUERY);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setDepartmentDictionaryList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | |
|
| | | params.addBodyParameter(Device.FieldNames.sn, authorationId);
|
| | | params.addBodyParameter(Device.FieldNames.type, CommonVariables.DeviceType.ANDROID_DEVICE);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | loadAfterReturn(getList(Device.class));
|
| | |
| | | RequestParams params = new RequestParams(AppApi.BASE_URL + AppApi.Query.DEVICE_QUERY);
|
| | | params.addBodyParameter(Device.FieldNames.belongId, device.getBelongId());
|
| | | params.addBodyParameter(Device.FieldNames.type, CommonVariables.DeviceType.CAMERA1);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<Device> devices = resultBean.getList(Device.class);
|
| | |
| | | params = new RequestParams(AppApi.BASE_URL + AppApi.Query.DEVICE_QUERY);
|
| | | params.addBodyParameter(Device.FieldNames.belongId, device.getBelongId());
|
| | | params.addBodyParameter(Device.FieldNames.type, CommonVariables.DeviceType.CAMERA2);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<Device> devices = resultBean.getList(Device.class);
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.COUNTRY);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | loadCountriesAfterReturn(getList(Dictionary.class));
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.ID_TYPE);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setIdTypeList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.GENDER);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setGenderList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.VISIT_REASON);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setVisitReasonList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.RESOLUTION);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setResolutionList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.PROTOCOL);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setProtocolList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.CAMERA_BRAND);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setCameraBrandList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.VISITOR_TYPE);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setVisitorTypeList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.DICTIONARY_QUERY);
|
| | | params.addParameter(DictionaryQueryCondition.FieldNames.type, CommonVariables.DictionaryType.ATTENDER_TYPE);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setAttenderTypeList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | params.addBodyParameter(Dictionary.FieldNames.type, type1);
|
| | | params.addBodyParameter(Dictionary.FieldNames.name, name);
|
| | | params.addBodyParameter(Dictionary.FieldNames.orderBy, "10");
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SqliteSqlUtil.insert(getExtraList(SqliteSqlBean.class));
|
| | |
| | | params.addBodyParameter(PhoneCallQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, CommonVariables.Page.DEFAULT_PAGE_SIZE);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | findPhoneCallLeftListAfterReturn(resultBean, isSortByDept, append);
|
| | |
| | | params.addBodyParameter(PhoneCall.FieldNames.calleeId, interviewee.getRegisterId());
|
| | | params.addBodyParameter(PhoneCall.FieldNames.deviceId, BaseApplication.getInstance().getAndroidDevice().getDeviceId());
|
| | | params.addBodyParameter(PhoneCall.FieldNames.callerId, visitor.getRegisterId());
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SqliteSqlUtil.insert(getExtraList(SqliteSqlBean.class));
|
| | |
| | | }
|
| | | if (BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.POST_QUERY);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | SelectDialog.setPostDictionaryList(getDictionaryNameList(getList(Dictionary.class)));
|
| | |
| | | params.addBodyParameter("surveillancePhoto", surveillancePhotoFile);
|
| | | params.addBodyParameter("uploadCustomPhoto", uploadCustomPhotoFile);
|
| | | params.addBodyParameter("idCardPhoto", idCardPhotoFile);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | if (idCardHeadPhoto != null && !"".equals(idCardHeadPhoto)) {
|
| | | File f5 = new File(idCardHeadPhoto);
|
| | | if (!f5.exists()) {
|
| | |
| | | params.addBodyParameter("f0", f0);
|
| | | params.addBodyParameter("surveillancePhoto", surveillancePhotoFile);
|
| | | params.addBodyParameter("idCardPhoto", idCardHeadPhotoFile);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | @Override
|
| | | public void success() {
|
| | |
| | | params.addBodyParameter("surveillancePhoto", surveillancePhotoFile);
|
| | | params.addBodyParameter("uploadCustomPhoto", uploadCustomPhotoFile);
|
| | | params.addBodyParameter("idCardPhoto", idCardPhotoFile);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | if (idCardHeadPhoto != null && !"".equals(idCardHeadPhoto)) {
|
| | | File f5 = new File(idCardHeadPhoto);
|
| | | if (!f5.exists()) {
|
| | |
| | | params.addBodyParameter("surveillancePhoto", item.getSurveillancePhoto());
|
| | | params.addBodyParameter("uploadCustomPhoto", item.getUploadCustomPhoto());
|
| | | params.addBodyParameter("idCardPhoto", item.getIdCardPhoto());
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | try {
|
| | | File path = BaseApplication.getInstance().getFilesDir();
|
| | | File f0 = new File(path, "f0");
|
| | |
| | | params.setUri(AppApi.BASE_URL + AppApi.SURVEILLANCE_UPLOAD);
|
| | | params.addBodyParameter("f0", f0);
|
| | | params.addBodyParameter("rawSurveillancePhoto", rawSurveillancePhotoFile);
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | @Override
|
| | | public void success() {
|
| | |
| | | params.addBodyParameter("rawSurveillancePhoto", rawSurveillancePhotoFile);
|
| | | params.addBodyParameter("androidCreateTime", item.getCreateTime());
|
| | | params.addBodyParameter("offlineUnknown", CommonVariables.Surveillance.OFFLINE_SURVEILLANCE_ITEM_TYPE +"");
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | @Override
|
| | | public void success() {
|
| | |
| | | params.addBodyParameter(VisitQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, CommonVariables.Page.DEFAULT_PAGE_SIZE);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
|
| | | params.addBodyParameter("deviceCompanyId", BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | findLeftVisitorListAfterReturn(resultBean, append);
|