diff --git a/src/main/java/com/cm/systemcity/controller/apis/reportcase/ReportCaseController.java b/src/main/java/com/cm/systemcity/controller/apis/reportcase/ReportCaseController.java index 3de7845..5c28c4d 100755 --- a/src/main/java/com/cm/systemcity/controller/apis/reportcase/ReportCaseController.java +++ b/src/main/java/com/cm/systemcity/controller/apis/reportcase/ReportCaseController.java @@ -466,4 +466,30 @@ public class ReportCaseController extends AbstractController { return reportCaseService.updateReportCaseException(params); } + @ApiOperation(value = "异常案件重新受理", notes = "异常案件重新受理") + @ApiImplicitParams({ + @ApiImplicitParam(name = "caseId", value = "案件ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save-exception-accept-again/{caseId}") + public SuccessResult saveExceptionAcceptAgain(@PathVariable("caseId") String caseId, + @RequestBody ReportCaseAcceptVO reportCaseAcceptVO) throws ParamsException, SaveException, UpdateException { + Map params = getParams(); + params.put("caseId", caseId); + params.put("acceptStatus", reportCaseAcceptVO.getAcceptStatus()); + + if (StringUtils.isBlank(reportCaseAcceptVO.getCommunityBossId())) { + throw new ParamsException("片区网格长ID不能为空"); + } + params.put("communityBossId", reportCaseAcceptVO.getCommunityBossId()); + if (StringUtils.isBlank(reportCaseAcceptVO.getCommunityBossName())) { + throw new ParamsException("片区网格长名称不能为空"); + } + params.put("communityBossName", reportCaseAcceptVO.getCommunityBossName()); + if (StringUtils.isBlank(reportCaseAcceptVO.getAcceptOpinion())) { + throw new ParamsException("受理意见不能为空"); + } + params.put("acceptOpinion", reportCaseAcceptVO.getAcceptOpinion()); + return reportCaseService.saveExceptionAcceptAgain(params); + } } diff --git a/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java b/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java index c9e6a86..b1394d3 100755 --- a/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java +++ b/src/main/java/com/cm/systemcity/service/reportcase/IReportCaseService.java @@ -426,4 +426,10 @@ public interface IReportCaseService { */ List> getReportCaseCommunityOverseer(Map params); + /** + * 重新受理异常案件 + * @param params + * @return + */ + SuccessResult saveExceptionAcceptAgain(Map params); } diff --git a/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java b/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java index 5f169b9..4deb857 100755 --- a/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/reportcase/impl/ReportCaseServiceImpl.java @@ -1485,4 +1485,40 @@ public class ReportCaseServiceImpl extends BaseService implements IReportCaseSer } return resultList; } + + @Override + public SuccessResult saveExceptionAcceptAgain(Map params) { + Map reportCaseParams = new HashMap<>(); + // 将案件状态重新更改为受理 + String caseId = params.get("caseId").toString(); + reportCaseParams.put("reportCaseId", caseId); + reportCaseParams.put("caseStatus", 1); + setUpdateInfo(reportCaseParams); + reportCaseDao.updateReportCase(reportCaseParams); + // 删除受理、立案、下派、处理表的历史记录 + Map removeMap = new HashMap<>(); + removeMap.put("caseId",caseId); + reportCaseDao.removeReportCaseAccept(removeMap); + reportCaseDao.removeReportCaseRegister(removeMap); + reportCaseDao.removeReportCaseAssign(removeMap); + reportCaseDao.removeReportCaseHandle(removeMap); + // 受理表中添加受理记录 + params.put("isRegister", 0); + params.put("acceptStatus", 1); + params.put("acceptUserName", securityComponent.getCurrentUser().getUserName()); + setSaveInfo(params); + reportCaseDao.saveReportCaseAccept(params); + // 新增重新受理日志 + Map caseLogParams = new HashMap<>(); + caseLogParams.put("caseId", params.get("caseId")); + caseLogParams.put("userOpinion", params.get("acceptOpinion")); + caseLogParams.put("optionType", "异常案件重新受理"); + caseLogParams.put("handleStatus", 1); + addReportCaseLog(caseLogParams); + // 自动进行立案 + params.clear(); + params.put("caseId", caseId); + params.put("registerOpinion", "自动立案"); + return saveReportCaseRegister(params); + } } \ No newline at end of file diff --git a/src/main/resources/static/route/reportcase/case_accept_again.html b/src/main/resources/static/route/reportcase/case_accept_again.html new file mode 100644 index 0000000..edefaa5 --- /dev/null +++ b/src/main/resources/static/route/reportcase/case_accept_again.html @@ -0,0 +1,189 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/reportcase/list_exception.html b/src/main/resources/static/route/reportcase/list_exception.html index 2a96292..2ce130c 100755 --- a/src/main/resources/static/route/reportcase/list_exception.html +++ b/src/main/resources/static/route/reportcase/list_exception.html @@ -414,7 +414,7 @@ area: ['40%', '70%'], shadeClose: true, anim: 2, - content: top.restAjax.path('route/reportcase/case_accept.html?reportCaseId={id}', + content: top.restAjax.path('route/reportcase/case_accept_again.html?reportCaseId={id}', [obj.data.reportCaseId]), end: function() { reloadTable()