瀏覽代碼

sop详情

车车 4 月之前
父節點
當前提交
04967623be

+ 1 - 1
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/sop/SopController.java

@@ -60,7 +60,7 @@ public class SopController {
     @PreAuthorize("@ss.hasPermission('iscs:sop:query')")
     public CommonResult<SopRespVO> selectSopById(@RequestParam("id") Long id) {
         SopRespVO sop = sopService.getSop(id);
-        return success(BeanUtils.toBean(sop, SopRespVO.class));
+        return success(sop);
     }
 
     @GetMapping("/getSopPage")

+ 3 - 3
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/sop/vo/SopRespVO.java

@@ -66,12 +66,12 @@ public class SopRespVO {
     private LocalDateTime createTime;
 
     @Schema(description = "流程步骤数据")
-    private List<SopWorkflowStepSaveReqVO> sopStepList;
+    private List<SopWorkflowStepRespVO> sopStepList;
 
     @Schema(description = "点位数据")
-    private List<SopPointsSaveReqVO> sopPointsList;
+    private List<SopPointsRespVO> sopPointsList;
 
     @Schema(description = "关联人员信息")
-    private List<SopUserSaveReqVO> sopUserList;
+    private List<SopUserRespVO> sopUserList;
 
 }

+ 14 - 4
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/service/sop/SopServiceImpl.java

@@ -4,9 +4,7 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.lang.Assert;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.SopPageReqVO;
-import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.SopRespVO;
-import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.SopSaveReqVO;
+import cn.iocoder.yudao.module.iscs.controller.admin.sop.vo.*;
 import cn.iocoder.yudao.module.iscs.dal.dataobject.sop.SopDO;
 import cn.iocoder.yudao.module.iscs.dal.mysql.sop.SopMapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -98,8 +96,20 @@ public class SopServiceImpl extends ServiceImpl<SopMapper, SopDO> implements Sop
         SopDO sopDO = sopMapper.selectById(id);
         Assert.isTrue(sopDO != null, "数据不存在!");
         SopRespVO bean = BeanUtils.toBean(sopDO, SopRespVO.class);
+        // 查询SopUser
+        SopUserPageReqVO sopUserPageReqVO = new SopUserPageReqVO().setSopId(id);
+        List<SopUserRespVO> sopUserList = sopUserService.getSopUserList(sopUserPageReqVO);
+        // 查询SopPoints
+        SopPointsPageReqVO sopPointsPageReqVO = new SopPointsPageReqVO().setSopId(id);
+        List<SopPointsRespVO> sopPointsList = sopPointsService.getSopPointsList(sopPointsPageReqVO);
+        // 查询SopWorkflowStep
+        SopWorkflowStepPageReqVO sopWorkflowStepPageReqVO = new SopWorkflowStepPageReqVO().setSopId(id);
+        List<SopWorkflowStepRespVO> sopWorkflowStepList = sopWorkflowStepService.getSopWorkflowStepList(sopWorkflowStepPageReqVO);
 
-
+        // 组装数据
+        bean.setSopUserList(sopUserList);
+        bean.setSopPointsList(sopPointsList);
+        bean.setSopStepList(sopWorkflowStepList);
         return bean;
     }