|
|
@@ -1124,6 +1124,7 @@ and
|
|
|
AND b.deleted = 0
|
|
|
and b.is_lock = 0
|
|
|
AND c.check_type =3
|
|
|
+ AND a.`status` =3
|
|
|
and a.org_path LIKE concat(#{orgPath}, '%')
|
|
|
AND a.start_time BETWEEN #{startTime} and #{endTime}
|
|
|
</select>
|
|
|
@@ -1132,11 +1133,11 @@ and
|
|
|
COUNT( a.id )
|
|
|
FROM
|
|
|
core_edu_training_task a
|
|
|
- LEFT JOIN core_edu_training_plan b ON a.plan_id = b.id
|
|
|
+ LEFT JOIN sys_org c ON a.org_id = c.id
|
|
|
WHERE
|
|
|
- b.exec_org_type = 3
|
|
|
- AND b.deleted =0
|
|
|
- and a.org_path like concat(concat('%',#{orgPath}),'%')
|
|
|
+ c.type =3
|
|
|
+ AND a.`status`=2
|
|
|
+ and a.org_path like concat(concat('%',#{orgPath}),'%')
|
|
|
AND a.training_start_date_time BETWEEN #{startTime} and #{endTime}
|
|
|
</select>
|
|
|
<select id="getEduUser" resultType="java.lang.Integer">
|
|
|
@@ -1153,8 +1154,10 @@ and
|
|
|
COUNT(a.id)
|
|
|
FROM
|
|
|
core_drill_task a
|
|
|
- LEFT JOIN core_drill_plan b ON a.plan_id = b.id
|
|
|
- WHERE b.exec_org_type=3
|
|
|
+ -- LEFT JOIN core_drill_plan b ON a.plan_id = b.id
|
|
|
+ LEFT JOIN sys_org c ON a.org_id = c.id
|
|
|
+ WHERE c.type=3
|
|
|
+ AND a.`status`=2
|
|
|
and a.org_path like concat(concat('%',#{orgPath}),'%')
|
|
|
AND a.drill_start_time BETWEEN #{startTime} and #{endTime}
|
|
|
</select>
|
|
|
@@ -1176,6 +1179,7 @@ and
|
|
|
core_drill_task a
|
|
|
LEFT JOIN core_drill_plan b ON a.plan_id = b.id
|
|
|
WHERE b.exec_org_type=4
|
|
|
+ and a.`status`=2
|
|
|
and a.org_path like concat(concat('%',#{orgPath}),'%')
|
|
|
AND a.drill_start_time BETWEEN #{startTime} and #{endTime}
|
|
|
</select>
|
|
|
@@ -1294,13 +1298,16 @@ and
|
|
|
</select>
|
|
|
<select id="getHeadSafeCheckNumber" resultType="java.lang.Integer">
|
|
|
SELECT
|
|
|
- COUNT( a.id )
|
|
|
+ count(a.id)
|
|
|
FROM
|
|
|
- core_safety_task a
|
|
|
- LEFT JOIN core_safecheck_plan b ON a.plan_id = b.id
|
|
|
+ core_safety_task a
|
|
|
+ LEFT JOIN core_safecheck_plan b ON a.plan_id = b.id
|
|
|
WHERE
|
|
|
- b.check_type = 1
|
|
|
- AND a.org_path LIKE concat(#{orgPath}, '%')
|
|
|
+ b.check_type = 4
|
|
|
+ AND b.plan_create_org_id != b.plan_of_org_id
|
|
|
+ AND a.`status` =3
|
|
|
+ AND a.ymd_year =#{year}
|
|
|
+ AND a.check_org_id =#{orgId}
|
|
|
</select>
|
|
|
<select id="getHeadSafeCheckNetworkNumber" resultType="java.lang.Integer">
|
|
|
SELECT
|
|
|
@@ -1308,13 +1315,16 @@ and
|
|
|
FROM
|
|
|
core_safety_task a
|
|
|
LEFT JOIN core_safecheck_plan b ON a.plan_id = b.id
|
|
|
- LEFT JOIN sys_org c ON c.id = a.org_id
|
|
|
+-- LEFT JOIN sys_org c ON c.id = a.org_id
|
|
|
WHERE
|
|
|
- b.check_type = 1
|
|
|
- AND c.deleted = 0
|
|
|
- and c.is_lock = 0
|
|
|
+ b.check_type = 4
|
|
|
+ AND b.plan_create_org_id != b.plan_of_org_id
|
|
|
+ AND a.`status` =3
|
|
|
+-- AND c.deleted = 0
|
|
|
+-- and c.is_lock = 0
|
|
|
-- AND c.type = 4
|
|
|
- AND a.org_path LIKE concat(#{orgPath}, '%')
|
|
|
+ AND a.ymd_year =#{year}
|
|
|
+ AND a.check_org_id =#{orgId}
|
|
|
</select>
|
|
|
<select id="getDangerNumber" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
@@ -1334,8 +1344,10 @@ and
|
|
|
LEFT JOIN core_safecheck_plan c ON c.id = b.plan_id
|
|
|
WHERE
|
|
|
src_type = 2
|
|
|
- AND c.check_type = 1
|
|
|
- AND b.org_path LIKE concat(#{orgPath}, '%')
|
|
|
+ AND c.check_type = 4
|
|
|
+ AND c.plan_create_org_id != c.plan_of_org_id
|
|
|
+ AND b.ymd_year =#{year}
|
|
|
+ AND b.check_org_id =#{orgId}
|
|
|
</select>
|
|
|
<select id="selectSysOrgByPathAndType" resultType="com.xunmei.system.api.domain.SysOrg">
|
|
|
SELECT
|