Bläddra i källkod

办结时需上传图片

limeng 1 vecka sedan
förälder
incheckning
5a04bd89d0

+ 1 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/controller/CentereventTEventcatalogueController.java

@@ -25,6 +25,7 @@ import com.sooka.sponest.event.centereventteventtype.domain.CentereventTEventtyp
 import com.sooka.sponest.event.centereventteventtype.service.ICentereventTEventtypeService;
 import com.sooka.sponest.event.centereventtfirelog.domain.CentereventTFireLog;
 import com.sooka.sponest.event.centereventtfirelog.service.ICentereventTFireLogService;
+import com.sooka.sponest.event.centereventtlog.domain.CentereventTLog;
 import com.sooka.sponest.event.remoteapi.RemoteDataService;
 import com.sooka.sponest.event.remoteapi.domain.CenterdataTAttach;
 import com.sooka.sponest.event.utils.EventProducerUtil;

+ 3 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/domain/bo/CentereventtDeptEventBO.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.event.centereventteventcatalogue.domain.bo;
 
 import com.sooka.sponest.event.centereventtfireinformation.domain.FireInformation;
 import com.sooka.sponest.event.centereventtforestfireloss.domain.ForestFireLoss;
+import com.sooka.sponest.event.remoteapi.domain.CenterdataTAttach;
 import lombok.Data;
 
 import java.util.List;
@@ -42,4 +43,6 @@ public class CentereventtDeptEventBO {
     private String address;
 
     private int version;
+
+    private List<CenterdataTAttach> attach; // 图片
 }

+ 15 - 0
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/CentereventTEventcatalogueServiceImpl.java

@@ -552,6 +552,21 @@ public class CentereventTEventcatalogueServiceImpl extends BaseService implement
         } else if (centereventtDeptEventBO.getEventStatus().equals("bj")) {
             logMessage = "办结该事件";
             centereventTLog.setOperation(BUS_OPER_TYPE_2);
+            //办结时插入图片
+            if (StringUtils.isNotEmpty(centereventtDeptEventBO.getAttach())) {
+                for (int i = 0; i < centereventtDeptEventBO.getAttach().size(); i++) {
+                    CenterdataTAttach attach = new CenterdataTAttach();
+                    attach.setBusId(centereventTLog.getId());
+                    attach.setAttachPath(centereventtDeptEventBO.getAttach().get(i).getAttachPath());
+                    attach.setBusIndx(BUS_INDEX_1);
+                    attach.setBusSource("reporting_source_2".equals(centereventTEventcatalogue.getReportSource()) ? "PC" : "APP");
+                    attach.setFileName(centereventtDeptEventBO.getAttach().get(i).getFileName());
+                    attach.setFileType(FilePrefixUtils.getUrlSuffix(centereventtDeptEventBO.getAttach().get(i).getAttachPath()));
+                    attach.setAttachSorts(i);
+                    attach(attach);
+                    remoteDataService.insertAttach(attach);
+                }
+            }
         } else if (centereventtDeptEventBO.getEventStatus().equals("gd")) {
             logMessage = "归档该事件";
             centereventTLog.setOperation(BUS_OPER_TYPE_2);