|
|
|
@ -294,6 +294,58 @@ |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getResolveInfo" resultType="com.elink.esua.epdc.dto.item.result.EvaluationInfoResultDTO" |
|
|
|
parameterType="com.elink.esua.epdc.dto.screen.form.EventStatisticsFormDTO"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
a.id AS deptId, |
|
|
|
IFNULL(SUM(b.value), 0) AS value, |
|
|
|
concat(ROUND(IFNULL(SUM(b.value) / SUM(b.total) * 100 , 0) ,2 ),'%') as proportion |
|
|
|
FROM meta_sys_dept a |
|
|
|
left join ( |
|
|
|
select |
|
|
|
item.ALL_DEPT_IDS, |
|
|
|
count((item.SOLUTION_INFO = '01' or item.SOLUTION_INFO = '02') or null) as value, |
|
|
|
count(item.ID) as total |
|
|
|
from epdc_item item |
|
|
|
where item.DEL_FLAG = '0' |
|
|
|
and item.IS_PEOPLE = '1' |
|
|
|
and item.EVENT_ID is null |
|
|
|
and item.ISSUE_ID is null |
|
|
|
and item.SOLUTION_INFO is not null |
|
|
|
and item.SOLUTION_INFO !='' |
|
|
|
and ((SUBSTRING_INDEX(item.CATEGORY_FULL_NAME,'-',1) != '其他' and item.PEOPLE_FLAG = '0') or (item.PEOPLE_FLAG in ('1','2'))) |
|
|
|
<if test='"1" == statType'> |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME, '%Y-%m-%d') <= #{statDate} |
|
|
|
</if> |
|
|
|
<if test='"2" == statType'> |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME, '%Y-%m') = #{statDate} |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME, '%Y-%m-%d') <= #{startDate} |
|
|
|
</if> |
|
|
|
<if test='"3" == statType'> |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME, '%Y') = #{statDate} |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME, '%Y-%m-%d') <= #{startDate} |
|
|
|
</if> |
|
|
|
<if test='"4" == statType'> |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME, '%Y-%m-%d') >= #{startDate} |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME, '%Y-%m-%d') <= #{endDate} |
|
|
|
</if> |
|
|
|
<if test="peopleFlag != null and peopleFlag != ''"> |
|
|
|
AND item.PEOPLE_FLAG = #{peopleFlag} |
|
|
|
</if> |
|
|
|
GROUP BY item.ALL_DEPT_IDS |
|
|
|
) b ON b.ALL_DEPT_IDS LIKE CONCAT('%', a.id, '%') |
|
|
|
WHERE a.del_flag = '0' |
|
|
|
<if test="deptId != null and deptId != ''"> |
|
|
|
AND a.pid = #{deptId} |
|
|
|
</if> |
|
|
|
AND a.type_key != 'street_dept' |
|
|
|
AND a.type_key != 'district_dept' |
|
|
|
GROUP BY a.id |
|
|
|
ORDER BY a.sort, CONVERT(a.`name` USING gbk) ASC |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getOnTimeDealInfo" resultType="com.elink.esua.epdc.dto.item.result.OnTimeDealInfoResultDTO" |
|
|
|
parameterType="com.elink.esua.epdc.dto.screen.form.EventStatisticsFormDTO"> |
|
|
|
|
|
|
|
|