|
|
@ -133,28 +133,477 @@ |
|
|
|
</insert> |
|
|
|
|
|
|
|
<delete id="delGridGroupTotal"> |
|
|
|
DELETE |
|
|
|
FROM |
|
|
|
fact_group_total_grid_daily |
|
|
|
WHERE |
|
|
|
customer_id = #{customerId} |
|
|
|
AND date_id = #{dateId} |
|
|
|
LIMIT 1000 |
|
|
|
</delete> |
|
|
|
|
|
|
|
<insert id="insertBatchGridGroupTotal"> |
|
|
|
insert into fact_group_total_grid_daily |
|
|
|
( |
|
|
|
id, |
|
|
|
customer_id, |
|
|
|
agency_id, |
|
|
|
grid_id, |
|
|
|
date_id, |
|
|
|
week_id, |
|
|
|
month_id, |
|
|
|
quarter_id, |
|
|
|
year_id, |
|
|
|
group_total, |
|
|
|
ordinary_total, |
|
|
|
branch_total, |
|
|
|
del_flag, |
|
|
|
revision, |
|
|
|
created_by, |
|
|
|
created_time, |
|
|
|
updated_by, |
|
|
|
updated_time |
|
|
|
) values |
|
|
|
<foreach collection="list" item="item" index="index" separator=","> |
|
|
|
( |
|
|
|
(SELECT REPLACE(UUID(), '-', '') AS id), |
|
|
|
#{item.customerId}, |
|
|
|
#{item.agencyId}, |
|
|
|
#{item.gridId}, |
|
|
|
#{item.dateId}, |
|
|
|
#{item.weekId}, |
|
|
|
#{item.monthId}, |
|
|
|
#{item.quarterId}, |
|
|
|
#{item.yearId}, |
|
|
|
#{item.groupTotal}, |
|
|
|
#{item.ordinaryTotal}, |
|
|
|
#{item.branchTotal}, |
|
|
|
0, |
|
|
|
0, |
|
|
|
'BASE_REPORT', |
|
|
|
now(), |
|
|
|
'BASE_REPORT', |
|
|
|
now() |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<delete id="delAgencyGroupTotal"> |
|
|
|
DELETE |
|
|
|
FROM |
|
|
|
fact_group_total_agency_daily |
|
|
|
WHERE |
|
|
|
customer_id = #{customerId} |
|
|
|
AND date_id = #{dateId} |
|
|
|
LIMIT 1000 |
|
|
|
</delete> |
|
|
|
|
|
|
|
<insert id="insertBatchAgencyGroupTotal"> |
|
|
|
insert into fact_group_total_agency_daily |
|
|
|
( |
|
|
|
id, |
|
|
|
customer_id, |
|
|
|
agency_id, |
|
|
|
pid, |
|
|
|
date_id, |
|
|
|
week_id, |
|
|
|
month_id, |
|
|
|
quarter_id, |
|
|
|
year_id, |
|
|
|
group_total, |
|
|
|
ordinary_total, |
|
|
|
branch_total, |
|
|
|
del_flag, |
|
|
|
revision, |
|
|
|
created_by, |
|
|
|
created_time, |
|
|
|
updated_by, |
|
|
|
updated_time |
|
|
|
) values |
|
|
|
<foreach collection="list" item="item" index="index" separator=","> |
|
|
|
( |
|
|
|
(SELECT REPLACE(UUID(), '-', '') AS id), |
|
|
|
#{item.customerId}, |
|
|
|
#{item.agencyId}, |
|
|
|
#{item.pid}, |
|
|
|
#{item.dateId}, |
|
|
|
#{item.weekId}, |
|
|
|
#{item.monthId}, |
|
|
|
#{item.quarterId}, |
|
|
|
#{item.yearId}, |
|
|
|
#{item.groupTotal}, |
|
|
|
#{item.ordinaryTotal}, |
|
|
|
#{item.branchTotal}, |
|
|
|
0, |
|
|
|
0, |
|
|
|
'BASE_REPORT', |
|
|
|
now(), |
|
|
|
'BASE_REPORT', |
|
|
|
now() |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<delete id="delGridHotTopic"> |
|
|
|
DELETE |
|
|
|
FROM |
|
|
|
fact_topic_hotdiscuss_grid_daily |
|
|
|
WHERE |
|
|
|
customer_id = #{customerId} |
|
|
|
AND date_id = #{dateId} |
|
|
|
LIMIT 1000 |
|
|
|
</delete> |
|
|
|
|
|
|
|
<insert id="insertBatchGridHotTopic"> |
|
|
|
insert into fact_topic_hotdiscuss_grid_daily |
|
|
|
( |
|
|
|
id, |
|
|
|
customer_id, |
|
|
|
agency_id, |
|
|
|
grid_id, |
|
|
|
date_id, |
|
|
|
week_id, |
|
|
|
month_id, |
|
|
|
quarter_id, |
|
|
|
year_id, |
|
|
|
topic_total, |
|
|
|
status, |
|
|
|
topic_count, |
|
|
|
del_flag, |
|
|
|
revision, |
|
|
|
created_by, |
|
|
|
created_time, |
|
|
|
updated_by, |
|
|
|
updated_time |
|
|
|
) values |
|
|
|
<foreach collection="list" item="item" index="index" separator=","> |
|
|
|
( |
|
|
|
(SELECT REPLACE(UUID(), '-', '') AS id), |
|
|
|
#{item.customerId}, |
|
|
|
#{item.agencyId}, |
|
|
|
#{item.gridId}, |
|
|
|
#{item.dateId}, |
|
|
|
#{item.weekId}, |
|
|
|
#{item.monthId}, |
|
|
|
#{item.quarterId}, |
|
|
|
#{item.yearId}, |
|
|
|
#{item.topicTotal}, |
|
|
|
#{item.status}, |
|
|
|
#{item.topicCount}, |
|
|
|
0, |
|
|
|
0, |
|
|
|
'BASE_REPORT', |
|
|
|
now(), |
|
|
|
'BASE_REPORT', |
|
|
|
now() |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<delete id="delAgencyHotTopic"> |
|
|
|
DELETE |
|
|
|
FROM |
|
|
|
fact_topic_hotdiscuss_agency_daily |
|
|
|
WHERE |
|
|
|
customer_id = #{customerId} |
|
|
|
AND date_id = #{dateId} |
|
|
|
LIMIT 1000 |
|
|
|
</delete> |
|
|
|
|
|
|
|
<insert id="insertBatchAgencyHotTopic"> |
|
|
|
insert into fact_topic_hotdiscuss_agency_daily |
|
|
|
( |
|
|
|
id, |
|
|
|
customer_id, |
|
|
|
agency_id, |
|
|
|
pid, |
|
|
|
date_id, |
|
|
|
week_id, |
|
|
|
month_id, |
|
|
|
quarter_id, |
|
|
|
year_id, |
|
|
|
topic_total, |
|
|
|
status, |
|
|
|
topic_count, |
|
|
|
del_flag, |
|
|
|
revision, |
|
|
|
created_by, |
|
|
|
created_time, |
|
|
|
updated_by, |
|
|
|
updated_time |
|
|
|
) values |
|
|
|
<foreach collection="list" item="item" index="index" separator=","> |
|
|
|
( |
|
|
|
(SELECT REPLACE(UUID(), '-', '') AS id), |
|
|
|
#{item.customerId}, |
|
|
|
#{item.agencyId}, |
|
|
|
#{item.pid}, |
|
|
|
#{item.dateId}, |
|
|
|
#{item.weekId}, |
|
|
|
#{item.monthId}, |
|
|
|
#{item.quarterId}, |
|
|
|
#{item.yearId}, |
|
|
|
#{item.topicTotal}, |
|
|
|
#{item.status}, |
|
|
|
#{item.topicCount}, |
|
|
|
0, |
|
|
|
0, |
|
|
|
'BASE_REPORT', |
|
|
|
now(), |
|
|
|
'BASE_REPORT', |
|
|
|
now() |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<!-- 根据dateId删除客户组织项目数据 --> |
|
|
|
<delete id="delAgencyProject"> |
|
|
|
DELETE FROM fact_agency_project_daily |
|
|
|
WHERE customer_id = #{customerId} |
|
|
|
AND date_id = #{dateId} |
|
|
|
LIMIT 1000 |
|
|
|
</delete> |
|
|
|
|
|
|
|
<!-- 批量新增组织项目数据 --> |
|
|
|
<insert id="insertAgencyProject"> |
|
|
|
INSERT INTO fact_agency_project_daily |
|
|
|
( |
|
|
|
ID, |
|
|
|
CUSTOMER_ID, |
|
|
|
AGENCY_ID, |
|
|
|
PARENT_ID, |
|
|
|
DATE_ID, |
|
|
|
WEEK_ID, |
|
|
|
MONTH_ID, |
|
|
|
QUARTER_ID, |
|
|
|
YEAR_ID, |
|
|
|
PROJECT_TOTAL, |
|
|
|
PENDING_TOTAL, |
|
|
|
PENDING_RATIO, |
|
|
|
CLOSED_TOTAL, |
|
|
|
CLOSED_RATIO, |
|
|
|
RESOLVED_TOTAL, |
|
|
|
RESOLVED_RATIO, |
|
|
|
UNRESOLVED_TOTAL, |
|
|
|
UNRESOLVED_RATIO, |
|
|
|
PROJECT_INCR, |
|
|
|
PENDING_INCR, |
|
|
|
CLOSED_INCR, |
|
|
|
RESOLVED_INCR, |
|
|
|
UNRESOLVED_INCR, |
|
|
|
DEL_FLAG, |
|
|
|
REVISION, |
|
|
|
CREATED_BY, |
|
|
|
CREATED_TIME, |
|
|
|
UPDATED_BY, |
|
|
|
UPDATED_TIME) |
|
|
|
values |
|
|
|
<foreach collection="list" item="i" separator=","> |
|
|
|
( |
|
|
|
REPLACE(UUID(), '-', ''), |
|
|
|
#{i.customerId}, |
|
|
|
#{i.agencyId}, |
|
|
|
#{i.parentId}, |
|
|
|
#{i.dateId}, |
|
|
|
#{i.weekId}, |
|
|
|
#{i.monthId}, |
|
|
|
#{i.quarterId}, |
|
|
|
#{i.yearId}, |
|
|
|
#{i.projectTotal}, |
|
|
|
#{i.pendingTotal}, |
|
|
|
#{i.pendingRatio}, |
|
|
|
#{i.closedTotal}, |
|
|
|
#{i.closedRatio}, |
|
|
|
#{i.resolvedTotal}, |
|
|
|
#{i.resolvedRatio}, |
|
|
|
#{i.unresolvedTotal}, |
|
|
|
#{i.unresolvedRatio}, |
|
|
|
#{i.projectIncr}, |
|
|
|
#{i.pendingIncr}, |
|
|
|
#{i.closedIncr}, |
|
|
|
#{i.resolvedIncr}, |
|
|
|
#{i.unresolvedIncr}, |
|
|
|
0, |
|
|
|
0, |
|
|
|
'BASE_REPORT', |
|
|
|
now(), |
|
|
|
'BASE_REPORT', |
|
|
|
now() |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<!-- 批量新增网格项目数据 --> |
|
|
|
<insert id="insertGridProject"> |
|
|
|
INSERT INTO fact_grid_project_daily |
|
|
|
(ID, |
|
|
|
CUSTOMER_ID, |
|
|
|
AGENCY_ID, |
|
|
|
GRID_ID, |
|
|
|
DATE_ID, |
|
|
|
WEEK_ID, |
|
|
|
MONTH_ID, |
|
|
|
QUARTER_ID, |
|
|
|
YEAR_ID, |
|
|
|
PROJECT_TOTAL, |
|
|
|
PENDING_TOTAL, |
|
|
|
PENDING_RATIO, |
|
|
|
CLOSED_TOTAL, |
|
|
|
CLOSED_RATIO, |
|
|
|
RESOLVED_TOTAL, |
|
|
|
RESOLVED_RATIO, |
|
|
|
UNRESOLVED_TOTAL, |
|
|
|
UNRESOLVED_RATIO, |
|
|
|
PROJECT_INCR, |
|
|
|
PENDING_INCR, |
|
|
|
CLOSED_INCR, |
|
|
|
RESOLVED_INCR, |
|
|
|
UNRESOLVED_INCR, |
|
|
|
DEL_FLAG, |
|
|
|
REVISION, |
|
|
|
CREATED_BY, |
|
|
|
CREATED_TIME, |
|
|
|
UPDATED_BY, |
|
|
|
UPDATED_TIME) |
|
|
|
values |
|
|
|
<foreach collection="list" item="i" separator=","> |
|
|
|
( |
|
|
|
REPLACE(UUID(), '-', ''), |
|
|
|
#{i.customerId}, |
|
|
|
#{i.agencyId}, |
|
|
|
#{i.gridId}, |
|
|
|
#{i.dateId}, |
|
|
|
#{i.weekId}, |
|
|
|
#{i.monthId}, |
|
|
|
#{i.quarterId}, |
|
|
|
#{i.yearId}, |
|
|
|
#{i.projectTotal}, |
|
|
|
#{i.pendingTotal}, |
|
|
|
#{i.pendingRatio}, |
|
|
|
#{i.closedTotal}, |
|
|
|
#{i.closedRatio}, |
|
|
|
#{i.resolvedTotal}, |
|
|
|
#{i.resolvedRatio}, |
|
|
|
#{i.unresolvedTotal}, |
|
|
|
#{i.unresolvedRatio}, |
|
|
|
#{i.projectIncr}, |
|
|
|
#{i.pendingIncr}, |
|
|
|
#{i.closedIncr}, |
|
|
|
#{i.resolvedIncr}, |
|
|
|
#{i.unresolvedIncr}, |
|
|
|
0, |
|
|
|
0, |
|
|
|
'BASE_REPORT', |
|
|
|
NOW(), |
|
|
|
'BASE_REPORT', |
|
|
|
NOW() |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<!-- 根据dateId删除客户网格项目数据 --> |
|
|
|
<delete id="delGridProject"> |
|
|
|
DELETE FROM fact_grid_project_daily |
|
|
|
WHERE customer_id = #{customerId} |
|
|
|
AND date_id = #{dateId} |
|
|
|
LIMIT 1000 |
|
|
|
</delete> |
|
|
|
|
|
|
|
<!-- 删除组织议题数据 --> |
|
|
|
<delete id="delAgencyIssue"> |
|
|
|
DELETE FROM fact_issue_agency_daily |
|
|
|
WHERE customer_id = #{customerId} |
|
|
|
AND date_id = #{dateId} |
|
|
|
LIMIT 1000 |
|
|
|
</delete> |
|
|
|
|
|
|
|
<!-- 新增组织议题数据 --> |
|
|
|
<insert id="insertAgencyIssue"> |
|
|
|
INSERt INTO fact_issue_agency_daily |
|
|
|
(ID, |
|
|
|
CUSTOMER_ID, |
|
|
|
AGENCY_ID, |
|
|
|
PID, |
|
|
|
YEAR_ID, |
|
|
|
QUARTER_ID, |
|
|
|
MONTH_ID, |
|
|
|
WEEK_ID, |
|
|
|
DATE_ID, |
|
|
|
ISSUE_INCR, |
|
|
|
ISSUE_TOTAL, |
|
|
|
SHIFT_PROJECT_INCR, |
|
|
|
SHIFT_PROJECT_TOTAL, |
|
|
|
SHIFT_PROJECT_PERCENT, |
|
|
|
VOTING_INCR, |
|
|
|
VOTING_TOTAL, |
|
|
|
VOTING_PERCENT, |
|
|
|
CLOSED_INCR, |
|
|
|
CLOSED_RESOLVED_INCR, |
|
|
|
CLOSED_UNRESOLVED_INCR, |
|
|
|
CLOSED_TOTAL, |
|
|
|
CLOSED_RESOLVED_TOTAL, |
|
|
|
CLOSED_UNRESOLVED_TOTAL, |
|
|
|
CLOSED_PERCENT, |
|
|
|
CLOSED_RESOLVED_PERCENT, |
|
|
|
CLOSED_UNRESOLVED_PERCENT, |
|
|
|
CLOSED_CASE_INCR, |
|
|
|
CLOSED_CASE_RESOLVED_INCR, |
|
|
|
CLOSED_CASE_UNRESOLVED_INCR, |
|
|
|
CLOSED_CASE_TOTAL, |
|
|
|
CLOSED_CASE_RESOLVED_TOTAL, |
|
|
|
CLOSED_CASE_UNRESOLVED_TOTAL, |
|
|
|
CLOSED_CASE_RESOLVED_PERCENT, |
|
|
|
CLOSED_CASE_UNRESOLVED_PERCENT, |
|
|
|
REVISION, |
|
|
|
CREATED_BY, |
|
|
|
CREATED_TIME, |
|
|
|
UPDATED_BY, |
|
|
|
DEL_FLAG, |
|
|
|
UPDATED_TIME) |
|
|
|
VALUES |
|
|
|
<foreach collection="list" item="i" separator=","> |
|
|
|
( |
|
|
|
REPLACE(UUID(), '-', ''), |
|
|
|
#{i.customerId}, |
|
|
|
#{i.agencyId}, |
|
|
|
#{i.pid}, |
|
|
|
#{i.yearId}, |
|
|
|
#{i.quarterId}, |
|
|
|
#{i.monthId}, |
|
|
|
#{i.weekId}, |
|
|
|
#{i.dateId}, |
|
|
|
#{i.issueIncr}, |
|
|
|
#{i.issueTotal}, |
|
|
|
#{i.shiftProjectIncr}, |
|
|
|
#{i.shiftProjectTotal}, |
|
|
|
#{i.shiftProjectPercent}, |
|
|
|
#{i.votingIncr}, |
|
|
|
#{i.votingTotal}, |
|
|
|
#{i.votingPercent}, |
|
|
|
#{i.closedIncr}, |
|
|
|
#{i.closedResolvedIncr}, |
|
|
|
#{i.closedUnresolvedIncr}, |
|
|
|
#{i.closedTotal}, |
|
|
|
#{i.closedResolvedTotal}, |
|
|
|
#{i.closedUnresolvedTotal}, |
|
|
|
#{i.closedPercent}, |
|
|
|
#{i.closedResolvedPercent}, |
|
|
|
#{i.closedUnresolvedPercent}, |
|
|
|
#{i.closedCaseIncr}, |
|
|
|
#{i.closedCaseResolvedIncr}, |
|
|
|
#{i.closedCaseUnresolvedIncr}, |
|
|
|
#{i.closedCaseTotal}, |
|
|
|
#{i.closedCaseResolvedTotal}, |
|
|
|
#{i.closedCaseUnresolvedTotal}, |
|
|
|
#{i.closedCaseResolvedPercent}, |
|
|
|
#{i.closedCaseUnresolvedPercent}, |
|
|
|
0, |
|
|
|
'BASE_REPORT', |
|
|
|
NOW(), |
|
|
|
'BASE_REPORT', |
|
|
|
0, |
|
|
|
NOW() |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
</mapper> |
|
|
|