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

62 lines
4.6 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">
<select id="selectOutsourceOrderHeadWithList" resultType="com.ruoyi.produce.domain.OutsourceOrderHeadWithList" parameterType="com.ruoyi.produce.domain.OutsourceOrderHeadWithList">
SELECT
outsource_order_head.outsourceOrderNo as outsourceOrderNo,
outsource_order_head.appointName as appointName,
outsource_order_head.sendDate as sendDate,
outsource_order_head.processName as processName,
outsource_order_list.itemCode as itemCode,
outsource_order_list.itemName as itemName,
outsource_order_list.itemSpecification as itemSpecification,
outsource_order_list.unit as unit,
outsource_order_list.qty as qty,
outsource_order_list.price as price,
outsource_order_list.totalPrice as totalPrice,
outsource_order_list.finishedQty as finishedQty,
outsource_order_list.processingCharges as processingCharges,
outsource_order_list.unfinishedQty as unfinishedQty,
outsource_order_list.remark as remark,
outsource_order_head.spare1 as finishedDate,
outsource_order_head.endFlag as endFlag,
outsource_order_head.linkman as linkman,
outsource_order_head.createDate as createDate,
outsource_order_list.productionOrder as productionOrder,
outsource_order_head.confirmFlag as confirmFlag
FROM
outsource_order_list
LEFT JOIN outsource_order_head ON outsource_order_head.outsourceOrderNo = outsource_order_list.outsourceOrderNo
<where>
<if test="outsourceOrderNo != null and outsourceOrderNo != ''"> and outsourceOrderNo like concat('%', #{outsourceOrderNo}, '%')</if>
<if test="appointName != null and appointName != ''"> and appointName like concat('%', #{appointName}, '%')</if>
<if test="productionOrder != null and productionOrder != ''"> and productionOrder like concat('%', #{productionOrder}, '%')</if>
<if test="processName != null and processName != ''"> and processName like concat('%', #{processName}, '%')</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="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="qty != null and qty != ''"> and qty = #{qty}</if>
<if test="params.beginSendDate != null and params.beginSendDate !=''"> and sendDate >= #{params.beginSendDate}</if>
<if test="params.endSendDate != null and params.endSendDate != ''">and #{params.endSendDate} >= sendDate</if>
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
<if test="totalPrice != null and totalPrice != ''"> and totalPrice like concat('%', #{totalPrice}, '%')</if>
<if test="finishedQty != null and finishedQty != ''"> and finishedQty like concat('%', #{finishedQty}, '%')</if>
<if test="processingCharges != null and processingCharges != ''"> and processingCharges like concat('%', #{processingCharges}, '%')</if>
<if test="unfinishedQty != null and unfinishedQty != ''"> and unfinishedQty like concat('%', #{unfinishedQty}, '%')</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="linkman != null and linkman != ''"> and linkman like concat('%', #{linkman}, '%')</if>
<if test="endFlag != null and endFlag != ''"> and endFlag = #{endFlag}</if>
<if test="confirmFlag != null and confirmFlag != ''"> and confirmFlag = #{confirmFlag}</if>
<if test="params.beginFinishedDate != null and params.beginFinishedDate !=''"> and finishedDate >= #{params.beginFinishedDate}</if>
<if test="params.endFinishedDate != null and params.endFinishedDate != ''">and #{params.endFinishedDate} >= finishedDate</if>
<if test="params.beginCreateDate != null and params.beginCreateDate !=''"> and createDate >= #{params.beginCreateDate}</if>
<if test="params.endCreateDate != null and params.endCreateDate != ''">and #{params.endCreateDate} >= createDate</if>
</where>
</select>
</mapper>