|
|
@ -133,27 +133,227 @@ |
|
|
|
</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删除客户组织项目数据 --> |
|
|
|