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.

89 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.indexcoll.FactIndexGovrnAblityGridMonthlyDao">
<resultMap type="com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity" id="factIndexGovrnAblityGridMonthlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="monthId" column="MONTH_ID"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/>
<result property="issueTotal" column="ISSUE_TOTAL"/>
<result property="avgIssueCount" column="AVG_ISSUE_COUNT"/>
<result property="avgShiftProjectRatio" column="AVG_SHIFT_PROJECT_RATIO"/>
<result property="projectTotal" column="PROJECT_TOTAL"/>
<result property="selfSolveProjectCount" column="SELF_SOLVE_PROJECT_COUNT"/>
<result property="resolveProjectCount" column="RESOLVE_PROJECT_COUNT"/>
<result property="transferRightRatio" column="TRANSFER_RIGHT_RATIO"/>
<result property="satisfactionRatio" column="SATISFACTION_RATIO"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteFactIndexGovrnAblityGridMonthly">
delete from fact_index_govrn_ablity_grid_monthly
where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId}
AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId}
</delete>
<insert id="batchInsertFactIndexGovrnAblityGridMonthly" parameterType="map">
insert into fact_index_govrn_ablity_grid_monthly
(
ID,
CUSTOMER_ID,
AGENCY_ID,
GRID_ID,
MONTH_ID,
QUARTER_ID,
YEAR_ID,
ISSUE_TOTAL,
AVG_ISSUE_COUNT,
AVG_SHIFT_PROJECT_RATIO,
PROJECT_TOTAL,
SELF_SOLVE_PROJECT_COUNT,
RESOLVE_PROJECT_COUNT,
TRANSFER_RIGHT_RATIO,
SATISFACTION_RATIO,
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),
#{customerId},
#{item.agencyId},
#{item.gridId},
#{item.monthId},
#{item.quarterId},
#{item.yearId},
#{item.issueTotal},
#{item.avgIssueCount},
#{item.avgShiftProjectRatio},
#{item.projectTotal},
#{item.selfSolveProjectCount},
#{item.resolveProjectCount},
#{item.transferRightRatio},
#{item.satisfactionRatio},
0,
0,
'APP_USER',
now(),
'APP_USER',
now()
)
</foreach>
</insert>
</mapper>