guarantee-lsq %!s(int64=2) %!d(string=hai) anos
pai
achega
5d50425487

+ 0 - 5
platform-dao/src/main/java/com/platform/dao/vo/query/fill/FillGatherTaskVO.java

@@ -108,10 +108,5 @@ public class FillGatherTaskVO extends BaseVO implements Serializable {
      */
     private Integer period;
 
-    /**
-     * 巡检内容项集合
-     */
-    private List<FillInfo> fillInfos;
-
 
 }

+ 5 - 1
platform-dao/src/main/java/com/platform/dao/vo/query/fill/FillGatherVO.java

@@ -2,6 +2,7 @@ package com.platform.dao.vo.query.fill;
 
 import com.platform.common.bean.BaseVO;
 import com.platform.dao.entity.fill.FillGatherInfo;
+import com.platform.dao.entity.fill.FillInfo;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -72,8 +73,11 @@ public class FillGatherVO extends BaseVO implements Serializable {
      * 频次周期(天)
      */
     private Integer period;
+    /**
+     * 巡检内容项集合
+     */
+    private List<FillInfo> fillInfos;
 
-    private List<FillGatherInfo> infos;
 
 
 }

+ 9 - 3
platform-service/src/main/java/com/platform/service/fill/impl/FillGatherServiceImpl.java

@@ -13,9 +13,11 @@ import com.platform.dao.dto.fill.FillGatherDTO;
 import com.platform.dao.entity.fill.FillGather;
 import com.platform.dao.entity.fill.FillGatherInfo;
 import com.platform.dao.entity.fill.FillGatherTask;
+import com.platform.dao.entity.fill.FillInfo;
 import com.platform.dao.mapper.fill.FillGatherInfoMapper;
 import com.platform.dao.mapper.fill.FillGatherMapper;
 import com.platform.dao.mapper.fill.FillGatherTaskMapper;
+import com.platform.dao.mapper.fill.FillInfoMapper;
 import com.platform.dao.vo.query.fill.FillGatherVO;
 import com.platform.service.base.impl.BaseServiceImpl;
 import com.platform.service.fill.FillGatherService;
@@ -40,6 +42,7 @@ public class FillGatherServiceImpl extends BaseServiceImpl<FillGatherMapper, Fil
 
     private final FillGatherInfoMapper fillGatherInfoMapper;
     private final FillGatherTaskMapper fillGatherTaskMapper;
+    private final FillInfoMapper fillInfoMapper;
     @Override
     public int batchDelete(List<String> ids) {
         Weekend<FillGather> weekend = new Weekend<>(FillGather.class);
@@ -135,9 +138,12 @@ public class FillGatherServiceImpl extends BaseServiceImpl<FillGatherMapper, Fil
     public FillGatherVO getVOById(String id) {
         FillGather gather = mapper.selectByPrimaryKey(id);
         FillGatherVO vo = BeanConverterUtil.copyObjectProperties(gather, FillGatherVO.class);
-        FillGatherInfo queryInfo = new FillGatherInfo();
-        queryInfo.setGatherId(id);
-        vo.setInfos(fillGatherInfoMapper.select(queryInfo));
+        List<FillInfo> fillInfos = new ArrayList<>();
+        List<FillGatherInfo> infos = fillGatherInfoMapper.select(new FillGatherInfo().setGatherId(gather.getId()));
+        for(FillGatherInfo info : infos){
+            fillInfos.add(fillInfoMapper.selectByPrimaryKey(info.getInfoId()));
+        }
+        vo.setFillInfos(fillInfos);
         return vo;
     }
 }

+ 0 - 6
platform-service/src/main/java/com/platform/service/fill/impl/FillGatherTaskServiceImpl.java

@@ -203,12 +203,6 @@ public class FillGatherTaskServiceImpl extends BaseServiceImpl<FillGatherTaskMap
         FillGatherTask task = mapper.selectByPrimaryKey(id);
         FillGatherTaskVO vo = BeanConverterUtil.copyObjectProperties(task,FillGatherTaskVO.class);
         vo.setDetails(fillGatherTaskDetailMapper.selectVOByTaskId(id));
-        List<FillInfo> fillInfos = new ArrayList<>();
-        List<FillGatherInfo> infos = fillGatherInfoMapper.select(new FillGatherInfo().setGatherId(task.getGatherId()));
-        for(FillGatherInfo info : infos){
-            fillInfos.add(fillInfoMapper.selectByPrimaryKey(info.getInfoId()));
-        }
-        vo.setFillInfos(fillInfos);
         return vo;
     }