diff --git a/src/main/java/cn/com/tenlion/controller/api/countbase/CountAreaController.java b/src/main/java/cn/com/tenlion/controller/api/countbase/CountAreaController.java index 33b0b94..b9982aa 100644 --- a/src/main/java/cn/com/tenlion/controller/api/countbase/CountAreaController.java +++ b/src/main/java/cn/com/tenlion/controller/api/countbase/CountAreaController.java @@ -45,6 +45,29 @@ public class CountAreaController extends DefaultBaseController { @Autowired private UserUtil userUtil; + @ApiOperation(value = "区域未完成事件统计", notes = "区域未完成事件统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count-case-nocomplete") + SuccessResultData countAreaNoComplete(){ + UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class); + if(expandData == null || StringUtils.isBlank(expandData.getAreaCode())){ + return new SuccessResultData<>(0); + } + String s = userUtil.areaCodeFormat(expandData.getAreaCode()); + return new SuccessResultData<>(countAreaService.countAreaNoComplete(s)); + } + + @ApiOperation(value = "区域完成事件统计", notes = "区域完成事件统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count-case-complete") + SuccessResultData countAreaComplete(){ + UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class); + if(expandData == null || StringUtils.isBlank(expandData.getAreaCode())){ + return new SuccessResultData<>(0); + } + String s = userUtil.areaCodeFormat(expandData.getAreaCode()); + return new SuccessResultData<>(countAreaService.countAreaComplete(s)); + } @ApiOperation(value = "区域案件统计", notes = "区域案件统计接口") diff --git a/src/main/java/cn/com/tenlion/controller/api/evaluate/EvaluateController.java b/src/main/java/cn/com/tenlion/controller/api/evaluate/EvaluateController.java index 8ad2a78..3a7facb 100644 --- a/src/main/java/cn/com/tenlion/controller/api/evaluate/EvaluateController.java +++ b/src/main/java/cn/com/tenlion/controller/api/evaluate/EvaluateController.java @@ -34,6 +34,18 @@ public class EvaluateController extends DefaultBaseController { @Autowired private IEvaluateService evaluateService; + + @ApiOperation(value = "事件评价详情", notes = "事件评价详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "evaluateId", value = "事件评价ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get-byreportid/{reportId}") + public EvaluateDTO getByReportId(@PathVariable("reportId") String reportId) { + return evaluateService.getByReportId(reportId); + } + + @ApiOperation(value = "新增事件评价", notes = "新增事件评价接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save") diff --git a/src/main/java/cn/com/tenlion/controller/api/handle/HandleController.java b/src/main/java/cn/com/tenlion/controller/api/handle/HandleController.java index d9a5083..5c5a5f8 100644 --- a/src/main/java/cn/com/tenlion/controller/api/handle/HandleController.java +++ b/src/main/java/cn/com/tenlion/controller/api/handle/HandleController.java @@ -36,6 +36,18 @@ public class HandleController extends DefaultBaseController { private IHandleService handleService; + @ApiOperation(value = "事件处理详情(根据任务ID)", notes = "事件处理详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "handleId", value = "事件处理ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get-bytaskid/{taskId}") + public HandleDTO getByTaskId(@PathVariable("taskId") String taskId) { + return handleService.getByTaskId(taskId); + } + + + @ApiOperation(value = "新增事件处理", notes = "新增事件处理接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save") diff --git a/src/main/java/cn/com/tenlion/controller/api/report/ReportController.java b/src/main/java/cn/com/tenlion/controller/api/report/ReportController.java index 05b6873..ab827db 100644 --- a/src/main/java/cn/com/tenlion/controller/api/report/ReportController.java +++ b/src/main/java/cn/com/tenlion/controller/api/report/ReportController.java @@ -2,7 +2,9 @@ package cn.com.tenlion.controller.api.report; import cn.com.tenlion.enums.report.HandleStatusEnum; import cn.com.tenlion.enums.report.ReportSourceEnum; +import cn.com.tenlion.pojo.bos.userexpand.UserExpandBO; import cn.com.tenlion.pojo.vos.report.HandleStatusVO; +import cn.com.tenlion.service.activitibase.IActivitiBaseService; import cn.com.tenlion.service.reportlog.IReportLogService; import ink.wgink.annotation.CheckRequestBodyAnnotation; import ink.wgink.common.base.DefaultBaseController; @@ -39,6 +41,21 @@ public class ReportController extends DefaultBaseController { @Autowired private IReportService reportService; + @Autowired + private SecurityComponent securityComponent; + @Autowired + private IActivitiBaseService activitiBaseService; + + + @ApiOperation(value = "获取事件的实例ID", notes = "获取事件的实例ID接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "reportId", value = "事件上报ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("getbuinessid/{reportId}") + public SuccessResultData getBuinessId(@PathVariable("reportId") String reportId) { + return new SuccessResultData<>(activitiBaseService.getProcessInstanceId(reportId)); + } @ApiOperation(value = "新增事件上报", notes = "新增事件上报接口") @@ -69,7 +86,6 @@ public class ReportController extends DefaultBaseController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("get/{reportId}") public ReportDTO get(@PathVariable("reportId") String reportId) { - return reportService.get(reportId); } @@ -106,9 +122,50 @@ public class ReportController extends DefaultBaseController { } + @ApiOperation(value = "区域完成事件分页列表", notes = "区域完成事件分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage-area-complete") + public SuccessResultList> listPageAreaComplete(ListPage page) { + UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class); + Map params = requestParams(); + page.setParams(params); + List handleStatuss = new ArrayList<>(); + handleStatuss.add(HandleStatusEnum.CASE_CLOSED.getValue()); + handleStatuss.add(HandleStatusEnum.FORCED_END.getValue()); + params.put("handleStatuss",handleStatuss); + return reportService.listPageArea(page,expandData == null ? "-1" : expandData.getAreaCode()); + } - + @ApiOperation(value = "区域未完成事件分页列表", notes = "区域未完成事件分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage-area-nocomplete") + public SuccessResultList> listPageAreaNoComplete(ListPage page) { + UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class); + Map params = requestParams(); + page.setParams(params); + List handleStatuss = new ArrayList<>(); + handleStatuss.add(HandleStatusEnum.REGISTER.getValue()); + handleStatuss.add(HandleStatusEnum.DISPATCH.getValue()); + handleStatuss.add(HandleStatusEnum.TREATMENT.getValue()); + handleStatuss.add(HandleStatusEnum.EXAMINE.getValue()); + params.put("handleStatuss",handleStatuss); + return reportService.listPageArea(page,expandData == null ? "-1" : expandData.getAreaCode()); + } diff --git a/src/main/java/cn/com/tenlion/controller/api/taskcompletebase/TaskCompleteBaseController.java b/src/main/java/cn/com/tenlion/controller/api/taskcompletebase/TaskCompleteBaseController.java index 738c484..676b910 100644 --- a/src/main/java/cn/com/tenlion/controller/api/taskcompletebase/TaskCompleteBaseController.java +++ b/src/main/java/cn/com/tenlion/controller/api/taskcompletebase/TaskCompleteBaseController.java @@ -34,37 +34,34 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件受理", notes = "事件受理接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "null", value = "null", paramType = "header"), @ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-accept/{reportId}") - public SuccessResult accept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { + public SuccessResult saveAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { taskCompleteBase.saveAccept(null,completeVO,reportId); return new SuccessResult(); } @ApiOperation(value = "事件不予受理", notes = "事件不予受理接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "null", value = "null", paramType = "header"), @ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-noaccept/{reportId}") - public SuccessResult noAccept( @PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { + public SuccessResult saveNoAccept( @PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { taskCompleteBase.saveNoAccept(null,completeVO,reportId); return new SuccessResult(); } @ApiOperation(value = "事件上报", notes = "事件上报接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "null", value = "null", paramType = "header"), @ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-report/{reportId}") - public SuccessResult report(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { + public SuccessResult saveReport(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { taskCompleteBase.saveReport(null,completeVO,reportId); return new SuccessResult(); } @@ -72,12 +69,11 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件分拨", notes = "事件分拨接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "null", value = "null", paramType = "header"), @ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save-allocate/{reportId}") - public SuccessResult allocate( @PathVariable("reportId") String reportId, @RequestBody DistributionVO distributionVO){ + public SuccessResult saveAllocate( @PathVariable("reportId") String reportId, @RequestBody DistributionVO distributionVO){ taskCompleteBase.saveAllocate(null,reportId,distributionVO); return new SuccessResult(); } @@ -85,24 +81,22 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件分拨确认受理", notes = "事件分拨确认受理接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "distributionUserId", value = "distributionUserId", paramType = "分拨用户ID") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-allocatesure-accept/{reportId}") - public SuccessResult allocateSureAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { + public SuccessResult saveAllocateSureAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { taskCompleteBase.saveAllocateSureAccept(null,reportId,completeVO); return new SuccessResult(); } @ApiOperation(value = "事件分拨确认不受理", notes = "事件分拨确认不受理接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "distributionUserId", value = "distributionUserId", paramType = "分拨用户ID") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-allocatesure-noaccept/{reportId}") - public SuccessResult allocateSureNoAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { + public SuccessResult saveAllocateSureNoAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) { taskCompleteBase.saveAllocateSureNoAccept(null,reportId,completeVO); return new SuccessResult(); } @@ -112,12 +106,11 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件派遣", notes = "事件派遣接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "RequestHeader", value = "分拨用户ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save-dispatch/{reportId}") - public SuccessResult dispatch(@PathVariable("reportId") String reportId, @RequestBody DispatchVO dispatchVO){ + public SuccessResult saveDispatch(@PathVariable("reportId") String reportId, @RequestBody DispatchVO dispatchVO){ taskCompleteBase.saveDispatch(null,reportId,dispatchVO); return new SuccessResult(); } @@ -125,12 +118,11 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件派遣处理", notes = "事件派遣处理接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save-dispatch-handle/{reportId}") - public SuccessResult dispatchHandle(@PathVariable("reportId") String reportId, @RequestBody HandleVO handleVO){ + public SuccessResult saveDispatchHandle(@PathVariable("reportId") String reportId, @RequestBody HandleVO handleVO){ taskCompleteBase.saveDispatchHandle(null,reportId,handleVO); return new SuccessResult(); } @@ -138,24 +130,22 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件派遣回退", notes = "事件派遣回退接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-dispatch-handle/{reportId}") - public SuccessResult dispatchRollBack(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){ + public SuccessResult saveDispatchRollBack(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){ taskCompleteBase.saveDispatchRollBack(null,reportId,completeVO); return new SuccessResult(); } @ApiOperation(value = "事件派遣延期申请", notes = "事件派遣延期申请接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-dispatch-delayapply/{reportId}") - public SuccessResult disparchDelayApply(@PathVariable("reportId") String reportId, @RequestBody DelayApplyVO delayApplyVO){ + public SuccessResult saveDisparchDelayApply(@PathVariable("reportId") String reportId, @RequestBody DelayApplyVO delayApplyVO){ taskCompleteBase.saveDisparchDelayApply(null,reportId,delayApplyVO); return new SuccessResult(); } @@ -163,12 +153,11 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件派遣核查通过", notes = "事件派遣核查通过接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-dispatch-he-pass/{reportId}") - public SuccessResult dispatchHEPass(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){ + public SuccessResult saveDispatchHEPass(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){ taskCompleteBase.saveDispatchHEPass(null,reportId,completeVO); return new SuccessResult(); } @@ -176,12 +165,11 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件派遣核查不通过", notes = "事件派遣核查不通过接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PutMapping("update-dispatch-he-nopass/{reportId}") - public SuccessResult dispatchHENoPass(@PathVariable("reportId") String reportId, + public SuccessResult saveDispatchHENoPass(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){ taskCompleteBase.saveDispatchHENoPass(null,reportId,completeVO); return new SuccessResult(); @@ -192,12 +180,11 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件核查通过", notes = "事件核查通过") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save-examinepass/{reportId}") - public SuccessResult examinePass(@PathVariable("reportId") String reportId, @RequestBody CheckVO checkVO){ + public SuccessResult saveExaminePass(@PathVariable("reportId") String reportId, @RequestBody CheckVO checkVO){ taskCompleteBase.saveExaminePass(null,reportId,checkVO); return new SuccessResult(); } @@ -206,21 +193,27 @@ public class TaskCompleteBaseController { @ApiOperation(value = "事件核查不通过", notes = "事件核查不通过") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save-examinenopass/{reportId}") - public SuccessResult examineNoPass(@PathVariable("reportId") String reportId, @RequestBody CheckVO checkVO){ + public SuccessResult saveExamineNoPass(@PathVariable("reportId") String reportId, @RequestBody CheckVO checkVO){ taskCompleteBase.saveExamineNoPass(null,reportId,checkVO); return new SuccessResult(); } - - - + @ApiOperation(value = "强制结束实例", notes = "强制结束实例") + @ApiImplicitParams({ + @ApiImplicitParam(name = "instanceld", value = "实例ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("over-instance/{instanceld}") + public SuccessResult updateInstanceOver(@PathVariable("instanceld") String instanceld,@RequestBody String overExplain){ + taskCompleteBase.updateInstanceOver(null,instanceld,overExplain); + return new SuccessResult(); + } diff --git a/src/main/java/cn/com/tenlion/enums/report/HandleStatusEnum.java b/src/main/java/cn/com/tenlion/enums/report/HandleStatusEnum.java index 3191025..6e26b18 100644 --- a/src/main/java/cn/com/tenlion/enums/report/HandleStatusEnum.java +++ b/src/main/java/cn/com/tenlion/enums/report/HandleStatusEnum.java @@ -9,7 +9,8 @@ public enum HandleStatusEnum { DISPATCH("DISPATCH","派遣阶段"), TREATMENT("TREATMENT","处置阶段"), EXAMINE("EXAMINE","核查阶段"), - CASE_CLOSED("CASE_CLOSED","结案"); + CASE_CLOSED("CASE_CLOSED","结案"), + FORCED_END("FORCED_END","强制结束"); diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/reportlog/ReportLogActivityDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/reportlog/ReportLogActivityDTO.java index 4574dd6..0993f87 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/reportlog/ReportLogActivityDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/reportlog/ReportLogActivityDTO.java @@ -12,6 +12,8 @@ public class ReportLogActivityDTO { private String nodeId; @ApiModelProperty(name = "nodeName", value = "节点名称") private String nodeName; + @ApiModelProperty(name = "nodeType", value = "节点类型") + private String nodeType; @ApiModelProperty(name = "nodeUserName", value = "节点处理用户") private String nodeUserName; @ApiModelProperty(name = "nodeUserDeptName", value = "节点处理用户部门名称") @@ -55,6 +57,14 @@ public class ReportLogActivityDTO { this.nodeName = nodeName; } + public String getNodeType() { + return nodeType; + } + + public void setNodeType(String nodeType) { + this.nodeType = nodeType; + } + public String getNodeUserName() { return nodeUserName; } diff --git a/src/main/java/cn/com/tenlion/service/activitibase/impl/ActivitiBaseServiceImpl.java b/src/main/java/cn/com/tenlion/service/activitibase/impl/ActivitiBaseServiceImpl.java index 4e132f9..0851013 100644 --- a/src/main/java/cn/com/tenlion/service/activitibase/impl/ActivitiBaseServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/activitibase/impl/ActivitiBaseServiceImpl.java @@ -105,8 +105,6 @@ public class ActivitiBaseServiceImpl extends DefaultBaseService implements IActi public ProcessInstance getInstance(String instanceId){ ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(instanceId).singleResult(); - - return pi; } diff --git a/src/main/java/cn/com/tenlion/service/casestatistics/impl/ICaseStatisticsServiceImpl.java b/src/main/java/cn/com/tenlion/service/casestatistics/impl/ICaseStatisticsServiceImpl.java index 4b39cee..e3be949 100644 --- a/src/main/java/cn/com/tenlion/service/casestatistics/impl/ICaseStatisticsServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/casestatistics/impl/ICaseStatisticsServiceImpl.java @@ -10,8 +10,8 @@ import ink.wgink.common.component.SecurityComponent; import ink.wgink.exceptions.SearchException; import ink.wgink.interfaces.department.IDepartmentBaseService; import ink.wgink.module.dictionary.pojo.dtos.AreaDTO; -import ink.wgink.module.dictionary.service.IAreaService; import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager; +import ink.wgink.mongo.module.dictionary.service.IMongoAreaService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.dtos.department.DepartmentDTO; import ink.wgink.pojo.result.SuccessResultData; @@ -36,7 +36,7 @@ import java.util.Map; public class ICaseStatisticsServiceImpl extends DefaultBaseService implements ICaseStatisticsService { @Autowired - private IAreaService areaService; + private IMongoAreaService areaService; @Autowired private IDepartmentBaseService iDepartmentBaseService; @Autowired diff --git a/src/main/java/cn/com/tenlion/service/distribution/IDistributionService.java b/src/main/java/cn/com/tenlion/service/distribution/IDistributionService.java index 4b68a69..934f512 100644 --- a/src/main/java/cn/com/tenlion/service/distribution/IDistributionService.java +++ b/src/main/java/cn/com/tenlion/service/distribution/IDistributionService.java @@ -24,6 +24,8 @@ import java.util.Map; **/ public interface IDistributionService { + void saveByTask(String token,String distributionId,String reportId,DistributionVO distributionVO); + /** * diff --git a/src/main/java/cn/com/tenlion/service/distribution/impl/DistributionServiceImpl.java b/src/main/java/cn/com/tenlion/service/distribution/impl/DistributionServiceImpl.java index e392372..422016c 100644 --- a/src/main/java/cn/com/tenlion/service/distribution/impl/DistributionServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/distribution/impl/DistributionServiceImpl.java @@ -160,6 +160,19 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist return distributionId; } + + public void saveByTask(String token,String distributionId,String reportId,DistributionVO distributionVO){ + Map params = HashMapUtil.beanToMap(distributionVO); + params.put("distributionId", distributionId); + params.put("reportId", reportId); + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + distributionDao.save(params); + } + @Override public void remove(List ids) { remove(null, ids); diff --git a/src/main/java/cn/com/tenlion/service/efficiencyarea/impl/EfficiencyAreaServiceImpl.java b/src/main/java/cn/com/tenlion/service/efficiencyarea/impl/EfficiencyAreaServiceImpl.java index 7a52c08..c9cdee4 100644 --- a/src/main/java/cn/com/tenlion/service/efficiencyarea/impl/EfficiencyAreaServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/efficiencyarea/impl/EfficiencyAreaServiceImpl.java @@ -3,7 +3,7 @@ package cn.com.tenlion.service.efficiencyarea.impl; import cn.com.tenlion.service.report.IReportService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.module.dictionary.pojo.dtos.AreaDTO; -import ink.wgink.module.dictionary.service.IAreaService; +import ink.wgink.mongo.module.dictionary.service.IMongoAreaService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; @@ -37,7 +37,7 @@ public class EfficiencyAreaServiceImpl extends DefaultBaseService implements IEf @Autowired private IEfficiencyAreaDao efficiencyAreaDao; @Autowired - private IAreaService areaService; + private IMongoAreaService areaService; @Autowired private IReportService reportService; diff --git a/src/main/java/cn/com/tenlion/service/evaluate/impl/EvaluateServiceImpl.java b/src/main/java/cn/com/tenlion/service/evaluate/impl/EvaluateServiceImpl.java index 9f8174a..d9f8106 100644 --- a/src/main/java/cn/com/tenlion/service/evaluate/impl/EvaluateServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/evaluate/impl/EvaluateServiceImpl.java @@ -130,6 +130,8 @@ public class EvaluateServiceImpl extends DefaultBaseService implements IEvaluate return evaluateDao.get(params); } + + @Override public EvaluateDTO get(String evaluateId) { Map params = super.getHashMap(2); diff --git a/src/main/java/cn/com/tenlion/service/gridmember/impl/GridMemberServiceImpl.java b/src/main/java/cn/com/tenlion/service/gridmember/impl/GridMemberServiceImpl.java index f8afd77..e7bf7eb 100644 --- a/src/main/java/cn/com/tenlion/service/gridmember/impl/GridMemberServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/gridmember/impl/GridMemberServiceImpl.java @@ -3,7 +3,7 @@ package cn.com.tenlion.service.gridmember.impl; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SaveException; import ink.wgink.module.dictionary.pojo.dtos.AreaDTO; -import ink.wgink.module.dictionary.service.IAreaService; +import ink.wgink.mongo.module.dictionary.service.IMongoAreaService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; @@ -36,7 +36,7 @@ public class GridMemberServiceImpl extends DefaultBaseService implements IGridMe @Autowired private IGridMemberDao gridMemberDao; @Autowired - private IAreaService areaService; + private IMongoAreaService areaService; diff --git a/src/main/java/cn/com/tenlion/service/parts/impl/PartsServiceImpl.java b/src/main/java/cn/com/tenlion/service/parts/impl/PartsServiceImpl.java index 7e2c993..779a199 100644 --- a/src/main/java/cn/com/tenlion/service/parts/impl/PartsServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/parts/impl/PartsServiceImpl.java @@ -7,10 +7,8 @@ import cn.com.tenlion.service.caseparts.ICasePartsService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.ParamsException; import ink.wgink.exceptions.SaveException; -import ink.wgink.module.dictionary.pojo.dtos.AreaDTO; -import ink.wgink.module.dictionary.service.IAreaService; +import ink.wgink.mongo.module.dictionary.service.IMongoAreaService; import ink.wgink.pojo.ListPage; -import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.date.DateUtil; import ink.wgink.util.map.HashMapUtil; @@ -42,7 +40,7 @@ public class PartsServiceImpl extends DefaultBaseService implements IPartsServic @Autowired private IPartsDao partsDao; @Autowired - private IAreaService areaService; + private IMongoAreaService areaService; @Autowired private ICasePartsService casePartsService; diff --git a/src/main/java/cn/com/tenlion/service/report/IReportService.java b/src/main/java/cn/com/tenlion/service/report/IReportService.java index e9f981b..d21fd21 100644 --- a/src/main/java/cn/com/tenlion/service/report/IReportService.java +++ b/src/main/java/cn/com/tenlion/service/report/IReportService.java @@ -36,6 +36,15 @@ public interface IReportService { SuccessResultList> listPageArchive(ListPage page); + /** + * 区域事件列表 + * @param page + * @param areaCode + * @return + */ + SuccessResultList> listPageArea(ListPage page,String areaCode); + + /** * 设置回显参数 * @param reportDTO diff --git a/src/main/java/cn/com/tenlion/service/report/impl/ReportServiceImpl.java b/src/main/java/cn/com/tenlion/service/report/impl/ReportServiceImpl.java index 123aef5..b466f63 100644 --- a/src/main/java/cn/com/tenlion/service/report/impl/ReportServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/report/impl/ReportServiceImpl.java @@ -6,9 +6,7 @@ import cn.com.tenlion.enums.report.HandleStatusEnum; import cn.com.tenlion.enums.report.ReportResultEnum; import cn.com.tenlion.enums.report.ReportSourceEnum; import cn.com.tenlion.enums.report.ReportTagEnum; -import cn.com.tenlion.pojo.bos.userexpand.UserExpandBO; import cn.com.tenlion.pojo.vos.dispatch.DispatchVO; -import cn.com.tenlion.pojo.vos.taskmsg.SocketVO; import cn.com.tenlion.service.activitibase.IActivitiBaseService; import cn.com.tenlion.service.collect.ICollectService; import cn.com.tenlion.service.difficult.IDifficultService; @@ -17,13 +15,14 @@ import cn.com.tenlion.service.evaluate.IEvaluateService; import cn.com.tenlion.service.remotebase.IRemoteBaseService; import cn.com.tenlion.service.sample.ISampleService; import cn.com.tenlion.service.warning.IWarningService; +import cn.com.tenlion.util.UserUtil; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; import ink.wgink.exceptions.UpdateException; import ink.wgink.interfaces.user.IUserBaseService; import ink.wgink.module.dictionary.pojo.dtos.AreaDTO; -import ink.wgink.module.dictionary.service.IAreaService; +import ink.wgink.mongo.module.dictionary.service.IMongoAreaService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.app.AppTokenUser; import ink.wgink.pojo.dtos.user.UserDTO; @@ -77,7 +76,9 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ @Autowired private CaseInfoConfig caseInfoConfig; @Autowired - private IAreaService areaService; + private IMongoAreaService areaService; + @Autowired + private UserUtil userUtil; @@ -249,7 +250,43 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ if(StringUtils.isBlank(type2Code)){ throw new SearchException("未获取到事件类型编码"); } - return areaCode.substring(0,6)+type1Code+type2Code; + Map countCaseNum = new HashMap<>(); + countCaseNum.put("reportAreaCode",areaCode); + countCaseNum.put("caseTypeCode1",type1Code); + countCaseNum.put("caseTypeCode2",type2Code); + Integer count = this.count(countCaseNum); + String reportCode = areaCode.substring(0,6)+type1Code+type2Code+ getNextSequence(count.toString(),6); + //效验编码 + Map checkParams = new HashMap<>(); + checkParams.put("reportCode",reportCode); + Integer checkCount = this.count(checkParams); + + if(checkCount > 0){ + throw new SaveException("编码异常,请重新上报"); + } + + return reportCode; + } + + /** + * 生成下位流水号 + * @param currSequence 当前号码 + * @param len 长度 + * @return + */ + private static String getNextSequence(String currSequence,int len){ + Integer curr = Integer.parseInt(currSequence); + curr++; + String currStr = curr.toString(); + StringBuffer result = new StringBuffer(); + for(int i=0;i 6){ + throw new SaveException("生成事件编号出错"); + } + return result.toString(); } @@ -261,6 +298,10 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ private List> setAcceptedUser(String areaCode){ List> list = remoteBaseService.getAreaCaseAdmin(areaCode); if(list.size() == 0){ + throw new SearchException("为获取到事件受理人员"); + } + //自动找上级管理员逻辑 暂时取消 + /*if(list.size() == 0){ AreaDTO byCode = areaService.getByCode(areaCode); if(byCode == null){ throw new SearchException("系统异常"); @@ -271,7 +312,7 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ throw new SaveException("未获取到案件受理人员"); } return setAcceptedUser(areaParentDTO.getAreaCode()); - } + }*/ return list; } @@ -395,6 +436,20 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ PageInfo pageInfo = new PageInfo<>(reportDTOs); return new SuccessResultList<>(reportDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } + + + public SuccessResultList> listPageArea(ListPage page,String areaCode){ + page.getParams().put("areaCode",userUtil.areaCodeFormat(areaCode)); + PageHelper.startPage(page.getPage(),page.getRows()); + List reportDTOS = list(page.getParams()); + PageInfo pageInfo = new PageInfo<>(reportDTOS); + return new SuccessResultList<>(reportDTOS,pageInfo.getPageNum(),pageInfo.getTotal()); + } + + + + + @Override public Integer count(Map params) { Integer count = reportDao.count(params); diff --git a/src/main/java/cn/com/tenlion/service/reportlog/impl/ReportLogServiceImpl.java b/src/main/java/cn/com/tenlion/service/reportlog/impl/ReportLogServiceImpl.java index 97a20aa..84d6fda 100644 --- a/src/main/java/cn/com/tenlion/service/reportlog/impl/ReportLogServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/reportlog/impl/ReportLogServiceImpl.java @@ -53,6 +53,8 @@ public class ReportLogServiceImpl extends DefaultBaseService implements IReportL + + /** * 获取流程 * @param businessId @@ -64,6 +66,7 @@ public class ReportLogServiceImpl extends DefaultBaseService implements IReportL List historicTaskInstances=processEngine.getHistoryService() .createHistoricTaskInstanceQuery() // 创建历史任务实例查询 .processInstanceId(businessId) // 用流程实例id查询 + .includeTaskLocalVariables() .finished() // 查询已经完成的任务 .list(); for (HistoricTaskInstance historicTaskInstance : historicTaskInstances) { @@ -71,6 +74,7 @@ public class ReportLogServiceImpl extends DefaultBaseService implements IReportL dto.setNodeId(historicTaskInstance.getId()); dto.setNodeName(historicTaskInstance.getName()); String assignee = historicTaskInstance.getAssignee(); + Map taskLocalVariables = historicTaskInstance.getTaskLocalVariables(); if(!StringUtils.isBlank(assignee)){ UserDTO userDTO = userBaseService.get(assignee); dto.setNodeUserName(userDTO.getUserName()); @@ -91,6 +95,19 @@ public class ReportLogServiceImpl extends DefaultBaseService implements IReportL for (Comment comment : taskComments) { dto.setNodeSummary(comment.getFullMessage()); } + + + //查询实例是否强制结束 + String deleteReason = historicTaskInstance.getDeleteReason(); + if(!StringUtils.isBlank(deleteReason)){ + dto.setNodeSummary(deleteReason); + }else{ + if(taskLocalVariables != null){ + //设置流程类型 + Object taskType = taskLocalVariables.get("taskType"); + dto.setNodeType(taskType == null ? "":taskType.toString()); + } + } dto.setNodeState("1"); list.add(dto); } diff --git a/src/main/java/cn/com/tenlion/service/taskbase/impl/TaskBaseServiceImpl.java b/src/main/java/cn/com/tenlion/service/taskbase/impl/TaskBaseServiceImpl.java index 9666b38..e7a80c1 100644 --- a/src/main/java/cn/com/tenlion/service/taskbase/impl/TaskBaseServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/taskbase/impl/TaskBaseServiceImpl.java @@ -302,9 +302,14 @@ public class TaskBaseServiceImpl extends DefaultBaseService implements ITaskBas PageHelper.startPage(page.getPage(), page.getRows()); List list = new ArrayList<>(); HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery(); + Object keyWords = page.getParams().get("keywords"); + if(keyWords != null){ + historicTaskInstanceQuery.processVariableValueLike("reportCode",keyWords.toString()); + } List historicTaskInstances = historicTaskInstanceQuery .taskAssignee(this.setUserId(token))//(pageNum - 1) * pageSize, pageSize - .orderByTaskCreateTime().desc().listPage((page.getPage() - 1) * page.getRows(), page.getRows()); + .orderByHistoricTaskInstanceEndTime() + .desc().listPage((page.getPage() - 1) * page.getRows(), page.getRows()); for (HistoricTaskInstance historicTaskInstance : historicTaskInstances) { HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery() .processInstanceId(historicTaskInstance.getProcessInstanceId()) diff --git a/src/main/java/cn/com/tenlion/service/taskcompletebase/ITaskCompleteBase.java b/src/main/java/cn/com/tenlion/service/taskcompletebase/ITaskCompleteBase.java index 88db2be..d5a4c20 100644 --- a/src/main/java/cn/com/tenlion/service/taskcompletebase/ITaskCompleteBase.java +++ b/src/main/java/cn/com/tenlion/service/taskcompletebase/ITaskCompleteBase.java @@ -132,6 +132,12 @@ public interface ITaskCompleteBase { - + /** + * 强制结束实例 + * @param token + * @param instanceId + * @param overExplain + */ + void updateInstanceOver(String token,String instanceId,String overExplain); } diff --git a/src/main/java/cn/com/tenlion/service/taskcompletebase/impl/TaskCompleteBaseImpl.java b/src/main/java/cn/com/tenlion/service/taskcompletebase/impl/TaskCompleteBaseImpl.java index 6f9dd93..f0a2f8a 100644 --- a/src/main/java/cn/com/tenlion/service/taskcompletebase/impl/TaskCompleteBaseImpl.java +++ b/src/main/java/cn/com/tenlion/service/taskcompletebase/impl/TaskCompleteBaseImpl.java @@ -1,14 +1,11 @@ package cn.com.tenlion.service.taskcompletebase.impl; import cn.com.tenlion.config.CaseInfoConfig; -import cn.com.tenlion.enums.audit.AuditStatusEnum; -import cn.com.tenlion.enums.audit.TaskTypeEnum; import cn.com.tenlion.enums.check.CheckStatusEnum; import cn.com.tenlion.enums.distributionuser.UserStatusEnum; import cn.com.tenlion.enums.distributionuser.UserTypeEnum; import cn.com.tenlion.enums.report.HandleStatusEnum; import cn.com.tenlion.enums.report.ReportResultEnum; -import cn.com.tenlion.pojo.dtos.caseadmin.CaseAdminDTO; import cn.com.tenlion.pojo.dtos.dispatch.DispatchDTO; import cn.com.tenlion.pojo.dtos.distribution.DistributionDTO; import cn.com.tenlion.pojo.dtos.report.ReportDTO; @@ -21,7 +18,7 @@ import cn.com.tenlion.pojo.vos.distribution.DistributionVO; import cn.com.tenlion.pojo.vos.distributionuser.DistributionUserVO; import cn.com.tenlion.pojo.vos.handle.HandleVO; import cn.com.tenlion.pojo.vos.taskcompletebase.CompleteVO; -import cn.com.tenlion.remote.IRestBaseUrl; +import cn.com.tenlion.service.activitibase.IActivitiBaseService; import cn.com.tenlion.service.caseadmin.ICaseAdminService; import cn.com.tenlion.service.check.ICheckService; import cn.com.tenlion.service.delayapply.IDelayApplyService; @@ -32,23 +29,25 @@ import cn.com.tenlion.service.handle.IHandleService; import cn.com.tenlion.service.remotebase.IRemoteBaseService; import cn.com.tenlion.service.report.IReportService; import cn.com.tenlion.service.taskcompletebase.ITaskCompleteBase; +import cn.com.tenlion.service.timeout.ITimeoutService; +import cn.com.tenlion.service.warning.IWarningService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.ParamsException; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; -import ink.wgink.interfaces.department.IDepartmentBaseService; -import ink.wgink.interfaces.department.IDepartmentUserBaseService; +import ink.wgink.exceptions.UpdateException; import ink.wgink.interfaces.role.IRoleDepartmentUserBaseService; import ink.wgink.module.dictionary.pojo.dtos.AreaDTO; -import ink.wgink.module.dictionary.service.IAreaService; +import ink.wgink.mongo.module.dictionary.service.IMongoAreaService; import ink.wgink.pojo.app.AppTokenUser; import ink.wgink.pojo.dtos.department.DepartmentUserDTO; +import ink.wgink.util.UUIDUtil; import ink.wgink.util.map.HashMapUtil; +import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.task.Task; -import org.activiti.engine.task.TaskQuery; import org.apache.commons.lang3.StringUtils; -import org.checkerframework.checker.units.qual.A; +import org.apache.poi.util.StringUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -84,7 +83,15 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom @Autowired private IRemoteBaseService remoteBaseService; @Autowired - private IAreaService areaService; + private IMongoAreaService areaService; + @Autowired + private RuntimeService runtimeService; + @Autowired + private IActivitiBaseService activitiBaseService; + @Autowired + private ITimeoutService timeoutService; + @Autowired + private IWarningService warningService; @@ -197,10 +204,8 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom * @param distributionVO */ public void saveAllocate(String token, String reportId,DistributionVO distributionVO){ - /** - * 保存分拨信息 - */ - String distributionId = distributionService.saveReturnId(token,reportId,distributionVO); + String distributionId = UUIDUtil.getUUID(); + /** * 查询分拨单位案件管理员 */ @@ -230,7 +235,6 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom */ if(distributionDeptType.equals("ma")){//主协办 //主办 - Set list1 = this.getDeptCaseAdmin(distributionVO.getMasterDeptId());; if(list1.size() <= 0){ throw new SearchException("未获取到主办单位-"+distributionVO.getMasterDeptName()+"案件管理员"); @@ -297,12 +301,20 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom distributionInfo.add(params); } + /** + * 保存分拨信息 + */ + distributionService.saveByTask(token,distributionId,reportId,distributionVO); + + Map params = new HashMap<>(); params.put("distributionUserInfoList",distributionInfo); //params.put("distributionId",distributionId); //params.put("taskType", TaskTypeEnum.TASK_ALLOCATE_SURE.getValue()); this.addComment(distributionVO.getTaskId(),"事件分拨"); taskService.complete(distributionVO.getTaskId(),params); + + } @@ -625,6 +637,36 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom } + /** + * 强制结束实例 + * @param token + * @param instanceId + * @param overExplain + */ + public void updateInstanceOver(String token,String instanceId,String overExplain){ + String businessKey = activitiBaseService.getBusinessKey(instanceId); + if(StringUtils.isBlank(businessKey)){ + throw new UpdateException("系统异常"); + + } + + String userName = this.getUserName(token); + + String explanin = userName + "强制终结事件原因:" + overExplain; + + //更新业务表 + reportService.updateHandleStatus(businessKey,HandleStatusEnum.FORCED_END.getValue()); + //终结实例 + runtimeService.deleteProcessInstance(instanceId,explanin); + //更新超时 + timeoutService.updateByReportId(businessKey); + //更新预警 + warningService.updateByReportId(businessKey); + } + + + + /** * 获取责任单位案件管理员 * @param deptId @@ -677,5 +719,17 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom } + private String getUserName(String token){ + String userName = ""; + if(StringUtils.isBlank(token)){ + userName = securityComponent.getCurrentUser().getUserName(); + }else{ + AppTokenUser appTokenUser = getAppTokenUser(token); + userName = appTokenUser.getUsername(); + } + return userName; + } + + } diff --git a/src/main/java/cn/com/tenlion/service/timeout/ITimeoutService.java b/src/main/java/cn/com/tenlion/service/timeout/ITimeoutService.java index 99bd558..74d61dd 100644 --- a/src/main/java/cn/com/tenlion/service/timeout/ITimeoutService.java +++ b/src/main/java/cn/com/tenlion/service/timeout/ITimeoutService.java @@ -20,6 +20,13 @@ import java.util.Map; public interface ITimeoutService { + /** + * 根据事件ID修改 + * @param reportId + */ + void updateByReportId(String reportId); + + /** * 区域超时事件列表 * @param page diff --git a/src/main/java/cn/com/tenlion/service/timeout/impl/TimeoutServiceImpl.java b/src/main/java/cn/com/tenlion/service/timeout/impl/TimeoutServiceImpl.java index 794a1b2..16d4403 100644 --- a/src/main/java/cn/com/tenlion/service/timeout/impl/TimeoutServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/timeout/impl/TimeoutServiceImpl.java @@ -89,6 +89,18 @@ public class TimeoutServiceImpl extends DefaultBaseService implements ITimeoutSe } } + public void updateByReportId(String reportId){ + if(!StringUtils.isBlank(reportId)){ + Map params = new HashMap<>(); + params.put("reportId",reportId); + params.put("status","1"); + params.put("gmtModified",DateUtil.getTime()); + timeoutDao.updateStatus(params); + } + + + } + diff --git a/src/main/java/cn/com/tenlion/service/warning/IWarningService.java b/src/main/java/cn/com/tenlion/service/warning/IWarningService.java index 647e907..1ec8aad 100644 --- a/src/main/java/cn/com/tenlion/service/warning/IWarningService.java +++ b/src/main/java/cn/com/tenlion/service/warning/IWarningService.java @@ -33,6 +33,14 @@ public interface IWarningService { SuccessResultList> listPageArea(ListPage page,String areaCode); + /** + * 根据事件ID更新 + * @param reportId + */ + void updateByReportId(String reportId); + + + /** * 根据任务ID更新 * @param taksId diff --git a/src/main/java/cn/com/tenlion/service/warning/impl/WarningServiceImpl.java b/src/main/java/cn/com/tenlion/service/warning/impl/WarningServiceImpl.java index 79e2609..f4ed35d 100644 --- a/src/main/java/cn/com/tenlion/service/warning/impl/WarningServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/warning/impl/WarningServiceImpl.java @@ -124,6 +124,13 @@ public class WarningServiceImpl extends DefaultBaseService implements IWarningSe } + public void updateByReportId(String reportId){ + Map params = new HashMap<>(); + params.put("reportId",reportId); + params.put("warningStatus","1"); + warningDao.updateByTaskId(params); + } + diff --git a/src/main/resources/mybatis/mapper/report/report-mapper.xml b/src/main/resources/mybatis/mapper/report/report-mapper.xml index 1eaccdb..10ef65e 100644 --- a/src/main/resources/mybatis/mapper/report/report-mapper.xml +++ b/src/main/resources/mybatis/mapper/report/report-mapper.xml @@ -458,6 +458,10 @@ AND t1.is_archive = #{isArchive} + + AND + t1.report_area_code LIKE CONCAT('%', #{areaCode} , '%') + ORDER BY t1.gmt_create DESC @@ -587,6 +591,19 @@ case_report t1 WHERE t1.is_delete = 0 + + AND t1.report_area_code = #{reportAreaCode} + + + AND t1.report_code = #{reportCode} + + + AND t1.case_type_code1 = #{caseTypeCode1} + + + AND t1.case_type_code2 = #{caseTypeCode2} + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/timeout/timeout-mapper.xml b/src/main/resources/mybatis/mapper/timeout/timeout-mapper.xml index 23fa8d6..95b11da 100644 --- a/src/main/resources/mybatis/mapper/timeout/timeout-mapper.xml +++ b/src/main/resources/mybatis/mapper/timeout/timeout-mapper.xml @@ -347,7 +347,29 @@ - + + + UPDATE + case_timeout + SET + status = #{status}, + gmt_modified = #{gmtModified} + WHERE + + report_id = #{reportId} + + + timeout_id = #{timeoutId} + + + + + + + + + + - - - - - - - - UPDATE - case_timeout - SET - status = #{status}, - gmt_modified = #{gmtModified} - WHERE - timeout_id = #{timeoutId} - - \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/warning/warning-mapper.xml b/src/main/resources/mybatis/mapper/warning/warning-mapper.xml index d6a25e0..e94f940 100644 --- a/src/main/resources/mybatis/mapper/warning/warning-mapper.xml +++ b/src/main/resources/mybatis/mapper/warning/warning-mapper.xml @@ -171,7 +171,13 @@ gmt_modified = #{gmtModified}, modifier = #{modifier} WHERE - task_id = #{taskId} + + task_id = #{taskId} + + + report_id = #{reportId} + + diff --git a/src/main/resources/static/route/gridmember/save.html b/src/main/resources/static/route/gridmember/save.html index bb267cb..0d72d92 100644 --- a/src/main/resources/static/route/gridmember/save.html +++ b/src/main/resources/static/route/gridmember/save.html @@ -221,7 +221,7 @@ // 初始化1级区域下拉选择 function initArea1Select() { - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [0]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [0]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data); }, function(code, data) { top.dialog.msg(data.msg); @@ -235,7 +235,7 @@ callback ? callback() : null; return; } - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area1]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area1]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data); callback ? callback() : null; }, function(code, data) { @@ -251,7 +251,7 @@ callback ? callback() : null; return; } - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area2]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area2]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data); callback ? callback() : null; }, function(code, data) { @@ -267,7 +267,7 @@ callback ? callback() : null; return; } - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area3]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area3]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data); callback ? callback() : null; }, function(code, data) { @@ -283,7 +283,7 @@ callback ? callback() : null; return; } - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area4]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area4]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data); callback ? callback() : null; }, function(code, data) { diff --git a/src/main/resources/static/route/gridmember/update.html b/src/main/resources/static/route/gridmember/update.html index e476a2b..078c1e0 100644 --- a/src/main/resources/static/route/gridmember/update.html +++ b/src/main/resources/static/route/gridmember/update.html @@ -208,7 +208,7 @@ // 初始化1级区域下拉选择 function initArea1Select(selectValue, callback) { - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [0]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [0]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area1'] = selectValue; @@ -231,7 +231,7 @@ }); return; } - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area1]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area1]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area2'] = selectValue; @@ -255,7 +255,7 @@ }); return; } - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area2]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area2]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area3'] = selectValue; @@ -279,7 +279,7 @@ }); return; } - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area3]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area3]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area4'] = selectValue; @@ -303,7 +303,7 @@ callback ? callback() : null; return; } - top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area4]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area4]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area5'] = selectValue; diff --git a/src/main/resources/static/route/pary/list-show.html b/src/main/resources/static/route/pary/list-show.html new file mode 100644 index 0000000..1ea5223 --- /dev/null +++ b/src/main/resources/static/route/pary/list-show.html @@ -0,0 +1,290 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/report/save.html b/src/main/resources/static/route/report/save.html index 8c7a61a..32d9896 100644 --- a/src/main/resources/static/route/report/save.html +++ b/src/main/resources/static/route/report/save.html @@ -472,7 +472,7 @@ id = 110889 } var loadLayerIndex; - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/{areaParentId}}', [id]), {}, null, function(code, data) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list/parent-id/{areaParentId}', [id]), {}, null, function(code, data) { var dataFormData = []; data.forEach(function (e) { var arr = {}; @@ -499,8 +499,15 @@ var label = node.path.map(function (node) { return node.label; }).join(separator); - $('#reportAreaCode').val(node.data.code); - $('#reportAreaName').val(label); + + if($('#reportAreaCode').val() != node.data.code){ + $('#reportAreaCode').val(node.data.code); + $('#reportAreaName').val('内蒙古自治区'+ separator + '乌兰察布市'+ separator + label); + $('#bGId').val("") + $('#bGName').val("") + } + + }); } //初始化事件类型 diff --git a/src/main/resources/static/route/reportlog/demo.html b/src/main/resources/static/route/reportlog/demo.html index 9d9b60b..37eef90 100644 --- a/src/main/resources/static/route/reportlog/demo.html +++ b/src/main/resources/static/route/reportlog/demo.html @@ -14,6 +14,7 @@
+
    @@ -44,7 +45,7 @@ 节点名称 处理人 - 处理部门 + 开始时间 结束时间 耗时 @@ -56,7 +57,7 @@ {{ item.nodeName }} {{ item.nodeUserName }} - {{ item.nodeUserDeptName }} + {{ item.nodeStateTime }} {{ item.nodeEndTime }} {{ item.nodeTimeConsuming }} @@ -139,6 +140,7 @@
+
@@ -155,9 +157,36 @@ var form = layui.form; var element = layui.element; var businessId = top.restAjax.params(window.location.href).businessId; + var reportId = top.restAjax.params(window.location.href).reportId; + + + + if(businessId == undefined || businessId == ''){ + var loadLayerIndex; + top.restAjax.get(top.restAjax.path('api/report/getbuinessid/{reportId}', [reportId]), {}, null, function(code, data) { + var businessId = data.data; + initUrl(businessId); + initData(businessId) + }, function(code, data) { + top.dialog.msg(data.msg); + }, function() { + loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3}); + }, function() { + top.dialog.close(loadLayerIndex); + }); + }else{ + initUrl(businessId); + initData(businessId) + } + + + function initUrl(businessId){ + $('#processFlow').attr('src',"route/activiti/get-runtime-process-image/"+ businessId) + $('#distributionLog').attr('src',"route/distribution/show-history.html?businessId="+ businessId) + } + + - $('#processFlow').attr('src',"route/activiti/get-runtime-process-image/"+ businessId) - $('#distributionLog').attr('src',"route/distribution/show-history.html?businessId="+ businessId) function closeBox() { parent.layer.close(parent.layer.getFrameIndex(window.name)); @@ -165,9 +194,9 @@ // 初始化内容 - function initData() { + function initData(id) { var loadLayerIndex; - top.restAjax.get(top.restAjax.path('api/reportlog/list-activity/{reportId}', [businessId]), {}, null, function(code, data) { + top.restAjax.get(top.restAjax.path('api/reportlog/list-activity/{businessId}', [id]), {}, null, function(code, data) { laytpl(document.getElementById('logTemplate').innerHTML).render(data, function(html) { document.getElementById('logTemplateView').innerHTML = html; form.render(null, 'dataForm'); @@ -180,7 +209,6 @@ top.dialog.close(loadLayerIndex); }); } - initData(); diff --git a/src/main/resources/static/route/taskbase/allocate/save-allocate.html b/src/main/resources/static/route/taskbase/allocate/save-allocate.html index d648d38..ce4ff3c 100644 --- a/src/main/resources/static/route/taskbase/allocate/save-allocate.html +++ b/src/main/resources/static/route/taskbase/allocate/save-allocate.html @@ -30,13 +30,14 @@ -
+ + + <!––>
- + -->
@@ -158,7 +159,6 @@ }); function selectSpecialUser(){ - top.dialog.dialogData.selectedUserIds = $('#specialUserId').val(); top.dialog.open({ url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []), title: '选择专办单位', @@ -174,11 +174,11 @@ $('#specialDeptId').val(selectedTypeRBArray[0].id); $('#specialDeptName').val(selectedTypeRBArray[0].name); } + top.dialog.dialogTreeData.selectedNodes = []; } }) } function selectMasterUser(){ - top.dialog.dialogData.selectedUserIds = $('#specialUserId').val(); top.dialog.open({ url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []), title: '选择主办单位', @@ -199,7 +199,6 @@ }) } function selectAssistUser(){ - top.dialog.dialogData.selectedUserIds = $('#specialUserId').val(); top.dialog.open({ url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []), title: '选择协办单位', diff --git a/src/main/resources/static/route/taskbase/archive/list-archive.html b/src/main/resources/static/route/taskbase/archive/list-archive.html index 00283e4..f588893 100644 --- a/src/main/resources/static/route/taskbase/archive/list-archive.html +++ b/src/main/resources/static/route/taskbase/archive/list-archive.html @@ -155,13 +155,14 @@ return rowData; } }, - {field: 'cz', width: 300, title: '操作', align:'center',fixed: 'right', + {field: 'cz', width: 500, title: '操作', align:'center',fixed: 'right', templet: function(row) { var level = row['taskLevel']; var rowData = '
'; rowData += ''; rowData += ''; rowData += ''; + rowData += ''; rowData += ''; rowData += '
'; return rowData; @@ -262,15 +263,15 @@ shadeClose: false, anim: 2, maxmin:false, - content: top.restAjax.path('route/pary/list.html?reportId={reportId}', [data.reportId]), + content: top.restAjax.path('route/pary/list-show.html?reportId={reportId}', [data.reportId]), end: function() { reloadTable(); } }); - }else if(layEvent === 'partEvent'){ + }else if(layEvent === 'evaluateEvent'){ layer.open({ type: 2, - title: '回访记录', + title: '评价结果', closeBtn: 1, area: ['90%', '90%'], shadeClose: false, diff --git a/src/main/resources/static/route/taskbase/dispatch/user-disparch.html b/src/main/resources/static/route/taskbase/dispatch/user-disparch.html index bf0d29e..4a5e595 100644 --- a/src/main/resources/static/route/taskbase/dispatch/user-disparch.html +++ b/src/main/resources/static/route/taskbase/dispatch/user-disparch.html @@ -80,7 +80,6 @@ function initTask() { var loadLayerIndex; top.restAjax.get(top.restAjax.path('api/distributionuser/get-bytaskId/{taskId}', [taskId]), {}, null, function(code, data) { - console.log(data) initFrame(); initThree(data.userDeptId , data.userDeptName); }, function(code, data) { @@ -171,6 +170,8 @@ userDom += ''+ avatarDom + item.userName +' ['+ item.userUsername +']'; } $('#userWrapper').append(userDom); + $('.layui-flow-more').remove(); + } function addSearchUserDom(data) { if(data.length < 1) { diff --git a/src/main/resources/static/route/taskbase/dispatchexamine/list-dispatchexamine.html b/src/main/resources/static/route/taskbase/dispatchexamine/list-dispatchexamine.html index 7ceb058..7d12b25 100644 --- a/src/main/resources/static/route/taskbase/dispatchexamine/list-dispatchexamine.html +++ b/src/main/resources/static/route/taskbase/dispatchexamine/list-dispatchexamine.html @@ -163,6 +163,7 @@ rowData += ''; rowData += ''; rowData += ''; + rowData += ''; rowData += ''; rowData += '
'; return rowData; @@ -253,7 +254,24 @@ reloadTable(); } }); - }else if(layEvent === 'pass'){ + }else if(layEvent === 'check'){ + layer.open({ + type: 2, + title: '核查', + closeBtn: 1, + area: ['90%', '90%'], + shadeClose: false, + anim: 2, + maxmin:false, + content: top.restAjax.path('route/taskbase/dispatchexamine/save-dispatchexamine.html?taskId={taskId}', [data.taskId]), + end: function() { + reloadTable(); + } + }); + } + + + else if(layEvent === 'pass'){ top.dialog.msg('处理结果核查通过,该案件处理流程结束?', { time: 0, btn: [top.dataMessage.button.yes, top.dataMessage.button.no], diff --git a/src/main/resources/static/route/taskbase/dispatchexamine/save-dispatchexamine.html b/src/main/resources/static/route/taskbase/dispatchexamine/save-dispatchexamine.html index 2a6e54a..6090bd0 100644 --- a/src/main/resources/static/route/taskbase/dispatchexamine/save-dispatchexamine.html +++ b/src/main/resources/static/route/taskbase/dispatchexamine/save-dispatchexamine.html @@ -10,11 +10,6 @@ -
@@ -22,131 +17,115 @@
- +
派遣信息
- +
- +
- -
- + +
+
- -
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
- -
-
- - -
-
- -
+
+ +
+
- +
- +
-
- -
- + +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
- -
- + +
+
- -
- + +
+
-
-
-
+
处理信息
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+ +
+ +
- +
- -
- @@ -193,11 +170,7 @@ var $ = layui.$; var form = layui.form; var laytpl = layui.laytpl; - var laydate = layui.laydate; - var reportId = top.restAjax.params(window.location.href).reportId; - - var wangEditor = window.wangEditor; - var wangEditorObj = {}; + var taskId = top.restAjax.params(window.location.href).taskId; var viewerObj = {}; function closeBox() { @@ -239,30 +212,15 @@ }); } - // 初始化视频 - function initVideo(fileName, data) { - for(var i = 0, item; item = data[i++];) { - var player = new ckplayer({ - container: '#'+ fileName + i, - variable: 'player', - flashplayer: false, - video: { - file: 'route/file/download/true/'+ item.fileId, - type: 'video/mp4' - } - }); - } - } - // 初始化上报图片图片上传 - function initReportPhotosUploadFile() { - var files = $('#reportPhotos').val(); - initFileList('reportPhotos', files, function(fileName) { + function initHandlePhotosUploadFile() { + var files = $('#handlePhotos').val(); + initFileList('handlePhotos', files, function(fileName) { var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false}); viewerObj[fileName] = viewer; }); - form.on('button(reportPhotosUploadFile)', function(obj) { + form.on('button(handlePhotosUploadFile)', function(obj) { var name = this.dataset.name; var explain = this.dataset.explain; top.dialog.file({ @@ -289,7 +247,7 @@ }); }); - form.on('button(reportPhotosRemoveFile)', function(obj) { + form.on('button(handlePhotosRemoveFile)', function(obj) { var name = this.dataset.name; var id = this.dataset.id; var files = $('#'+ name).val().replace(id, ''); @@ -305,139 +263,108 @@ }); }); } - // 初始化上报音频音频上传 - function initReportAudioUploadFile() { - var files = $('#reportAudio').val(); - initFileList('reportAudio', files); - form.on('button(reportAudioUploadFile)', function(obj) { - var name = this.dataset.name; - var explain = this.dataset.explain; - top.dialog.file({ - type: 'audio', - title: '上传'+ explain, - width: '400px', - height: '420px', - maxFileCount: '1', - onClose: function() { - var uploadFileArray = top.dialog.dialogData.uploadFileArray; - if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) { - var files = $('#'+ name).val(); - for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) { - if(files.length > 0) { - files += ','; - } - files += file.data; - } - initFileList(name, files); + + + + + + + + $('.close').on('click', function() { + closeBox(); + }); + + + + //通过 + $('.pass').on('click', function() { + var reportId = $('#reportId').val(); + layer.prompt({ + formType: 2, + title: '请输入核查说明', + maxlength:200, + area: ['600px', '300px'] //自定义文本域宽高 + }, function(value, index, elem){ + layer.close(index); + var loadLayerIndex; + var formData={}; + formData.taskId = taskId; + formData.explain = value; + top.restAjax.put(top.restAjax.path('api/taskcompetebase/update-dispatch-he-pass/{reportId}', [reportId]), formData, null, function(code, data) { + var layerIndex = top.dialog.msg('成功!', { + time: 0, + btn: [top.dataMessage.button.yes], + shade: 0.3, + yes: function(index) { + top.dialog.close(index); + closeBox(); } - } + }); + }, function(code, data) { + top.dialog.msg(data.msg); + }, function() { + loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3}); + }, function() { + top.dialog.close(loadLayerIndex); }); }); + }); - form.on('button(reportAudioRemoveFile)', function(obj) { - var name = this.dataset.name; - var id = this.dataset.id; - var files = $('#'+ name).val().replace(id, ''); - files = files.replace(/\,+/g, ','); - if(files.charAt(0) == ',') { - files = files.substring(1); - } - if(files.charAt(files.length - 1) == ',') { - files = files.substring(0, files.length - 1); - } - initFileList(name, files); - }); - } - // 初始化上报视频视频上传 - function initReportVideoUploadFile() { - var files = $('#reportVideo').val(); - initFileList('reportVideo', files, initVideo); - form.on('button(reportVideoUploadFile)', function(obj) { - var name = this.dataset.name; - var explain = this.dataset.explain; - top.dialog.file({ - type: 'video', - title: '上传'+ explain, - width: '400px', - height: '420px', - maxFileCount: '1', - onClose: function() { - var uploadFileArray = top.dialog.dialogData.uploadFileArray; - if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) { - var files = $('#'+ name).val(); - for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) { - if(files.length > 0) { - files += ','; - } - files += file.data; - } - initFileList(name, files, initVideo); + + //不通过 + $('.nopass').on('click', function() { + var reportId = $('#reportId').val(); + layer.prompt({ + formType: 2, + title: '请输入核查说明', + maxlength:200, + area: ['600px', '300px'] //自定义文本域宽高 + }, function(value, index, elem){ + layer.close(index); + var loadLayerIndex; + var formData={}; + formData.taskId = taskId; + formData.explain = value; + top.restAjax.put(top.restAjax.path('api/taskcompetebase/update-dispatch-he-nopass/{reportId}', [reportId]), formData, null, function(code, data) { + var layerIndex = top.dialog.msg('成功,已退回到处理人重新处理!', { + time: 0, + btn: [top.dataMessage.button.yes], + shade: 0.3, + yes: function(index) { + top.dialog.close(index); + closeBox(); } - } + }); + }, function(code, data) { + top.dialog.msg(data.msg); + }, function() { + loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3}); + }, function() { + top.dialog.close(loadLayerIndex); }); }); - form.on('button(reportVideoRemoveFile)', function(obj) { - var name = this.dataset.name; - var id = this.dataset.id; - var files = $('#'+ name).val().replace(id, ''); - files = files.replace(/\,+/g, ','); - if(files.charAt(0) == ',') { - files = files.substring(1); - } - if(files.charAt(files.length - 1) == ',') { - files = files.substring(0, files.length - 1); - } - initFileList(name, files, initVideo); - }); - } - //初始化百度地图 - function initMap(longitude, latitude) { - map = new BMap.Map("mapContainer", {enableMapClick: false,}); - var point = new BMap.Point(longitude, latitude); - map.centerAndZoom(point, 12); - map.disableDoubleClickZoom(); - map.addControl(new BMap.NavigationControl()); - map.addControl(new BMap.ScaleControl()); - map.addControl(new BMap.OverviewMapControl()); - map.addControl(new BMap.MapTypeControl()); - map.enableScrollWheelZoom();//启用地图滚轮放大缩小 - map.enableContinuousZoom();//开启缩放平滑 - var geocoder= new BMap.Geocoder(); - mapMarkPoint(map, point); - } - //地图标点 - function mapMarkPoint(map, point) { - var marker = new BMap.Marker(point); - map.addOverlay(marker); + }); + + + function initData(){ + initDispatchInfo(); + initHandleInfo(); } - - - - function initCaseTypeName(type1Name,type2Name) { - return type1Name + ' / ' + type2Name; - } - - - // 初始化内容 - function initData() { + // 初始化派遣信息 + function initDispatchInfo() { var loadLayerIndex; - top.restAjax.get(top.restAjax.path('api/report/get/{reportId}', [reportId]), {}, null, function(code, data) { + top.restAjax.get(top.restAjax.path('api/dispatch/get-bytaskId/{taskId}', [taskId]), {}, null, function(code, data) { var dataFormData = {}; for(var i in data) { dataFormData[i] = data[i] +''; } - dataFormData['caseTypeName'] = initCaseTypeName(data['caseTypeName1'],data['caseTypeName2']); - + dataFormData['isAllowDelay'] = dataFormData['isAllowDelay'] == '0' ? '否':'是' form.val('dataForm', dataFormData); form.render(null, 'dataForm'); - initReportPhotosUploadFile(); - initReportAudioUploadFile(); - initReportVideoUploadFile(); - initMap(data.reportLng,data.reportLat) }, function(code, data) { top.dialog.msg(data.msg); }, function() { @@ -446,76 +373,35 @@ top.dialog.close(loadLayerIndex); }); } + + // 初始化处理信息 + function initHandleInfo() { + var loadLayerIndex; + top.restAjax.get(top.restAjax.path('api/handle/get-bytaskid/{taskId}', [taskId]), {}, null, function(code, data) { + var dataFormData = {}; + for(var i in data) { + dataFormData[i] = data[i] +''; + } + dataFormData['handleGmtCreate'] = dataFormData['gmtCreate'] + dataFormData['handleCreatorName'] = dataFormData['creatorName'] + delete dataFormData.gmtCreate + delete dataFormData.creator + form.val('dataForm', dataFormData); + form.render(null, 'dataForm'); + initHandlePhotosUploadFile(); + }, function(code, data) { + top.dialog.msg(data.msg); + }, function() { + loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3}); + }, function() { + top.dialog.close(loadLayerIndex); + }); + } + + initData(); - $('.close').on('click', function() { - closeBox(); - }); - - //收藏 - $('.collect').on('click', function() { - var field = {}; - field.reportId = reportId; - top.dialog.confirm('确定收藏该案件?', function(index) { - top.dialog.close(index); - var loadLayerIndex; - top.restAjax.post(top.restAjax.path('api/collect/save', []), field, null, function(code, data) { - top.dialog.msg('成功!'); - }, function(code, data) { - top.dialog.msg(data.msg); - }, function() { - loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3}); - }, function() { - top.dialog.close(loadLayerIndex); - }); - }); - }); - - //标杆 - $('.sample').on('click', function() { - var field = {}; - field.reportId = reportId; - top.dialog.confirm('确定将该案件设为标杆案件?', function(index) { - top.dialog.close(index); - var loadLayerIndex; - top.restAjax.post(top.restAjax.path('api/sample/save', []), field, null, function(code, data) { - top.dialog.msg('成功!'); - }, function(code, data) { - top.dialog.msg(data.msg); - }, function() { - loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3}); - }, function() { - top.dialog.close(loadLayerIndex); - }); - }); - }); - - - - - - - $('#showCasePars').on('click',function () { - var casePartsObjId = $('#casePartsObjId').val(); - if(casePartsObjId == '' || casePartsObjId == null){ - top.dialog.msg('未选择部件'); - return; - } - layer.open({ - type: 2, - title: '部件详情', - closeBtn: 1, - area: ['70%', '70%'], - shadeClose: false, - anim: 2, - maxmin:false, - content: top.restAjax.path('route/parts/show-orgid.html?objId={objId}', [casePartsObjId]), - end: function() { - } - }); - }); - // 校验 form.verify({ });