You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
3.4 KiB
108 lines
3.4 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.epmet.dao.stats.DataStatsDao">
|
|
|
|
<delete id="delGmUploadData">
|
|
DELETE
|
|
FROM
|
|
fact_grid_member_statistics_daily
|
|
WHERE
|
|
source_customer_id = #{customerId}
|
|
AND date_id = #{dateId}
|
|
LIMIT 1000
|
|
</delete>
|
|
|
|
<insert id="saveOrUpGmUploadData">
|
|
INSERT INTO fact_grid_member_statistics_daily
|
|
(
|
|
id,
|
|
date_id,
|
|
month_id,
|
|
year_id,
|
|
source_type,
|
|
customer_id,
|
|
source_customer_id,
|
|
agency_id,
|
|
grid_id,
|
|
pid,
|
|
pids,
|
|
staff_id,
|
|
staff_name,
|
|
project_count,
|
|
issue_to_project_count,
|
|
closed_issue_count,
|
|
project_response_count,
|
|
project_transfer_count,
|
|
project_closed_count,
|
|
project_incr,
|
|
issue_to_project_incr,
|
|
closed_issue_incr,
|
|
project_response_incr,
|
|
project_transfer_incr,
|
|
project_closed_incr,
|
|
del_flag,
|
|
revision,
|
|
created_by,
|
|
created_time,
|
|
updated_by,
|
|
updated_time
|
|
)
|
|
VALUES
|
|
<foreach collection="list" item="i" separator=",">
|
|
(
|
|
REPLACE(UUID(), '-', ''),
|
|
#{i.dateId},
|
|
#{i.monthId},
|
|
#{i.yearId},
|
|
#{i.sourceType},
|
|
#{i.parentCustomerId},
|
|
#{i.customerId},
|
|
#{i.agencyId},
|
|
#{i.gridId},
|
|
#{i.pid},
|
|
#{i.pids},
|
|
#{i.staffId},
|
|
#{i.staffName},
|
|
#{i.projectCount},
|
|
#{i.issueToProjectCount},
|
|
#{i.closedIssueCount},
|
|
#{i.projectResponseCount},
|
|
#{i.projectTransferCount},
|
|
#{i.projectClosedCount},
|
|
#{i.projectIncr},
|
|
#{i.issueToProjectIncr},
|
|
#{i.closedIssueIncr},
|
|
#{i.projectResponseIncr},
|
|
#{i.projectTransferIncr},
|
|
#{i.projectClosedIncr},
|
|
0,
|
|
0,
|
|
'BASE_REPORT',
|
|
NOW(),
|
|
'BASE_REPORT',
|
|
NOW()
|
|
)
|
|
</foreach>
|
|
ON DUPLICATE KEY
|
|
UPDATE
|
|
source_type = values(source_type),
|
|
customer_id = values(customer_id),
|
|
source_customer_id = values(source_customer_id),
|
|
project_count = values(project_count),
|
|
issue_to_project_count = values(issue_to_project_count),
|
|
closed_issue_count = values(closed_issue_count),
|
|
project_response_count = values(project_response_count),
|
|
project_transfer_count = values(project_transfer_count),
|
|
project_closed_count = values(project_closed_count),
|
|
project_incr = values(project_incr),
|
|
issue_to_project_incr = values(issue_to_project_incr),
|
|
closed_issue_incr = values(closed_issue_incr),
|
|
project_response_incr = values(project_response_incr),
|
|
project_transfer_incr = values(project_transfer_incr),
|
|
project_closed_incr = values(project_closed_incr),
|
|
updated_by = 'BASE_REPORT',
|
|
updated_time = NOW()
|
|
</insert>
|
|
|
|
</mapper>
|
|
|