|
|
@ -763,14 +763,19 @@ |
|
|
|
</select> |
|
|
|
<select id="selectPartyMemberProjectStaticByAgency" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> |
|
|
|
SELECT |
|
|
|
AGENCY_ID, |
|
|
|
COUNT(ID) AS "sum", |
|
|
|
SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count" |
|
|
|
FROM fact_origin_project_main_daily |
|
|
|
WHERE CUSTOMER_ID = #{customerId} |
|
|
|
AND DATE_ID <= #{dateId} |
|
|
|
a.ID AS AGENCY_ID, |
|
|
|
count( b.ID ) AS "sum", |
|
|
|
sum( IF( IS_PARTY = 1, 1, 0 )) AS "count" |
|
|
|
FROM |
|
|
|
dim_agency a |
|
|
|
INNER JOIN |
|
|
|
fact_origin_project_main_daily b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' ) |
|
|
|
WHERE |
|
|
|
b.CUSTOMER_ID = #{customerId} |
|
|
|
AND b.DATE_ID <= #{dateId} |
|
|
|
AND ORIGIN = 'issue' |
|
|
|
GROUP BY AGENCY_ID |
|
|
|
GROUP BY |
|
|
|
a.ID |
|
|
|
</select> |
|
|
|
<select id="selectPartyMemberProjectStaticByGrid" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> |
|
|
|
SELECT |
|
|
@ -785,15 +790,20 @@ |
|
|
|
</select> |
|
|
|
<select id="selectPartyMemberClosedProjectStaticByAgency" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> |
|
|
|
SELECT |
|
|
|
AGENCY_ID, |
|
|
|
COUNT(ID) AS "sum", |
|
|
|
SUM(IF(IS_PARTY = 1 ,1, 0)) AS "count" |
|
|
|
FROM fact_origin_project_main_daily |
|
|
|
WHERE CUSTOMER_ID = #{customerId} |
|
|
|
AND DATE_ID <= #{dateId} |
|
|
|
a.ID AS AGENCY_ID, |
|
|
|
count( b.ID ) AS "sum", |
|
|
|
sum( IF( IS_PARTY = 1, 1, 0 )) AS "count" |
|
|
|
FROM |
|
|
|
dim_agency a |
|
|
|
INNER JOIN |
|
|
|
fact_origin_project_main_daily b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' ) |
|
|
|
WHERE |
|
|
|
b.CUSTOMER_ID = #{customerId} |
|
|
|
AND b.DATE_ID <= #{dateId} |
|
|
|
AND PROJECT_STATUS = 'closed' |
|
|
|
AND ORIGIN = 'issue' |
|
|
|
GROUP BY AGENCY_ID |
|
|
|
GROUP BY |
|
|
|
a.ID |
|
|
|
</select> |
|
|
|
<select id="selectPartyMemberClosedProjectStaticByGrid" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> |
|
|
|
SELECT |
|
|
|