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.
148 lines
8.0 KiB
148 lines
8.0 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.DcBusiTargetAdjustDaySubMapper">
|
|
|
|
<resultMap type="com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao" id="DcBusiTargetAdjustDaySubResult">
|
|
<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="id" column="id" />
|
|
<result property="billNoMaster" column="bill_no_master" />
|
|
<result property="targetCode" column="target_code" />
|
|
<result property="targetName" column="target_name" />
|
|
<result property="tagetUnit" column="taget_unit" />
|
|
<result property="adjustDate" column="adjust_date" />
|
|
<result property="adjstTime" column="adjst_time" />
|
|
<result property="valOrigin" column="val_origin" />
|
|
<result property="valAdjust" column="val_adjust" />
|
|
<result property="valResult" column="val_result" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDcBusiTargetAdjustDaySubVo">
|
|
select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, bill_no_master, target_code, target_name, taget_unit, adjust_date, adjst_time, val_origin, val_adjust, val_result from dc_busi_target_adjust_day_sub
|
|
</sql>
|
|
|
|
<select id="selectDcBusiTargetAdjustDaySubDaoList" parameterType="DcBusiTargetAdjustDaySubDao" resultMap="DcBusiTargetAdjustDaySubResult">
|
|
<include refid="selectDcBusiTargetAdjustDaySubVo"/>
|
|
<where>
|
|
<if test="billNoMaster != null and billNoMaster != ''"> and bill_no_master = #{billNoMaster}</if>
|
|
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if>
|
|
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if>
|
|
<if test="tagetUnit != null and tagetUnit != ''"> and taget_unit = #{tagetUnit}</if>
|
|
<if test="adjustDate != null and adjustDate != ''"> and adjust_date = #{adjustDate}</if>
|
|
<if test="adjstTime != null "> and adjst_time = #{adjstTime}</if>
|
|
<if test="valOrigin != null "> and val_origin = #{valOrigin}</if>
|
|
<if test="valAdjust != null "> and val_adjust = #{valAdjust}</if>
|
|
<if test="valResult != null "> and val_result = #{valResult}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDcBusiTargetAdjustDaySubDaoById" parameterType="Long" resultMap="DcBusiTargetAdjustDaySubResult">
|
|
<include refid="selectDcBusiTargetAdjustDaySubVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDcBusiTargetAdjustDaySubDao" parameterType="DcBusiTargetAdjustDaySubDao" useGeneratedKeys="true" keyProperty="id">
|
|
insert into dc_busi_target_adjust_day_sub
|
|
<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="billNoMaster != null">bill_no_master,</if>
|
|
<if test="targetCode != null">target_code,</if>
|
|
<if test="targetName != null">target_name,</if>
|
|
<if test="tagetUnit != null">taget_unit,</if>
|
|
<if test="adjustDate != null">adjust_date,</if>
|
|
<if test="adjstTime != null">adjst_time,</if>
|
|
<if test="valOrigin != null">val_origin,</if>
|
|
<if test="valAdjust != null">val_adjust,</if>
|
|
<if test="valResult != null">val_result,</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="billNoMaster != null">#{billNoMaster},</if>
|
|
<if test="targetCode != null">#{targetCode},</if>
|
|
<if test="targetName != null">#{targetName},</if>
|
|
<if test="tagetUnit != null">#{tagetUnit},</if>
|
|
<if test="adjustDate != null">#{adjustDate},</if>
|
|
<if test="adjstTime != null">#{adjstTime},</if>
|
|
<if test="valOrigin != null">#{valOrigin},</if>
|
|
<if test="valAdjust != null">#{valAdjust},</if>
|
|
<if test="valResult != null">#{valResult},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDcBusiTargetAdjustDaySubDao" parameterType="DcBusiTargetAdjustDaySubDao">
|
|
update dc_busi_target_adjust_day_sub
|
|
<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="billNoMaster != null">bill_no_master = #{billNoMaster},</if>
|
|
<if test="targetCode != null">target_code = #{targetCode},</if>
|
|
<if test="targetName != null">target_name = #{targetName},</if>
|
|
<if test="tagetUnit != null">taget_unit = #{tagetUnit},</if>
|
|
<if test="adjustDate != null">adjust_date = #{adjustDate},</if>
|
|
<if test="adjstTime != null">adjst_time = #{adjstTime},</if>
|
|
<if test="valOrigin != null">val_origin = #{valOrigin},</if>
|
|
<if test="valAdjust != null">val_adjust = #{valAdjust},</if>
|
|
<if test="valResult != null">val_result = #{valResult},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDcBusiTargetAdjustDaySubDaoById" parameterType="Long">
|
|
delete from dc_busi_target_adjust_day_sub where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDcBusiTargetAdjustDaySubDaoByBillNoMaster" parameterType="String">
|
|
delete from dc_busi_target_adjust_day_sub where bill_no_master = #{billNoMaster}
|
|
</delete>
|
|
|
|
<delete id="deleteDcBusiTargetAdjustDaySubDaoByIds" parameterType="String">
|
|
delete from dc_busi_target_adjust_day_sub where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<delete id="deleteDcBusiTargetAdjustDaySubDaoByMasterIds" parameterType="String">
|
|
delete from dc_busi_target_adjust_day_sub where bill_no_master in (
|
|
SELECT
|
|
bill_serial
|
|
FROM
|
|
dc_busi_target_adjust_day_master
|
|
WHERE
|
|
id IN
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
)
|
|
|
|
</delete>
|
|
|
|
</mapper>
|