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.
134 lines
8.0 KiB
134 lines
8.0 KiB
2 years ago
|
<?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.ruoyi.produce.mapper.CancelStockHeadMapper">
|
||
|
|
||
|
<resultMap type="CancelStockHead" id="CancelStockHeadResult">
|
||
|
<result property="cancelStockNo" column="cancelStockNo" />
|
||
|
<result property="workOrderNo" column="workOrderNo" />
|
||
|
<result property="deptName" column="deptName" />
|
||
|
<result property="cancelStockMan" column="cancelStockMan" />
|
||
|
<result property="stockNo" column="stockNo" />
|
||
|
<result property="stockName" column="stockName" />
|
||
|
<result property="warehouseKeeper" column="warehouseKeeper" />
|
||
|
<result property="cancelStockType" column="cancelStockType" />
|
||
|
<result property="cancelStockDate" column="cancelStockDate" />
|
||
|
<result property="remark" column="remark" />
|
||
|
<result property="spare1" column="spare1" />
|
||
|
<result property="spare2" column="spare2" />
|
||
|
<result property="spare3" column="spare3" />
|
||
|
<result property="spare4" column="spare4" />
|
||
|
<result property="spare5" column="spare5" />
|
||
|
<result property="spare6" column="spare6" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectCancelStockHeadVo">
|
||
|
select cancelStockNo, workOrderNo, deptName, cancelStockMan, stockNo, stockName, warehouseKeeper, cancelStockType, cancelStockDate, remark, spare1, spare2, spare3, spare4, spare5, spare6 from cancel_stock_head
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectCancelStockHeadList" parameterType="CancelStockHead" resultMap="CancelStockHeadResult">
|
||
|
<include refid="selectCancelStockHeadVo"/>
|
||
|
<where>
|
||
|
<if test="cancelStockNo != null and cancelStockNo != ''"> and cancelStockNo like concat('%', #{cancelStockNo}, '%')</if>
|
||
|
<if test="workOrderNo != null and workOrderNo != ''"> and workOrderNo like concat('%', #{workOrderNo}, '%')</if>
|
||
|
<if test="deptName != null and deptName != ''"> and deptName like concat('%', #{deptName}, '%')</if>
|
||
|
<if test="cancelStockMan != null and cancelStockMan != ''"> and cancelStockMan like concat('%', #{cancelStockMan}, '%')</if>
|
||
|
<if test="stockNo != null and stockNo != ''"> and stockNo like concat('%', #{stockNo}, '%')</if>
|
||
|
<if test="stockName != null and stockName != ''"> and stockName like concat('%', #{stockName}, '%')</if>
|
||
|
<if test="warehouseKeeper != null and warehouseKeeper != ''"> and warehouseKeeper like concat('%', #{warehouseKeeper}, '%')</if>
|
||
|
<if test="cancelStockType != null and cancelStockType != ''"> and cancelStockType = #{cancelStockType}</if>
|
||
|
<if test="params.beginCancelStockDate != null and params.beginCancelStockDate != '' and params.endCancelStockDate != null and params.endCancelStockDate != ''"> and cancelStockDate between #{params.beginCancelStockDate} and #{params.endCancelStockDate}</if>
|
||
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||
|
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||
|
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||
|
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||
|
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||
|
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||
|
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectCancelStockHeadById" parameterType="String" resultMap="CancelStockHeadResult">
|
||
|
<include refid="selectCancelStockHeadVo"/>
|
||
|
where cancelStockNo = #{cancelStockNo}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertCancelStockHead" parameterType="CancelStockHead">
|
||
|
insert into cancel_stock_head
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="cancelStockNo != null and cancelStockNo != ''">cancelStockNo,</if>
|
||
|
<if test="workOrderNo != null and workOrderNo != ''">workOrderNo,</if>
|
||
|
<if test="deptName != null">deptName,</if>
|
||
|
<if test="cancelStockMan != null">cancelStockMan,</if>
|
||
|
<if test="stockNo != null">stockNo,</if>
|
||
|
<if test="stockName != null">stockName,</if>
|
||
|
<if test="warehouseKeeper != null">warehouseKeeper,</if>
|
||
|
<if test="cancelStockType != null">cancelStockType,</if>
|
||
|
<if test="cancelStockDate != null">cancelStockDate,</if>
|
||
|
<if test="remark != null">remark,</if>
|
||
|
<if test="spare1 != null">spare1,</if>
|
||
|
<if test="spare2 != null">spare2,</if>
|
||
|
<if test="spare3 != null">spare3,</if>
|
||
|
<if test="spare4 != null">spare4,</if>
|
||
|
<if test="spare5 != null">spare5,</if>
|
||
|
<if test="spare6 != null">spare6,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="cancelStockNo != null and cancelStockNo != ''">#{cancelStockNo},</if>
|
||
|
<if test="workOrderNo != null and workOrderNo != ''">#{workOrderNo},</if>
|
||
|
<if test="deptName != null">#{deptName},</if>
|
||
|
<if test="cancelStockMan != null">#{cancelStockMan},</if>
|
||
|
<if test="stockNo != null">#{stockNo},</if>
|
||
|
<if test="stockName != null">#{stockName},</if>
|
||
|
<if test="warehouseKeeper != null">#{warehouseKeeper},</if>
|
||
|
<if test="cancelStockType != null">#{cancelStockType},</if>
|
||
|
<if test="cancelStockDate != null">#{cancelStockDate},</if>
|
||
|
<if test="remark != null">#{remark},</if>
|
||
|
<if test="spare1 != null">#{spare1},</if>
|
||
|
<if test="spare2 != null">#{spare2},</if>
|
||
|
<if test="spare3 != null">#{spare3},</if>
|
||
|
<if test="spare4 != null">#{spare4},</if>
|
||
|
<if test="spare5 != null">#{spare5},</if>
|
||
|
<if test="spare6 != null">#{spare6},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateCancelStockHead" parameterType="CancelStockHead">
|
||
|
update cancel_stock_head
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="workOrderNo != null and workOrderNo != ''">workOrderNo = #{workOrderNo},</if>
|
||
|
<if test="deptName != null">deptName = #{deptName},</if>
|
||
|
<if test="cancelStockMan != null">cancelStockMan = #{cancelStockMan},</if>
|
||
|
<if test="stockNo != null">stockNo = #{stockNo},</if>
|
||
|
<if test="stockName != null">stockName = #{stockName},</if>
|
||
|
<if test="warehouseKeeper != null">warehouseKeeper = #{warehouseKeeper},</if>
|
||
|
<if test="cancelStockType != null">cancelStockType = #{cancelStockType},</if>
|
||
|
<if test="cancelStockDate != null">cancelStockDate = #{cancelStockDate},</if>
|
||
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||
|
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||
|
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||
|
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||
|
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||
|
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||
|
</trim>
|
||
|
where cancelStockNo = #{cancelStockNo}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteCancelStockHeadById" parameterType="String">
|
||
|
delete from cancel_stock_head where cancelStockNo = #{cancelStockNo}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteCancelStockHeadByIds" parameterType="String">
|
||
|
delete from cancel_stock_head where cancelStockNo in
|
||
|
<foreach item="cancelStockNo" collection="array" open="(" separator="," close=")">
|
||
|
#{cancelStockNo}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
<select id="selectCountByDay" resultType="Integer">
|
||
|
select count(*) from cancel_stock_head where to_days(cancelStockDate) = to_days(now());
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|