Browse Source

流程详情返回审核人名称

陈长荣 5 months ago
parent
commit
ef1c08fe40

+ 12 - 0
jfcloud-gene-biz/src/main/java/com/github/jfcloud/gene/flow/dto/FlowDetailDto.java

@@ -65,6 +65,18 @@ public class FlowDetailDto {
     @Schema(description = "文件下载链接")
     private String fileUrl;
 
+    @Schema(description = "基因编辑部门负责人id")
+    private Long geneEditPlId;
+
+    @Schema(description = "基因编辑部门负责人名称")
+    private String geneEditPlName;
+
+    @Schema(description = "项目管理部审核人id")
+    private Long projectManageId;
+
+    @Schema(description = "项目管理部审核人名称")
+    private String projectManageName;
+
     @Schema(description = "品系定制")
     private StrainCustomDto custom;
 

+ 4 - 12
jfcloud-gene-biz/src/main/java/com/github/jfcloud/gene/flow/service/impl/FlowInfoServiceImpl.java

@@ -111,6 +111,8 @@ public class FlowInfoServiceImpl extends ServiceImpl<FlowInfoMapper, FlowInfo> i
         Assert.notNull(flowInfo, "基因定制流程不存在");
 
         FlowDetailDto detail = BeanUtil.copyProperties(flowInfo, FlowDetailDto.class);
+        detail.setGeneEditPlName(userIdNameCache.getNicknameByUserId(flowInfo.getGeneEditPlId()));
+        detail.setProjectManageName(userIdNameCache.getNicknameByUserId(flowInfo.getProjectManageId()));
         detail.setStatusLabel(Objects.requireNonNull(GeneStatusEnum.getByStatus(detail.getStatus())).getDescription());
         detail.setCustom(customInfoService.getByFlowId(id));
         detail.setPurification(purificationInfoService.getByFlowId(id));
@@ -129,21 +131,11 @@ public class FlowInfoServiceImpl extends ServiceImpl<FlowInfoMapper, FlowInfo> i
         flowInfo.setId(CustomIdGenerator.nextId());
 
         if (vo.getCustom() != null) {
-            if (vo.getPurification() != null) {
-                flowInfo.setTarget(GeneTargetEnum.CUSTOM + "," + GeneTargetEnum.PURIFICATION);
-
-                vo.getPurification().setFlowId(flowInfo.getId());
-                purificationInfoService.saveForm(vo.getPurification());
-            } else {
-                flowInfo.setTarget(GeneTargetEnum.CUSTOM.getCode());
-            }
-
             vo.getCustom().setFlowId(flowInfo.getId());
             customInfoService.saveForm(vo.getCustom());
+        }
 
-        } else if (vo.getPurification() != null) {
-            flowInfo.setTarget(GeneTargetEnum.PURIFICATION.getCode());
-
+        if (vo.getPurification() != null) {
             vo.getPurification().setFlowId(flowInfo.getId());
             purificationInfoService.saveForm(vo.getPurification());
         }

+ 3 - 0
jfcloud-gene-biz/src/main/java/com/github/jfcloud/gene/flow/vo/FlowDetailVo.java

@@ -11,6 +11,9 @@ import javax.validation.constraints.NotNull;
 @Data
 public class FlowDetailVo {
 
+    @Schema(description = "基因定制获得目标")
+    private String target;
+
     /**
      * 项目名称
      */