limeng 2 anni fa
parent
commit
9500c96c98

+ 17 - 3
mybusiness/src/main/resources/mapper/zhsq_qk/ksh/ZhsqKshMapper.xml

@@ -71,6 +71,7 @@ dept_id jdId, dept_name jdName from sys_dept where post_id = 15 and parent_id =
                 <if test="jdId != null  and jdId != ''"> AND jd_id = #{jdId} </if>
             ) z
     </select>
+
     <select id="kshZhongdianrenkouTotal" parameterType="ZhsqKshVo" resultType="ZhsqKshTotal">
         SELECT
             count(IF(per_ldsx = 1, 1, NULL)) changzhuCount,
@@ -79,11 +80,24 @@ dept_id jdId, dept_name jdName from sys_dept where post_id = 15 and parent_id =
             count(IF(per_ldsx = 4, 1, NULL)) zanzhuCount,
             count(IF(per_sfkg = 1, 1, NULL)) kongguaCount,
             count(IF(per_sfkg = 2, 1, NULL)) feikongguaCount,
-            count(IF(t.tsrq_id = 7, 1, NULL)) shangcanCount,
-            count(IF(t.tsrq_id = 20, 1, NULL)) laolingCount
+            (
+                SELECT
+                count(1)
+                FROM
+                zhsq_person_tsrq
+                WHERE
+                tsrq_id = 7
+            ) shangcanCount,
+            (
+                SELECT
+                count(1)
+                FROM
+                zhsq_person_tsrq
+                WHERE
+                tsrq_id = 20
+            ) laolingCount
         FROM
             zhsq_person p
-        LEFT JOIN zhsq_person_tsrq t ON p.per_id = t.per_id
         WHERE
             p.del_flag = 0
         AND p.per_del_state = 1

+ 0 - 1
mybusiness/src/main/resources/mapper/zhsq_qk/person/ZhsqPersonMapper.xml

@@ -446,7 +446,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="perRddb != null  and perRddb != ''"> and per_rddb = #{perRddb}</if>
         <if test="perLdsx != null  and perLdsx != ''"> and per_ldsx = #{perLdsx}</if>
         <if test="perDelState != null  and perDelState != ''"> and per_del_state = #{perDelState}</if>
-        group by zhsq_person.per_id
     </select>
     <select id="selectZhsqPersonList" parameterType="ZhsqPerson" resultMap="ZhsqPersonResultNoAssociation">
         <include refid="selectZhsqPersonVoNoAssociation"/>