万材erp项目
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.
 
 
 
 

140 lines
7.8 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.ruoyi.produce.mapper.CancelStockListMapper">
<resultMap type="CancelStockList" id="CancelStockListResult">
<result property="cancelStockNo" column="cancelStockNo" />
<result property="itemNo" column="itemNo" />
<result property="itemCode" column="itemCode" />
<result property="itemName" column="itemName" />
<result property="itemSpecification" column="itemSpecification" />
<result property="machineType" column="machineType" />
<result property="unit" column="unit" />
<result property="qty" column="qty" />
<result property="coinType" column="coinType" />
<result property="price" column="price" />
<result property="totalPrice" column="totalPrice" />
<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="selectCancelStockListVo">
select cancelStockNo, itemNo, itemCode, itemName, itemSpecification, machineType, unit, qty, coinType, price, totalPrice, remark, spare1, spare2, spare3, spare4, spare5, spare6 from cancel_stock_list
</sql>
<select id="selectCancelStockListList" parameterType="CancelStockList" resultMap="CancelStockListResult">
<include refid="selectCancelStockListVo"/>
<where>
<if test="cancelStockNo != null and cancelStockNo != ''"> and cancelStockNo like concat('%', #{cancelStockNo}, '%')</if>
<if test="itemNo != null and itemNo != ''"> and itemNo like concat('%', #{itemNo}, '%')</if>
<if test="itemCode != null and itemCode != ''"> and itemCode like concat('%', #{itemCode}, '%')</if>
<if test="itemName != null and itemName != ''"> and itemName like concat('%', #{itemName}, '%')</if>
<if test="itemSpecification != null and itemSpecification != ''"> and itemSpecification like concat('%', #{itemSpecification}, '%')</if>
<if test="machineType != null and machineType != ''"> and machineType like concat('%', #{machineType}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="qty != null "> and qty = #{qty}</if>
<if test="coinType != null and coinType != ''"> and coinType = #{coinType}</if>
<if test="price != null "> and price = #{price}</if>
<if test="totalPrice != null "> and totalPrice = #{totalPrice}</if>
<if test="remark != null and remark != ''"> and remark = #{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="selectCancelStockListById" parameterType="String" resultMap="CancelStockListResult">
<include refid="selectCancelStockListVo"/>
where cancelStockNo = #{cancelStockNo}
</select>
<insert id="insertCancelStockList" parameterType="CancelStockList">
insert into cancel_stock_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cancelStockNo != null and cancelStockNo != ''">cancelStockNo,</if>
<if test="itemNo != null">itemNo,</if>
<if test="itemCode != null">itemCode,</if>
<if test="itemName != null">itemName,</if>
<if test="itemSpecification != null">itemSpecification,</if>
<if test="machineType != null">machineType,</if>
<if test="unit != null">unit,</if>
<if test="qty != null">qty,</if>
<if test="coinType != null">coinType,</if>
<if test="price != null">price,</if>
<if test="totalPrice != null">totalPrice,</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="itemNo != null">#{itemNo},</if>
<if test="itemCode != null">#{itemCode},</if>
<if test="itemName != null">#{itemName},</if>
<if test="itemSpecification != null">#{itemSpecification},</if>
<if test="machineType != null">#{machineType},</if>
<if test="unit != null">#{unit},</if>
<if test="qty != null">#{qty},</if>
<if test="coinType != null">#{coinType},</if>
<if test="price != null">#{price},</if>
<if test="totalPrice != null">#{totalPrice},</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="updateCancelStockList" parameterType="CancelStockList">
update cancel_stock_list
<trim prefix="SET" suffixOverrides=",">
<if test="itemNo != null">itemNo = #{itemNo},</if>
<if test="itemCode != null">itemCode = #{itemCode},</if>
<if test="itemName != null">itemName = #{itemName},</if>
<if test="itemSpecification != null">itemSpecification = #{itemSpecification},</if>
<if test="machineType != null">machineType = #{machineType},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="qty != null">qty = #{qty},</if>
<if test="coinType != null">coinType = #{coinType},</if>
<if test="price != null">price = #{price},</if>
<if test="totalPrice != null">totalPrice = #{totalPrice},</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="deleteCancelStockListById" parameterType="String">
delete from cancel_stock_list where cancelStockNo = #{cancelStockNo}
</delete>
<delete id="deleteCancelStockListByIds" parameterType="String">
delete from cancel_stock_list where cancelStockNo in
<foreach item="cancelStockNo" collection="array" open="(" separator="," close=")">
#{cancelStockNo}
</foreach>
</delete>
</mapper>