Browse Source

党建借口改版v2

feature/zhy_updatepush
zhangyuan 5 years ago
parent
commit
058cb9f48e
  1. 60
      epdc-cloud-analysis-pc/src/main/resources/mapper/screen/ScreenIndexDataDao.xml
  2. 8
      epdc-cloud-analysis-pc/src/main/resources/mapper/screen/ScreenPublicDataDao.xml

60
epdc-cloud-analysis-pc/src/main/resources/mapper/screen/ScreenIndexDataDao.xml

@ -210,6 +210,8 @@
IFNULL(groupUser.createGroupPartyCount,0) createGroupPartyCount,
IFNULL(new.newNum,0) publishArticleCount,
ROUND(IFNULL((ite.partyToItemNum + ite.userToItemNum) / issue.issNum,0),4) * 100 issueToProjectRatio,
IFNULL(ite.partyToItemNum + ite.userToItemNum, 0) shiftedProjectTotal,
IFNULL(issue.issNum, 0) issueTotal,
0 createThreeMeetsCount,
0 joinThreeMeetsCount
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
@ -328,7 +330,11 @@
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId,
IFNULL(act.actNum ,0) activityCount,
ROUND(IFNULL(IFNULL(actInfo.volunteerNum,0) / IFNULL(actInfo.userNum,0),0),4) * 100 volunteerRatio,
ROUND(IFNULL(IFNULL(actInfo.partyVolunteerNum,0) / IFNULL(actInfo.volunteerNum,0),0),4) * 100 partyVolunteerRatio
ROUND(IFNULL(IFNULL(actInfo.partyVolunteerNum,0) / IFNULL(actInfo.volunteerNum,0),0),4) * 100 partyVolunteerRatio,
IFNULL(actInfo.partyVolunteerNum,0) partyVolunteerTotal,
IFNULL(actInfo.volunteerNum,0) volunteerTotal,
IFNULL(actInfo.volunteerNum,0) volunteerUserTotal,
IFNULL(actInfo.userNum,0) regUserTotal
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
left join (
select
@ -427,7 +433,13 @@
/ IFNULL(itemCount.itemCloseAndScoreNum,0),4),0) * 100 satisfactionRatio,
ROUND(IFNULL(IFNULL(itemCount.itemNum,0) / IFNULL(issueCount.issueNum,0),0),4) * 100 issueToProjectRatio,
IFNULL(itemCount.selfSolveProjectNum,0) selfSolveProjectCount,
0 transferRightRatio
0 AS transferRightRatio,
0 AS transferRightRatioFz,
0 AS transferRightRatioFm,
IFNULL(itemCount.itemSatisfiedNum,0) * 0.6 + IFNULL(itemCount.itemVeryNum,0) satisfactionRatioFz,
IFNULL(itemCount.itemCloseAndScoreNum,0) satisfactionRatioFm,
IFNULL(itemCount.itemNum,0) issueToProjectRatioFz,
IFNULL(issueCount.issueNum,0) issueToProjectRatioFm
from <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept sd
left join (
select
@ -487,7 +499,17 @@
IFNULL(tr.closedProjectRatio,0.00) AS closedProjectRatio,
IFNULL(tr.satisfactionRatio,0.00) AS satisfactionRatio,
0.00 AS overdueProjectRatio,
IF( d.TYPE_KEY = 'street_party', IFNULL(tr.handleProjectRatio,0.00),0.00) AS handleProjectRatio
IF( d.TYPE_KEY = 'street_party', IFNULL(tr.handleProjectRatio,0.00),0.00) AS handleProjectRatio,
tr.respProjectRatioFz,
tr.respProjectRatioFm,
tr.closedProjectRatioFz,
tr.closedProjectRatioFm,
tr.satisfactionRatioFz,
tr.satisfactionRatioFm,
0 AS overdueProjectRatioFz,
0 AS overdueProjectRatioFm,
IF( d.TYPE_KEY = 'street_party', tr.handleProjectRatioFz, 0) handleProjectRatioFz,
IF( d.TYPE_KEY = 'street_party', tr.handleProjectRatioFm, 0) handleProjectRatioFm
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d
left join (
select
@ -495,12 +517,18 @@
sum(t.transferedCount) as transferedCount,
count( me.ITEM_STATE = 10 or null) as closedProjectCount,
round(sum(t.respProject) / sum(t.transferedCount),2) respProjectRatio,
IFNULL(sum(t.respProject), 0) respProjectRatioFz,
IFNULL(sum(t.transferedCount), 0) respProjectRatioFm,
round(count(me.ITEM_STATE = 10 or null)/count( t.ITEM_ID),4)*100 as closedProjectRatio,
IFNULL(count(me.ITEM_STATE = 10 or null), 0) closedProjectRatioFz,
IFNULL(count( t.ITEM_ID), 0) closedProjectRatioFm,
IFNULL(ROUND((count(me.EVALUATION_SCORE = 1 or null) * 0.6 + count(me.EVALUATION_SCORE = 2 or null)) /
count(me.EVALUATION_SCORE is not null or null),4)*100, 0.00) as satisfactionRatio,
round(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)) / sum(t.transferedCount),2) as handleProjectRatio
IFNULL(count(me.EVALUATION_SCORE = 1 or null) * 0.6 + count(me.EVALUATION_SCORE = 2 or null), 0) satisfactionRatioFz,
IFNULL(count(me.EVALUATION_SCORE is not null or null), 0) satisfactionRatioFm,
round(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)) / sum(t.transferedCount),2) as handleProjectRatio,
IFNULL(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)), 0) handleProjectRatioFz,
IFNULL(sum(t.transferedCount), 0) handleProjectRatioFm
from(
select
ei.DEPT_ID,
@ -544,17 +572,33 @@
IFNULL(tr.respProjectRatio,0.00) AS respProjectRatio,
IFNULL(tr.closedProjectRatio,0.00) AS closedProjectRatio,
IFNULL(tr.satisfactionRatio,0.00) AS satisfactionRatio,
IFNULL(tr.handleProjectRatio,0.00) AS handleProjectRatio
IFNULL(tr.handleProjectRatio,0.00) AS handleProjectRatio,
tr.respProjectRatioFz,
tr.respProjectRatioFm,
tr.handleProjectRatioFz,
tr.handleProjectRatioFm,
tr.closedProjectRatioFz,
tr.closedProjectRatioFm,
tr.satisfactionRatioFz,
tr.satisfactionRatioFm
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.sys_dept d
left join (select
t.DEPT_ID,
sum(t.transferedCount) as transferedCount,
count( me.ITEM_STATE = 10 or null) as closedProjectCount,
round(sum(t.respProject) / sum(t.transferedCount),2) respProjectRatio,
IFNULL(sum(t.respProject), 0) respProjectRatioFz,
IFNULL(sum(t.transferedCount), 0) respProjectRatioFm,
round(count(me.ITEM_STATE = 10 or null)/count( t.ITEM_ID),4)*100 as closedProjectRatio,
IFNULL(count(me.ITEM_STATE = 10 or null), 0) closedProjectRatioFz,
IFNULL(count( t.ITEM_ID), 0) closedProjectRatioFm,
IFNULL(ROUND((count(me.EVALUATION_SCORE = 1 or null) * 0.6 + count(me.EVALUATION_SCORE = 2 or null)) /
count(me.EVALUATION_SCORE is not null or null),4)*100, 0.00) as satisfactionRatio,
round(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)) / sum(t.transferedCount),2) as handleProjectRatio
IFNULL(count(me.EVALUATION_SCORE = 1 or null) * 0.6 + count(me.EVALUATION_SCORE = 2 or null), 0) satisfactionRatioFz,
IFNULL(count(me.EVALUATION_SCORE is not null or null), 0) satisfactionRatioFm,
round(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)) / sum(t.transferedCount),2) as handleProjectRatio,
IFNULL(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)), 0) handleProjectRatioFz,
IFNULL(sum(t.transferedCount), 0) handleProjectRatioFm
from (
select ei.DEPT_ID,
ei.ITEM_ID,

8
epdc-cloud-analysis-pc/src/main/resources/mapper/screen/ScreenPublicDataDao.xml

@ -14,7 +14,7 @@
'' AS centerMark,
'' AS partyMark,
CASE sd.`type_key` WHEN 'community_party' THEN 'community' WHEN 'district_party' THEN 'district' WHEN 'street_party' THEN 'street' ELSE '' END AS `level`,
'' AS areaCode,
sd.area_code AS areaCode,
DATE_FORMAT(NOW(), '%Y%m%d') AS dataEndTime
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept` sd
LEFT JOIN <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept` sd1 ON sd1.`id`= sd.`pid`
@ -35,7 +35,8 @@
'' AS areaMarks,
'' AS centerMark,
'' AS partyMark,
DATE_FORMAT(NOW(), '%Y%m%d') AS dataEndTime
DATE_FORMAT(NOW(), '%Y%m%d') AS dataEndTime,
sd.area_code
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept` sd
WHERE sd.`del_flag`= 0
AND sd.`type_key`= 'grid_party'
@ -52,7 +53,8 @@
'' AS areaMarks,
'' AS centerMark,
'' AS deptMark,
DATE_FORMAT(NOW(), '%Y%m%d') AS dataEndTime
DATE_FORMAT(NOW(), '%Y%m%d') AS dataEndTime,
sd.area_code
FROM <include refid="com.elink.esua.epdc.modules.common.dao.EpdcTableNameDao.tb_admin"/>.`sys_dept` sd
WHERE sd.`del_flag`= 0
AND sd.`type_key` IN ('street_dept', 'district_dept')

Loading…
Cancel
Save