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.
288 lines
17 KiB
288 lines
17 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.lzbi.draft.mapper.DcBusiTargetDraftMonthMapper">
|
|
|
|
<resultMap type="com.lzbi.draft.domain.DcBusiTargetDraftMonth" id="DcBusiTargetDraftMonthResult">
|
|
<result property="id" column="id" />
|
|
<result property="companyName" column="company_name" />
|
|
<result property="companyId" column="company_id" />
|
|
<result property="orgId" column="org_id" />
|
|
<result property="orgName" column="org_name" />
|
|
<result property="assetCode" column="asset_code" />
|
|
<result property="assetName" column="asset_name" />
|
|
<result property="fieldCode" column="field_code" />
|
|
<result property="fieldName" column="field_name" />
|
|
<result property="targetNameAlias" column="target_name_alias" />
|
|
<result property="targetName" column="target_name" />
|
|
<result property="targetCode" column="target_code" />
|
|
<result property="targetUint" column="target_uint" />
|
|
<result property="countYear" column="count_year" />
|
|
<result property="countMonth" column="count_month" />
|
|
<result property="valSum" column="val_sum" />
|
|
<result property="valAvgAll" column="val_avg_all" />
|
|
<result property="valAvgNull" column="val_avg_null" />
|
|
<result property="valPlan" column="val_plan" />
|
|
<result property="tenantId" column="tenant_id" />
|
|
<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" />
|
|
<result property="deleteBy" column="delete_by" />
|
|
<result property="deleteTime" column="delete_time" />
|
|
<result property="valP1" column="val_p1" />
|
|
<result property="valP2" column="val_p2" />
|
|
<result property="valP3" column="val_p3" />
|
|
<result property="valP4" column="val_p4" />
|
|
<result property="valP5" column="val_p5" />
|
|
<result property="valP6" column="val_p6" />
|
|
<result property="valP7" column="val_p7" />
|
|
<result property="valP8" column="val_p8" />
|
|
<result property="valP9" column="val_p9" />
|
|
<result property="valP10" column="val_p10" />
|
|
<result property="valP11" column="val_p11" />
|
|
<result property="valP12" column="val_p12" />
|
|
<result property="valP13" column="val_p13" />
|
|
<result property="valP14" column="val_p14" />
|
|
<result property="valP15" column="val_p15" />
|
|
<result property="valP16" column="val_p16" />
|
|
<result property="valP17" column="val_p17" />
|
|
<result property="valP18" column="val_p18" />
|
|
<result property="valP19" column="val_p19" />
|
|
<result property="valP20" column="val_p20" />
|
|
<result property="valP21" column="val_p21" />
|
|
<result property="valP22" column="val_p22" />
|
|
<result property="valP23" column="val_p23" />
|
|
<result property="valP24" column="val_p24" />
|
|
<result property="valP25" column="val_p25" />
|
|
<result property="valP26" column="val_p26" />
|
|
<result property="valP27" column="val_p27" />
|
|
<result property="valP28" column="val_p28" />
|
|
<result property="valP29" column="val_p29" />
|
|
<result property="valP30" column="val_p30" />
|
|
<result property="valP31" column="val_p31" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDcBusiTargetDraftMonthVo">
|
|
select id, company_name, company_id, org_id, org_name, asset_code, asset_name, field_code, field_name, target_name_alias, target_name, target_code, target_uint, count_year, count_month, val_sum, val_avg_all, val_avg_null, val_plan, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, val_p1, val_p2, val_p3, val_p4, val_p5, val_p6, val_p7, val_p8, val_p9, val_p10, val_p11, val_p12, val_p13, val_p14, val_p15, val_p16, val_p17, val_p18, val_p19, val_p20, val_p21, val_p22, val_p23, val_p24, val_p25, val_p26, val_p27, val_p28, val_p29, val_p30, val_p31 from dc_busi_target_draft_month
|
|
</sql>
|
|
|
|
<select id="selectDcBusiTargetDraftMonthList" parameterType="DcBusiTargetDraftMonth" resultMap="DcBusiTargetDraftMonthResult">
|
|
<include refid="selectDcBusiTargetDraftMonthVo"/>
|
|
<where>
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
|
<if test="orgId != null "> and org_id = #{orgId}</if>
|
|
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
|
|
<if test="fieldCode != null and fieldCode != ''"> and field_code = #{fieldCode}</if>
|
|
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if>
|
|
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if>
|
|
<if test="countYear != null and countYear != ''"> and count_year = #{countYear}</if>
|
|
<if test="countMonth != null and countMonth != ''"> and count_month = #{countMonth}</if>
|
|
<if test="valP1 != null "> and val_p1 = #{valP1}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDcBusiTargetDraftMonthById" parameterType="Long" resultMap="DcBusiTargetDraftMonthResult">
|
|
<include refid="selectDcBusiTargetDraftMonthVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDcBusiTargetDraftMonth" parameterType="DcBusiTargetDraftMonth" useGeneratedKeys="true" keyProperty="id">
|
|
insert into dc_busi_target_draft_month
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="companyName != null">company_name,</if>
|
|
<if test="companyId != null">company_id,</if>
|
|
<if test="orgId != null">org_id,</if>
|
|
<if test="orgName != null">org_name,</if>
|
|
<if test="assetCode != null">asset_code,</if>
|
|
<if test="assetName != null">asset_name,</if>
|
|
<if test="fieldCode != null">field_code,</if>
|
|
<if test="fieldName != null">field_name,</if>
|
|
<if test="targetNameAlias != null">target_name_alias,</if>
|
|
<if test="targetName != null">target_name,</if>
|
|
<if test="targetCode != null">target_code,</if>
|
|
<if test="targetUint != null">target_uint,</if>
|
|
<if test="countYear != null">count_year,</if>
|
|
<if test="countMonth != null">count_month,</if>
|
|
<if test="valSum != null">val_sum,</if>
|
|
<if test="valAvgAll != null">val_avg_all,</if>
|
|
<if test="valAvgNull != null">val_avg_null,</if>
|
|
<if test="valPlan != null">val_plan,</if>
|
|
<if test="tenantId != null">tenant_id,</if>
|
|
<if test="revision != null">revision,</if>
|
|
<if test="createdBy != null">created_by,</if>
|
|
<if test="createdTime != null">created_time,</if>
|
|
<if test="updatedBy != null">updated_by,</if>
|
|
<if test="updatedTime != null">updated_time,</if>
|
|
<if test="deleteBy != null">delete_by,</if>
|
|
<if test="deleteTime != null">delete_time,</if>
|
|
<if test="valP1 != null">val_p1,</if>
|
|
<if test="valP2 != null">val_p2,</if>
|
|
<if test="valP3 != null">val_p3,</if>
|
|
<if test="valP4 != null">val_p4,</if>
|
|
<if test="valP5 != null">val_p5,</if>
|
|
<if test="valP6 != null">val_p6,</if>
|
|
<if test="valP7 != null">val_p7,</if>
|
|
<if test="valP8 != null">val_p8,</if>
|
|
<if test="valP9 != null">val_p9,</if>
|
|
<if test="valP10 != null">val_p10,</if>
|
|
<if test="valP11 != null">val_p11,</if>
|
|
<if test="valP12 != null">val_p12,</if>
|
|
<if test="valP13 != null">val_p13,</if>
|
|
<if test="valP14 != null">val_p14,</if>
|
|
<if test="valP15 != null">val_p15,</if>
|
|
<if test="valP16 != null">val_p16,</if>
|
|
<if test="valP17 != null">val_p17,</if>
|
|
<if test="valP18 != null">val_p18,</if>
|
|
<if test="valP19 != null">val_p19,</if>
|
|
<if test="valP20 != null">val_p20,</if>
|
|
<if test="valP21 != null">val_p21,</if>
|
|
<if test="valP22 != null">val_p22,</if>
|
|
<if test="valP23 != null">val_p23,</if>
|
|
<if test="valP24 != null">val_p24,</if>
|
|
<if test="valP25 != null">val_p25,</if>
|
|
<if test="valP26 != null">val_p26,</if>
|
|
<if test="valP27 != null">val_p27,</if>
|
|
<if test="valP28 != null">val_p28,</if>
|
|
<if test="valP29 != null">val_p29,</if>
|
|
<if test="valP30 != null">val_p30,</if>
|
|
<if test="valP31 != null">val_p31,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="companyName != null">#{companyName},</if>
|
|
<if test="companyId != null">#{companyId},</if>
|
|
<if test="orgId != null">#{orgId},</if>
|
|
<if test="orgName != null">#{orgName},</if>
|
|
<if test="assetCode != null">#{assetCode},</if>
|
|
<if test="assetName != null">#{assetName},</if>
|
|
<if test="fieldCode != null">#{fieldCode},</if>
|
|
<if test="fieldName != null">#{fieldName},</if>
|
|
<if test="targetNameAlias != null">#{targetNameAlias},</if>
|
|
<if test="targetName != null">#{targetName},</if>
|
|
<if test="targetCode != null">#{targetCode},</if>
|
|
<if test="targetUint != null">#{targetUint},</if>
|
|
<if test="countYear != null">#{countYear},</if>
|
|
<if test="countMonth != null">#{countMonth},</if>
|
|
<if test="valSum != null">#{valSum},</if>
|
|
<if test="valAvgAll != null">#{valAvgAll},</if>
|
|
<if test="valAvgNull != null">#{valAvgNull},</if>
|
|
<if test="valPlan != null">#{valPlan},</if>
|
|
<if test="tenantId != null">#{tenantId},</if>
|
|
<if test="revision != null">#{revision},</if>
|
|
<if test="createdBy != null">#{createdBy},</if>
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
<if test="updatedBy != null">#{updatedBy},</if>
|
|
<if test="updatedTime != null">#{updatedTime},</if>
|
|
<if test="deleteBy != null">#{deleteBy},</if>
|
|
<if test="deleteTime != null">#{deleteTime},</if>
|
|
<if test="valP1 != null">#{valP1},</if>
|
|
<if test="valP2 != null">#{valP2},</if>
|
|
<if test="valP3 != null">#{valP3},</if>
|
|
<if test="valP4 != null">#{valP4},</if>
|
|
<if test="valP5 != null">#{valP5},</if>
|
|
<if test="valP6 != null">#{valP6},</if>
|
|
<if test="valP7 != null">#{valP7},</if>
|
|
<if test="valP8 != null">#{valP8},</if>
|
|
<if test="valP9 != null">#{valP9},</if>
|
|
<if test="valP10 != null">#{valP10},</if>
|
|
<if test="valP11 != null">#{valP11},</if>
|
|
<if test="valP12 != null">#{valP12},</if>
|
|
<if test="valP13 != null">#{valP13},</if>
|
|
<if test="valP14 != null">#{valP14},</if>
|
|
<if test="valP15 != null">#{valP15},</if>
|
|
<if test="valP16 != null">#{valP16},</if>
|
|
<if test="valP17 != null">#{valP17},</if>
|
|
<if test="valP18 != null">#{valP18},</if>
|
|
<if test="valP19 != null">#{valP19},</if>
|
|
<if test="valP20 != null">#{valP20},</if>
|
|
<if test="valP21 != null">#{valP21},</if>
|
|
<if test="valP22 != null">#{valP22},</if>
|
|
<if test="valP23 != null">#{valP23},</if>
|
|
<if test="valP24 != null">#{valP24},</if>
|
|
<if test="valP25 != null">#{valP25},</if>
|
|
<if test="valP26 != null">#{valP26},</if>
|
|
<if test="valP27 != null">#{valP27},</if>
|
|
<if test="valP28 != null">#{valP28},</if>
|
|
<if test="valP29 != null">#{valP29},</if>
|
|
<if test="valP30 != null">#{valP30},</if>
|
|
<if test="valP31 != null">#{valP31},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDcBusiTargetDraftMonth" parameterType="DcBusiTargetDraftMonth">
|
|
update dc_busi_target_draft_month
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="companyName != null">company_name = #{companyName},</if>
|
|
<if test="companyId != null">company_id = #{companyId},</if>
|
|
<if test="orgId != null">org_id = #{orgId},</if>
|
|
<if test="orgName != null">org_name = #{orgName},</if>
|
|
<if test="assetCode != null">asset_code = #{assetCode},</if>
|
|
<if test="assetName != null">asset_name = #{assetName},</if>
|
|
<if test="fieldCode != null">field_code = #{fieldCode},</if>
|
|
<if test="fieldName != null">field_name = #{fieldName},</if>
|
|
<if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if>
|
|
<if test="targetName != null">target_name = #{targetName},</if>
|
|
<if test="targetCode != null">target_code = #{targetCode},</if>
|
|
<if test="targetUint != null">target_uint = #{targetUint},</if>
|
|
<if test="countYear != null">count_year = #{countYear},</if>
|
|
<if test="countMonth != null">count_month = #{countMonth},</if>
|
|
<if test="valSum != null">val_sum = #{valSum},</if>
|
|
<if test="valAvgAll != null">val_avg_all = #{valAvgAll},</if>
|
|
<if test="valAvgNull != null">val_avg_null = #{valAvgNull},</if>
|
|
<if test="valPlan != null">val_plan = #{valPlan},</if>
|
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
|
<if test="revision != null">revision = #{revision},</if>
|
|
<if test="createdBy != null">created_by = #{createdBy},</if>
|
|
<if test="createdTime != null">created_time = #{createdTime},</if>
|
|
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
|
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
|
|
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
|
|
<if test="valP1 != null">val_p1 = #{valP1},</if>
|
|
<if test="valP2 != null">val_p2 = #{valP2},</if>
|
|
<if test="valP3 != null">val_p3 = #{valP3},</if>
|
|
<if test="valP4 != null">val_p4 = #{valP4},</if>
|
|
<if test="valP5 != null">val_p5 = #{valP5},</if>
|
|
<if test="valP6 != null">val_p6 = #{valP6},</if>
|
|
<if test="valP7 != null">val_p7 = #{valP7},</if>
|
|
<if test="valP8 != null">val_p8 = #{valP8},</if>
|
|
<if test="valP9 != null">val_p9 = #{valP9},</if>
|
|
<if test="valP10 != null">val_p10 = #{valP10},</if>
|
|
<if test="valP11 != null">val_p11 = #{valP11},</if>
|
|
<if test="valP12 != null">val_p12 = #{valP12},</if>
|
|
<if test="valP13 != null">val_p13 = #{valP13},</if>
|
|
<if test="valP14 != null">val_p14 = #{valP14},</if>
|
|
<if test="valP15 != null">val_p15 = #{valP15},</if>
|
|
<if test="valP16 != null">val_p16 = #{valP16},</if>
|
|
<if test="valP17 != null">val_p17 = #{valP17},</if>
|
|
<if test="valP18 != null">val_p18 = #{valP18},</if>
|
|
<if test="valP19 != null">val_p19 = #{valP19},</if>
|
|
<if test="valP20 != null">val_p20 = #{valP20},</if>
|
|
<if test="valP21 != null">val_p21 = #{valP21},</if>
|
|
<if test="valP22 != null">val_p22 = #{valP22},</if>
|
|
<if test="valP23 != null">val_p23 = #{valP23},</if>
|
|
<if test="valP24 != null">val_p24 = #{valP24},</if>
|
|
<if test="valP25 != null">val_p25 = #{valP25},</if>
|
|
<if test="valP26 != null">val_p26 = #{valP26},</if>
|
|
<if test="valP27 != null">val_p27 = #{valP27},</if>
|
|
<if test="valP28 != null">val_p28 = #{valP28},</if>
|
|
<if test="valP29 != null">val_p29 = #{valP29},</if>
|
|
<if test="valP30 != null">val_p30 = #{valP30},</if>
|
|
<if test="valP31 != null">val_p31 = #{valP31},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDcBusiTargetDraftMonthById" parameterType="Long">
|
|
delete from dc_busi_target_draft_month where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDcBusiTargetDraftMonthByIds" parameterType="String">
|
|
delete from dc_busi_target_draft_month where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|