From d5e62ae5585f5d479921439e9f1af462a783f740 Mon Sep 17 00:00:00 2001 From: mg <maokecheng@163.com> Date: 星期四, 13 十月 2022 18:04:08 +0800 Subject: [PATCH] 优化案件池流程。 --- ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java | 39 +++++++++++++++++++++++++++++++++++---- 1 files changed, 35 insertions(+), 4 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java index 5d020e7..2967722 100644 --- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java +++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java @@ -96,6 +96,10 @@ WorkflowConfigMapper workflowConfigMapper; @Resource ImageResourcesMapper imageResourcesMapper; + @Resource + DispatchInfoMapper dispatchInfoMapper; + @Resource + PartyInfoMapper partyInfoMapper; @Override @@ -201,17 +205,33 @@ public Boolean saveViolationCase(ViolationParam violationParam, Long id) { Violations violations = new Violations(); BeanUtils.copyProperties(violationParam, violations); - violations.setId(id); Integer value = 1; + violations.setId(id); + setDisposeRecord(id); return violationsMapper.insert(violations) == value ? true : false; + } + + private void setDisposeRecord(Long id) { + String stepName = "璋冨害"; + Integer state = 0; + DisposeRecord disposeRecord = new DisposeRecord(); + disposeRecord.setBaseCaseId(id); + disposeRecord.setState(state); + disposeRecord.setCreateTime(LocalDateTime.now()); + AdminUserDetails userDetails = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); + disposeRecord.setCreateUser(userDetails.getUserId()); + disposeRecord.setStartTime(LocalDateTime.now()); + disposeRecord.setStepName(stepName); + disposeRecordMapper.insert(disposeRecord); } @Override public Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Long id) { IllegalBuilding illegalBuilding = new IllegalBuilding(); BeanUtils.copyProperties(illegalBuildingParam, illegalBuilding); - illegalBuilding.setBaseCaseId(id); + setDisposeRecord(id); Integer value = 1; + illegalBuilding.setBaseCaseId(id); return illegalBuildingMapper.insert(illegalBuilding) == value ? true : false; } @@ -232,9 +252,14 @@ Violations violations = violationsMapper.selectCondMap(mapV); baseCase.setViolations(violations); } else { - IllegalBuilding illegalBuilding = illegalBuildingMapper.selectById(baseCase.getId()); + IllegalBuilding illegalBuilding = illegalBuildingMapper.selectById(baseCase.getId()); baseCase.setIllegalBuilding(illegalBuilding); } + //鑾峰彇璋冨害淇℃伅 + Map mapD = new HashMap(); + mapD.put("baseCaseId",baseCase.getId()); + DispatchInfo dispatchInfo = dispatchInfoMapper.selectCondMap(mapD); + baseCase.setDispatchInfo(dispatchInfo); bcd.setBaseCase(baseCase); //妗堜欢鐩稿叧淇℃伅 //2.鏌ヨ鍔炵悊缁忚繃淇℃伅 @@ -264,7 +289,7 @@ continue; } for (DisposeRecord record : records) { - if (record != null&&record.getCreateTime()!=null) { + if (record != null && record.getCreateTime() != null) { record.setLinkTime( DateUtil.getDistanceDateTime( DateUtil.fromLocalDateTime(baseCase.getAlarmTime()), @@ -302,6 +327,12 @@ QueryWrapper<Investigation> wrapperI = new QueryWrapper<>(); wrapperI.lambda().eq(Investigation::getBaseCaseId, baseCase.getId()); Investigation investigation = investigationMapper.selectOne(wrapperI); + //鑾峰彇褰撲簨浜轰俊鎭� + Map mapP = new HashMap(); + mapP.put("id", investigation.getPartyId()); + PartyInfo partyInfo = partyInfoMapper.selectCondMap(mapP); + //濉厖褰撲簨浜� + investigation.setPartyInfo(partyInfo); currentSitVo.setInvestigation(investigation); //璁剧疆鍛婄煡杩濇硶 QueryWrapper<Writ> wrapperW = new QueryWrapper<>(); -- Gitblit v1.8.0