forked from luyan/epmet-cloud-lingshan
12 changed files with 167 additions and 48 deletions
@ -0,0 +1,40 @@ |
|||
<?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.evaluationindex.indexcal.AgencySelfSubScoreDao"> |
|||
|
|||
<delete id="deleteByMonthId"> |
|||
delete from fact_index_agency_self_sub_score limit 1000 |
|||
</delete> |
|||
|
|||
<insert id="insertBatch"> |
|||
INSERT INTO fact_index_agency_self_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, |
|||
DATA_TYPE, SELF_SCORE, SUB_SCORE, PARENT_INDEX_CODE,ALL_PARENT_INDEX_CODE, |
|||
SELF_WEIGHT,SUB_WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) |
|||
VALUES |
|||
<foreach collection="list" item="item" separator=","> |
|||
( |
|||
REPLACE ( UUID(), '-', '' ), |
|||
#{item.customerId}, |
|||
#{item.agencyId}, |
|||
#{item.parentAgencyId}, |
|||
#{item.yearId}, |
|||
#{item.quarterId}, |
|||
#{item.monthId}, |
|||
#{item.dataType}, |
|||
#{item.selfScore}, |
|||
#{item.subScore}, |
|||
#{item.parentIndexCode}, |
|||
#{item.allParentIndexCode}, |
|||
#{item.selfWeight}, |
|||
#{item.subWeight}, |
|||
#{item.delFlag}, |
|||
#{item.revision}, |
|||
#{item.createdBy}, |
|||
NOW(), |
|||
#{item.updatedBy}, |
|||
NOW() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
@ -1,7 +1,7 @@ |
|||
<?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.evaluationindex.indexcal.FactIndexCommunitySelfSubScoreDao"> |
|||
<mapper namespace="com.epmet.dao.evaluationindex.indexcal.CommunitySelfSubScoreDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.evaluationindex.indexcal.CommunitySelfSubScoreEntity" id="factIndexCommunitySelfSubScoreMap"> |
|||
<result property="id" column="ID"/> |
@ -1,29 +0,0 @@ |
|||
<?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.evaluationindex.indexcal.FactIndexGridSelfSubScoreDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.evaluationindex.indexcal.GridSelfSubScoreEntity" id="factIndexGridSelfSubScoreMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="allParentIds" column="ALL_PARENT_IDS"/> |
|||
<result property="quarterId" column="QUARTER_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="scoreType" column="SCORE_TYPE"/> |
|||
<result property="score" column="SCORE"/> |
|||
<result property="indexCode" column="INDEX_CODE"/> |
|||
<result property="allParentIndexCode" column="ALL_PARENT_INDEX_CODE"/> |
|||
<result property="weight" column="WEIGHT"/> |
|||
<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> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,58 @@ |
|||
<?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.evaluationindex.indexcal.GridSelfSubScoreDao"> |
|||
<delete id="deleteByMonthId"> |
|||
delete from fact_index_grid_self_sub_score where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR} AND PARENT_INDEX_CODE = #{parentIndexCode,jdbcType=VARCHAR} limit 1000 |
|||
</delete> |
|||
<!-- 批量插入计算结果 --> |
|||
<insert id="insertBatch"> |
|||
INSERT INTO `fact_index_grid_self_sub_score` ( |
|||
`ID`, |
|||
`CUSTOMER_ID`, |
|||
`GRID_ID`, |
|||
`AGENCY_ID`, |
|||
`ALL_PARENT_IDS`, |
|||
`QUARTER_ID`, |
|||
`YEAR_ID`, |
|||
`MONTH_ID`, |
|||
`SELF_SCORE`, |
|||
`SUB_SCORE`, |
|||
`PARENT_INDEX_CODE`, |
|||
`ALL_PARENT_INDEX_CODE`, |
|||
`SELF_WEIGHT`, |
|||
`SUB_WEIGHT`, |
|||
`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.gridId}, |
|||
#{item.agencyId}, |
|||
#{item.allParentIds}, |
|||
#{item.quarterId}, |
|||
#{item.yearId}, |
|||
#{item.monthId}, |
|||
#{item.selfScore}, |
|||
#{item.subScore}, |
|||
#{item.parentIndexCode}, |
|||
#{item.allParentIndexCode}, |
|||
#{item.selfWeight}, |
|||
#{item.subWeight}, |
|||
0, |
|||
0, |
|||
'APP_USER', |
|||
now(), |
|||
'APP_USER', |
|||
now() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
Loading…
Reference in new issue