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

54 lines
3.7 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.stock.mapper.WarehousingOutHeadWithListMapper">
<select id="selectWarehousingOutHeadWithList" resultType="com.ruoyi.stock.domain.WarehousingOutHeadWithList" parameterType="com.ruoyi.stock.domain.WarehousingOutHeadWithList">
SELECT
warehousing_out_head.warehousingOutNo as warehousingOutNo,
warehousing_out_head.workOrderNo as workOrderNo,
warehousing_out_list.buyOrderNo as buyOrderNo,
warehousing_out_head.warehousingOutDate as warehousingOutDate,
warehousing_out_list.itemNo as itemNo,
warehousing_out_list.itemCode as itemCode,
warehousing_out_list.itemName as itemName,
warehousing_out_list.itemSpecification as itemSpecification,
warehousing_out_list.unit as unit,
warehousing_out_list.planQty as planQty,
warehousing_out_list.realQty as realQty,
warehousing_out_list.returnQty as returnQty,
warehousing_out_list.remark as remark,
warehousing_out_head.deptNo as deptNo,
warehousing_out_head.deptName as deptName,
warehousing_out_head.stockName as stockName,
warehousing_out_head.outputClass as outputClass,
warehousing_out_head.itemClass as itemClass
FROM
warehousing_out_list
LEFT JOIN warehousing_out_head ON warehousing_out_list.warehousingOutNo = warehousing_out_head.warehousingOutNo
<where>
<if test="warehousingOutNo != null and warehousingOutNo != ''"> and warehousingOutNo like concat('%', #{warehousingOutNo}, '%')</if>
<if test="workOrderNo != null and workOrderNo != ''"> and workOrderNo like concat('%', #{workOrderNo}, '%')</if>
<if test="buyOrderNo != null and buyOrderNo != ''"> and buyOrderNo like concat('%', #{buyOrderNo}, '%')</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="stockName != null and stockName != ''"> and stcokName like concat('%', #{stockName}, '%')</if>
<if test="itemSpecification != null and itemSpecification != ''"> and itemSpecification = #{itemSpecification}</if>
<if test="params.beginWarehousingOutDate != null and params.beginWarehousingOutDate !=''"> and warehousingOutDate >= #{params.beginWarehousingOutDate}</if>
<if test="params.endWarehousingOutDate != null and params.endWarehousingOutDate != ''">and #{params.endWarehousingOutDate} >= warehousingOutDate</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="returnQty != null and returnQty != ''"> and returnQty = #{returnQty}</if>
<if test="planQty != null and planQty != ''"> and planQty = #{planQty}</if>
<if test="realQty != null and realQty != ''"> and realQty = #{realQty}</if>
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
<if test="deptNo != null and deptNo != ''"> and deptNo like deptNo('%', #{deptNo}, '%')</if>
<if test="deptName != null and deptName != ''"> and deptName like concat('%', #{deptName}, '%')</if>
<if test="outputClass != null and outputClass != ''"> and outputClass = #{outputClass}</if>
<if test="itemClass != null and itemClass != ''"> and itemClass = #{itemClass}</if>
</where>
</select>
</mapper>