Parcourir la source

Merge remote-tracking branch 'origin/dev_v1.0.0' into dev_v1.0.0

wangliang il y a 1 an
Parent
commit
18212fdcd0

+ 1 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/TBQualityProblemApplyResult.java

@@ -34,6 +34,7 @@ public class TBQualityProblemApplyResult extends TBQualityProblemApply implement
     @ApiModelProperty(value = "提交人")
     private String submitter;
 
+
     @ApiModelProperty(value = "提交时间")
     private Long submissionTime;
 

+ 11 - 3
sop-business/src/main/resources/mapper/SysDeviceMapper.xml

@@ -24,10 +24,18 @@
             <if test="bound != null and bound != ''">
                 and a.bound = #{bound}
             </if>
-            <if test="enable != null and enable != ''">
-                and a.enable = #{enable}
-            </if>
 
+
+            <if test="enable != null">
+                <choose>
+                    <when test="enable">
+                        and a.enable =1
+                    </when>
+                    <otherwise>
+                        and a.enable = 0
+                    </otherwise>
+                </choose>
+            </if>
         </where>
         order by a.create_time desc
     </select>

+ 9 - 1
sop-business/src/main/resources/mapper/SysDingGroupMapper.xml

@@ -35,8 +35,16 @@
             <if test="status != null">
                 AND t.status = #{status}
             </if>
+
             <if test="faceOpen != null">
-                AND a.face_open = #{faceOpen}
+                <choose>
+                    <when test="faceOpen">
+                        AND a.face_open = 1
+                    </when>
+                    <otherwise>
+                        AND a.face_open = 0
+                    </otherwise>
+                </choose>
             </if>
             <if test="createStartTime != null and createStartTime != '' ">
                 <![CDATA[

+ 3 - 18
sop-business/src/main/resources/mapper/TBQualityProblemApplyMapper.xml

@@ -3,20 +3,6 @@
 <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
         distinct a.*,
         si.type sopType,
@@ -37,8 +23,7 @@
         where find_in_set(us1.id, (select tffl.pend_approve_id from t_f_flow_log tffl where tffl.flow_id = fe.flow_id order by tffl.create_time desc limit 1))) pend_approve_users
         FROM
         t_b_quality_problem_apply a
-        LEFT JOIN t_b_sop_info si ON si.crm_no = a.crm_no
-        AND si.sop_no = a.sop_no
+        LEFT JOIN t_b_sop_info si on 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.flow_id = fe.flow_id
@@ -57,10 +42,10 @@
                 and a.type = #{type}
             </if>
             <if test="reason != null and reason != ''">
-                and sc.reason = #{reason}
+                and a.reason = #{reason}
             </if>
             <if test="degree != null and degree != ''">
-                and sc.influence_degree = #{degree}
+                and a.influence_degree = #{degree}
             </if>
             <if test="custom != null and custom != ''">
                 and sc.name like concat('%', #{custom} , '%')

+ 6 - 1
sop-business/src/main/resources/mapper/TBUserArchivesSupplierMapper.xml

@@ -7,5 +7,10 @@
         left join sys_user u on u.mobile_number=ua.mobile_number
         where us.supplier_id=#{supplierId}
     </select>-->
-    <select id="findUsersBySupplierId" resultType="com.qmth.sop.business.entity.SysUser"></select>
+    <select id="findUsersBySupplierId" resultType="com.qmth.sop.business.entity.SysUser">
+        SELECT u.* from t_b_user_archives_supplier us
+        left join t_b_user_archives ua on ua.id=us.user_archives_id
+        left join sys_user u on u.mobile_number=ua.mobile_number
+        where us.supplier_id=#{supplierId}
+    </select>
 </mapper>