|
@ -769,32 +769,39 @@ |
|
|
|
|
|
|
|
|
<select id="selectGirdMemberPatrol" resultType="com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO"> |
|
|
<select id="selectGirdMemberPatrol" resultType="com.epmet.dataaggre.dto.epmetuser.result.GridMemberPatrolListResultDTO"> |
|
|
SELECT |
|
|
SELECT |
|
|
staff_id staffId, |
|
|
a.staff_id staffId, |
|
|
staff_name staffName, |
|
|
a.staff_name staffName, |
|
|
date_id dateId, |
|
|
a.date_id dateId, |
|
|
IFNULL( |
|
|
IFNULL( |
|
|
SUM( |
|
|
SUM( |
|
|
issue_to_project_count + closed_issue_count + project_response_count + project_transfer_count + project_closed_count |
|
|
a.issue_to_project_count + a.closed_issue_count + a.project_response_count + a.project_transfer_count + a.project_closed_count |
|
|
) |
|
|
), |
|
|
, 0)eventCount |
|
|
0 |
|
|
|
|
|
) eventCount |
|
|
|
|
|
FROM |
|
|
|
|
|
fact_grid_member_statistics_daily a |
|
|
|
|
|
INNER JOIN ( |
|
|
|
|
|
SELECT |
|
|
|
|
|
staff_id, |
|
|
|
|
|
MAX(date_id) date_id |
|
|
FROM |
|
|
FROM |
|
|
fact_grid_member_statistics_daily |
|
|
fact_grid_member_statistics_daily |
|
|
WHERE |
|
|
WHERE del_flag = '0' |
|
|
del_flag = '0' |
|
|
|
|
|
AND pids LIKE concat('%', #{agencyId}, '%') |
|
|
AND pids LIKE concat('%', #{agencyId}, '%') |
|
|
AND date_id = ( |
|
|
|
|
|
SELECT MAX(date_id) |
|
|
|
|
|
FROM fact_grid_member_statistics_daily |
|
|
|
|
|
WHERE |
|
|
|
|
|
del_flag = '0' |
|
|
|
|
|
<if test="dimType!= null and dimType == 'month' "> |
|
|
<if test="dimType!= null and dimType == 'month' "> |
|
|
AND month_id = #{dimId} |
|
|
AND month_id = #{dimId} |
|
|
</if> |
|
|
</if> |
|
|
<if test="dimType!= null and dimType == 'year' "> |
|
|
<if test="dimType!= null and dimType == 'year' "> |
|
|
AND year_id = #{dimId} |
|
|
AND year_id = #{dimId} |
|
|
</if> |
|
|
</if> |
|
|
) |
|
|
GROUP BY STAFF_ID |
|
|
GROUP BY staff_id |
|
|
) b ON a.STAFF_ID = b.STAFF_ID AND a.date_id = b.date_id |
|
|
|
|
|
|
|
|
|
|
|
WHERE |
|
|
|
|
|
a.del_flag = '0' |
|
|
|
|
|
AND a.pids LIKE concat('%', #{agencyId}, '%') |
|
|
|
|
|
GROUP BY a.staff_id |
|
|
|
|
|
ORDER BY a.date_id DESC |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="regUserList" resultType="com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO$CustomerDataManage"> |
|
|
<select id="regUserList" resultType="com.epmet.dataaggre.dto.datastats.result.CustomerDataManageResultDTO$CustomerDataManage"> |
|
|