|
|
@ -2890,10 +2890,10 @@ |
|
|
|
<select id="getEvaluationDataListByDays" resultType="com.elink.esua.epdc.dto.item.result.EvaluationTotalLineDetailResultDTO" |
|
|
|
parameterType="com.elink.esua.epdc.dto.item.form.ScreenTotalFormDTO"> |
|
|
|
select |
|
|
|
DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d') as time, |
|
|
|
ROUND(count(item.EVALUATION_SCORE = 0 or null) / count(item.ID) * 100,1) as bmy, |
|
|
|
ROUND(count(item.EVALUATION_SCORE = 1 or null) / count(item.ID) * 100,1) as jbmy, |
|
|
|
ROUND(count(item.EVALUATION_SCORE = 2 or null) / count(item.ID) * 100,1) as fcmy |
|
|
|
DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d') as time, |
|
|
|
ROUND(count(item.EVALUATION_SCORE = 0 or null) / count(item.ID) * 100,1) as bmy, |
|
|
|
ROUND(count(item.EVALUATION_SCORE = 1 or null) / count(item.ID) * 100,1) as jbmy, |
|
|
|
ROUND(count(item.EVALUATION_SCORE = 2 or null) / count(item.ID) * 100,1) as fcmy |
|
|
|
from epdc_item item |
|
|
|
where item.DEL_FLAG = '0' |
|
|
|
and item.IS_PEOPLE = '1' |
|
|
@ -2924,6 +2924,44 @@ |
|
|
|
ORDER BY DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d') asc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getResolveDataListByDays" resultType="com.elink.esua.epdc.dto.item.result.ResolveTotalLineDetailResultDTO" |
|
|
|
parameterType="com.elink.esua.epdc.dto.item.form.ScreenTotalFormDTO"> |
|
|
|
select |
|
|
|
DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d') as time, |
|
|
|
ROUND(count(item.SOLUTION_INFO = '01' or null) / count(item.ID) * 100,1) as jj, |
|
|
|
ROUND(count(item.SOLUTION_INFO = '02' or null) / count(item.ID) * 100,1) as jbjj, |
|
|
|
ROUND(count(item.SOLUTION_INFO = '03' or null) / count(item.ID) * 100,1) as wjj |
|
|
|
from epdc_item item |
|
|
|
where item.DEL_FLAG = '0' |
|
|
|
and item.IS_PEOPLE = '1' |
|
|
|
and item.ITEM_STATE = '10' |
|
|
|
and item.EVENT_ID is null |
|
|
|
and item.ISSUE_ID is null |
|
|
|
and ((SUBSTRING_INDEX(item.CATEGORY_FULL_NAME,'-',1) != '其他' and item.PEOPLE_FLAG = '0') or (item.PEOPLE_FLAG in ('1','2'))) |
|
|
|
<choose> |
|
|
|
<when test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) <![CDATA[ <= ]]> DATE_FORMAT(date_sub(now(),interval 1 day),'%Y-%m-%d') |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
<if test="deptId != null and deptId != ''"> |
|
|
|
AND find_in_set(#{deptId},item.ALL_DEPT_IDS) |
|
|
|
</if> |
|
|
|
<if test="peopleFlag != null and peopleFlag != ''"> |
|
|
|
AND item.PEOPLE_FLAG = #{peopleFlag} |
|
|
|
</if> |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d') IN |
|
|
|
<foreach collection="timeArr" index="index" item="time" open="(" separator="," close=")"> |
|
|
|
#{time} |
|
|
|
</foreach> |
|
|
|
and item.SOLUTION_INFO is not null |
|
|
|
and item.SOLUTION_INFO !='' |
|
|
|
group by DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d') |
|
|
|
ORDER BY DATE_FORMAT(item.CREATED_TIME,'%Y-%m-%d') asc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getEvaluationDataListByMonths" resultType="com.elink.esua.epdc.dto.item.result.EvaluationTotalLineDetailResultDTO" |
|
|
|
parameterType="com.elink.esua.epdc.dto.item.form.ScreenTotalFormDTO"> |
|
|
|
select |
|
|
@ -2960,6 +2998,43 @@ |
|
|
|
ORDER BY DATE_FORMAT(item.CREATED_TIME,'%Y-%m') asc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getResolveDataListByMonths" resultType="com.elink.esua.epdc.dto.item.result.ResolveTotalLineDetailResultDTO" |
|
|
|
parameterType="com.elink.esua.epdc.dto.item.form.ScreenTotalFormDTO"> |
|
|
|
select |
|
|
|
DATE_FORMAT(item.CREATED_TIME,'%Y-%m') as time, |
|
|
|
ROUND(count(item.SOLUTION_INFO = '01' or null) / count(item.ID) * 100,1) as jj, |
|
|
|
ROUND(count(item.SOLUTION_INFO = '02' or null) / count(item.ID) * 100,1) as jbjj, |
|
|
|
ROUND(count(item.SOLUTION_INFO = '03' or null) / count(item.ID) * 100,1) as wjj |
|
|
|
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 ((SUBSTRING_INDEX(item.CATEGORY_FULL_NAME,'-',1) != '其他' and item.PEOPLE_FLAG = '0') or (item.PEOPLE_FLAG in ('1','2'))) |
|
|
|
<choose> |
|
|
|
<when test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) <![CDATA[ <= ]]> DATE_FORMAT(date_sub(now(),interval 1 day),'%Y-%m-%d') |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
<if test="deptId != null and deptId != ''"> |
|
|
|
AND find_in_set(#{deptId},item.ALL_DEPT_IDS) |
|
|
|
</if> |
|
|
|
<if test="peopleFlag != null and peopleFlag != ''"> |
|
|
|
AND item.PEOPLE_FLAG = #{peopleFlag} |
|
|
|
</if> |
|
|
|
AND DATE_FORMAT(item.CREATED_TIME,'%Y-%m') IN |
|
|
|
<foreach collection="timeArr" index="index" item="time" open="(" separator="," close=")"> |
|
|
|
#{time} |
|
|
|
</foreach> |
|
|
|
and item.SOLUTION_INFO is not null |
|
|
|
and item.SOLUTION_INFO !='' |
|
|
|
group by DATE_FORMAT(item.CREATED_TIME,'%Y-%m') |
|
|
|
ORDER BY DATE_FORMAT(item.CREATED_TIME,'%Y-%m') asc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getItemListByAddress" resultType="com.elink.esua.epdc.dto.item.result.ItemListByAddressResultDTO"> |
|
|
|
SELECT |
|
|
|
a.id id, |
|
|
@ -3044,6 +3119,43 @@ |
|
|
|
and item.EVALUATION_SCORE is not null |
|
|
|
order by item.created_time DESC |
|
|
|
</select> |
|
|
|
<select id="resolveTotal" resultType="com.elink.esua.epdc.dto.item.result.ResolveTotalPieResultDTO"> |
|
|
|
|
|
|
|
select |
|
|
|
case item.SOLUTION_INFO |
|
|
|
when '01' then '解决' |
|
|
|
when '02' then '基本解决' |
|
|
|
when '03' then '未解决' |
|
|
|
else '' |
|
|
|
end as name, |
|
|
|
count(item.ID) as value |
|
|
|
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 ((SUBSTRING_INDEX(item.CATEGORY_FULL_NAME,'-',1) != '其他' and item.PEOPLE_FLAG = '0') or (item.PEOPLE_FLAG in ('1','2'))) |
|
|
|
<choose> |
|
|
|
<when test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) <![CDATA[ <= ]]> DATE_FORMAT(date_sub(now(),interval 1 day),'%Y-%m-%d') |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
<if test="deptId != null and deptId != ''"> |
|
|
|
AND find_in_set(#{deptId},item.ALL_DEPT_IDS) |
|
|
|
</if> |
|
|
|
<if test="peopleFlag != null and peopleFlag != ''"> |
|
|
|
AND item.PEOPLE_FLAG = #{peopleFlag} |
|
|
|
</if> |
|
|
|
and item.SOLUTION_INFO is not null |
|
|
|
and item.SOLUTION_INFO !='' |
|
|
|
group by item.SOLUTION_INFO |
|
|
|
ORDER BY count(item.ID) desc |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updateBatchBySerialNum"> |
|
|
|
UPDATE |
|
|
|