right join esua_epdc_events.epdc_events ee on ee.MOBILE = seur.MOBILE and ee.DEL_FLAG = '0'
left join esua_epdc_admin.sys_dept sd on sd.id = ee.GRID_ID
@ -115,7 +113,6 @@
0 as projectResponseIncr,
0 as projectTransferIncr,
0 as projectClosedIncr
from esua_epdc_admin.sys_epmet_user_relation seur
left join esua_epdc_admin.sys_user eu on eu.MOBILE = seur.MOBILE
right join esua_epdc_events.epdc_item ei on ei.CREATED_BY = eu.id and ei.DEL_FLAG = '0'
@ -183,7 +180,7 @@
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') <= #{endTime} and ei.STATE = 10 or null) as projectClosedCount, -- 项目结案数,截止到当前dateId的总数
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{endTime} and ei.STATE = 0 and eid.ID is null or null) as projectResponseIncr, -- 项目响应数,dateId这一天的增量
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{endTime} and ei.STATE = 0 and eid.ID is not null or null) as projectTransferIncr, -- 项目吹哨数,dateId这一天的增量
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{endTime} and ei.STATE = 10 or null) as projectClosedIncr -- 项目结案数,dateId这一天的增量
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{endTime} and ei.STATE = 10 or null) as projectClosedIncr, -- 项目结案数,dateId这一天的增量
</when>
<otherwise>
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') <= #{yearMonthDay} and ei.STATE = 0 and eid.ID is null or null) as projectResponseCount, -- 项目响应数,截止到当前dateId的总数
@ -191,11 +188,11 @@
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') <= #{yearMonthDay} and ei.STATE = 10 or null) as projectClosedCount, -- 项目结案数,截止到当前dateId的总数
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{yearMonthDay} and ei.STATE = 0 and eid.ID is null or null) as projectResponseIncr, -- 项目响应数,dateId这一天的增量
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{yearMonthDay} and ei.STATE = 0 and eid.ID is not null or null) as projectTransferIncr, -- 项目吹哨数,dateId这一天的增量
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{yearMonthDay} and ei.STATE = 10 or null) as projectClosedIncr -- 项目结案数,dateId这一天的增量
count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{yearMonthDay} and ei.STATE = 10 or null) as projectClosedIncr, -- 项目结案数,dateId这一天的增量
</otherwise>
</choose>
0 as issueToProjectIncr,
0 as closedIssueIncr,
0 as closedIssueIncr
from esua_epdc_admin.sys_epmet_user_relation seur
left join esua_epdc_admin.sys_user eu on eu.MOBILE = seur.MOBILE
right join esua_epdc_events.epdc_item_handle_process ei on ei.CREATED_BY = eu.id and ei.DEL_FLAG = '0'