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.
193 lines
13 KiB
193 lines
13 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.OutsourceOrderHeadMapper">
|
|
|
|
<resultMap type="OutsourceOrderHead" id="OutsourceOrderHeadResult">
|
|
<result property="outsourceOrderNo" column="outsourceOrderNo" />
|
|
<result property="batchNumber" column="batchNumber" />
|
|
<result property="appointNo" column="appointNo" />
|
|
<result property="appointName" column="appointName" />
|
|
<result property="createDate" column="createDate" />
|
|
<result property="sendDate" column="sendDate" />
|
|
<result property="processNo" column="processNo" />
|
|
<result property="processName" column="processName" />
|
|
<result property="linkman" column="linkman" />
|
|
<result property="faxNumber" column="faxNumber" />
|
|
<result property="address" column="address" />
|
|
<result property="phoneNum" column="phoneNum" />
|
|
<result property="endFlag" column="endFlag" />
|
|
<result property="remark" column="remark" />
|
|
<result property="sendStockNo" column="sendStockNo" />
|
|
<result property="sendStockName" column="sendStockName" />
|
|
<result property="deliveryStockNo" column="deliveryStockNo" />
|
|
<result property="deliveryStockName" column="deliveryStockName" />
|
|
<result property="carrierCompany" column="carrierCompany" />
|
|
<result property="confirmFlag" column="confirmFlag" />
|
|
<result property="confirmMan" column="confirmMan" />
|
|
<result property="confirmDate" column="confirmDate" />
|
|
<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="selectOutsourceOrderHeadVo">
|
|
select outsourceOrderNo, batchNumber, appointNo, appointName, createDate, sendDate, processNo, processName, linkman, faxNumber, address, phoneNum, endFlag, remark, sendStockNo, sendStockName, deliveryStockNo, deliveryStockName, carrierCompany, confirmFlag, confirmMan, confirmDate, spare1, spare2, spare3, spare4, spare5, spare6 from outsource_order_head
|
|
</sql>
|
|
|
|
<select id="selectOutsourceOrderHeadList" parameterType="OutsourceOrderHead" resultMap="OutsourceOrderHeadResult">
|
|
<include refid="selectOutsourceOrderHeadVo"/>
|
|
<where>
|
|
<if test="outsourceOrderNo != null and outsourceOrderNo != ''"> and outsourceOrderNo like concat('%', #{outsourceOrderNo}, '%')</if>
|
|
<if test="batchNumber != null and batchNumber != ''"> and batchNumber like concat('%', #{batchNumber}, '%')</if>
|
|
<if test="appointNo != null and appointNo != ''"> and appointNo like concat('%', #{appointNo}, '%')</if>
|
|
<if test="appointName != null and appointName != ''"> and appointName like concat('%', #{appointName}, '%')</if>
|
|
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and createDate between #{params.beginCreateDate} and #{params.endCreateDate}</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="processNo != null and processNo != ''"> and processNo like concat('%', #{processNo}, '%')</if>
|
|
<if test="processName != null and processName != ''"> and processName like concat('%', #{processName}, '%')</if>
|
|
<if test="linkman != null and linkman != ''"> and linkman like concat('%', #{linkman}, '%')</if>
|
|
<if test="faxNumber != null and faxNumber != ''"> and faxNumber like concat('%', #{faxNumber}, '%')</if>
|
|
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
|
<if test="phoneNum != null and phoneNum != ''"> and phoneNum like concat('%', #{phoneNum}, '%')</if>
|
|
<if test="endFlag != null and endFlag != ''"> and endFlag = #{endFlag}</if>
|
|
<if test="sendStockNo != null and sendStockNo != ''"> and sendStockNo like concat('%', #{sendStockNo}, '%')</if>
|
|
<if test="sendStockName != null and sendStockName != ''"> and sendStockName like concat('%', #{sendStockName}, '%')</if>
|
|
<if test="deliveryStockNo != null and deliveryStockNo != ''"> and deliveryStockNo like concat('%', #{deliveryStockNo}, '%')</if>
|
|
<if test="deliveryStockName != null and deliveryStockName != ''"> and deliveryStockName like concat('%', #{deliveryStockName}, '%')</if>
|
|
<if test="carrierCompany != null and carrierCompany != ''"> and carrierCompany like concat('%', #{carrierCompany}, '%')</if>
|
|
<if test="confirmFlag != null and confirmFlag != ''"> and confirmFlag = #{confirmFlag}</if>
|
|
<if test="confirmMan != null and confirmMan != ''"> and confirmMan = #{confirmMan}</if>
|
|
<if test="params.beginConfirmDate != null and params.beginConfirmDate != '' and params.endConfirmDate != null and params.endConfirmDate != ''"> and confirmDate between #{params.beginConfirmDate} and #{params.endConfirmDate}</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="selectOutsourceOrderHeadById" parameterType="String" resultMap="OutsourceOrderHeadResult">
|
|
<include refid="selectOutsourceOrderHeadVo"/>
|
|
where outsourceOrderNo = #{outsourceOrderNo}
|
|
</select>
|
|
|
|
<insert id="insertOutsourceOrderHead" parameterType="OutsourceOrderHead">
|
|
insert into outsource_order_head
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="outsourceOrderNo != null and outsourceOrderNo != ''">outsourceOrderNo,</if>
|
|
<if test="batchNumber != null">batchNumber,</if>
|
|
<if test="appointNo != null and appointNo != ''">appointNo,</if>
|
|
<if test="appointName != null and appointName != ''">appointName,</if>
|
|
<if test="createDate != null">createDate,</if>
|
|
<if test="sendDate != null">sendDate,</if>
|
|
<if test="processNo != null and processNo != ''">processNo,</if>
|
|
<if test="processName != null and processName != ''">processName,</if>
|
|
<if test="linkman != null">linkman,</if>
|
|
<if test="faxNumber != null">faxNumber,</if>
|
|
<if test="address != null">address,</if>
|
|
<if test="phoneNum != null">phoneNum,</if>
|
|
<if test="endFlag != null">endFlag,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="sendStockNo != null">sendStockNo,</if>
|
|
<if test="sendStockName != null">sendStockName,</if>
|
|
<if test="deliveryStockNo != null">deliveryStockNo,</if>
|
|
<if test="deliveryStockName != null">deliveryStockName,</if>
|
|
<if test="carrierCompany != null">carrierCompany,</if>
|
|
<if test="confirmFlag != null">confirmFlag,</if>
|
|
<if test="confirmMan != null">confirmMan,</if>
|
|
<if test="confirmDate != null">confirmDate,</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="batchNumber != null">#{batchNumber},</if>
|
|
<if test="appointNo != null and appointNo != ''">#{appointNo},</if>
|
|
<if test="appointName != null and appointName != ''">#{appointName},</if>
|
|
<if test="createDate != null">#{createDate},</if>
|
|
<if test="sendDate != null">#{sendDate},</if>
|
|
<if test="processNo != null and processNo != ''">#{processNo},</if>
|
|
<if test="processName != null and processName != ''">#{processName},</if>
|
|
<if test="linkman != null">#{linkman},</if>
|
|
<if test="faxNumber != null">#{faxNumber},</if>
|
|
<if test="address != null">#{address},</if>
|
|
<if test="phoneNum != null">#{phoneNum},</if>
|
|
<if test="endFlag != null">#{endFlag},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="sendStockNo != null">#{sendStockNo},</if>
|
|
<if test="sendStockName != null">#{sendStockName},</if>
|
|
<if test="deliveryStockNo != null">#{deliveryStockNo},</if>
|
|
<if test="deliveryStockName != null">#{deliveryStockName},</if>
|
|
<if test="carrierCompany != null">#{carrierCompany},</if>
|
|
<if test="confirmFlag != null">#{confirmFlag},</if>
|
|
<if test="confirmMan != null">#{confirmMan},</if>
|
|
<if test="confirmDate != null">#{confirmDate},</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="updateOutsourceOrderHead" parameterType="OutsourceOrderHead">
|
|
update outsource_order_head
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="batchNumber != null">batchNumber = #{batchNumber},</if>
|
|
<if test="appointNo != null and appointNo != ''">appointNo = #{appointNo},</if>
|
|
<if test="appointName != null and appointName != ''">appointName = #{appointName},</if>
|
|
<if test="createDate != null">createDate = #{createDate},</if>
|
|
<if test="sendDate != null">sendDate = #{sendDate},</if>
|
|
<if test="processNo != null and processNo != ''">processNo = #{processNo},</if>
|
|
<if test="processName != null and processName != ''">processName = #{processName},</if>
|
|
<if test="linkman != null">linkman = #{linkman},</if>
|
|
<if test="faxNumber != null">faxNumber = #{faxNumber},</if>
|
|
<if test="address != null">address = #{address},</if>
|
|
<if test="phoneNum != null">phoneNum = #{phoneNum},</if>
|
|
<if test="endFlag != null">endFlag = #{endFlag},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="sendStockNo != null">sendStockNo = #{sendStockNo},</if>
|
|
<if test="sendStockName != null">sendStockName = #{sendStockName},</if>
|
|
<if test="deliveryStockNo != null">deliveryStockNo = #{deliveryStockNo},</if>
|
|
<if test="deliveryStockName != null">deliveryStockName = #{deliveryStockName},</if>
|
|
<if test="carrierCompany != null">carrierCompany = #{carrierCompany},</if>
|
|
<if test="confirmFlag != null">confirmFlag = #{confirmFlag},</if>
|
|
<if test="confirmMan != null">confirmMan = #{confirmMan},</if>
|
|
<if test="confirmDate != null">confirmDate = #{confirmDate},</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="deleteOutsourceOrderHeadById" parameterType="String">
|
|
delete from outsource_order_head where outsourceOrderNo = #{outsourceOrderNo}
|
|
</delete>
|
|
|
|
<delete id="deleteOutsourceOrderHeadByIds" parameterType="String">
|
|
delete from outsource_order_head where outsourceOrderNo in
|
|
<foreach item="outsourceOrderNo" collection="array" open="(" separator="," close=")">
|
|
#{outsourceOrderNo}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<select id="selectCountByDay" resultType="Integer">
|
|
select count(*) from outsource_order_head where to_days(createDate) = to_days(now());
|
|
</select>
|
|
|
|
</mapper>
|