|
|
@ -4,23 +4,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
<mapper namespace="com.lzbi.draft.mapper.DcBusiTargetDraftDayMapper"> |
|
|
|
|
|
|
|
<resultMap type="com.lzbi.draft.domain.DcBusiTargetDraftDayDao" id="DcBusiTargetDraftDayDaoResult"> |
|
|
|
<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" /> |
|
|
|
<resultMap type="com.lzbi.draft.domain.DcBusiTargetDraftDay" id="DcBusiTargetDraftDayResult"> |
|
|
|
<result property="id" column="id" /> |
|
|
|
<result property="companyName" column="company_name" /> |
|
|
|
<result property="companyCode" column="company_code" /> |
|
|
|
<result property="orgCode" column="org_code" /> |
|
|
|
<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="fieldType" column="field_type" /> |
|
|
|
<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" /> |
|
|
@ -28,57 +22,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="valOriginal" column="val_original" /> |
|
|
|
<result property="valAdjust" column="val_adjust" /> |
|
|
|
<result property="valResult" column="val_result" /> |
|
|
|
<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" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectDcBusiTargetDraftDayVo"> |
|
|
|
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, company_name, company_code, org_code, org_name, asset_code, asset_name, field_type, target_name, target_code, target_uint, count_date, val_original, val_adjust, val_result, val_plan from dc_busi_target_draft_day |
|
|
|
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_date, val_original, val_adjust, val_result, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_busi_target_draft_day |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectDcBusiTargetDraftDayDaoList" parameterType="DcBusiTargetDraftDayDao" resultMap="DcBusiTargetDraftDayDaoResult"> |
|
|
|
<select id="selectDcBusiTargetDraftDayList" parameterType="DcBusiTargetDraftDay" resultMap="DcBusiTargetDraftDayResult"> |
|
|
|
<include refid="selectDcBusiTargetDraftDayVo"/> |
|
|
|
<where> |
|
|
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if> |
|
|
|
<if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if> |
|
|
|
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> |
|
|
|
<if test="orgName != null and orgName != ''"> and org_name like concat('%', #{orgName}, '%')</if> |
|
|
|
<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="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if> |
|
|
|
<if test="fieldType != null and fieldType != ''"> and field_type = #{fieldType}</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="targetUint != null and targetUint != ''"> and target_uint = #{targetUint}</if> |
|
|
|
<if test="countDate != null and countDate != ''"> and count_date = #{countDate}</if> |
|
|
|
<if test="valOriginal != null "> and val_original = #{valOriginal}</if> |
|
|
|
<if test="valAdjust != null "> and val_adjust = #{valAdjust}</if> |
|
|
|
<if test="valResult != null "> and val_result = #{valResult}</if> |
|
|
|
<if test="valPlan != null and valPlan != ''"> and val_plan = #{valPlan}</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectDcBusiTargetDraftDayDaoById" parameterType="Long" resultMap="DcBusiTargetDraftDayDaoResult"> |
|
|
|
<select id="selectDcBusiTargetDraftDayById" parameterType="Long" resultMap="DcBusiTargetDraftDayResult"> |
|
|
|
<include refid="selectDcBusiTargetDraftDayVo"/> |
|
|
|
where id = #{id} |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertDcBusiTargetDraftDayDao" parameterType="DcBusiTargetDraftDayDao" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
<insert id="insertDcBusiTargetDraftDay" parameterType="DcBusiTargetDraftDay" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
insert into dc_busi_target_draft_day |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
<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="companyName != null">company_name,</if> |
|
|
|
<if test="companyCode != null">company_code,</if> |
|
|
|
<if test="orgCode != null">org_code,</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="fieldType != null">field_type,</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> |
|
|
@ -86,24 +73,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="valOriginal != null">val_original,</if> |
|
|
|
<if test="valAdjust != null">val_adjust,</if> |
|
|
|
<if test="valResult != null">val_result,</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> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<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="companyName != null">#{companyName},</if> |
|
|
|
<if test="companyCode != null">#{companyCode},</if> |
|
|
|
<if test="orgCode != null">#{orgCode},</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="fieldType != null">#{fieldType},</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> |
|
|
@ -111,28 +99,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="valOriginal != null">#{valOriginal},</if> |
|
|
|
<if test="valAdjust != null">#{valAdjust},</if> |
|
|
|
<if test="valResult != null">#{valResult},</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> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateDcBusiTargetDraftDayDao" parameterType="DcBusiTargetDraftDayDao"> |
|
|
|
<update id="updateDcBusiTargetDraftDay" parameterType="DcBusiTargetDraftDay"> |
|
|
|
update dc_busi_target_draft_day |
|
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
|
<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="companyName != null">company_name = #{companyName},</if> |
|
|
|
<if test="companyCode != null">company_code = #{companyCode},</if> |
|
|
|
<if test="orgCode != null">org_code = #{orgCode},</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="fieldType != null">field_type = #{fieldType},</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> |
|
|
@ -140,16 +129,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="valOriginal != null">val_original = #{valOriginal},</if> |
|
|
|
<if test="valAdjust != null">val_adjust = #{valAdjust},</if> |
|
|
|
<if test="valResult != null">val_result = #{valResult},</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> |
|
|
|
</trim> |
|
|
|
where id = #{id} |
|
|
|
</update> |
|
|
|
|
|
|
|
<delete id="deleteDcBusiTargetDraftDayDaoById" parameterType="Long"> |
|
|
|
<delete id="deleteDcBusiTargetDraftDayById" parameterType="Long"> |
|
|
|
delete from dc_busi_target_draft_day where id = #{id} |
|
|
|
</delete> |
|
|
|
|
|
|
|
<delete id="deleteDcBusiTargetDraftDayDaoByIds" parameterType="String"> |
|
|
|
<delete id="deleteDcBusiTargetDraftDayByIds" parameterType="String"> |
|
|
|
delete from dc_busi_target_draft_day where id in |
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
|
#{id} |
|
|
|