Quellcode durchsuchen

质量问题反馈表api更新

shudonghui vor 1 Jahr
Ursprung
Commit
648c13460b

+ 69 - 18
sop-business/src/main/java/com/qmth/sop/business/bean/result/TBQualityProblemApplyResult.java

@@ -9,10 +9,7 @@ import java.io.Serializable;
 public class TBQualityProblemApplyResult extends TBQualityProblemApply implements Serializable {
 
     @ApiModelProperty(value = "责任人")
-    private String userName;
-
-    @ApiModelProperty(value = "创建人")
-    private String createName;
+    private String userNames;
 
     @ApiModelProperty(value = "客户名称")
     private String custom;
@@ -23,21 +20,19 @@ public class TBQualityProblemApplyResult extends TBQualityProblemApply implement
     @ApiModelProperty(value = "实施产品")
     private ProductTypeEnum sopType;
 
-    public String getUserName() {
-        return userName;
-    }
 
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getCreateName() {
-        return createName;
-    }
-
-    public void setCreateName(String createName) {
-        this.createName = createName;
-    }
+    @ApiModelProperty(value = "提交人")
+    private String submitter;
+    @ApiModelProperty(value = "提交时间")
+    private long submissionTime;
+    @ApiModelProperty(value = "状态,START:已开始,AUDITING:审核中,REJECT:已驳回,END:已终止,FINISH:已结束")
+    private String status;
+    @ApiModelProperty(value = "更新时间")
+    private long updateDateTime;
+    @ApiModelProperty(value = "当前节点")
+    private String setup;
+    @ApiModelProperty(value = "当前负责人")
+    private String pendApproveUsers;
 
     public String getCustom() {
         return custom;
@@ -62,4 +57,60 @@ public class TBQualityProblemApplyResult extends TBQualityProblemApply implement
     public void setSopType(ProductTypeEnum sopType) {
         this.sopType = sopType;
     }
+
+    public String getSubmitter() {
+        return submitter;
+    }
+
+    public void setSubmitter(String submitter) {
+        this.submitter = submitter;
+    }
+
+    public long getSubmissionTime() {
+        return submissionTime;
+    }
+
+    public void setSubmissionTime(long submissionTime) {
+        this.submissionTime = submissionTime;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public long getUpdateDateTime() {
+        return updateDateTime;
+    }
+
+    public void setUpdateDateTime(long updateDateTime) {
+        this.updateDateTime = updateDateTime;
+    }
+
+    public String getSetup() {
+        return setup;
+    }
+
+    public void setSetup(String setup) {
+        this.setup = setup;
+    }
+
+    public String getPendApproveUsers() {
+        return pendApproveUsers;
+    }
+
+    public void setPendApproveUsers(String pendApproveUsers) {
+        this.pendApproveUsers = pendApproveUsers;
+    }
+
+    public String getUserNames() {
+        return userNames;
+    }
+
+    public void setUserNames(String userNames) {
+        this.userNames = userNames;
+    }
 }

+ 28 - 6
sop-business/src/main/resources/mapper/TBQualityProblemApplyMapper.xml

@@ -3,26 +3,48 @@
 <mapper namespace="com.qmth.sop.business.mapper.TBQualityProblemApplyMapper">
 
     <select id="query" resultType="com.qmth.sop.business.bean.result.TBQualityProblemApplyResult">
+<!--        SELECT-->
+<!--        a.*,-->
+<!--        u.real_name user_name,-->
+<!--        cu.real_name create_name,-->
+<!--        si.type sop_type,-->
+<!--        sc.NAME custom,-->
+<!--        sc.type custom_type-->
+<!--        FROM-->
+<!--        t_b_quality_problem_apply a-->
+<!--        LEFT JOIN sys_user u ON u.id = a.user_id-->
+<!--        LEFT JOIN sys_user cu ON cu.id = a.create_id-->
+<!--        LEFT JOIN t_b_sop_info si ON si.crm_no = a.crm_no-->
+<!--        AND si.sop_no = a.sop_no-->
+<!--        LEFT JOIN sys_custom sc ON sc.id = si.custom_id-->
         SELECT
         a.*,
-        u.real_name user_name,
-        cu.real_name create_name,
         si.type sop_type,
         sc.NAME custom,
-        sc.type custom_type
+        sc.type custom_type,
+        fa.STATUS,
+        fa.setup,
+        fa.create_time submission_time,
+        fa.update_time update_date_time,
+        cu.real_name submitter ,
+        (select group_concat(u.real_name) from sys_user u where u.id in (a.user_ids) order by u.id) user_names,
+        (select group_concat(u.real_name) from sys_user u where u.id in (fl.pend_approve_id ) order by u.id) pend_approve_users
         FROM
         t_b_quality_problem_apply a
-        LEFT JOIN sys_user u ON u.id = a.user_id
-        LEFT JOIN sys_user cu ON cu.id = a.create_id
         LEFT JOIN t_b_sop_info si ON si.crm_no = a.crm_no
         AND si.sop_no = a.sop_no
         LEFT JOIN sys_custom sc ON sc.id = si.custom_id
+        LEFT JOIN t_f_custom_flow_entity fe ON fe.`code` = a.problem_no
+        LEFT JOIN t_f_flow_approve fa ON fa.id = fe.flow_id
+        LEFT JOIN sys_user cu ON cu.id = fa.create_id
+        LEFT JOIN t_f_flow_log fl ON fl.flow_id = fa.flow_id
         <where>
             <if test="serviceId != null and serviceId != ''">
                 and a.service_id = #{serviceId}
             </if>
             <if test="userId != null and userId != ''">
-                and a.user_id = #{userId}
+<!--                and a.user_ids = #{userId}-->
+                LOCATE('#{userId}',a.user_ids)
             </if>
             <if test="type != null and type != ''">
                 and a.type = #{type}