From c9529bd19a8d61666b71824dd751682c1e9dc288 Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: 星期一, 15 八月 2022 10:39:31 +0800
Subject: [PATCH] Merge branches 'genchuang' and 'master' of https://sinanoaq.cn:8888/r/safePlatform-out into master

---
 incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java
index c32bc28..72b5683 100644
--- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java
@@ -14,15 +14,13 @@
 import com.gkhy.safePlatform.incidentManage.exception.AccidentException;
 import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentReportFileReqDTO;
 import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentReportReqDTO;
-import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportCountRespDTO;
-import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportDetailRespDTO;
-import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportFileRespDTO;
-import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportPageRespDTO;
+import com.gkhy.safePlatform.incidentManage.model.dto.resp.*;
 import com.gkhy.safePlatform.incidentManage.query.AccidentReportQuery;
 import com.gkhy.safePlatform.incidentManage.query.AccidentReportRPCQuery;
 import com.gkhy.safePlatform.incidentManage.query.db.AccidentReportDBQuery;
 import com.gkhy.safePlatform.incidentManage.query.db.AccidentReportRPCDBQuery;
 import com.gkhy.safePlatform.incidentManage.service.AccidentReportService;
+import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressFileInfoService;
 import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressInfoService;
 import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentReportFileInfoService;
 import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentReportInfoService;
@@ -51,6 +49,9 @@
 
     @Autowired
     private AccidentExpressInfoService accidentExpressInfoService;
+
+    @Autowired
+    private AccidentExpressFileInfoService accidentExpressFileInfoService;
 
 
     @Override
@@ -140,12 +141,20 @@
             throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST);
         } else {
             BeanUtils.copyProperties(AccidentReportInfoDetailDO, AccidentReportDetailRespDTO);
-            //查找对应的附件
+            //查找事故报告对应的附件
             List<AccidentReportFileInfoDO> AccidentReportFileInfoDOList = accidentReportFileInfoService.selectByAccidentReportId(id);
             if (!CollectionUtils.isEmpty(AccidentReportFileInfoDOList)) {
                 List<AccidentReportFileRespDTO> accidentReportFileRespDTOList = BeanCopyUtils.copyBeanList(AccidentReportFileInfoDOList, AccidentReportFileRespDTO.class);
                 AccidentReportDetailRespDTO.setFileList(accidentReportFileRespDTOList);
             }
+            //  查找事故快报对应的附件
+            List<AccidentExpressFileInfoDO> AccidentExpressFileInfoDOList = accidentExpressFileInfoService.selectByAccidentExpressId(AccidentReportDetailRespDTO.getAccidentExpressId());
+            if (!CollectionUtils.isEmpty(AccidentExpressFileInfoDOList)) {
+                List<AccidentExpressFileRespDTO> accidentExpressFileRespDTOList = BeanCopyUtils.copyBeanList(AccidentExpressFileInfoDOList, AccidentExpressFileRespDTO.class);
+                AccidentReportDetailRespDTO.setExpressFileList(accidentExpressFileRespDTOList);
+            }
+
+
             return new ResultVO<>(ResultCodes.OK, AccidentReportDetailRespDTO);
         }
     }

--
Gitblit v1.9.2