|
|
|
|
@ -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 n.id_code ) verify_police_size, |
|
|
|
|
count( n.id ) verify_size, |
|
|
|
|
count( DISTINCT nb.blameIdCode ) verify_police_size, |
|
|
|
|
count( n.negative_id ) verify_size, |
|
|
|
|
dc.score |
|
|
|
|
FROM |
|
|
|
|
( |
|
|
|
|
@ -24,13 +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_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 |
|
|
|
|
n.depart_id is not null |
|
|
|
|
AND n.discoveryTime BETWEEN #{beginTime} AND #{endTime} |
|
|
|
|
AND n.discovery_time BETWEEN #{beginTime} AND #{endTime} |
|
|
|
|
<if test="departName != null and departName != ''"> |
|
|
|
|
AND d.short_name like concat('%', #{departName}, '%') |
|
|
|
|
</if> |
|
|
|
|
|