diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java index fd30762..5c17f54 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java @@ -548,6 +548,7 @@ @Field("currState") String currState, @Field("changeState") String changeState, @Field("remarks") String remarks, + @Field("approvalResult") String approvalResult, @Field("operationKey") String operationKey, @Field("taskUserId") String taskUserId ); diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java index fd30762..5c17f54 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java @@ -548,6 +548,7 @@ @Field("currState") String currState, @Field("changeState") String changeState, @Field("remarks") String remarks, + @Field("approvalResult") String approvalResult, @Field("operationKey") String operationKey, @Field("taskUserId") String taskUserId ); diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java index a35ba05..3a450f6 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java @@ -266,10 +266,9 @@ * http://xx.com/static/2019-10/8050891248624f2bbefedcb196ce89cb.jpeg */ public static Observable uploadImage(File image) { - RequestBody requestBody = RequestBody.create(MediaType.parse("image/png"), image); + RequestBody requestBody = RequestBody.create(image, MediaType.parse("image/png")); return api.uploadImage( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", image.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", image.getName(), requestBody) ); } @@ -277,10 +276,9 @@ * 上传案卷音频 */ public static Observable uploadAudio(File audio) { - RequestBody requestBody = RequestBody.create(MediaType.parse("audio/m4a"), audio); + RequestBody requestBody = RequestBody.create(audio, MediaType.parse("audio/m4a")); return api.uploadAudio( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", audio.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", audio.getName(), requestBody) ); } @@ -288,10 +286,9 @@ * 上传案卷视频 */ public static Observable uploadVideo(File video) { - RequestBody requestBody = RequestBody.create(MediaType.parse("video/mp4"), video); + RequestBody requestBody = RequestBody.create(video, MediaType.parse("video/mp4")); return api.uploadVideo( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", video.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", video.getName(), requestBody) ); } @@ -316,56 +313,42 @@ * 案卷处理分页查询,去掉三包类型的案卷 */ public static Observable handleCaseResult(int limit, int offset) { - return api.getHandleResult( - AuthenticationHelper.getToken(), "0", limit, offset - ); + return api.getHandleResult(AuthenticationHelper.getToken(), "0", limit, offset); } /** * 处理已办分页查询 */ public static Observable handledCaseResult(int offset) { - return api.getHandledResult( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.getHandledResult(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 紧急案件分页查询 */ public static Observable getUrgentCase(String isSupervise, int offset) { - return api.getUrgentCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getUrgentCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 超时案件分页查询 */ public static Observable getOvertimeCase(String isSupervise, int offset) { - return api.getOvertimeCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getOvertimeCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 在线人员查询 */ - public static Observable getOnlinePerson( - String deptid, String roleTips, String isOnLine - ) { + public static Observable getOnlinePerson(String deptid, String roleTips, String isOnLine) { return api.getOnlinePerson(AuthenticationHelper.getToken(), deptid, roleTips, isOnLine); } /** * 设备定位信息上传 */ - public static Observable getPositionUploadResult( - String imei, String positionLat, String positionLng - ) { - return api.uploadDevicePosition( - AuthenticationHelper.getToken(), imei, positionLat, positionLng - ); + public static Observable getPositionUploadResult(String imei, String positionLat, String positionLng) { + return api.uploadDevicePosition(AuthenticationHelper.getToken(), imei, positionLat, positionLng); } /** @@ -390,12 +373,10 @@ * 案卷核实-仅添加核实意见/核实情况/核实图片 */ public static Observable getHandleCaseResult( - String processId, String bizId, String currState, String changeState, String remarks, - String fileId + String processId, String bizId, String currState, String changeState, String remarks, String fileId ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId ); } @@ -409,8 +390,7 @@ String fileId, String approvalResult ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId, approvalResult + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId, approvalResult ); } @@ -439,21 +419,17 @@ * 派遣员处理 */ public static Observable getDispatcherHandleCaseResult( - String processId, String bizId, String currState, String changeState, - String remarks, String operationKey, String taskUserId + String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId ) { return api.dispatcherHandleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - operationKey, taskUserId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId ); } /** * 紧急要件-超时督办 */ - public static Observable getUpdateSuperviseResult( - String id, String superviseRemarks - ) { + public static Observable getUpdateSuperviseResult(String id, String superviseRemarks) { return api.updateSuperviseRemarks(AuthenticationHelper.getToken(), id, superviseRemarks); } @@ -482,24 +458,19 @@ * 公厕打扫签到 */ public static Observable getCleanToiletResult( - String toiletId, String userId, String lng, String lat, String startTime, String endTime, - String photo, String workContent + String toiletId, String userId, String lng, String lat, String startTime, String endTime, String photo, String workContent ) { return api.cleanToilet( - AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, - photo, workContent + AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, photo, workContent ); } /** * 公厕打扫记录 */ - public static Observable getCleanRecordResult( - String userId, String keywords, String beginDate, String endDate, int offset - ) { + public static Observable getCleanRecordResult(String userId, String keywords, String beginDate, String endDate, int offset) { return api.obtainToiletCleanRecord( - AuthenticationHelper.getToken(), userId, keywords, - beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), userId, keywords, beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset ); } @@ -507,30 +478,24 @@ * 三包待办 */ public static Observable getPackageWorkListResult(String isShop, int offset) { - return api.obtainPackageWorkListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPackageWorkListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包已办 */ public static Observable getCompletedListResult(String isShop, int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包处罚 */ public static Observable getHandlePackageResult( - String id, String punishType, String punishRemarks, String punishTime, - String punishImage + String id, String punishType, String punishRemarks, String punishTime, String punishImage ) { return api.handlePackageCase( - AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, - punishImage + AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, punishImage ); } @@ -538,12 +503,10 @@ * 商铺变更 */ public static Observable getShopChangeResult( - String merchantId, String merchantName, String contactName, String contactPhone, - String images + String merchantId, String merchantName, String contactName, String contactPhone, String images ) { return api.changeShopInfo( - AuthenticationHelper.getToken(), merchantId, "1", - merchantName, contactName, contactPhone, images, "1" + AuthenticationHelper.getToken(), merchantId, "1", merchantName, contactName, contactPhone, images, "1" ); } @@ -551,63 +514,49 @@ * 二级派遣员待办案卷 */ public static Observable getWorkListResult(int offset) { - return api.obtainWorkListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainWorkListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员待处理案卷 */ public static Observable getProcessListResult(int offset) { - return api.obtainProcessListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainProcessListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员已办案卷 */ public static Observable getCompletedListResult(int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级缓办待处理 */ public static Observable getPostponeListResult(int offset) { - return api.obtainPostponeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPostponeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级延期待处理 */ public static Observable getDelayedListResult(int offset) { - return api.obtainDelayedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainDelayedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门授权审核 */ public static Observable getCaseAuthorizeResult(int offset) { - return api.obtainCaseAuthorizeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAuthorizeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门调整批示 */ public static Observable getCaseAdjustResult(int offset) { - return api.obtainCaseAdjustListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAdjustListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** @@ -628,23 +577,17 @@ * 桥梁新增打卡记录 */ public static Observable getAddMaintainRecordResult( - String bridgeId, String content, String maintainTime, String personId, - String longitude, String latitude, String description + String bridgeId, String content, String maintainTime, String personId, String longitude, String latitude, String description ) { return shopApi.addMaintainRecord( - AuthenticationHelper.getToken(), bridgeId, content, maintainTime, - personId, longitude, latitude, description); + AuthenticationHelper.getToken(), bridgeId, content, maintainTime, personId, longitude, latitude, description); } /** * 桥梁养护记录 */ - public static Observable getMaintainRecordResult( - String startDate, String endDate, int offset - ) { - return shopApi.obtainMaintainRecord( - AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset - ); + public static Observable getMaintainRecordResult(String startDate, String endDate, int offset) { + return shopApi.obtainMaintainRecord(AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset); } /** @@ -672,9 +615,7 @@ /** * 控制路灯开关 */ - public static Observable getLightControlResult( - List lampIds, String controlType - ) { + public static Observable getLightControlResult(List lampIds, String controlType) { return shopApi.controlStreetLight(AuthenticationHelper.getToken(), lampIds, controlType); } @@ -688,18 +629,14 @@ /** * 单个取消报警 */ - public static Observable getCancelAlarmResult( - String id, String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String id, String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), id, jobStatus, handleMessage); } /** * 一键取消报警 */ - public static Observable getCancelAlarmResult( - String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), jobStatus, handleMessage); } @@ -708,8 +645,7 @@ */ public static Observable getWellListResult(int offset) { return shopApi.obtainWellList( - AuthenticationHelper.getToken(), "wellCode", "asc", - LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), "wellCode", "asc", LocaleConstant.PAGE_LIMIT, offset ); } diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java index fd30762..5c17f54 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java @@ -548,6 +548,7 @@ @Field("currState") String currState, @Field("changeState") String changeState, @Field("remarks") String remarks, + @Field("approvalResult") String approvalResult, @Field("operationKey") String operationKey, @Field("taskUserId") String taskUserId ); diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java index a35ba05..3a450f6 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java @@ -266,10 +266,9 @@ * http://xx.com/static/2019-10/8050891248624f2bbefedcb196ce89cb.jpeg */ public static Observable uploadImage(File image) { - RequestBody requestBody = RequestBody.create(MediaType.parse("image/png"), image); + RequestBody requestBody = RequestBody.create(image, MediaType.parse("image/png")); return api.uploadImage( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", image.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", image.getName(), requestBody) ); } @@ -277,10 +276,9 @@ * 上传案卷音频 */ public static Observable uploadAudio(File audio) { - RequestBody requestBody = RequestBody.create(MediaType.parse("audio/m4a"), audio); + RequestBody requestBody = RequestBody.create(audio, MediaType.parse("audio/m4a")); return api.uploadAudio( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", audio.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", audio.getName(), requestBody) ); } @@ -288,10 +286,9 @@ * 上传案卷视频 */ public static Observable uploadVideo(File video) { - RequestBody requestBody = RequestBody.create(MediaType.parse("video/mp4"), video); + RequestBody requestBody = RequestBody.create(video, MediaType.parse("video/mp4")); return api.uploadVideo( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", video.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", video.getName(), requestBody) ); } @@ -316,56 +313,42 @@ * 案卷处理分页查询,去掉三包类型的案卷 */ public static Observable handleCaseResult(int limit, int offset) { - return api.getHandleResult( - AuthenticationHelper.getToken(), "0", limit, offset - ); + return api.getHandleResult(AuthenticationHelper.getToken(), "0", limit, offset); } /** * 处理已办分页查询 */ public static Observable handledCaseResult(int offset) { - return api.getHandledResult( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.getHandledResult(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 紧急案件分页查询 */ public static Observable getUrgentCase(String isSupervise, int offset) { - return api.getUrgentCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getUrgentCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 超时案件分页查询 */ public static Observable getOvertimeCase(String isSupervise, int offset) { - return api.getOvertimeCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getOvertimeCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 在线人员查询 */ - public static Observable getOnlinePerson( - String deptid, String roleTips, String isOnLine - ) { + public static Observable getOnlinePerson(String deptid, String roleTips, String isOnLine) { return api.getOnlinePerson(AuthenticationHelper.getToken(), deptid, roleTips, isOnLine); } /** * 设备定位信息上传 */ - public static Observable getPositionUploadResult( - String imei, String positionLat, String positionLng - ) { - return api.uploadDevicePosition( - AuthenticationHelper.getToken(), imei, positionLat, positionLng - ); + public static Observable getPositionUploadResult(String imei, String positionLat, String positionLng) { + return api.uploadDevicePosition(AuthenticationHelper.getToken(), imei, positionLat, positionLng); } /** @@ -390,12 +373,10 @@ * 案卷核实-仅添加核实意见/核实情况/核实图片 */ public static Observable getHandleCaseResult( - String processId, String bizId, String currState, String changeState, String remarks, - String fileId + String processId, String bizId, String currState, String changeState, String remarks, String fileId ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId ); } @@ -409,8 +390,7 @@ String fileId, String approvalResult ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId, approvalResult + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId, approvalResult ); } @@ -439,21 +419,17 @@ * 派遣员处理 */ public static Observable getDispatcherHandleCaseResult( - String processId, String bizId, String currState, String changeState, - String remarks, String operationKey, String taskUserId + String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId ) { return api.dispatcherHandleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - operationKey, taskUserId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId ); } /** * 紧急要件-超时督办 */ - public static Observable getUpdateSuperviseResult( - String id, String superviseRemarks - ) { + public static Observable getUpdateSuperviseResult(String id, String superviseRemarks) { return api.updateSuperviseRemarks(AuthenticationHelper.getToken(), id, superviseRemarks); } @@ -482,24 +458,19 @@ * 公厕打扫签到 */ public static Observable getCleanToiletResult( - String toiletId, String userId, String lng, String lat, String startTime, String endTime, - String photo, String workContent + String toiletId, String userId, String lng, String lat, String startTime, String endTime, String photo, String workContent ) { return api.cleanToilet( - AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, - photo, workContent + AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, photo, workContent ); } /** * 公厕打扫记录 */ - public static Observable getCleanRecordResult( - String userId, String keywords, String beginDate, String endDate, int offset - ) { + public static Observable getCleanRecordResult(String userId, String keywords, String beginDate, String endDate, int offset) { return api.obtainToiletCleanRecord( - AuthenticationHelper.getToken(), userId, keywords, - beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), userId, keywords, beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset ); } @@ -507,30 +478,24 @@ * 三包待办 */ public static Observable getPackageWorkListResult(String isShop, int offset) { - return api.obtainPackageWorkListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPackageWorkListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包已办 */ public static Observable getCompletedListResult(String isShop, int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包处罚 */ public static Observable getHandlePackageResult( - String id, String punishType, String punishRemarks, String punishTime, - String punishImage + String id, String punishType, String punishRemarks, String punishTime, String punishImage ) { return api.handlePackageCase( - AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, - punishImage + AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, punishImage ); } @@ -538,12 +503,10 @@ * 商铺变更 */ public static Observable getShopChangeResult( - String merchantId, String merchantName, String contactName, String contactPhone, - String images + String merchantId, String merchantName, String contactName, String contactPhone, String images ) { return api.changeShopInfo( - AuthenticationHelper.getToken(), merchantId, "1", - merchantName, contactName, contactPhone, images, "1" + AuthenticationHelper.getToken(), merchantId, "1", merchantName, contactName, contactPhone, images, "1" ); } @@ -551,63 +514,49 @@ * 二级派遣员待办案卷 */ public static Observable getWorkListResult(int offset) { - return api.obtainWorkListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainWorkListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员待处理案卷 */ public static Observable getProcessListResult(int offset) { - return api.obtainProcessListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainProcessListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员已办案卷 */ public static Observable getCompletedListResult(int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级缓办待处理 */ public static Observable getPostponeListResult(int offset) { - return api.obtainPostponeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPostponeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级延期待处理 */ public static Observable getDelayedListResult(int offset) { - return api.obtainDelayedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainDelayedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门授权审核 */ public static Observable getCaseAuthorizeResult(int offset) { - return api.obtainCaseAuthorizeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAuthorizeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门调整批示 */ public static Observable getCaseAdjustResult(int offset) { - return api.obtainCaseAdjustListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAdjustListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** @@ -628,23 +577,17 @@ * 桥梁新增打卡记录 */ public static Observable getAddMaintainRecordResult( - String bridgeId, String content, String maintainTime, String personId, - String longitude, String latitude, String description + String bridgeId, String content, String maintainTime, String personId, String longitude, String latitude, String description ) { return shopApi.addMaintainRecord( - AuthenticationHelper.getToken(), bridgeId, content, maintainTime, - personId, longitude, latitude, description); + AuthenticationHelper.getToken(), bridgeId, content, maintainTime, personId, longitude, latitude, description); } /** * 桥梁养护记录 */ - public static Observable getMaintainRecordResult( - String startDate, String endDate, int offset - ) { - return shopApi.obtainMaintainRecord( - AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset - ); + public static Observable getMaintainRecordResult(String startDate, String endDate, int offset) { + return shopApi.obtainMaintainRecord(AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset); } /** @@ -672,9 +615,7 @@ /** * 控制路灯开关 */ - public static Observable getLightControlResult( - List lampIds, String controlType - ) { + public static Observable getLightControlResult(List lampIds, String controlType) { return shopApi.controlStreetLight(AuthenticationHelper.getToken(), lampIds, controlType); } @@ -688,18 +629,14 @@ /** * 单个取消报警 */ - public static Observable getCancelAlarmResult( - String id, String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String id, String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), id, jobStatus, handleMessage); } /** * 一键取消报警 */ - public static Observable getCancelAlarmResult( - String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), jobStatus, handleMessage); } @@ -708,8 +645,7 @@ */ public static Observable getWellListResult(int offset) { return shopApi.obtainWellList( - AuthenticationHelper.getToken(), "wellCode", "asc", - LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), "wellCode", "asc", LocaleConstant.PAGE_LIMIT, offset ); } diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java index 1765c7a..5fd496f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java @@ -257,7 +257,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, data.getProcessPersonid()); } }); diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java index fd30762..5c17f54 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java @@ -548,6 +548,7 @@ @Field("currState") String currState, @Field("changeState") String changeState, @Field("remarks") String remarks, + @Field("approvalResult") String approvalResult, @Field("operationKey") String operationKey, @Field("taskUserId") String taskUserId ); diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java index a35ba05..3a450f6 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java @@ -266,10 +266,9 @@ * http://xx.com/static/2019-10/8050891248624f2bbefedcb196ce89cb.jpeg */ public static Observable uploadImage(File image) { - RequestBody requestBody = RequestBody.create(MediaType.parse("image/png"), image); + RequestBody requestBody = RequestBody.create(image, MediaType.parse("image/png")); return api.uploadImage( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", image.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", image.getName(), requestBody) ); } @@ -277,10 +276,9 @@ * 上传案卷音频 */ public static Observable uploadAudio(File audio) { - RequestBody requestBody = RequestBody.create(MediaType.parse("audio/m4a"), audio); + RequestBody requestBody = RequestBody.create(audio, MediaType.parse("audio/m4a")); return api.uploadAudio( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", audio.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", audio.getName(), requestBody) ); } @@ -288,10 +286,9 @@ * 上传案卷视频 */ public static Observable uploadVideo(File video) { - RequestBody requestBody = RequestBody.create(MediaType.parse("video/mp4"), video); + RequestBody requestBody = RequestBody.create(video, MediaType.parse("video/mp4")); return api.uploadVideo( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", video.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", video.getName(), requestBody) ); } @@ -316,56 +313,42 @@ * 案卷处理分页查询,去掉三包类型的案卷 */ public static Observable handleCaseResult(int limit, int offset) { - return api.getHandleResult( - AuthenticationHelper.getToken(), "0", limit, offset - ); + return api.getHandleResult(AuthenticationHelper.getToken(), "0", limit, offset); } /** * 处理已办分页查询 */ public static Observable handledCaseResult(int offset) { - return api.getHandledResult( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.getHandledResult(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 紧急案件分页查询 */ public static Observable getUrgentCase(String isSupervise, int offset) { - return api.getUrgentCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getUrgentCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 超时案件分页查询 */ public static Observable getOvertimeCase(String isSupervise, int offset) { - return api.getOvertimeCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getOvertimeCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 在线人员查询 */ - public static Observable getOnlinePerson( - String deptid, String roleTips, String isOnLine - ) { + public static Observable getOnlinePerson(String deptid, String roleTips, String isOnLine) { return api.getOnlinePerson(AuthenticationHelper.getToken(), deptid, roleTips, isOnLine); } /** * 设备定位信息上传 */ - public static Observable getPositionUploadResult( - String imei, String positionLat, String positionLng - ) { - return api.uploadDevicePosition( - AuthenticationHelper.getToken(), imei, positionLat, positionLng - ); + public static Observable getPositionUploadResult(String imei, String positionLat, String positionLng) { + return api.uploadDevicePosition(AuthenticationHelper.getToken(), imei, positionLat, positionLng); } /** @@ -390,12 +373,10 @@ * 案卷核实-仅添加核实意见/核实情况/核实图片 */ public static Observable getHandleCaseResult( - String processId, String bizId, String currState, String changeState, String remarks, - String fileId + String processId, String bizId, String currState, String changeState, String remarks, String fileId ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId ); } @@ -409,8 +390,7 @@ String fileId, String approvalResult ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId, approvalResult + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId, approvalResult ); } @@ -439,21 +419,17 @@ * 派遣员处理 */ public static Observable getDispatcherHandleCaseResult( - String processId, String bizId, String currState, String changeState, - String remarks, String operationKey, String taskUserId + String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId ) { return api.dispatcherHandleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - operationKey, taskUserId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId ); } /** * 紧急要件-超时督办 */ - public static Observable getUpdateSuperviseResult( - String id, String superviseRemarks - ) { + public static Observable getUpdateSuperviseResult(String id, String superviseRemarks) { return api.updateSuperviseRemarks(AuthenticationHelper.getToken(), id, superviseRemarks); } @@ -482,24 +458,19 @@ * 公厕打扫签到 */ public static Observable getCleanToiletResult( - String toiletId, String userId, String lng, String lat, String startTime, String endTime, - String photo, String workContent + String toiletId, String userId, String lng, String lat, String startTime, String endTime, String photo, String workContent ) { return api.cleanToilet( - AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, - photo, workContent + AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, photo, workContent ); } /** * 公厕打扫记录 */ - public static Observable getCleanRecordResult( - String userId, String keywords, String beginDate, String endDate, int offset - ) { + public static Observable getCleanRecordResult(String userId, String keywords, String beginDate, String endDate, int offset) { return api.obtainToiletCleanRecord( - AuthenticationHelper.getToken(), userId, keywords, - beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), userId, keywords, beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset ); } @@ -507,30 +478,24 @@ * 三包待办 */ public static Observable getPackageWorkListResult(String isShop, int offset) { - return api.obtainPackageWorkListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPackageWorkListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包已办 */ public static Observable getCompletedListResult(String isShop, int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包处罚 */ public static Observable getHandlePackageResult( - String id, String punishType, String punishRemarks, String punishTime, - String punishImage + String id, String punishType, String punishRemarks, String punishTime, String punishImage ) { return api.handlePackageCase( - AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, - punishImage + AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, punishImage ); } @@ -538,12 +503,10 @@ * 商铺变更 */ public static Observable getShopChangeResult( - String merchantId, String merchantName, String contactName, String contactPhone, - String images + String merchantId, String merchantName, String contactName, String contactPhone, String images ) { return api.changeShopInfo( - AuthenticationHelper.getToken(), merchantId, "1", - merchantName, contactName, contactPhone, images, "1" + AuthenticationHelper.getToken(), merchantId, "1", merchantName, contactName, contactPhone, images, "1" ); } @@ -551,63 +514,49 @@ * 二级派遣员待办案卷 */ public static Observable getWorkListResult(int offset) { - return api.obtainWorkListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainWorkListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员待处理案卷 */ public static Observable getProcessListResult(int offset) { - return api.obtainProcessListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainProcessListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员已办案卷 */ public static Observable getCompletedListResult(int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级缓办待处理 */ public static Observable getPostponeListResult(int offset) { - return api.obtainPostponeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPostponeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级延期待处理 */ public static Observable getDelayedListResult(int offset) { - return api.obtainDelayedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainDelayedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门授权审核 */ public static Observable getCaseAuthorizeResult(int offset) { - return api.obtainCaseAuthorizeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAuthorizeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门调整批示 */ public static Observable getCaseAdjustResult(int offset) { - return api.obtainCaseAdjustListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAdjustListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** @@ -628,23 +577,17 @@ * 桥梁新增打卡记录 */ public static Observable getAddMaintainRecordResult( - String bridgeId, String content, String maintainTime, String personId, - String longitude, String latitude, String description + String bridgeId, String content, String maintainTime, String personId, String longitude, String latitude, String description ) { return shopApi.addMaintainRecord( - AuthenticationHelper.getToken(), bridgeId, content, maintainTime, - personId, longitude, latitude, description); + AuthenticationHelper.getToken(), bridgeId, content, maintainTime, personId, longitude, latitude, description); } /** * 桥梁养护记录 */ - public static Observable getMaintainRecordResult( - String startDate, String endDate, int offset - ) { - return shopApi.obtainMaintainRecord( - AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset - ); + public static Observable getMaintainRecordResult(String startDate, String endDate, int offset) { + return shopApi.obtainMaintainRecord(AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset); } /** @@ -672,9 +615,7 @@ /** * 控制路灯开关 */ - public static Observable getLightControlResult( - List lampIds, String controlType - ) { + public static Observable getLightControlResult(List lampIds, String controlType) { return shopApi.controlStreetLight(AuthenticationHelper.getToken(), lampIds, controlType); } @@ -688,18 +629,14 @@ /** * 单个取消报警 */ - public static Observable getCancelAlarmResult( - String id, String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String id, String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), id, jobStatus, handleMessage); } /** * 一键取消报警 */ - public static Observable getCancelAlarmResult( - String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), jobStatus, handleMessage); } @@ -708,8 +645,7 @@ */ public static Observable getWellListResult(int offset) { return shopApi.obtainWellList( - AuthenticationHelper.getToken(), "wellCode", "asc", - LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), "wellCode", "asc", LocaleConstant.PAGE_LIMIT, offset ); } diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java index 1765c7a..5fd496f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java @@ -257,7 +257,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, data.getProcessPersonid()); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java index e3f4600..68ce21f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java @@ -328,7 +328,7 @@ taskUserId = data.getProcessPersonid(); } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, taskUserId); } }); diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java index fd30762..5c17f54 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java @@ -548,6 +548,7 @@ @Field("currState") String currState, @Field("changeState") String changeState, @Field("remarks") String remarks, + @Field("approvalResult") String approvalResult, @Field("operationKey") String operationKey, @Field("taskUserId") String taskUserId ); diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java index a35ba05..3a450f6 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java @@ -266,10 +266,9 @@ * http://xx.com/static/2019-10/8050891248624f2bbefedcb196ce89cb.jpeg */ public static Observable uploadImage(File image) { - RequestBody requestBody = RequestBody.create(MediaType.parse("image/png"), image); + RequestBody requestBody = RequestBody.create(image, MediaType.parse("image/png")); return api.uploadImage( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", image.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", image.getName(), requestBody) ); } @@ -277,10 +276,9 @@ * 上传案卷音频 */ public static Observable uploadAudio(File audio) { - RequestBody requestBody = RequestBody.create(MediaType.parse("audio/m4a"), audio); + RequestBody requestBody = RequestBody.create(audio, MediaType.parse("audio/m4a")); return api.uploadAudio( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", audio.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", audio.getName(), requestBody) ); } @@ -288,10 +286,9 @@ * 上传案卷视频 */ public static Observable uploadVideo(File video) { - RequestBody requestBody = RequestBody.create(MediaType.parse("video/mp4"), video); + RequestBody requestBody = RequestBody.create(video, MediaType.parse("video/mp4")); return api.uploadVideo( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", video.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", video.getName(), requestBody) ); } @@ -316,56 +313,42 @@ * 案卷处理分页查询,去掉三包类型的案卷 */ public static Observable handleCaseResult(int limit, int offset) { - return api.getHandleResult( - AuthenticationHelper.getToken(), "0", limit, offset - ); + return api.getHandleResult(AuthenticationHelper.getToken(), "0", limit, offset); } /** * 处理已办分页查询 */ public static Observable handledCaseResult(int offset) { - return api.getHandledResult( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.getHandledResult(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 紧急案件分页查询 */ public static Observable getUrgentCase(String isSupervise, int offset) { - return api.getUrgentCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getUrgentCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 超时案件分页查询 */ public static Observable getOvertimeCase(String isSupervise, int offset) { - return api.getOvertimeCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getOvertimeCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 在线人员查询 */ - public static Observable getOnlinePerson( - String deptid, String roleTips, String isOnLine - ) { + public static Observable getOnlinePerson(String deptid, String roleTips, String isOnLine) { return api.getOnlinePerson(AuthenticationHelper.getToken(), deptid, roleTips, isOnLine); } /** * 设备定位信息上传 */ - public static Observable getPositionUploadResult( - String imei, String positionLat, String positionLng - ) { - return api.uploadDevicePosition( - AuthenticationHelper.getToken(), imei, positionLat, positionLng - ); + public static Observable getPositionUploadResult(String imei, String positionLat, String positionLng) { + return api.uploadDevicePosition(AuthenticationHelper.getToken(), imei, positionLat, positionLng); } /** @@ -390,12 +373,10 @@ * 案卷核实-仅添加核实意见/核实情况/核实图片 */ public static Observable getHandleCaseResult( - String processId, String bizId, String currState, String changeState, String remarks, - String fileId + String processId, String bizId, String currState, String changeState, String remarks, String fileId ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId ); } @@ -409,8 +390,7 @@ String fileId, String approvalResult ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId, approvalResult + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId, approvalResult ); } @@ -439,21 +419,17 @@ * 派遣员处理 */ public static Observable getDispatcherHandleCaseResult( - String processId, String bizId, String currState, String changeState, - String remarks, String operationKey, String taskUserId + String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId ) { return api.dispatcherHandleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - operationKey, taskUserId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId ); } /** * 紧急要件-超时督办 */ - public static Observable getUpdateSuperviseResult( - String id, String superviseRemarks - ) { + public static Observable getUpdateSuperviseResult(String id, String superviseRemarks) { return api.updateSuperviseRemarks(AuthenticationHelper.getToken(), id, superviseRemarks); } @@ -482,24 +458,19 @@ * 公厕打扫签到 */ public static Observable getCleanToiletResult( - String toiletId, String userId, String lng, String lat, String startTime, String endTime, - String photo, String workContent + String toiletId, String userId, String lng, String lat, String startTime, String endTime, String photo, String workContent ) { return api.cleanToilet( - AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, - photo, workContent + AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, photo, workContent ); } /** * 公厕打扫记录 */ - public static Observable getCleanRecordResult( - String userId, String keywords, String beginDate, String endDate, int offset - ) { + public static Observable getCleanRecordResult(String userId, String keywords, String beginDate, String endDate, int offset) { return api.obtainToiletCleanRecord( - AuthenticationHelper.getToken(), userId, keywords, - beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), userId, keywords, beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset ); } @@ -507,30 +478,24 @@ * 三包待办 */ public static Observable getPackageWorkListResult(String isShop, int offset) { - return api.obtainPackageWorkListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPackageWorkListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包已办 */ public static Observable getCompletedListResult(String isShop, int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包处罚 */ public static Observable getHandlePackageResult( - String id, String punishType, String punishRemarks, String punishTime, - String punishImage + String id, String punishType, String punishRemarks, String punishTime, String punishImage ) { return api.handlePackageCase( - AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, - punishImage + AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, punishImage ); } @@ -538,12 +503,10 @@ * 商铺变更 */ public static Observable getShopChangeResult( - String merchantId, String merchantName, String contactName, String contactPhone, - String images + String merchantId, String merchantName, String contactName, String contactPhone, String images ) { return api.changeShopInfo( - AuthenticationHelper.getToken(), merchantId, "1", - merchantName, contactName, contactPhone, images, "1" + AuthenticationHelper.getToken(), merchantId, "1", merchantName, contactName, contactPhone, images, "1" ); } @@ -551,63 +514,49 @@ * 二级派遣员待办案卷 */ public static Observable getWorkListResult(int offset) { - return api.obtainWorkListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainWorkListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员待处理案卷 */ public static Observable getProcessListResult(int offset) { - return api.obtainProcessListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainProcessListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员已办案卷 */ public static Observable getCompletedListResult(int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级缓办待处理 */ public static Observable getPostponeListResult(int offset) { - return api.obtainPostponeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPostponeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级延期待处理 */ public static Observable getDelayedListResult(int offset) { - return api.obtainDelayedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainDelayedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门授权审核 */ public static Observable getCaseAuthorizeResult(int offset) { - return api.obtainCaseAuthorizeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAuthorizeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门调整批示 */ public static Observable getCaseAdjustResult(int offset) { - return api.obtainCaseAdjustListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAdjustListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** @@ -628,23 +577,17 @@ * 桥梁新增打卡记录 */ public static Observable getAddMaintainRecordResult( - String bridgeId, String content, String maintainTime, String personId, - String longitude, String latitude, String description + String bridgeId, String content, String maintainTime, String personId, String longitude, String latitude, String description ) { return shopApi.addMaintainRecord( - AuthenticationHelper.getToken(), bridgeId, content, maintainTime, - personId, longitude, latitude, description); + AuthenticationHelper.getToken(), bridgeId, content, maintainTime, personId, longitude, latitude, description); } /** * 桥梁养护记录 */ - public static Observable getMaintainRecordResult( - String startDate, String endDate, int offset - ) { - return shopApi.obtainMaintainRecord( - AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset - ); + public static Observable getMaintainRecordResult(String startDate, String endDate, int offset) { + return shopApi.obtainMaintainRecord(AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset); } /** @@ -672,9 +615,7 @@ /** * 控制路灯开关 */ - public static Observable getLightControlResult( - List lampIds, String controlType - ) { + public static Observable getLightControlResult(List lampIds, String controlType) { return shopApi.controlStreetLight(AuthenticationHelper.getToken(), lampIds, controlType); } @@ -688,18 +629,14 @@ /** * 单个取消报警 */ - public static Observable getCancelAlarmResult( - String id, String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String id, String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), id, jobStatus, handleMessage); } /** * 一键取消报警 */ - public static Observable getCancelAlarmResult( - String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), jobStatus, handleMessage); } @@ -708,8 +645,7 @@ */ public static Observable getWellListResult(int offset) { return shopApi.obtainWellList( - AuthenticationHelper.getToken(), "wellCode", "asc", - LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), "wellCode", "asc", LocaleConstant.PAGE_LIMIT, offset ); } diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java index 1765c7a..5fd496f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java @@ -257,7 +257,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, data.getProcessPersonid()); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java index e3f4600..68ce21f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java @@ -328,7 +328,7 @@ taskUserId = data.getProcessPersonid(); } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, taskUserId); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java index 3c5c6da..01cf41d 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java @@ -45,11 +45,11 @@ List fragmentList = new ArrayList<>(); fragmentList.add(new DeptCaseTodoFragment()); //待办任务 fragmentList.add(new DeptCaseProcessFragment()); //待处理 - fragmentList.add(new DeptCaseHandledFragment()); //已处理 fragmentList.add(new DeptCaseAdjustFragment()); //部门调整 - fragmentList.add(new DeptCaseAuthorizeFragment()); //部门授权 fragmentList.add(new DeptCasePostponeFragment()); //二级缓办 + fragmentList.add(new DeptCaseAuthorizeFragment()); //部门授权 fragmentList.add(new DeptCaseDelayedFragment()); //二级延期 + fragmentList.add(new DeptCaseHandledFragment()); //已处理 SubViewPagerAdapter adapter = new SubViewPagerAdapter(getSupportFragmentManager(), LocaleConstant.DEPT_PAGE_TITLES, fragmentList); viewBinding.viewPager.setAdapter(adapter); //绑定TabLayout diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java index fd30762..5c17f54 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java @@ -548,6 +548,7 @@ @Field("currState") String currState, @Field("changeState") String changeState, @Field("remarks") String remarks, + @Field("approvalResult") String approvalResult, @Field("operationKey") String operationKey, @Field("taskUserId") String taskUserId ); diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java index a35ba05..3a450f6 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java @@ -266,10 +266,9 @@ * http://xx.com/static/2019-10/8050891248624f2bbefedcb196ce89cb.jpeg */ public static Observable uploadImage(File image) { - RequestBody requestBody = RequestBody.create(MediaType.parse("image/png"), image); + RequestBody requestBody = RequestBody.create(image, MediaType.parse("image/png")); return api.uploadImage( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", image.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", image.getName(), requestBody) ); } @@ -277,10 +276,9 @@ * 上传案卷音频 */ public static Observable uploadAudio(File audio) { - RequestBody requestBody = RequestBody.create(MediaType.parse("audio/m4a"), audio); + RequestBody requestBody = RequestBody.create(audio, MediaType.parse("audio/m4a")); return api.uploadAudio( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", audio.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", audio.getName(), requestBody) ); } @@ -288,10 +286,9 @@ * 上传案卷视频 */ public static Observable uploadVideo(File video) { - RequestBody requestBody = RequestBody.create(MediaType.parse("video/mp4"), video); + RequestBody requestBody = RequestBody.create(video, MediaType.parse("video/mp4")); return api.uploadVideo( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", video.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", video.getName(), requestBody) ); } @@ -316,56 +313,42 @@ * 案卷处理分页查询,去掉三包类型的案卷 */ public static Observable handleCaseResult(int limit, int offset) { - return api.getHandleResult( - AuthenticationHelper.getToken(), "0", limit, offset - ); + return api.getHandleResult(AuthenticationHelper.getToken(), "0", limit, offset); } /** * 处理已办分页查询 */ public static Observable handledCaseResult(int offset) { - return api.getHandledResult( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.getHandledResult(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 紧急案件分页查询 */ public static Observable getUrgentCase(String isSupervise, int offset) { - return api.getUrgentCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getUrgentCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 超时案件分页查询 */ public static Observable getOvertimeCase(String isSupervise, int offset) { - return api.getOvertimeCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getOvertimeCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 在线人员查询 */ - public static Observable getOnlinePerson( - String deptid, String roleTips, String isOnLine - ) { + public static Observable getOnlinePerson(String deptid, String roleTips, String isOnLine) { return api.getOnlinePerson(AuthenticationHelper.getToken(), deptid, roleTips, isOnLine); } /** * 设备定位信息上传 */ - public static Observable getPositionUploadResult( - String imei, String positionLat, String positionLng - ) { - return api.uploadDevicePosition( - AuthenticationHelper.getToken(), imei, positionLat, positionLng - ); + public static Observable getPositionUploadResult(String imei, String positionLat, String positionLng) { + return api.uploadDevicePosition(AuthenticationHelper.getToken(), imei, positionLat, positionLng); } /** @@ -390,12 +373,10 @@ * 案卷核实-仅添加核实意见/核实情况/核实图片 */ public static Observable getHandleCaseResult( - String processId, String bizId, String currState, String changeState, String remarks, - String fileId + String processId, String bizId, String currState, String changeState, String remarks, String fileId ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId ); } @@ -409,8 +390,7 @@ String fileId, String approvalResult ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId, approvalResult + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId, approvalResult ); } @@ -439,21 +419,17 @@ * 派遣员处理 */ public static Observable getDispatcherHandleCaseResult( - String processId, String bizId, String currState, String changeState, - String remarks, String operationKey, String taskUserId + String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId ) { return api.dispatcherHandleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - operationKey, taskUserId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId ); } /** * 紧急要件-超时督办 */ - public static Observable getUpdateSuperviseResult( - String id, String superviseRemarks - ) { + public static Observable getUpdateSuperviseResult(String id, String superviseRemarks) { return api.updateSuperviseRemarks(AuthenticationHelper.getToken(), id, superviseRemarks); } @@ -482,24 +458,19 @@ * 公厕打扫签到 */ public static Observable getCleanToiletResult( - String toiletId, String userId, String lng, String lat, String startTime, String endTime, - String photo, String workContent + String toiletId, String userId, String lng, String lat, String startTime, String endTime, String photo, String workContent ) { return api.cleanToilet( - AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, - photo, workContent + AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, photo, workContent ); } /** * 公厕打扫记录 */ - public static Observable getCleanRecordResult( - String userId, String keywords, String beginDate, String endDate, int offset - ) { + public static Observable getCleanRecordResult(String userId, String keywords, String beginDate, String endDate, int offset) { return api.obtainToiletCleanRecord( - AuthenticationHelper.getToken(), userId, keywords, - beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), userId, keywords, beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset ); } @@ -507,30 +478,24 @@ * 三包待办 */ public static Observable getPackageWorkListResult(String isShop, int offset) { - return api.obtainPackageWorkListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPackageWorkListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包已办 */ public static Observable getCompletedListResult(String isShop, int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包处罚 */ public static Observable getHandlePackageResult( - String id, String punishType, String punishRemarks, String punishTime, - String punishImage + String id, String punishType, String punishRemarks, String punishTime, String punishImage ) { return api.handlePackageCase( - AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, - punishImage + AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, punishImage ); } @@ -538,12 +503,10 @@ * 商铺变更 */ public static Observable getShopChangeResult( - String merchantId, String merchantName, String contactName, String contactPhone, - String images + String merchantId, String merchantName, String contactName, String contactPhone, String images ) { return api.changeShopInfo( - AuthenticationHelper.getToken(), merchantId, "1", - merchantName, contactName, contactPhone, images, "1" + AuthenticationHelper.getToken(), merchantId, "1", merchantName, contactName, contactPhone, images, "1" ); } @@ -551,63 +514,49 @@ * 二级派遣员待办案卷 */ public static Observable getWorkListResult(int offset) { - return api.obtainWorkListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainWorkListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员待处理案卷 */ public static Observable getProcessListResult(int offset) { - return api.obtainProcessListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainProcessListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员已办案卷 */ public static Observable getCompletedListResult(int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级缓办待处理 */ public static Observable getPostponeListResult(int offset) { - return api.obtainPostponeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPostponeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级延期待处理 */ public static Observable getDelayedListResult(int offset) { - return api.obtainDelayedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainDelayedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门授权审核 */ public static Observable getCaseAuthorizeResult(int offset) { - return api.obtainCaseAuthorizeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAuthorizeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门调整批示 */ public static Observable getCaseAdjustResult(int offset) { - return api.obtainCaseAdjustListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAdjustListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** @@ -628,23 +577,17 @@ * 桥梁新增打卡记录 */ public static Observable getAddMaintainRecordResult( - String bridgeId, String content, String maintainTime, String personId, - String longitude, String latitude, String description + String bridgeId, String content, String maintainTime, String personId, String longitude, String latitude, String description ) { return shopApi.addMaintainRecord( - AuthenticationHelper.getToken(), bridgeId, content, maintainTime, - personId, longitude, latitude, description); + AuthenticationHelper.getToken(), bridgeId, content, maintainTime, personId, longitude, latitude, description); } /** * 桥梁养护记录 */ - public static Observable getMaintainRecordResult( - String startDate, String endDate, int offset - ) { - return shopApi.obtainMaintainRecord( - AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset - ); + public static Observable getMaintainRecordResult(String startDate, String endDate, int offset) { + return shopApi.obtainMaintainRecord(AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset); } /** @@ -672,9 +615,7 @@ /** * 控制路灯开关 */ - public static Observable getLightControlResult( - List lampIds, String controlType - ) { + public static Observable getLightControlResult(List lampIds, String controlType) { return shopApi.controlStreetLight(AuthenticationHelper.getToken(), lampIds, controlType); } @@ -688,18 +629,14 @@ /** * 单个取消报警 */ - public static Observable getCancelAlarmResult( - String id, String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String id, String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), id, jobStatus, handleMessage); } /** * 一键取消报警 */ - public static Observable getCancelAlarmResult( - String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), jobStatus, handleMessage); } @@ -708,8 +645,7 @@ */ public static Observable getWellListResult(int offset) { return shopApi.obtainWellList( - AuthenticationHelper.getToken(), "wellCode", "asc", - LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), "wellCode", "asc", LocaleConstant.PAGE_LIMIT, offset ); } diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java index 1765c7a..5fd496f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java @@ -257,7 +257,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, data.getProcessPersonid()); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java index e3f4600..68ce21f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java @@ -328,7 +328,7 @@ taskUserId = data.getProcessPersonid(); } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, taskUserId); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java index 3c5c6da..01cf41d 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java @@ -45,11 +45,11 @@ List fragmentList = new ArrayList<>(); fragmentList.add(new DeptCaseTodoFragment()); //待办任务 fragmentList.add(new DeptCaseProcessFragment()); //待处理 - fragmentList.add(new DeptCaseHandledFragment()); //已处理 fragmentList.add(new DeptCaseAdjustFragment()); //部门调整 - fragmentList.add(new DeptCaseAuthorizeFragment()); //部门授权 fragmentList.add(new DeptCasePostponeFragment()); //二级缓办 + fragmentList.add(new DeptCaseAuthorizeFragment()); //部门授权 fragmentList.add(new DeptCaseDelayedFragment()); //二级延期 + fragmentList.add(new DeptCaseHandledFragment()); //已处理 SubViewPagerAdapter adapter = new SubViewPagerAdapter(getSupportFragmentManager(), LocaleConstant.DEPT_PAGE_TITLES, fragmentList); viewBinding.viewPager.setAdapter(adapter); //绑定TabLayout diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java index 92a578b..73308b6 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java @@ -22,6 +22,7 @@ import com.casic.dcms.vm.CaseOperateViewModel; import com.casic.dcms.vm.CaseViewModel; import com.casic.dcms.vm.NodeViewModel; +import com.casic.dcms.vm.PersonViewModel; import com.gyf.immersionbar.ImmersionBar; import com.pengxh.androidx.lite.adapter.ReadOnlyImageAdapter; import com.pengxh.androidx.lite.base.AndroidxBaseActivity; @@ -43,13 +44,14 @@ private CaseViewModel caseViewModel; private NodeViewModel nodeViewModel; private CaseOperateViewModel operateViewModel; + private PersonViewModel personViewModel; private CaseDetailBean.DataBean data = new CaseDetailBean.DataBean(); - private List personBeans; private String id; private String changeState; private String taskUserId; private String operationKey; - private List nodeDataBeans; + private List nodeDataBeans = new ArrayList<>(); + private List personBeans = new ArrayList<>(); @Override protected void setupTopBarLayout() { @@ -63,7 +65,31 @@ @Override protected void observeRequestState() { + caseViewModel.loadState.observe(this, new Observer() { + @Override + public void onChanged(LoadState loadState) { + if (loadState == LoadState.Loading) { + DialogHub.get().showLoading(DeptTodoDetailActivity.this, "获取数据中..."); + } else { + DialogHub.get().dismissLoading(); + } + } + }); + operateViewModel.loadState.observe(this, new Observer() { + @Override + public void onChanged(LoadState loadState) { + if (loadState == LoadState.Loading) { + DialogHub.get().showLoading(DeptTodoDetailActivity.this, "案卷处理中,请稍后..."); + } else if (loadState == LoadState.Success) { + DialogHub.get().dismissLoading(); + finish(); + } else { + StringHub.show(context, "处理失败,请重试"); + DialogHub.get().dismissLoading(); + } + } + }); } @Override @@ -71,13 +97,6 @@ id = getIntent().getStringExtra("id"); caseViewModel = new ViewModelProvider(this).get(CaseViewModel.class); caseViewModel.obtainCaseDetail(id); - - nodeViewModel = new ViewModelProvider(this).get(NodeViewModel.class); - operateViewModel = new ViewModelProvider(this).get(CaseOperateViewModel.class); - } - - @Override - public void initEvent() { caseViewModel.caseDetailModel.observe(this, new Observer() { @Override public void onChanged(CaseDetailBean resultBean) { @@ -162,20 +181,13 @@ //获取处置类型 nodeViewModel.obtainNextNode(String.valueOf(data.getCaseState())); - } - } - }); - caseViewModel.loadState.observe(this, new Observer() { - @Override - public void onChanged(LoadState loadState) { - if (loadState == LoadState.Loading) { - DialogHub.get().showLoading(DeptTodoDetailActivity.this, "获取数据中..."); - } else { - DialogHub.get().dismissLoading(); + //获取下级处置人员 + personViewModel.obtainSubordinatePerson(); } } }); + nodeViewModel = new ViewModelProvider(this).get(NodeViewModel.class); nodeViewModel.nodeModel.observe(this, new Observer() { @Override public void onChanged(CaseNextNodeBean resultBean) { @@ -196,6 +208,21 @@ } }); + personViewModel = new ViewModelProvider(this).get(PersonViewModel.class); + personViewModel.processPersonModel.observe(this, new Observer() { + @Override + public void onChanged(ProcessPersonBean resultBean) { + if (resultBean.getCode() == 200) { + personBeans = resultBean.getData(); + } + } + }); + + operateViewModel = new ViewModelProvider(this).get(CaseOperateViewModel.class); + } + + @Override + public void initEvent() { viewBinding.locationMapView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -221,6 +248,32 @@ CaseNextNodeBean.DataBean nodeBean = nodeDataBeans.get(position); changeState = String.valueOf(nodeBean.getNextState()); operationKey = nodeBean.getOperationKey(); + + if (viewBinding.optTypeView.getText().toString().equals("处置人员") || viewBinding.optTypeView.getText().toString().equals("返回处理")) { + viewBinding.handlePersonLayout.setVisibility(View.VISIBLE); + //获取处置人员列表 + viewBinding.handlePersonLayout.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + QMUIBottomSheet.BottomListSheetBuilder sheetBuilder = new QMUIBottomSheet.BottomListSheetBuilder(context); + sheetBuilder.setTitle("处置人员"); + for (ProcessPersonBean.DataBean dataBean : personBeans) { + sheetBuilder.addItem(dataBean.getName()); + } + sheetBuilder.setGravityCenter(true).setOnSheetItemClickListener(new QMUIBottomSheet.BottomListSheetBuilder.OnSheetItemClickListener() { + @Override + public void onClick(QMUIBottomSheet dialog, View itemView, int position, String tag) { + dialog.dismiss(); + + viewBinding.handlePersonView.setText(tag); + taskUserId = personBeans.get(position).getId(); + } + }).build().show(); + } + }); + } else { + viewBinding.handlePersonLayout.setVisibility(View.GONE); + } } }).build().show(); } @@ -259,21 +312,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, taskUserId); - } - }); - operateViewModel.loadState.observe(this, new Observer() { - @Override - public void onChanged(LoadState loadState) { - if (loadState == LoadState.Loading) { - DialogHub.get().showLoading(DeptTodoDetailActivity.this, "案卷处理中,请稍后..."); - } else if (loadState == LoadState.Success) { - DialogHub.get().dismissLoading(); - finish(); - } else { - StringHub.show(context, "处理失败,请重试"); - DialogHub.get().dismissLoading(); - } + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, taskUserId); } }); } diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java index fd30762..5c17f54 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java @@ -548,6 +548,7 @@ @Field("currState") String currState, @Field("changeState") String changeState, @Field("remarks") String remarks, + @Field("approvalResult") String approvalResult, @Field("operationKey") String operationKey, @Field("taskUserId") String taskUserId ); diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java index a35ba05..3a450f6 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java @@ -266,10 +266,9 @@ * http://xx.com/static/2019-10/8050891248624f2bbefedcb196ce89cb.jpeg */ public static Observable uploadImage(File image) { - RequestBody requestBody = RequestBody.create(MediaType.parse("image/png"), image); + RequestBody requestBody = RequestBody.create(image, MediaType.parse("image/png")); return api.uploadImage( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", image.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", image.getName(), requestBody) ); } @@ -277,10 +276,9 @@ * 上传案卷音频 */ public static Observable uploadAudio(File audio) { - RequestBody requestBody = RequestBody.create(MediaType.parse("audio/m4a"), audio); + RequestBody requestBody = RequestBody.create(audio, MediaType.parse("audio/m4a")); return api.uploadAudio( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", audio.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", audio.getName(), requestBody) ); } @@ -288,10 +286,9 @@ * 上传案卷视频 */ public static Observable uploadVideo(File video) { - RequestBody requestBody = RequestBody.create(MediaType.parse("video/mp4"), video); + RequestBody requestBody = RequestBody.create(video, MediaType.parse("video/mp4")); return api.uploadVideo( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", video.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", video.getName(), requestBody) ); } @@ -316,56 +313,42 @@ * 案卷处理分页查询,去掉三包类型的案卷 */ public static Observable handleCaseResult(int limit, int offset) { - return api.getHandleResult( - AuthenticationHelper.getToken(), "0", limit, offset - ); + return api.getHandleResult(AuthenticationHelper.getToken(), "0", limit, offset); } /** * 处理已办分页查询 */ public static Observable handledCaseResult(int offset) { - return api.getHandledResult( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.getHandledResult(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 紧急案件分页查询 */ public static Observable getUrgentCase(String isSupervise, int offset) { - return api.getUrgentCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getUrgentCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 超时案件分页查询 */ public static Observable getOvertimeCase(String isSupervise, int offset) { - return api.getOvertimeCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getOvertimeCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 在线人员查询 */ - public static Observable getOnlinePerson( - String deptid, String roleTips, String isOnLine - ) { + public static Observable getOnlinePerson(String deptid, String roleTips, String isOnLine) { return api.getOnlinePerson(AuthenticationHelper.getToken(), deptid, roleTips, isOnLine); } /** * 设备定位信息上传 */ - public static Observable getPositionUploadResult( - String imei, String positionLat, String positionLng - ) { - return api.uploadDevicePosition( - AuthenticationHelper.getToken(), imei, positionLat, positionLng - ); + public static Observable getPositionUploadResult(String imei, String positionLat, String positionLng) { + return api.uploadDevicePosition(AuthenticationHelper.getToken(), imei, positionLat, positionLng); } /** @@ -390,12 +373,10 @@ * 案卷核实-仅添加核实意见/核实情况/核实图片 */ public static Observable getHandleCaseResult( - String processId, String bizId, String currState, String changeState, String remarks, - String fileId + String processId, String bizId, String currState, String changeState, String remarks, String fileId ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId ); } @@ -409,8 +390,7 @@ String fileId, String approvalResult ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId, approvalResult + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId, approvalResult ); } @@ -439,21 +419,17 @@ * 派遣员处理 */ public static Observable getDispatcherHandleCaseResult( - String processId, String bizId, String currState, String changeState, - String remarks, String operationKey, String taskUserId + String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId ) { return api.dispatcherHandleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - operationKey, taskUserId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId ); } /** * 紧急要件-超时督办 */ - public static Observable getUpdateSuperviseResult( - String id, String superviseRemarks - ) { + public static Observable getUpdateSuperviseResult(String id, String superviseRemarks) { return api.updateSuperviseRemarks(AuthenticationHelper.getToken(), id, superviseRemarks); } @@ -482,24 +458,19 @@ * 公厕打扫签到 */ public static Observable getCleanToiletResult( - String toiletId, String userId, String lng, String lat, String startTime, String endTime, - String photo, String workContent + String toiletId, String userId, String lng, String lat, String startTime, String endTime, String photo, String workContent ) { return api.cleanToilet( - AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, - photo, workContent + AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, photo, workContent ); } /** * 公厕打扫记录 */ - public static Observable getCleanRecordResult( - String userId, String keywords, String beginDate, String endDate, int offset - ) { + public static Observable getCleanRecordResult(String userId, String keywords, String beginDate, String endDate, int offset) { return api.obtainToiletCleanRecord( - AuthenticationHelper.getToken(), userId, keywords, - beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), userId, keywords, beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset ); } @@ -507,30 +478,24 @@ * 三包待办 */ public static Observable getPackageWorkListResult(String isShop, int offset) { - return api.obtainPackageWorkListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPackageWorkListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包已办 */ public static Observable getCompletedListResult(String isShop, int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包处罚 */ public static Observable getHandlePackageResult( - String id, String punishType, String punishRemarks, String punishTime, - String punishImage + String id, String punishType, String punishRemarks, String punishTime, String punishImage ) { return api.handlePackageCase( - AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, - punishImage + AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, punishImage ); } @@ -538,12 +503,10 @@ * 商铺变更 */ public static Observable getShopChangeResult( - String merchantId, String merchantName, String contactName, String contactPhone, - String images + String merchantId, String merchantName, String contactName, String contactPhone, String images ) { return api.changeShopInfo( - AuthenticationHelper.getToken(), merchantId, "1", - merchantName, contactName, contactPhone, images, "1" + AuthenticationHelper.getToken(), merchantId, "1", merchantName, contactName, contactPhone, images, "1" ); } @@ -551,63 +514,49 @@ * 二级派遣员待办案卷 */ public static Observable getWorkListResult(int offset) { - return api.obtainWorkListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainWorkListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员待处理案卷 */ public static Observable getProcessListResult(int offset) { - return api.obtainProcessListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainProcessListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员已办案卷 */ public static Observable getCompletedListResult(int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级缓办待处理 */ public static Observable getPostponeListResult(int offset) { - return api.obtainPostponeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPostponeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级延期待处理 */ public static Observable getDelayedListResult(int offset) { - return api.obtainDelayedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainDelayedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门授权审核 */ public static Observable getCaseAuthorizeResult(int offset) { - return api.obtainCaseAuthorizeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAuthorizeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门调整批示 */ public static Observable getCaseAdjustResult(int offset) { - return api.obtainCaseAdjustListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAdjustListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** @@ -628,23 +577,17 @@ * 桥梁新增打卡记录 */ public static Observable getAddMaintainRecordResult( - String bridgeId, String content, String maintainTime, String personId, - String longitude, String latitude, String description + String bridgeId, String content, String maintainTime, String personId, String longitude, String latitude, String description ) { return shopApi.addMaintainRecord( - AuthenticationHelper.getToken(), bridgeId, content, maintainTime, - personId, longitude, latitude, description); + AuthenticationHelper.getToken(), bridgeId, content, maintainTime, personId, longitude, latitude, description); } /** * 桥梁养护记录 */ - public static Observable getMaintainRecordResult( - String startDate, String endDate, int offset - ) { - return shopApi.obtainMaintainRecord( - AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset - ); + public static Observable getMaintainRecordResult(String startDate, String endDate, int offset) { + return shopApi.obtainMaintainRecord(AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset); } /** @@ -672,9 +615,7 @@ /** * 控制路灯开关 */ - public static Observable getLightControlResult( - List lampIds, String controlType - ) { + public static Observable getLightControlResult(List lampIds, String controlType) { return shopApi.controlStreetLight(AuthenticationHelper.getToken(), lampIds, controlType); } @@ -688,18 +629,14 @@ /** * 单个取消报警 */ - public static Observable getCancelAlarmResult( - String id, String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String id, String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), id, jobStatus, handleMessage); } /** * 一键取消报警 */ - public static Observable getCancelAlarmResult( - String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), jobStatus, handleMessage); } @@ -708,8 +645,7 @@ */ public static Observable getWellListResult(int offset) { return shopApi.obtainWellList( - AuthenticationHelper.getToken(), "wellCode", "asc", - LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), "wellCode", "asc", LocaleConstant.PAGE_LIMIT, offset ); } diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java index 1765c7a..5fd496f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java @@ -257,7 +257,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, data.getProcessPersonid()); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java index e3f4600..68ce21f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java @@ -328,7 +328,7 @@ taskUserId = data.getProcessPersonid(); } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, taskUserId); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java index 3c5c6da..01cf41d 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java @@ -45,11 +45,11 @@ List fragmentList = new ArrayList<>(); fragmentList.add(new DeptCaseTodoFragment()); //待办任务 fragmentList.add(new DeptCaseProcessFragment()); //待处理 - fragmentList.add(new DeptCaseHandledFragment()); //已处理 fragmentList.add(new DeptCaseAdjustFragment()); //部门调整 - fragmentList.add(new DeptCaseAuthorizeFragment()); //部门授权 fragmentList.add(new DeptCasePostponeFragment()); //二级缓办 + fragmentList.add(new DeptCaseAuthorizeFragment()); //部门授权 fragmentList.add(new DeptCaseDelayedFragment()); //二级延期 + fragmentList.add(new DeptCaseHandledFragment()); //已处理 SubViewPagerAdapter adapter = new SubViewPagerAdapter(getSupportFragmentManager(), LocaleConstant.DEPT_PAGE_TITLES, fragmentList); viewBinding.viewPager.setAdapter(adapter); //绑定TabLayout diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java index 92a578b..73308b6 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java @@ -22,6 +22,7 @@ import com.casic.dcms.vm.CaseOperateViewModel; import com.casic.dcms.vm.CaseViewModel; import com.casic.dcms.vm.NodeViewModel; +import com.casic.dcms.vm.PersonViewModel; import com.gyf.immersionbar.ImmersionBar; import com.pengxh.androidx.lite.adapter.ReadOnlyImageAdapter; import com.pengxh.androidx.lite.base.AndroidxBaseActivity; @@ -43,13 +44,14 @@ private CaseViewModel caseViewModel; private NodeViewModel nodeViewModel; private CaseOperateViewModel operateViewModel; + private PersonViewModel personViewModel; private CaseDetailBean.DataBean data = new CaseDetailBean.DataBean(); - private List personBeans; private String id; private String changeState; private String taskUserId; private String operationKey; - private List nodeDataBeans; + private List nodeDataBeans = new ArrayList<>(); + private List personBeans = new ArrayList<>(); @Override protected void setupTopBarLayout() { @@ -63,7 +65,31 @@ @Override protected void observeRequestState() { + caseViewModel.loadState.observe(this, new Observer() { + @Override + public void onChanged(LoadState loadState) { + if (loadState == LoadState.Loading) { + DialogHub.get().showLoading(DeptTodoDetailActivity.this, "获取数据中..."); + } else { + DialogHub.get().dismissLoading(); + } + } + }); + operateViewModel.loadState.observe(this, new Observer() { + @Override + public void onChanged(LoadState loadState) { + if (loadState == LoadState.Loading) { + DialogHub.get().showLoading(DeptTodoDetailActivity.this, "案卷处理中,请稍后..."); + } else if (loadState == LoadState.Success) { + DialogHub.get().dismissLoading(); + finish(); + } else { + StringHub.show(context, "处理失败,请重试"); + DialogHub.get().dismissLoading(); + } + } + }); } @Override @@ -71,13 +97,6 @@ id = getIntent().getStringExtra("id"); caseViewModel = new ViewModelProvider(this).get(CaseViewModel.class); caseViewModel.obtainCaseDetail(id); - - nodeViewModel = new ViewModelProvider(this).get(NodeViewModel.class); - operateViewModel = new ViewModelProvider(this).get(CaseOperateViewModel.class); - } - - @Override - public void initEvent() { caseViewModel.caseDetailModel.observe(this, new Observer() { @Override public void onChanged(CaseDetailBean resultBean) { @@ -162,20 +181,13 @@ //获取处置类型 nodeViewModel.obtainNextNode(String.valueOf(data.getCaseState())); - } - } - }); - caseViewModel.loadState.observe(this, new Observer() { - @Override - public void onChanged(LoadState loadState) { - if (loadState == LoadState.Loading) { - DialogHub.get().showLoading(DeptTodoDetailActivity.this, "获取数据中..."); - } else { - DialogHub.get().dismissLoading(); + //获取下级处置人员 + personViewModel.obtainSubordinatePerson(); } } }); + nodeViewModel = new ViewModelProvider(this).get(NodeViewModel.class); nodeViewModel.nodeModel.observe(this, new Observer() { @Override public void onChanged(CaseNextNodeBean resultBean) { @@ -196,6 +208,21 @@ } }); + personViewModel = new ViewModelProvider(this).get(PersonViewModel.class); + personViewModel.processPersonModel.observe(this, new Observer() { + @Override + public void onChanged(ProcessPersonBean resultBean) { + if (resultBean.getCode() == 200) { + personBeans = resultBean.getData(); + } + } + }); + + operateViewModel = new ViewModelProvider(this).get(CaseOperateViewModel.class); + } + + @Override + public void initEvent() { viewBinding.locationMapView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -221,6 +248,32 @@ CaseNextNodeBean.DataBean nodeBean = nodeDataBeans.get(position); changeState = String.valueOf(nodeBean.getNextState()); operationKey = nodeBean.getOperationKey(); + + if (viewBinding.optTypeView.getText().toString().equals("处置人员") || viewBinding.optTypeView.getText().toString().equals("返回处理")) { + viewBinding.handlePersonLayout.setVisibility(View.VISIBLE); + //获取处置人员列表 + viewBinding.handlePersonLayout.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + QMUIBottomSheet.BottomListSheetBuilder sheetBuilder = new QMUIBottomSheet.BottomListSheetBuilder(context); + sheetBuilder.setTitle("处置人员"); + for (ProcessPersonBean.DataBean dataBean : personBeans) { + sheetBuilder.addItem(dataBean.getName()); + } + sheetBuilder.setGravityCenter(true).setOnSheetItemClickListener(new QMUIBottomSheet.BottomListSheetBuilder.OnSheetItemClickListener() { + @Override + public void onClick(QMUIBottomSheet dialog, View itemView, int position, String tag) { + dialog.dismiss(); + + viewBinding.handlePersonView.setText(tag); + taskUserId = personBeans.get(position).getId(); + } + }).build().show(); + } + }); + } else { + viewBinding.handlePersonLayout.setVisibility(View.GONE); + } } }).build().show(); } @@ -259,21 +312,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, taskUserId); - } - }); - operateViewModel.loadState.observe(this, new Observer() { - @Override - public void onChanged(LoadState loadState) { - if (loadState == LoadState.Loading) { - DialogHub.get().showLoading(DeptTodoDetailActivity.this, "案卷处理中,请稍后..."); - } else if (loadState == LoadState.Success) { - DialogHub.get().dismissLoading(); - finish(); - } else { - StringHub.show(context, "处理失败,请重试"); - DialogHub.get().dismissLoading(); - } + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, taskUserId); } }); } diff --git a/app/src/main/java/com/casic/dcms/vm/CaseOperateViewModel.java b/app/src/main/java/com/casic/dcms/vm/CaseOperateViewModel.java index 35a0f49..0e611cb 100644 --- a/app/src/main/java/com/casic/dcms/vm/CaseOperateViewModel.java +++ b/app/src/main/java/com/casic/dcms/vm/CaseOperateViewModel.java @@ -302,9 +302,9 @@ }); } - public void dispatcherHandleCase(String processId, String bizId, String currState, String changeState, String remarks, String operationKey, String taskUserId) { + public void dispatcherHandleCase(String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId) { loadState.setValue(LoadState.Loading); - Observable observable = RetrofitServiceManager.getDispatcherHandleCaseResult(processId, bizId, currState, changeState, remarks, operationKey, taskUserId); + Observable observable = RetrofitServiceManager.getDispatcherHandleCaseResult(processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId); ObserverSubscriber.addSubscribe(observable, new OnObserverCallback() { @Override public void onCompleted() { diff --git a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java index c504007..ca5d45d 100644 --- a/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java +++ b/app/src/main/java/com/casic/dcms/fragment/handle/CaseTodoFragment.java @@ -85,10 +85,6 @@ } private void obtainHandleCaseList() { - /** - * isOvertime 否 String 是否超时,null-所有案卷,1-超时案卷 - * isEmergent 否 String 是否紧急,null-所有案卷,1-紧急案卷 - */ caseViewModel.obtainHandleCaseList(pageIndex, false); } diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java index fd30762..5c17f54 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitService.java @@ -548,6 +548,7 @@ @Field("currState") String currState, @Field("changeState") String changeState, @Field("remarks") String remarks, + @Field("approvalResult") String approvalResult, @Field("operationKey") String operationKey, @Field("taskUserId") String taskUserId ); diff --git a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java index a35ba05..3a450f6 100644 --- a/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java +++ b/app/src/main/java/com/casic/dcms/utils/retrofit/RetrofitServiceManager.java @@ -266,10 +266,9 @@ * http://xx.com/static/2019-10/8050891248624f2bbefedcb196ce89cb.jpeg */ public static Observable uploadImage(File image) { - RequestBody requestBody = RequestBody.create(MediaType.parse("image/png"), image); + RequestBody requestBody = RequestBody.create(image, MediaType.parse("image/png")); return api.uploadImage( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", image.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", image.getName(), requestBody) ); } @@ -277,10 +276,9 @@ * 上传案卷音频 */ public static Observable uploadAudio(File audio) { - RequestBody requestBody = RequestBody.create(MediaType.parse("audio/m4a"), audio); + RequestBody requestBody = RequestBody.create(audio, MediaType.parse("audio/m4a")); return api.uploadAudio( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", audio.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", audio.getName(), requestBody) ); } @@ -288,10 +286,9 @@ * 上传案卷视频 */ public static Observable uploadVideo(File video) { - RequestBody requestBody = RequestBody.create(MediaType.parse("video/mp4"), video); + RequestBody requestBody = RequestBody.create(video, MediaType.parse("video/mp4")); return api.uploadVideo( - AuthenticationHelper.getToken(), - MultipartBody.Part.createFormData("file", video.getName(), requestBody) + AuthenticationHelper.getToken(), MultipartBody.Part.createFormData("file", video.getName(), requestBody) ); } @@ -316,56 +313,42 @@ * 案卷处理分页查询,去掉三包类型的案卷 */ public static Observable handleCaseResult(int limit, int offset) { - return api.getHandleResult( - AuthenticationHelper.getToken(), "0", limit, offset - ); + return api.getHandleResult(AuthenticationHelper.getToken(), "0", limit, offset); } /** * 处理已办分页查询 */ public static Observable handledCaseResult(int offset) { - return api.getHandledResult( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.getHandledResult(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 紧急案件分页查询 */ public static Observable getUrgentCase(String isSupervise, int offset) { - return api.getUrgentCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getUrgentCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 超时案件分页查询 */ public static Observable getOvertimeCase(String isSupervise, int offset) { - return api.getOvertimeCase( - AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset - ); + return api.getOvertimeCase(AuthenticationHelper.getToken(), isSupervise, LocaleConstant.PAGE_LIMIT, offset); } /** * 在线人员查询 */ - public static Observable getOnlinePerson( - String deptid, String roleTips, String isOnLine - ) { + public static Observable getOnlinePerson(String deptid, String roleTips, String isOnLine) { return api.getOnlinePerson(AuthenticationHelper.getToken(), deptid, roleTips, isOnLine); } /** * 设备定位信息上传 */ - public static Observable getPositionUploadResult( - String imei, String positionLat, String positionLng - ) { - return api.uploadDevicePosition( - AuthenticationHelper.getToken(), imei, positionLat, positionLng - ); + public static Observable getPositionUploadResult(String imei, String positionLat, String positionLng) { + return api.uploadDevicePosition(AuthenticationHelper.getToken(), imei, positionLat, positionLng); } /** @@ -390,12 +373,10 @@ * 案卷核实-仅添加核实意见/核实情况/核实图片 */ public static Observable getHandleCaseResult( - String processId, String bizId, String currState, String changeState, String remarks, - String fileId + String processId, String bizId, String currState, String changeState, String remarks, String fileId ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId ); } @@ -409,8 +390,7 @@ String fileId, String approvalResult ) { return api.handleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - fileId, approvalResult + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, fileId, approvalResult ); } @@ -439,21 +419,17 @@ * 派遣员处理 */ public static Observable getDispatcherHandleCaseResult( - String processId, String bizId, String currState, String changeState, - String remarks, String operationKey, String taskUserId + String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId ) { return api.dispatcherHandleCase( - AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, - operationKey, taskUserId + AuthenticationHelper.getToken(), processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId ); } /** * 紧急要件-超时督办 */ - public static Observable getUpdateSuperviseResult( - String id, String superviseRemarks - ) { + public static Observable getUpdateSuperviseResult(String id, String superviseRemarks) { return api.updateSuperviseRemarks(AuthenticationHelper.getToken(), id, superviseRemarks); } @@ -482,24 +458,19 @@ * 公厕打扫签到 */ public static Observable getCleanToiletResult( - String toiletId, String userId, String lng, String lat, String startTime, String endTime, - String photo, String workContent + String toiletId, String userId, String lng, String lat, String startTime, String endTime, String photo, String workContent ) { return api.cleanToilet( - AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, - photo, workContent + AuthenticationHelper.getToken(), toiletId, userId, lng, lat, startTime, endTime, photo, workContent ); } /** * 公厕打扫记录 */ - public static Observable getCleanRecordResult( - String userId, String keywords, String beginDate, String endDate, int offset - ) { + public static Observable getCleanRecordResult(String userId, String keywords, String beginDate, String endDate, int offset) { return api.obtainToiletCleanRecord( - AuthenticationHelper.getToken(), userId, keywords, - beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), userId, keywords, beginDate, endDate, LocaleConstant.PAGE_LIMIT, offset ); } @@ -507,30 +478,24 @@ * 三包待办 */ public static Observable getPackageWorkListResult(String isShop, int offset) { - return api.obtainPackageWorkListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPackageWorkListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包已办 */ public static Observable getCompletedListResult(String isShop, int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), isShop, LocaleConstant.PAGE_LIMIT, offset); } /** * 三包处罚 */ public static Observable getHandlePackageResult( - String id, String punishType, String punishRemarks, String punishTime, - String punishImage + String id, String punishType, String punishRemarks, String punishTime, String punishImage ) { return api.handlePackageCase( - AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, - punishImage + AuthenticationHelper.getToken(), id, punishType, punishRemarks, punishTime, punishImage ); } @@ -538,12 +503,10 @@ * 商铺变更 */ public static Observable getShopChangeResult( - String merchantId, String merchantName, String contactName, String contactPhone, - String images + String merchantId, String merchantName, String contactName, String contactPhone, String images ) { return api.changeShopInfo( - AuthenticationHelper.getToken(), merchantId, "1", - merchantName, contactName, contactPhone, images, "1" + AuthenticationHelper.getToken(), merchantId, "1", merchantName, contactName, contactPhone, images, "1" ); } @@ -551,63 +514,49 @@ * 二级派遣员待办案卷 */ public static Observable getWorkListResult(int offset) { - return api.obtainWorkListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainWorkListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员待处理案卷 */ public static Observable getProcessListResult(int offset) { - return api.obtainProcessListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainProcessListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级派遣员已办案卷 */ public static Observable getCompletedListResult(int offset) { - return api.obtainCompletedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCompletedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级缓办待处理 */ public static Observable getPostponeListResult(int offset) { - return api.obtainPostponeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainPostponeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 二级延期待处理 */ public static Observable getDelayedListResult(int offset) { - return api.obtainDelayedListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainDelayedListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门授权审核 */ public static Observable getCaseAuthorizeResult(int offset) { - return api.obtainCaseAuthorizeListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAuthorizeListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** * 部门调整批示 */ public static Observable getCaseAdjustResult(int offset) { - return api.obtainCaseAdjustListPage( - AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset - ); + return api.obtainCaseAdjustListPage(AuthenticationHelper.getToken(), LocaleConstant.PAGE_LIMIT, offset); } /** @@ -628,23 +577,17 @@ * 桥梁新增打卡记录 */ public static Observable getAddMaintainRecordResult( - String bridgeId, String content, String maintainTime, String personId, - String longitude, String latitude, String description + String bridgeId, String content, String maintainTime, String personId, String longitude, String latitude, String description ) { return shopApi.addMaintainRecord( - AuthenticationHelper.getToken(), bridgeId, content, maintainTime, - personId, longitude, latitude, description); + AuthenticationHelper.getToken(), bridgeId, content, maintainTime, personId, longitude, latitude, description); } /** * 桥梁养护记录 */ - public static Observable getMaintainRecordResult( - String startDate, String endDate, int offset - ) { - return shopApi.obtainMaintainRecord( - AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset - ); + public static Observable getMaintainRecordResult(String startDate, String endDate, int offset) { + return shopApi.obtainMaintainRecord(AuthenticationHelper.getToken(), startDate, endDate, LocaleConstant.PAGE_LIMIT, offset); } /** @@ -672,9 +615,7 @@ /** * 控制路灯开关 */ - public static Observable getLightControlResult( - List lampIds, String controlType - ) { + public static Observable getLightControlResult(List lampIds, String controlType) { return shopApi.controlStreetLight(AuthenticationHelper.getToken(), lampIds, controlType); } @@ -688,18 +629,14 @@ /** * 单个取消报警 */ - public static Observable getCancelAlarmResult( - String id, String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String id, String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), id, jobStatus, handleMessage); } /** * 一键取消报警 */ - public static Observable getCancelAlarmResult( - String jobStatus, String handleMessage - ) { + public static Observable getCancelAlarmResult(String jobStatus, String handleMessage) { return shopApi.cancelAlarm(AuthenticationHelper.getToken(), jobStatus, handleMessage); } @@ -708,8 +645,7 @@ */ public static Observable getWellListResult(int offset) { return shopApi.obtainWellList( - AuthenticationHelper.getToken(), "wellCode", "asc", - LocaleConstant.PAGE_LIMIT, offset + AuthenticationHelper.getToken(), "wellCode", "asc", LocaleConstant.PAGE_LIMIT, offset ); } diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java index 1765c7a..5fd496f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAdjustDetailActivity.java @@ -257,7 +257,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, data.getProcessPersonid()); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java index e3f4600..68ce21f 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptAuthorizeDetailActivity.java @@ -328,7 +328,7 @@ taskUserId = data.getProcessPersonid(); } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, taskUserId); } }); diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java index 3c5c6da..01cf41d 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptHandleActivity.java @@ -45,11 +45,11 @@ List fragmentList = new ArrayList<>(); fragmentList.add(new DeptCaseTodoFragment()); //待办任务 fragmentList.add(new DeptCaseProcessFragment()); //待处理 - fragmentList.add(new DeptCaseHandledFragment()); //已处理 fragmentList.add(new DeptCaseAdjustFragment()); //部门调整 - fragmentList.add(new DeptCaseAuthorizeFragment()); //部门授权 fragmentList.add(new DeptCasePostponeFragment()); //二级缓办 + fragmentList.add(new DeptCaseAuthorizeFragment()); //部门授权 fragmentList.add(new DeptCaseDelayedFragment()); //二级延期 + fragmentList.add(new DeptCaseHandledFragment()); //已处理 SubViewPagerAdapter adapter = new SubViewPagerAdapter(getSupportFragmentManager(), LocaleConstant.DEPT_PAGE_TITLES, fragmentList); viewBinding.viewPager.setAdapter(adapter); //绑定TabLayout diff --git a/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java b/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java index 92a578b..73308b6 100644 --- a/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java +++ b/app/src/main/java/com/casic/dcms/view/department/DeptTodoDetailActivity.java @@ -22,6 +22,7 @@ import com.casic.dcms.vm.CaseOperateViewModel; import com.casic.dcms.vm.CaseViewModel; import com.casic.dcms.vm.NodeViewModel; +import com.casic.dcms.vm.PersonViewModel; import com.gyf.immersionbar.ImmersionBar; import com.pengxh.androidx.lite.adapter.ReadOnlyImageAdapter; import com.pengxh.androidx.lite.base.AndroidxBaseActivity; @@ -43,13 +44,14 @@ private CaseViewModel caseViewModel; private NodeViewModel nodeViewModel; private CaseOperateViewModel operateViewModel; + private PersonViewModel personViewModel; private CaseDetailBean.DataBean data = new CaseDetailBean.DataBean(); - private List personBeans; private String id; private String changeState; private String taskUserId; private String operationKey; - private List nodeDataBeans; + private List nodeDataBeans = new ArrayList<>(); + private List personBeans = new ArrayList<>(); @Override protected void setupTopBarLayout() { @@ -63,7 +65,31 @@ @Override protected void observeRequestState() { + caseViewModel.loadState.observe(this, new Observer() { + @Override + public void onChanged(LoadState loadState) { + if (loadState == LoadState.Loading) { + DialogHub.get().showLoading(DeptTodoDetailActivity.this, "获取数据中..."); + } else { + DialogHub.get().dismissLoading(); + } + } + }); + operateViewModel.loadState.observe(this, new Observer() { + @Override + public void onChanged(LoadState loadState) { + if (loadState == LoadState.Loading) { + DialogHub.get().showLoading(DeptTodoDetailActivity.this, "案卷处理中,请稍后..."); + } else if (loadState == LoadState.Success) { + DialogHub.get().dismissLoading(); + finish(); + } else { + StringHub.show(context, "处理失败,请重试"); + DialogHub.get().dismissLoading(); + } + } + }); } @Override @@ -71,13 +97,6 @@ id = getIntent().getStringExtra("id"); caseViewModel = new ViewModelProvider(this).get(CaseViewModel.class); caseViewModel.obtainCaseDetail(id); - - nodeViewModel = new ViewModelProvider(this).get(NodeViewModel.class); - operateViewModel = new ViewModelProvider(this).get(CaseOperateViewModel.class); - } - - @Override - public void initEvent() { caseViewModel.caseDetailModel.observe(this, new Observer() { @Override public void onChanged(CaseDetailBean resultBean) { @@ -162,20 +181,13 @@ //获取处置类型 nodeViewModel.obtainNextNode(String.valueOf(data.getCaseState())); - } - } - }); - caseViewModel.loadState.observe(this, new Observer() { - @Override - public void onChanged(LoadState loadState) { - if (loadState == LoadState.Loading) { - DialogHub.get().showLoading(DeptTodoDetailActivity.this, "获取数据中..."); - } else { - DialogHub.get().dismissLoading(); + //获取下级处置人员 + personViewModel.obtainSubordinatePerson(); } } }); + nodeViewModel = new ViewModelProvider(this).get(NodeViewModel.class); nodeViewModel.nodeModel.observe(this, new Observer() { @Override public void onChanged(CaseNextNodeBean resultBean) { @@ -196,6 +208,21 @@ } }); + personViewModel = new ViewModelProvider(this).get(PersonViewModel.class); + personViewModel.processPersonModel.observe(this, new Observer() { + @Override + public void onChanged(ProcessPersonBean resultBean) { + if (resultBean.getCode() == 200) { + personBeans = resultBean.getData(); + } + } + }); + + operateViewModel = new ViewModelProvider(this).get(CaseOperateViewModel.class); + } + + @Override + public void initEvent() { viewBinding.locationMapView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -221,6 +248,32 @@ CaseNextNodeBean.DataBean nodeBean = nodeDataBeans.get(position); changeState = String.valueOf(nodeBean.getNextState()); operationKey = nodeBean.getOperationKey(); + + if (viewBinding.optTypeView.getText().toString().equals("处置人员") || viewBinding.optTypeView.getText().toString().equals("返回处理")) { + viewBinding.handlePersonLayout.setVisibility(View.VISIBLE); + //获取处置人员列表 + viewBinding.handlePersonLayout.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + QMUIBottomSheet.BottomListSheetBuilder sheetBuilder = new QMUIBottomSheet.BottomListSheetBuilder(context); + sheetBuilder.setTitle("处置人员"); + for (ProcessPersonBean.DataBean dataBean : personBeans) { + sheetBuilder.addItem(dataBean.getName()); + } + sheetBuilder.setGravityCenter(true).setOnSheetItemClickListener(new QMUIBottomSheet.BottomListSheetBuilder.OnSheetItemClickListener() { + @Override + public void onClick(QMUIBottomSheet dialog, View itemView, int position, String tag) { + dialog.dismiss(); + + viewBinding.handlePersonView.setText(tag); + taskUserId = personBeans.get(position).getId(); + } + }).build().show(); + } + }); + } else { + viewBinding.handlePersonLayout.setVisibility(View.GONE); + } } }).build().show(); } @@ -259,21 +312,7 @@ return; } operateViewModel.dispatcherHandleCase(data.getProcessId(), id, - String.valueOf(data.getCaseState()), changeState, optionInput, operationKey, taskUserId); - } - }); - operateViewModel.loadState.observe(this, new Observer() { - @Override - public void onChanged(LoadState loadState) { - if (loadState == LoadState.Loading) { - DialogHub.get().showLoading(DeptTodoDetailActivity.this, "案卷处理中,请稍后..."); - } else if (loadState == LoadState.Success) { - DialogHub.get().dismissLoading(); - finish(); - } else { - StringHub.show(context, "处理失败,请重试"); - DialogHub.get().dismissLoading(); - } + String.valueOf(data.getCaseState()), changeState, optionInput, "", operationKey, taskUserId); } }); } diff --git a/app/src/main/java/com/casic/dcms/vm/CaseOperateViewModel.java b/app/src/main/java/com/casic/dcms/vm/CaseOperateViewModel.java index 35a0f49..0e611cb 100644 --- a/app/src/main/java/com/casic/dcms/vm/CaseOperateViewModel.java +++ b/app/src/main/java/com/casic/dcms/vm/CaseOperateViewModel.java @@ -302,9 +302,9 @@ }); } - public void dispatcherHandleCase(String processId, String bizId, String currState, String changeState, String remarks, String operationKey, String taskUserId) { + public void dispatcherHandleCase(String processId, String bizId, String currState, String changeState, String remarks, String approvalResult, String operationKey, String taskUserId) { loadState.setValue(LoadState.Loading); - Observable observable = RetrofitServiceManager.getDispatcherHandleCaseResult(processId, bizId, currState, changeState, remarks, operationKey, taskUserId); + Observable observable = RetrofitServiceManager.getDispatcherHandleCaseResult(processId, bizId, currState, changeState, remarks, approvalResult, operationKey, taskUserId); ObserverSubscriber.addSubscribe(observable, new OnObserverCallback() { @Override public void onCompleted() { diff --git a/app/src/main/res/layout/activity_dept_todo.xml b/app/src/main/res/layout/activity_dept_todo.xml index 237c89d..b518c6d 100644 --- a/app/src/main/res/layout/activity_dept_todo.xml +++ b/app/src/main/res/layout/activity_dept_todo.xml @@ -228,6 +228,33 @@ style="@style/rightImageStyle" /> + + + + + + + + + + + + + +