guarantee-lsq 2 лет назад
Родитель
Сommit
476f0749c0

+ 4 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/fill/FillGatherVO.java

@@ -1,12 +1,14 @@
 package com.platform.dao.vo.query.fill;
 
 import com.platform.common.bean.BaseVO;
+import com.platform.dao.entity.fill.FillGatherInfo;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  * @Description 填报项目VO结果类
@@ -71,5 +73,7 @@ public class FillGatherVO extends BaseVO implements Serializable {
      */
     private Integer period;
 
+    private List<FillGatherInfo> infos;
+
 
 }

+ 2 - 2
platform-rest/src/main/java/com/platform/rest/controller/fill/FillGatherController.java

@@ -40,8 +40,8 @@ public class FillGatherController {
      * @return R
      */
     @GetMapping("/{id}")
-    public R<FillGather> getById(@PathVariable("id") String id) {
-        return new R<>(fillGatherService.getModelById(id));
+    public R<FillGatherVO> getById(@PathVariable("id") String id) {
+        return new R<>(fillGatherService.getVOById(id));
     }
 
     /**

+ 2 - 2
platform-rest/src/main/java/com/platform/rest/controller/fill/FillGatherTaskController.java

@@ -42,8 +42,8 @@ public class FillGatherTaskController {
      * @return R
      */
     @GetMapping("/{id}")
-    public R<FillGatherTask> getById(@PathVariable("id") String id) {
-        return new R<>(fillGatherTaskService.getModelById(id));
+    public R<FillGatherTaskVO> getById(@PathVariable("id") String id) {
+        return new R<>(fillGatherTaskService.getVOById(id));
     }
 
     /**

+ 2 - 0
platform-service/src/main/java/com/platform/service/fill/FillGatherService.java

@@ -42,4 +42,6 @@ public interface FillGatherService extends IBaseService<FillGather, FillGatherDT
      * @return :
      */
     FillGatherVO selectByCodeIdUseType(Integer codeId, Integer useType);
+
+    FillGatherVO getVOById(String id);
 }

+ 10 - 0
platform-service/src/main/java/com/platform/service/fill/impl/FillGatherServiceImpl.java

@@ -130,4 +130,14 @@ public class FillGatherServiceImpl extends BaseServiceImpl<FillGatherMapper, Fil
         }
         return BeanConverterUtil.copyObjectProperties(fillGathers.get(0), new FillGatherVO());
     }
+
+    @Override
+    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));
+        return vo;
+    }
 }