|
|
|
|
@ -7,8 +7,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<select id="queryDepartNegative" resultType="com.biutag.supervision.pojo.model.DepartNegativeModel"> |
|
|
|
|
SELECT |
|
|
|
|
d.*, |
|
|
|
|
count( DISTINCT nb.blameIdCode ) verify_police_size, |
|
|
|
|
count( n.id ) verify_size, |
|
|
|
|
count( DISTINCT nb.blameIdCode ) verify_police_size, |
|
|
|
|
count( n.negative_id ) verify_size, |
|
|
|
|
dc.score |
|
|
|
|
FROM |
|
|
|
|
( |
|
|
|
|
@ -17,7 +17,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
d1.short_name parent_depart_name, |
|
|
|
|
d.short_name depart_name, |
|
|
|
|
p.police_size, |
|
|
|
|
|
|
|
|
|
p.aux_size |
|
|
|
|
FROM |
|
|
|
|
sup_depart d |
|
|
|
|
@ -25,15 +24,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
LEFT JOIN sup_depart_police_size p ON p.depart_id = d.id |
|
|
|
|
WHERE |
|
|
|
|
d.LEVEL = 3 |
|
|
|
|
and d.statistics_group_id = #{departGroupId} |
|
|
|
|
<if test="departGroupId != null and departGroupId != ''"> |
|
|
|
|
and d.statistics_group_id = #{departGroupId} |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
) d |
|
|
|
|
LEFT JOIN negative n ON n.involveDepartId = d.depart_id |
|
|
|
|
AND n.checkStatus IN ( '1', '2' ) |
|
|
|
|
AND n.discoveryTime BETWEEN #{beginTime} AND #{endTime} |
|
|
|
|
LEFT JOIN negative_blame nb ON n.id = nb.negativeId |
|
|
|
|
LEFT JOIN negative_score_depart n ON d.depart_id = n.depart_id |
|
|
|
|
LEFT JOIN negative_blame nb ON n.negative_id = nb.blameId |
|
|
|
|
left join depart_score dc on d.depart_id = dc.depart_id |
|
|
|
|
WHERE |
|
|
|
|
1 = 1 |
|
|
|
|
n.depart_id is not null |
|
|
|
|
AND n.discovery_time BETWEEN #{beginTime} AND #{endTime} |
|
|
|
|
<if test="departName != null and departName != ''"> |
|
|
|
|
AND d.short_name like concat('%', #{departName}, '%') |
|
|
|
|
</if> |
|
|
|
|
|