Przeglądaj źródła

feature: 任务类型同步字段修改

mazq 1 rok temu
rodzic
commit
d9b6a2b088

+ 0 - 25
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/sub/dto/tasktype/CheckTaskTypeItemResp.java

@@ -1,25 +0,0 @@
-package com.dragoninfo.dcuc.auth.sub.dto.tasktype;
-
-import lombok.Data;
-
-/**
- * <p>
- * 检查任务返回
- * </p>
- *
- * @author huangzqa
- * @date 2023/5/31
- */
-@Data
-public class CheckTaskTypeItemResp {
-
-    /**
-     * 任务类型
-     */
-    private String taskClass;
-
-    /**
-     * 标题
-     */
-    private String title;
-}

+ 40 - 0
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/sub/dto/tasktype/TaskInfoDetailResp.java

@@ -0,0 +1,40 @@
+package com.dragoninfo.dcuc.auth.sub.dto.tasktype;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * <p>
+ * 任务详情
+ * </p>
+ *
+ * @author huangzqa
+ * @date 2023/5/31
+ */
+@Data
+public class TaskInfoDetailResp {
+
+    /**
+     * 任务代码
+     */
+    @ApiModelProperty(value = "任务代码")
+    private String taskCode;
+
+    /**
+     * 任务名称
+     */
+    @ApiModelProperty(value = "任务名称")
+    private String taskName;
+
+    /**
+     * 任务类型代码
+     */
+    @ApiModelProperty(value = "任务类型代码")
+    private String taskClassCode;
+
+    /**
+     * 任务类型名称
+     */
+    @ApiModelProperty(value = "任务类型名称")
+    private String taskClassName;
+}

+ 17 - 45
dcuc-auth-model/src/main/java/com/dragoninfo/dcuc/auth/sub/dto/tasktype/TaskTypeInfoDto.java

@@ -1,5 +1,6 @@
 package com.dragoninfo.dcuc.auth.sub.dto.tasktype;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 /**
@@ -12,64 +13,35 @@ import lombok.Data;
 public class TaskTypeInfoDto {
 
     /**
-     * id
+     * 任务类型代码
      */
-    private int id;
-
-    /**
-     * 任务类型编码
-     */
-    private String code;
-
+    @ApiModelProperty(value = "任务类型代码")
+    private String taskClassCode;
     /**
      * 任务类型名称
      */
-    private String name;
-
-    /**
-     * 注释
-     */
-    private String remark;
-
-    /**
-     * 层级
-     */
-    private String level;
-
+    @ApiModelProperty(value = "任务类型名称")
+    private String taskClassName;
     /**
      * 父任务类型ID
      */
-    private String parentCode;
-
-    /**
-     * 是否叶子节点
-     */
-    private String isLeaf;
-
+    @ApiModelProperty(value = "父任务类型ID")
+    private String parentId;
     /**
-     * 警种,多警种用英文逗号分隔
+     * 父任务类型代码
      */
-    private String policeTag;
-
-    /**
-     * 警种和流程关联关系,警种:流程定义ID
-     * 多数据时,每对数据用应用逗号分隔
-     */
-    private String processIds;
-
-    /**
-     * 来源应用ID
-     */
-    private String appId;
-
+    @ApiModelProperty(value = "父任务类型代码")
+    private String parentClassCode;
     /**
-     * 来源应用名称
+     * 父任务类型名称
      */
-    private String appName;
+    @ApiModelProperty(value = "父任务类型名称")
+    private String parentClassName;
 
     /**
-     * 是否自动审批
+     * 来源应用代码
      */
-    private String isAutoReview;
+    @ApiModelProperty(value = "来源应用代码")
+    private String sourceAppCode;
 
 }

+ 2 - 2
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/business/IApproveRemoteCallBusiness.java

@@ -1,6 +1,6 @@
 package com.dragoninfo.dcuc.auth.business;
 
-import com.dragoninfo.dcuc.auth.sub.dto.tasktype.CheckTaskTypeItemResp;
+import com.dragoninfo.dcuc.auth.sub.dto.tasktype.TaskInfoDetailResp;
 import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
 import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
 
@@ -28,7 +28,7 @@ public interface IApproveRemoteCallBusiness {
      * @param taskId     任务ID
      * @return 返回内容
      */
-    ResponseDTO<CheckTaskTypeItemResp> checkTaskIdRequest(String appTokenId, String taskId);
+    ResponseDTO<TaskInfoDetailResp> getTaskInfoDetail(String appTokenId, String taskId);
 
 
 }

+ 6 - 6
dcuc-auth-service/src/main/java/com/dragoninfo/dcuc/auth/business/impl/ApproveRemoteCallBusinessImpl.java

@@ -4,7 +4,7 @@ import com.dragoninfo.dcuc.auth.business.IApproveRemoteCallBusiness;
 import com.dragoninfo.dcuc.auth.config.DcucAuthConfig;
 import com.dragoninfo.dcuc.auth.constance.ApprovalApiConstance;
 import com.dragoninfo.dcuc.auth.sub.dto.tasktype.ApprovalResultEnum;
-import com.dragoninfo.dcuc.auth.sub.dto.tasktype.CheckTaskTypeItemResp;
+import com.dragoninfo.dcuc.auth.sub.dto.tasktype.TaskInfoDetailResp;
 import com.dragoninfo.dcuc.auth.sub.dto.tasktype.TaskTypeInfoDto;
 import com.dragoninfo.dcuc.auth.sub.entity.AuthSubTaskType;
 import com.dragoninfo.dcuc.auth.sub.service.IAuthSubTaskTypeService;
@@ -85,10 +85,10 @@ public class ApproveRemoteCallBusinessImpl implements IApproveRemoteCallBusiness
      * @return 返回内容
      */
     @Override
-    public ResponseDTO<CheckTaskTypeItemResp> checkTaskIdRequest(String appTokenId, String taskId) {
+    public ResponseDTO<TaskInfoDetailResp> getTaskInfoDetail(String appTokenId, String taskId) {
         String baseUrl = dcucAuthConfig.getApprovalCenterUrl();
         String taskIdCheckUrl = baseUrl + ApprovalApiConstance.TASK_ID_CHECK_URL;
-        TypeReference<ResponseDTO<CheckTaskTypeItemResp>> typeReference = new TypeReference<ResponseDTO<CheckTaskTypeItemResp>>() {
+        TypeReference<ResponseDTO<TaskInfoDetailResp>> typeReference = new TypeReference<ResponseDTO<TaskInfoDetailResp>>() {
         };
         log.info("获取审批任务详情地址:{}", taskIdCheckUrl);
         return baseGet("获取审批任务详情", "获取审批任务详情失败", taskIdCheckUrl, typeReference);
@@ -173,9 +173,9 @@ public class ApproveRemoteCallBusinessImpl implements IApproveRemoteCallBusiness
             List<AuthSubTaskType> collect = listResult.stream()
                     .map(e -> {
                         AuthSubTaskType taskType = new AuthSubTaskType();
-                        taskType.setTaskTypeCode(e.getCode());
-                        taskType.setTaskTypeName(e.getName());
-                        taskType.setParentCode(e.getParentCode());
+                        taskType.setTaskTypeCode(e.getTaskClassCode());
+                        taskType.setTaskTypeName(e.getTaskClassName());
+                        taskType.setParentCode(e.getParentClassCode());
                         return taskType;
                     }).collect(Collectors.toList());
             taskTypeService.saveByCodes(collect);