diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/OrgrankdataResultDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/OrgrankdataResultDTO.java index 7f6ff307..397effd4 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/OrgrankdataResultDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/OrgrankdataResultDTO.java @@ -75,13 +75,14 @@ public class OrgrankdataResultDTO implements Serializable { */ private Integer projectTotal; + /** - * 满意率,最大值100,保留小数点后四位 + * 结案率,最大值100,保留小数点后四位 */ private BigDecimal closeProjectRatio; /** - * 结案率,最大值100,保留小数点后四位 + * 满意率,最大值100,保留小数点后四位 */ private BigDecimal satisfactionRatio; /** diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenProjectDataServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenProjectDataServiceImpl.java index ff8c5aa9..a39894b4 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenProjectDataServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenProjectDataServiceImpl.java @@ -106,7 +106,7 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl data = baseDao.selectQuantityGridMonthly(yearMonth); // 数据格式化 @@ -119,7 +119,7 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl data = baseDao.selectQuantityOrgMonthly(yearMonth); // 数据格式化 diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java index e1717b3d..5a9c286d 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java @@ -147,7 +147,7 @@ public class ScreenPublicDataServiceImpl extends BaseServiceImpl list = baseDao.getOrgrankdata(yearMonth); // 将list转换为json格式 if(list != null && list.size()>0){ @@ -232,7 +232,7 @@ public class ScreenPublicDataServiceImpl extends BaseServiceImpl list = baseDao.getUserjoin(yearMonth); //获取平均参与度 diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml index d209cce8..49aaf51d 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml @@ -230,7 +230,7 @@ from (select lin.* from (select * from esua_epdc_events.epdc_item order by id) lin where lin.DEL_FLAG=0 - AND date_format( lin.CREATED_TIME, '%Y-%m' ) = #{yearMonth} + AND date_format( lin.CREATED_TIME, '%Y%m' ) = #{yearMonth} group by lin.EVENT_ID)li group by li.GRID_ID)it on it.GRID_ID=sd.id left join (select al.GRID_ID, @@ -240,7 +240,7 @@ from (select lin.* from (select * from esua_epdc_events.epdc_item order by id) lin where lin.DEL_FLAG=0 - AND date_format( lin.CREATED_TIME, '%Y-%m' ) <= #{yearMonth} + AND date_format( lin.CREATED_TIME, '%Y%m' ) <= #{yearMonth} group by lin.EVENT_ID)al group by al.GRID_ID)li2 on li2.GRID_ID=sd.id WHERE sd.`del_flag`= 0 @@ -270,7 +270,7 @@ from (select lin.* from (select * from esua_epdc_events.epdc_item order by id) lin where lin.DEL_FLAG=0 - AND date_format( lin.CREATED_TIME, '%Y-%m' ) =#{yearMonth} + AND date_format( lin.CREATED_TIME, '%Y%m' ) =#{yearMonth} group by lin.EVENT_ID)li group by li.GRID_ID)it on it.GRID_ID=sd.id left join (select al.GRID_ID, @@ -280,7 +280,7 @@ from (select lin.* from (select * from esua_epdc_events.epdc_item order by id) lin where lin.DEL_FLAG=0 - AND date_format( lin.CREATED_TIME, '%Y-%m' ) <=#{yearMonth} + AND date_format( lin.CREATED_TIME, '%Y%m' ) <=#{yearMonth} group by lin.EVENT_ID)al group by al.GRID_ID)li2 on li2.GRID_ID=sd.id WHERE sd.`del_flag`= 0 @@ -310,7 +310,7 @@ from (select lin.* from (select * from esua_epdc_events.epdc_item order by id) lin where lin.DEL_FLAG=0 - AND date_format( lin.CREATED_TIME, '%Y-%m' ) =#{yearMonth} + AND date_format( lin.CREATED_TIME, '%Y%m' ) =#{yearMonth} group by lin.EVENT_ID)li group by li.GRID_ID)it on it.GRID_ID=sd.id left join (select al.GRID_ID, @@ -320,7 +320,7 @@ from (select lin.* from (select * from esua_epdc_events.epdc_item order by id) lin where lin.DEL_FLAG=0 - AND date_format( lin.CREATED_TIME, '%Y-%m' ) <=#{yearMonth} + AND date_format( lin.CREATED_TIME, '%Y%m' ) <=#{yearMonth} group by lin.EVENT_ID)al group by al.GRID_ID)li2 on li2.GRID_ID=sd.id WHERE sd.`del_flag`= 0 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 9ab010d4..9fb557ea 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 @@ -1437,10 +1437,15 @@ select gr.id as orgId, t.issueTotal, t.projectTotal, IFNULL(ROUND(t.itemCloseTotal/t.projectTotal,4),0) * 100 closeProjectRatio, - IFNULL(ROUND((t.itemSatisfiedTotal * 0.6 + t.itemVeryTotal)/t.projectTotal,4),0) * 100 satisfactionRatio, + + IFNULL(ROUND( + ((t.itemUnsatisfactoryTotal * 0.6) + t.itemVeryTotal + ((t.projectTotal - t.itemUnsatisfactoryTotal - t.itemVeryTotal) * 0.8)) + /t.projectTotal,4),0) * 100 satisfactionRatio, IFNULL(t.itemCloseTotal,0) as closeProjectRatioFz, IFNULL(t.projectTotal,0) as closeProjectRatioFm, - IFNULL((t.itemSatisfiedTotal * 0.6 + t.itemVeryTotal),0) as satisfactionRatioFz, + IFNULL( + ((t.itemUnsatisfactoryTotal * 0.6) + t.itemVeryTotal + ((t.projectTotal - t.itemUnsatisfactoryTotal - t.itemVeryTotal) * 0.8)) + ,0) as satisfactionRatioFz, IFNULL(t.projectTotal,0) as satisfactionRatioFm from ( select @@ -1494,7 +1499,7 @@ select gr.id as orgId, )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(*) itemUnsatisfactoryTotal 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 = 0 GROUP BY `EVENT_ID`) itemUnsatisfactoryTotal, (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' @@ -1517,7 +1522,7 @@ select gr.id as orgId, IFNULL(issueCount.issueNum,0) issueTotal, IFNULL(itemCount.itemNum,0) projectTotal, IFNULL(itemCloseCount.itemNum,0) itemCloseTotal, - IFNULL(itemSatisfiedCount.itemNum,0) itemSatisfiedTotal, + IFNULL(itemUnsatisfactoryTotal.itemNum,0) itemUnsatisfactoryTotal, IFNULL(itemVeryCount.itemNum,0) itemVeryTotal from esua_epdc_admin.sys_dept sd left join ( @@ -1620,11 +1625,11 @@ 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 = 0 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 - ) itemSatisfiedCount on itemSatisfiedCount.DEPT_ID = sd.ID + ) itemUnsatisfactoryTotal on itemUnsatisfactoryTotal.DEPT_ID = sd.ID 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' @@ -1652,7 +1657,7 @@ select gr.id as orgId, IFNULL(issueCount.issueNum,0) issueTotal, IFNULL(itemCount.itemNum,0) projectTotal, IFNULL(itemCloseCount.itemNum,0) itemCloseTotal, - IFNULL(itemSatisfiedCount.itemNum,0) itemSatisfiedTotal, + IFNULL(itemUnsatisfactoryTotal.itemNum,0) itemUnsatisfactoryTotal, IFNULL(itemVeryCount.itemNum,0) itemVeryTotal from esua_epdc_admin.sys_dept sd left join ( @@ -1749,9 +1754,9 @@ 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.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 = 0 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 + ) itemUnsatisfactoryTotal on itemUnsatisfactoryTotal.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' @@ -1780,7 +1785,7 @@ select gr.id as orgId, IFNULL(issueCount.issueNum,0) issueTotal, IFNULL(itemCount.itemNum,0) projectTotal, IFNULL(itemCloseCount.itemNum,0) itemCloseTotal, - IFNULL(itemSatisfiedCount.itemNum,0) itemSatisfiedTotal, + IFNULL(itemUnsatisfactoryTotal.itemNum,0) itemUnsatisfactoryTotal, IFNULL(itemVeryCount.itemNum,0) itemVeryTotal from esua_epdc_admin.sys_dept sd left join (select count(*) partyNum,uu.DEPT_ID from esua_epdc_user.epdc_user uu where uu.DEL_FLAG = '0' and uu.PARTY_FLAG = '1' group by uu.DEPT_ID) user on user.DEPT_ID = sd.ID @@ -1838,7 +1843,7 @@ select gr.id as orgId, 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 = 0 group by item.`EVENT_ID` ,item.GRID_ID))a group by a.`DEPT_ID` ) itemUnsatisfactoryTotal on itemUnsatisfactoryTotal.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