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.
155 lines
9.5 KiB
155 lines
9.5 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.OutsourceOrderListMapper">
|
||
|
|
||
|
<resultMap type="OutsourceOrderList" id="OutsourceOrderListResult">
|
||
|
<result property="outsourceOrderNo" column="outsourceOrderNo" />
|
||
|
<result property="productionOrder" column="productionOrder" />
|
||
|
<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="price" column="price" />
|
||
|
<result property="processingCharges" column="processingCharges" />
|
||
|
<result property="sendDate" column="sendDate" />
|
||
|
<result property="remark" column="remark" />
|
||
|
<result property="totalPrice" column="totalPrice" />
|
||
|
<result property="finishedQty" column="finishedQty" />
|
||
|
<result property="unfinishedQty" column="unfinishedQty" />
|
||
|
<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="selectOutsourceOrderListVo">
|
||
|
select outsourceOrderNo, productionOrder, itemCode, itemName, itemSpecification, machineType, unit, qty, price, processingCharges, sendDate, remark, totalPrice, finishedQty, unfinishedQty, spare1, spare2, spare3, spare4, spare5, spare6 from outsource_order_list
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectOutsourceOrderListList" parameterType="OutsourceOrderList" resultMap="OutsourceOrderListResult">
|
||
|
<include refid="selectOutsourceOrderListVo"/>
|
||
|
<where>
|
||
|
<if test="outsourceOrderNo != null and outsourceOrderNo != ''"> and outsourceOrderNo like concat('%', #{outsourceOrderNo}, '%')</if>
|
||
|
<if test="productionOrder != null and productionOrder != ''"> and productionOrder like concat('%', #{productionOrder}, '%')</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 like concat('%', #{qty}, '%')</if>
|
||
|
<if test="price != null "> and price like concat('%', #{price}, '%')</if>
|
||
|
<if test="processingCharges != null "> and processingCharges like concat('%', #{processingCharges}, '%')</if>
|
||
|
<if test="params.beginSendDate != null and params.beginSendDate != '' and params.endSendDate != null and params.endSendDate != ''"> and sendDate between #{params.beginSendDate} and #{params.endSendDate}</if>
|
||
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||
|
<if test="totalPrice != null "> and totalPrice like concat('%', #{totalPrice}, '%')</if>
|
||
|
<if test="finishedQty != null "> and finishedQty = #{finishedQty}</if>
|
||
|
<if test="unfinishedQty != null "> and unfinishedQty = #{unfinishedQty}</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="selectOutsourceOrderListById" parameterType="String" resultMap="OutsourceOrderListResult">
|
||
|
<include refid="selectOutsourceOrderListVo"/>
|
||
|
where outsourceOrderNo = #{outsourceOrderNo}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertOutsourceOrderList" parameterType="OutsourceOrderList">
|
||
|
insert into outsource_order_list
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="outsourceOrderNo != null and outsourceOrderNo != ''">outsourceOrderNo,</if>
|
||
|
<if test="productionOrder != null">productionOrder,</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="price != null">price,</if>
|
||
|
<if test="processingCharges != null">processingCharges,</if>
|
||
|
<if test="sendDate != null">sendDate,</if>
|
||
|
<if test="remark != null">remark,</if>
|
||
|
<if test="totalPrice != null">totalPrice,</if>
|
||
|
<if test="finishedQty != null">finishedQty,</if>
|
||
|
<if test="unfinishedQty != null">unfinishedQty,</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="outsourceOrderNo != null and outsourceOrderNo != ''">#{outsourceOrderNo},</if>
|
||
|
<if test="productionOrder != null">#{productionOrder},</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="price != null">#{price},</if>
|
||
|
<if test="processingCharges != null">#{processingCharges},</if>
|
||
|
<if test="sendDate != null">#{sendDate},</if>
|
||
|
<if test="remark != null">#{remark},</if>
|
||
|
<if test="totalPrice != null">#{totalPrice},</if>
|
||
|
<if test="finishedQty != null">#{finishedQty},</if>
|
||
|
<if test="unfinishedQty != null">#{unfinishedQty},</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="updateOutsourceOrderList" parameterType="OutsourceOrderList">
|
||
|
update outsource_order_list
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="productionOrder != null">productionOrder = #{productionOrder},</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="price != null">price = #{price},</if>
|
||
|
<if test="processingCharges != null">processingCharges = #{processingCharges},</if>
|
||
|
<if test="sendDate != null">sendDate = #{sendDate},</if>
|
||
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
<if test="totalPrice != null">totalPrice = #{totalPrice},</if>
|
||
|
<if test="finishedQty != null">finishedQty = #{finishedQty},</if>
|
||
|
<if test="unfinishedQty != null">unfinishedQty = #{unfinishedQty},</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 outsourceOrderNo = #{outsourceOrderNo}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteOutsourceOrderListById" parameterType="String">
|
||
|
delete from outsource_order_list where outsourceOrderNo = #{outsourceOrderNo}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteOutsourceOrderListByIds" parameterType="String">
|
||
|
delete from outsource_order_list where outsourceOrderNo in
|
||
|
<foreach item="outsourceOrderNo" collection="array" open="(" separator="," close=")">
|
||
|
#{outsourceOrderNo}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|