From 3441ace2fd71ed09d31b33f8d4b1b9c276239ab7 Mon Sep 17 00:00:00 2001 From: mg <maokecheng@163.com> Date: 星期四, 29 九月 2022 15:19:29 +0800 Subject: [PATCH] 添加案件详情。 --- ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java | 61 ++++++++++++++++++++++++++++-- 1 files changed, 57 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 ff3c5dc..b1913e7 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 @@ -1,11 +1,10 @@ package com.ycl.service.caseHandler.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ycl.bo.casePool.CasePoolIllegalBuildingDO; -import com.ycl.bo.casePool.CasePoolViolationDO; -import com.ycl.bo.casePool.CurrentSitVo; +import com.ycl.bo.casePool.*; import com.ycl.dto.casePool.IllegalBuildingParam; import com.ycl.dto.casePool.ViolationParam; import com.ycl.entity.caseHandler.*; @@ -28,6 +27,7 @@ import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneOffset; +import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -79,6 +79,11 @@ InvestigationMapper investigationMapper; @Resource WritMapper writMapper; + + @Resource + WorkflowConfigStepMapper workflowConfigStepMapper; + @Resource + WorkflowConfigMapper workflowConfigMapper; @Override @@ -206,12 +211,40 @@ BaseCase baseCase = baseCaseMapper.selectOne(wrapper); bcd.setBaseCase(baseCase); //2.鏌ヨ鍔炵悊缁忚繃淇℃伅 + //2.1鏌ヨ澶勭疆娴佺▼閰嶇疆 + HandlePassVo handlePassVo = new HandlePassVo(); + QueryWrapper<WorkflowConfig> wrapperWc = new QueryWrapper<>(); + wrapperWc.lambda().eq(WorkflowConfig::getCode, "ddlc").or().eq(WorkflowConfig::getCode, "wtcllc"); + List<WorkflowConfig> wcs = workflowConfigMapper.selectList(wrapperWc); + Integer ddlcId=0,wtcllcId=0; + for (WorkflowConfig wc : wcs) { + if ("ddlc".equals(wc.getCode())) { + ddlcId = wc.getId(); + } + if ("wtcllc".equals(wc.getCode())) { + wtcllcId = wc.getId(); + } + } + //2.2鏌ヨ澶勭疆娴佺▼鐜妭閰嶇疆 + QueryWrapper<WorkflowConfigStep> wrapperWcs = new QueryWrapper<>(); + wrapperWcs.lambda().eq(WorkflowConfigStep::getWorkflowConfigId, ddlcId); + List<WorkflowConfigStep> listWcs = workflowConfigStepMapper.selectList(wrapperWcs); + //2.3璁剧疆璋冨害娴佺▼ + handlePassVo.setWorkflowConfigSteps(listWcs); + bcd.setHandlePassVo(handlePassVo); //3.鏌ヨ妗堝嵎鍥剧墖淇℃伅 //4.鏌ヨ闂澶勭悊淇℃伅 + ProblemProVo problemProVo = new ProblemProVo(); + //4.2鏌ヨ澶勭疆娴佺▼鐜妭閰嶇疆 + QueryWrapper<WorkflowConfigStep> wrapperWcsPp = new QueryWrapper<>(); + wrapperWcsPp.lambda().eq(WorkflowConfigStep::getWorkflowConfigId, wtcllcId); + List<WorkflowConfigStep> listWcsPp = workflowConfigStepMapper.selectList(wrapperWcsPp); + //4.3璁剧疆璋冨害娴佺▼ + problemProVo.setWorkflowConfigSteps(listWcsPp); + bcd.setProblemProVo(problemProVo); //5.鏌ヨ鐜板満鎯呭喌淇℃伅 CurrentSitVo currentSitVo = new CurrentSitVo(); QueryWrapper<ArrivalSituation> wrapperAs = new QueryWrapper<>(); - wrapperAs.lambda().eq(ArrivalSituation::getBaseCaseId, baseCase.getId()); //璁剧疆鍒拌揪鐜板満鎯呭喌 ArrivalSituation as = arrivalSituationMapper.selectOne(wrapperAs); currentSitVo.setArrivalSituation(as); @@ -228,4 +261,24 @@ bcd.setCurrentSitVo(currentSitVo); return bcd; } + + @Override + public ArrayList<String> listCaseImages(Integer id, Integer type) { + Integer illegalBuildingType = 02; + ArrayList<String> caseImages = new ArrayList<>(); + caseImages.add(investigationMapper + .selectOne(new LambdaQueryWrapper<Investigation>() + .eq(Investigation::getBaseCaseId, id)).getPic()); + caseImages.add(arrivalSituationMapper + .selectOne(new LambdaQueryWrapper<ArrivalSituation>() + .eq(ArrivalSituation::getBaseCaseId, id)).getSituationPic()); + if (type == illegalBuildingType) { + Writ writ = writMapper.selectOne(new LambdaQueryWrapper<Writ>().eq(Writ::getBaseCaseId, id)); + caseImages.add(writ.getWritPic()); + caseImages.add(writ.getOriginalPic()); + caseImages.add(writ.getOtherPic()); + caseImages.add(writ.getRectifiedPic()); + } + return caseImages; + } } \ No newline at end of file -- Gitblit v1.8.0