万材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.

154 lines
8.9 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.stock.mapper.WarehousingOutListMapper">
<resultMap type="WarehousingOutList" id="WarehousingOutListResult">
<result property="warehousingOutNo" column="warehousingOutNo" />
<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="planQty" column="planQty" />
<result property="realQty" column="realQty" />
<result property="returnQty" column="returnQty" />
<result property="coinType" column="coinType" />
<result property="price" column="price" />
<result property="totalPrice" column="totalPrice" />
<result property="remark" column="remark" />
<result property="buyOrderNo" column="buyOrderNo" />
<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="selectWarehousingOutListVo">
select warehousingOutNo, itemNo, itemCode, itemName, itemSpecification, machineType, unit, planQty, realQty, returnQty, coinType, price, totalPrice, remark, buyOrderNo, spare1, spare2, spare3, spare4, spare5, spare6 from warehousing_out_list
</sql>
<select id="selectWarehousingOutListList" parameterType="WarehousingOutList" resultMap="WarehousingOutListResult">
<include refid="selectWarehousingOutListVo"/>
<where>
<if test="warehousingOutNo != null and warehousingOutNo != ''"> and warehousingOutNo like concat('%', #{warehousingOutNo}, '%')</if>
<if test="itemNo != null and itemNo != ''"> and itemNo = #{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="planQty != null "> and planQty = #{planQty}</if>
<if test="realQty != null "> and realQty = #{realQty}</if>
<if test="returnQty != null "> and returnQty = #{returnQty}</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="buyOrderNo != null and buyOrderNo != ''"> and buyOrderNo like concat('%', #{buyOrderNo}, '%')</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="selectWarehousingOutListById" parameterType="String" resultMap="WarehousingOutListResult">
<include refid="selectWarehousingOutListVo"/>
where warehousingOutNo = #{warehousingOutNo}
</select>
<insert id="insertWarehousingOutList" parameterType="WarehousingOutList">
insert into warehousing_out_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehousingOutNo != null">warehousingOutNo,</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="planQty != null">planQty,</if>
<if test="realQty != null">realQty,</if>
<if test="returnQty != null">returnQty,</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="buyOrderNo != null">buyOrderNo,</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="warehousingOutNo != null">#{warehousingOutNo},</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="planQty != null">#{planQty},</if>
<if test="realQty != null">#{realQty},</if>
<if test="returnQty != null">#{returnQty},</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="buyOrderNo != null">#{buyOrderNo},</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="updateWarehousingOutList" parameterType="WarehousingOutList">
update warehousing_out_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="planQty != null">planQty = #{planQty},</if>
<if test="realQty != null">realQty = #{realQty},</if>
<if test="returnQty != null">returnQty = #{returnQty},</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="buyOrderNo != null">buyOrderNo = #{buyOrderNo},</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 warehousingOutNo = #{warehousingOutNo}
</update>
<delete id="deleteWarehousingOutListById" parameterType="String">
delete from warehousing_out_list where warehousingOutNo = #{warehousingOutNo}
</delete>
<delete id="deleteWarehousingOutListByIds" parameterType="String">
delete from warehousing_out_list where warehousingOutNo in
<foreach item="warehousingOutNo" collection="array" open="(" separator="," close=")">
#{warehousingOutNo}
</foreach>
</delete>
</mapper>