diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml index 37205215..f22707a0 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml @@ -1467,7 +1467,7 @@ select gr.id as orgId, from ( select DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId, - DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, + DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId, 'agency' as orgType, sd.ID orgId, sd.PID parentId, @@ -1478,9 +1478,9 @@ select gr.id as orgId, select count(*) groupTotal from esua_epdc_party_group.epdc_party_group ws - where ws.DEL_FLAG = '0' and date_format(ws.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + where ws.DEL_FLAG = '0' and date_format(ws.CREATED_TIME, '%Y%m' ) = #{yearMonth} ) groupTotal, - (select count(*) topicTotal from esua_epdc_party_group.epdc_party_topic top where top.DEL_FLAG = '0' and date_format(top.CREATED_TIME, '%Y-%m' ) = #{yearMonth} ) topicTotal, + (select count(*) topicTotal from esua_epdc_party_group.epdc_party_topic top where top.DEL_FLAG = '0' and date_format(top.CREATED_TIME, '%Y%m' ) = #{yearMonth} ) topicTotal, ( SELECT count( t.a ) issueTotal @@ -1493,7 +1493,7 @@ select gr.id as orgId, esua_epdc_events.epdc_issue mei WHERE mei.DEL_FLAG = '0' - AND date_format( mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( mei.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY EVENT_ID )t @@ -1510,14 +1510,14 @@ select gr.id as orgId, esua_epdc_events.epdc_item item WHERE item.DEL_FLAG = '0' - AND date_format( item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( item.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY EVENT_ID )t ) projectTotal, - (select count(*) itemCloseTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.ITEM_STATE = 10 GROUP BY `EVENT_ID`) itemCloseTotal, - (select count(*) itemSatisfiedTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 GROUP BY `EVENT_ID`) itemSatisfiedTotal, - (select count(*) itemVeryTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 GROUP BY `EVENT_ID`) itemVeryTotal + (select count(*) itemCloseTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.ITEM_STATE = 10 GROUP BY `EVENT_ID`) itemCloseTotal, + (select count(*) itemSatisfiedTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 GROUP BY `EVENT_ID`) itemSatisfiedTotal, + (select count(*) itemVeryTotal from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 GROUP BY `EVENT_ID`) itemVeryTotal from esua_epdc_admin.sys_dept sd where sd.DEL_FLAG = '0' AND sd.id IS NOT NULL @@ -1527,7 +1527,7 @@ select gr.id as orgId, union all select DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId, - DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, + DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId, 'agency' as orgType, sd.ID orgId, sd.PID parentId, @@ -1570,7 +1570,7 @@ select gr.id as orgId, left join ( select sum(topn.topNum) topNum ,d2.PID DEPT_ID from ( select top.GRID_ID ,count(*) topNum from esua_epdc_party_group.epdc_party_topic top where top.DEL_FLAG = '0' - and date_format(top.CREATED_TIME, '%Y-%m' ) = #{yearMonth} group by top.GRID_ID ) topn + and date_format(top.CREATED_TIME, '%Y%m' ) = #{yearMonth} group by top.GRID_ID ) topn left join esua_epdc_admin.sys_dept d1 on d1.ID = topn.GRID_ID left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID @@ -1591,7 +1591,7 @@ select gr.id as orgId, esua_epdc_events.epdc_issue mei WHERE mei.DEL_FLAG = '0' - AND date_format( mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( mei.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY EVENT_ID, GRID_ID @@ -1619,7 +1619,7 @@ select gr.id as orgId, esua_epdc_events.epdc_item item WHERE item.DEL_FLAG = '0' - AND date_format( item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( item.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY EVENT_ID, GRID_ID @@ -1634,7 +1634,7 @@ select gr.id as orgId, left join ( select sum(itemgrid.itemNum) itemNum ,d2.PID DEPT_ID from (select GRID_ID,count(itemNum)itemNum FROM ( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' - and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid + and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID @@ -1642,7 +1642,7 @@ select gr.id as orgId, left join ( select sum(itemgrid.itemNum) itemNum ,d2.PID DEPT_ID from (select GRID_ID,count(itemNum)itemNum FROM( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' - and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid + and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID @@ -1650,7 +1650,7 @@ select gr.id as orgId, left join ( select sum(itemgrid.itemNum) itemNum ,d2.PID DEPT_ID from (select GRID_ID,count(itemNum)itemNum FROM( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' - and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid + and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID @@ -1662,7 +1662,7 @@ select gr.id as orgId, select DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId, - DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, + DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId, 'agency' as orgType, sd.ID orgId, sd.PID parentId, @@ -1704,7 +1704,7 @@ select gr.id as orgId, left join ( select sum(topn.topNum) topNum ,d1.PID DEPT_ID from ( select top.GRID_ID ,count(*) topNum from esua_epdc_party_group.epdc_party_topic top where top.DEL_FLAG = '0' - and date_format(top.CREATED_TIME, '%Y-%m' ) = #{yearMonth} group by top.GRID_ID ) topn + and date_format(top.CREATED_TIME, '%Y%m' ) = #{yearMonth} group by top.GRID_ID ) topn left join esua_epdc_admin.sys_dept d1 on d1.ID = topn.GRID_ID group by d1.PID ) topCount on topCount.DEPT_ID = sd.ID left join ( @@ -1723,7 +1723,7 @@ select gr.id as orgId, esua_epdc_events.epdc_issue mei WHERE mei.DEL_FLAG = '0' - AND date_format( mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( mei.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY EVENT_ID, GRID_ID @@ -1751,7 +1751,7 @@ select gr.id as orgId, esua_epdc_events.epdc_item item WHERE item.DEL_FLAG = '0' - AND date_format( item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( item.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY EVENT_ID, GRID_ID @@ -1765,19 +1765,19 @@ select gr.id as orgId, left join ( select sum(itemgrid.itemNum) itemNum ,d1.PID DEPT_ID from ( SELECT GRID_ID,count(itemNum)itemNum from ( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' - and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid + and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID ) itemCloseCount on itemCloseCount.DEPT_ID = sd.ID left join ( select sum(itemgrid.itemNum) itemNum ,d1.PID DEPT_ID from ( SELECT GRID_ID,count(itemNum)itemNum from( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' - and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid + and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID ) itemSatisfiedCount on itemSatisfiedCount.DEPT_ID = sd.ID left join ( select sum(itemgrid.itemNum) itemNum ,d1.PID DEPT_ID from ( SELECT GRID_ID,count(itemNum)itemNum from( select item.GRID_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' - and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid + and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.`EVENT_ID` ,item.GRID_ID )a GROUP BY a.GRID_ID) itemgrid left join esua_epdc_admin.sys_dept d1 on d1.ID = itemgrid.GRID_ID group by d1.PID ) itemVeryCount on itemVeryCount.DEPT_ID = sd.ID where sd.DEL_FLAG = '0' @@ -1790,7 +1790,7 @@ select gr.id as orgId, union all select DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId, - DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, + DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId, 'grid' as orgType, sd.ID orgId, sd.PID parentId, @@ -1811,10 +1811,10 @@ select gr.id as orgId, count(*) as TIMES_TOTAL, ws.DEPT_ID as DEPT_ID from esua_epdc_party_group.epdc_party_group ws - where ws.DEL_FLAG = '0' and date_format(ws.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + where ws.DEL_FLAG = '0' and date_format(ws.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY ws.DEPT_ID ) tto on tto.DEPT_ID = sd.ID - left join (select top.GRID_ID DEPT_ID ,count(*) topNum from esua_epdc_party_group.epdc_party_topic top where top.DEL_FLAG = '0' and date_format(top.CREATED_TIME, '%Y-%m' ) = #{yearMonth} group by top.GRID_ID) topCount on topCount.DEPT_ID = sd.ID + left join (select top.GRID_ID DEPT_ID ,count(*) topNum from esua_epdc_party_group.epdc_party_topic top where top.DEL_FLAG = '0' and date_format(top.CREATED_TIME, '%Y%m' ) = #{yearMonth} group by top.GRID_ID) topCount on topCount.DEPT_ID = sd.ID left join ( SELECT count( t.a ) issueNum, @@ -1829,7 +1829,7 @@ select gr.id as orgId, esua_epdc_events.epdc_issue mei WHERE mei.DEL_FLAG = '0' - AND date_format( mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( mei.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY EVENT_ID, GRID_ID @@ -1851,7 +1851,7 @@ select gr.id as orgId, esua_epdc_events.epdc_item item WHERE item.DEL_FLAG = '0' - AND date_format( item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( item.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY EVENT_ID, GRID_ID @@ -1859,9 +1859,9 @@ select gr.id as orgId, GROUP BY t.GRID_ID ) itemCount on itemCount.DEPT_ID = sd.ID - left join (select DEPT_ID, COUNT(itemNum)itemNum from((select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.`EVENT_ID` ,item.GRID_ID))a group by a.`DEPT_ID` ) itemCloseCount on itemCloseCount.DEPT_ID = sd.ID - left join (select DEPT_ID, COUNT(itemNum)itemNum from((select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.`EVENT_ID` ,item.GRID_ID))a group by a.`DEPT_ID` ) itemSatisfiedCount on itemSatisfiedCount.DEPT_ID = sd.ID - left join (select DEPT_ID, COUNT(itemNum)itemNum from((select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y-%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.`EVENT_ID` ,item.GRID_ID))a group by a.`DEPT_ID` ) itemVeryCount on itemVeryCount.DEPT_ID = sd.ID + left join (select DEPT_ID, COUNT(itemNum)itemNum from((select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.ITEM_STATE = 10 group by item.`EVENT_ID` ,item.GRID_ID))a group by a.`DEPT_ID` ) itemCloseCount on itemCloseCount.DEPT_ID = sd.ID + left join (select DEPT_ID, COUNT(itemNum)itemNum from((select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 1 group by item.`EVENT_ID` ,item.GRID_ID))a group by a.`DEPT_ID` ) itemSatisfiedCount on itemSatisfiedCount.DEPT_ID = sd.ID + left join (select DEPT_ID, COUNT(itemNum)itemNum from((select item.GRID_ID DEPT_ID ,count(*) itemNum from esua_epdc_events.epdc_item item where item.DEL_FLAG = '0' and date_format(item.CREATED_TIME, '%Y%m' ) = #{yearMonth} and item.EVALUATION_SCORE = 2 group by item.`EVENT_ID` ,item.GRID_ID))a group by a.`DEPT_ID` ) itemVeryCount on itemVeryCount.DEPT_ID = sd.ID where sd.DEL_FLAG = '0' AND sd.id IS NOT NULL AND sd.`id` NOT IN( SELECT t.`dept_id` @@ -1956,7 +1956,7 @@ select gr.id as orgId, ( select DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId, - DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, + DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId, 'agency' as orgType, sd.ID orgId, sd.PID parentId, @@ -2016,7 +2016,7 @@ select gr.id as orgId, esua_epdc_analysis.epdc_user_behavior_log behavior LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu ) - AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format(behavior.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY USER_ID, USER.DEPT_ID ) behaviorCount GROUP BY behaviorCount.DEPT_ID) be @@ -2034,7 +2034,7 @@ select gr.id as orgId, eisu.GRID_ID DEPT_ID, count(*) issueNum from esua_epdc_events.epdc_issue eisu - where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = #{yearMonth} + where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y%m' ) = #{yearMonth} GROUP BY eisu.GRID_ID ) isuCount left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID @@ -2053,7 +2053,7 @@ select gr.id as orgId, select DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId, - DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, + DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId, 'agency' as orgType, sd.ID orgId, sd.PID parentId, @@ -2111,7 +2111,7 @@ select gr.id as orgId, FROM esua_epdc_analysis.epdc_user_behavior_log behavior LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu ) - AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format(behavior.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY USER_ID, USER.DEPT_ID ) behaviorCount GROUP BY behaviorCount.DEPT_ID) be @@ -2127,7 +2127,7 @@ select gr.id as orgId, eisu.GRID_ID DEPT_ID, count(*) issueNum from esua_epdc_events.epdc_issue eisu - where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = #{yearMonth} + where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y%m' ) = #{yearMonth} GROUP BY eisu.GRID_ID ) isuCount left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID @@ -2144,7 +2144,7 @@ select gr.id as orgId, select DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId, - DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, + DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId, 'agency' as orgType, sd.ID orgId, sd.PID parentId, @@ -2197,7 +2197,7 @@ select gr.id as orgId, FROM esua_epdc_analysis.epdc_user_behavior_log behavior LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu ) - AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format(behavior.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY USER_ID, USER.DEPT_ID ) behaviorCount GROUP BY behaviorCount.DEPT_ID) be @@ -2212,7 +2212,7 @@ select gr.id as orgId, eisu.GRID_ID DEPT_ID, count(*) issueNum from esua_epdc_events.epdc_issue eisu - where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = #{yearMonth} + where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y%m' ) = #{yearMonth} GROUP BY eisu.GRID_ID ) isuCount left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID group by d1.PID @@ -2228,7 +2228,7 @@ select gr.id as orgId, select DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId, - DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, + DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId, 'grid' as orgType, sd.ID orgId, sd.PID parentId, @@ -2274,7 +2274,7 @@ select gr.id as orgId, LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu ) - AND date_format(behavior.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format(behavior.CREATED_TIME, '%Y%m' ) = #{yearMonth} GROUP BY USER_ID, USER.DEPT_ID ) behaviorCount GROUP BY behaviorCount.DEPT_ID @@ -2284,7 +2284,7 @@ select gr.id as orgId, eisu.GRID_ID dept_ID, count(*) issueNum from esua_epdc_events.epdc_issue eisu - where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y-%m' ) = #{yearMonth} + where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y%m' ) = #{yearMonth} GROUP BY eisu.GRID_ID ) issueNumber on issueNumber.dept_ID = sd.ID where sd.DEL_FLAG = '0' @@ -2880,7 +2880,7 @@ union all