Browse Source

Merge branch 'dev_bugfix_ljj' into develop

dev_shibei_match
zhaoqifeng 4 years ago
parent
commit
f845798d26
  1. 34
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
  2. 48
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

34
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

@ -330,20 +330,20 @@
IFNULL( b.count, IFNULL( b.count,
0 ) AS "count" 0 ) AS "count"
FROM FROM
(SELECT f.AGENCY_ID, (SELECT da.ID AS AGENCY_ID,
COUNT( f.ID ) AS "count" COUNT( f.ID ) AS "count"
FROM fact_origin_project_log_daily f FROM fact_origin_project_log_daily f
INNER JOIN dim_agency da ON f.AGENCY_ID = da.ID INNER JOIN dim_agency da ON f.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE f.IS_ACTIVE = 0 WHERE f.IS_ACTIVE = 0
AND f.CUSTOMER_ID = #{customerId} AND f.CUSTOMER_ID = #{customerId}
AND f.MONTH_ID = #{monthId} AND f.MONTH_ID = #{monthId}
GROUP BY f.AGENCY_ID ) a GROUP BY da.ID ) a
LEFT JOIN LEFT JOIN
(SELECT f.AGENCY_ID, (SELECT da.ID AS AGENCY_ID,
COUNT( f.ID ) AS "count" COUNT( f.ID ) AS "count"
FROM fact_origin_project_log_daily f FROM fact_origin_project_log_daily f
INNER JOIN dim_agency da ON f.AGENCY_ID = da.ID INNER JOIN dim_agency da ON f.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
( ACTION_CODE = 'close' ( ACTION_CODE = 'close'
@ -354,7 +354,7 @@
AND f.IS_ACTIVE = 1 AND f.IS_ACTIVE = 1
AND f.CUSTOMER_ID = #{customerId} AND f.CUSTOMER_ID = #{customerId}
AND f.MONTH_ID = #{monthId} AND f.MONTH_ID = #{monthId}
GROUP BY f.AGENCY_ID ) b GROUP BY da.ID ) b
ON a.AGENCY_ID = b.AGENCY_ID ON a.AGENCY_ID = b.AGENCY_ID
</select> </select>
<select id="selectGridSatisfaction" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="selectGridSatisfaction" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
@ -388,11 +388,12 @@
FROM FROM
( (
SELECT SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
fm.ID, fm.ID,
IFNULL( IS_SATISFIED, 1 ) AS "score" IFNULL( IS_SATISFIED, 1 ) AS "score"
FROM FROM
fact_origin_project_main_daily fm dim_agency da
INNER JOIN fact_origin_project_main_daily fm ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
WHERE fm.CUSTOMER_ID = #{customerId} WHERE fm.CUSTOMER_ID = #{customerId}
AND fm.MONTH_ID = #{monthId} AND fm.MONTH_ID = #{monthId}
AND fm.PROJECT_STATUS = 'closed' AND fm.PROJECT_STATUS = 'closed'
@ -553,11 +554,12 @@
FROM FROM
( (
SELECT SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
fm.ID, fm.ID,
IFNULL( IS_SATISFIED, 1 ) AS "score" IFNULL( IS_SATISFIED, 1 ) AS "score"
FROM FROM
fact_origin_project_main_daily fm dim_agency da
INNER JOIN fact_origin_project_main_daily fm ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
WHERE fm.CUSTOMER_ID = #{customerId} WHERE fm.CUSTOMER_ID = #{customerId}
AND fm.PROJECT_STATUS = 'closed' AND fm.PROJECT_STATUS = 'closed'
AND fm.ORIGIN = 'issue' AND fm.ORIGIN = 'issue'
@ -571,20 +573,20 @@
IFNULL( b.count, IFNULL( b.count,
0 ) AS "count" 0 ) AS "count"
FROM FROM
(SELECT f.AGENCY_ID, (SELECT da.ID AS AGENCY_ID,
COUNT( f.ID ) AS "count" COUNT( f.ID ) AS "count"
FROM fact_origin_project_log_daily f FROM fact_origin_project_log_daily f
INNER JOIN dim_agency da ON f.AGENCY_ID = da.ID INNER JOIN dim_agency da ON f.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE f.IS_ACTIVE = 0 WHERE f.IS_ACTIVE = 0
AND f.CUSTOMER_ID = #{customerId} AND f.CUSTOMER_ID = #{customerId}
AND f.DATE_ID &lt;= #{dateId} AND f.DATE_ID &lt;= #{dateId}
GROUP BY f.AGENCY_ID ) a GROUP BY da.ID ) a
LEFT JOIN LEFT JOIN
(SELECT f.AGENCY_ID, (SELECT da.ID AS AGENCY_ID,
COUNT( f.ID ) AS "count" COUNT( f.ID ) AS "count"
FROM fact_origin_project_log_daily f FROM fact_origin_project_log_daily f
INNER JOIN dim_agency da ON f.AGENCY_ID = da.ID INNER JOIN dim_agency da ON f.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
(ACTION_CODE = 'close' (ACTION_CODE = 'close'
@ -595,7 +597,7 @@
AND f.IS_ACTIVE = 1 AND f.IS_ACTIVE = 1
AND f.CUSTOMER_ID = #{customerId} AND f.CUSTOMER_ID = #{customerId}
AND f.DATE_ID &lt;= #{dateId} AND f.DATE_ID &lt;= #{dateId}
GROUP BY f.AGENCY_ID ) b GROUP BY da.ID ) b
ON a.AGENCY_ID = b.AGENCY_ID ON a.AGENCY_ID = b.AGENCY_ID
</select> </select>
<select id="selectGridResponseDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="selectGridResponseDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">

48
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -197,25 +197,25 @@
IFNULL(b.count,0) AS "count" IFNULL(b.count,0) AS "count"
FROM FROM
(SELECT (SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "count" COUNT( fm.ID ) AS "count"
FROM FROM
fact_origin_project_main_daily fm fact_origin_project_main_daily fm
INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID INNER JOIN dim_agency da ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
fm.PROJECT_STATUS = 'closed' fm.PROJECT_STATUS = 'closed'
AND fm.CUSTOMER_ID = #{customerId} AND fm.CUSTOMER_ID = #{customerId}
AND fm.MONTH_ID = #{monthId} AND fm.MONTH_ID = #{monthId}
GROUP BY GROUP BY
fm.AGENCY_ID) a da.ID) a
LEFT JOIN LEFT JOIN
(SELECT (SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "count" COUNT( fm.ID ) AS "count"
FROM FROM
fact_origin_project_main_daily fm fact_origin_project_main_daily fm
INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID INNER JOIN dim_agency da ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
fm.PROJECT_STATUS = 'closed' fm.PROJECT_STATUS = 'closed'
@ -223,7 +223,7 @@
AND fm.MONTH_ID = #{monthId} AND fm.MONTH_ID = #{monthId}
AND fm.FINISH_ORG_IDS LIKE CONCAT('%', fm.AGENCY_ID,'%') AND fm.FINISH_ORG_IDS LIKE CONCAT('%', fm.AGENCY_ID,'%')
GROUP BY GROUP BY
fm.AGENCY_ID) b da.ID) b
ON a.AGENCY_ID = b.AGENCY_ID ON a.AGENCY_ID = b.AGENCY_ID
</select> </select>
<select id="getResolveProject" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="getResolveProject" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
@ -233,25 +233,25 @@
IFNULL(b.count,0) AS "count" IFNULL(b.count,0) AS "count"
FROM FROM
(SELECT (SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "count" COUNT( fm.ID ) AS "count"
FROM FROM
fact_origin_project_main_daily fm fact_origin_project_main_daily fm
INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID INNER JOIN dim_agency da ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
fm.PROJECT_STATUS = 'closed' fm.PROJECT_STATUS = 'closed'
AND fm.CUSTOMER_ID = #{customerId} AND fm.CUSTOMER_ID = #{customerId}
AND fm.MONTH_ID = #{monthId} AND fm.MONTH_ID = #{monthId}
GROUP BY GROUP BY
fm.AGENCY_ID) a da.ID) a
LEFT JOIN LEFT JOIN
(SELECT (SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "count" COUNT( fm.ID ) AS "count"
FROM FROM
fact_origin_project_main_daily fm fact_origin_project_main_daily fm
INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID INNER JOIN dim_agency da ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
fm.PROJECT_STATUS = 'closed' fm.PROJECT_STATUS = 'closed'
@ -259,7 +259,7 @@
AND fm.MONTH_ID = #{monthId} AND fm.MONTH_ID = #{monthId}
AND fm.IS_RESOLVED = 'resolved' AND fm.IS_RESOLVED = 'resolved'
GROUP BY GROUP BY
fm.AGENCY_ID) b da.ID) b
ON a.AGENCY_ID = b.AGENCY_ID ON a.AGENCY_ID = b.AGENCY_ID
</select> </select>
<select id="getGridResolveProject" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="getGridResolveProject" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
@ -858,25 +858,25 @@
IFNULL(b.count,0) AS "count" IFNULL(b.count,0) AS "count"
FROM FROM
(SELECT (SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "count" COUNT( fm.ID ) AS "count"
FROM FROM
fact_origin_project_main_daily fm fact_origin_project_main_daily fm
INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID INNER JOIN dim_agency da ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
fm.PROJECT_STATUS = 'closed' fm.PROJECT_STATUS = 'closed'
AND fm.CUSTOMER_ID = #{customerId} AND fm.CUSTOMER_ID = #{customerId}
AND fm.DATE_ID &lt;= #{dateId} AND fm.DATE_ID &lt;= #{dateId}
GROUP BY GROUP BY
fm.AGENCY_ID) a da.ID) a
LEFT JOIN LEFT JOIN
(SELECT (SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "count" COUNT( fm.ID ) AS "count"
FROM FROM
fact_origin_project_main_daily fm fact_origin_project_main_daily fm
INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID INNER JOIN dim_agency da ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
fm.PROJECT_STATUS = 'closed' fm.PROJECT_STATUS = 'closed'
@ -884,7 +884,7 @@
AND fm.DATE_ID &lt;= #{dateId} AND fm.DATE_ID &lt;= #{dateId}
AND fm.FINISH_ORG_IDS LIKE CONCAT('%', fm.AGENCY_ID,'%') AND fm.FINISH_ORG_IDS LIKE CONCAT('%', fm.AGENCY_ID,'%')
GROUP BY GROUP BY
fm.AGENCY_ID) b da.ID) b
ON a.AGENCY_ID = b.AGENCY_ID ON a.AGENCY_ID = b.AGENCY_ID
</select> </select>
<select id="getResolveProjectDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="getResolveProjectDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
@ -894,25 +894,25 @@
IFNULL(b.count,0) AS "count" IFNULL(b.count,0) AS "count"
FROM FROM
(SELECT (SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "count" COUNT( fm.ID ) AS "count"
FROM FROM
fact_origin_project_main_daily fm fact_origin_project_main_daily fm
INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID INNER JOIN dim_agency da ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
fm.PROJECT_STATUS = 'closed' fm.PROJECT_STATUS = 'closed'
AND fm.CUSTOMER_ID = #{customerId} AND fm.CUSTOMER_ID = #{customerId}
AND fm.DATE_ID &lt;= #{dateId} AND fm.DATE_ID &lt;= #{dateId}
GROUP BY GROUP BY
fm.AGENCY_ID) a da.ID) a
LEFT JOIN LEFT JOIN
(SELECT (SELECT
fm.AGENCY_ID, da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "count" COUNT( fm.ID ) AS "count"
FROM FROM
fact_origin_project_main_daily fm fact_origin_project_main_daily fm
INNER JOIN dim_agency da ON fm.AGENCY_ID = da.ID INNER JOIN dim_agency da ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
AND da.`LEVEL` = #{level} AND da.`LEVEL` = #{level}
WHERE WHERE
fm.PROJECT_STATUS = 'closed' fm.PROJECT_STATUS = 'closed'
@ -920,7 +920,7 @@
AND fm.DATE_ID &lt;= #{dateId} AND fm.DATE_ID &lt;= #{dateId}
AND fm.IS_RESOLVED = 'resolved' AND fm.IS_RESOLVED = 'resolved'
GROUP BY GROUP BY
fm.AGENCY_ID) b da.ID) b
ON a.AGENCY_ID = b.AGENCY_ID ON a.AGENCY_ID = b.AGENCY_ID
</select> </select>

Loading…
Cancel
Save