出库部分

This commit is contained in:
张怡蓉
2025-06-06 11:29:34 +08:00
parent 85d08f8a32
commit 8eecfa8aac
19 changed files with 433 additions and 49 deletions

View File

@@ -22,6 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="startDate" column="start_date" />
<result property="finishDate" column="finish_date" />
<result property="warehouseName" column="warehouse_name" />
<result property="customerName" column="customer_name" />
</resultMap>
<sql id="selectOutStockoutFinishVo">
@@ -133,25 +135,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<select id="selectOutStockoutFinishListByOutStockout" parameterType="OutStockout" resultMap="OutStockoutFinishResult">
<include refid="selectOutStockoutFinishVo"/>
select distinct o.stockout_guid, o.stockout_id, o.out_type, o.create_date, o.department_no, o.customer_no, o.create_man_id, o.status, o.stockout_source,
o.warehouse_id, o.class_now_id, o.exit_id, o.car_number, o.FID, o.erp_stockout_id,o.start_date,o.finish_date,bw.warehouse_name,bc.customer_name from out_stockout_finish o
left join bas_warehouse bw on bw.warehouse_id = o.warehouse_id
left join bas_customer bc on bc.customer_no = o.customer_no
left join out_stockout_detail_finish d on d.stockout_id = o.stockout_id
left join bas_product bp on bp.product_id = d.product_id
<where>
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
<if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
<if test="stockoutGuid != null and stockoutGuid != ''"> and o.stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and o.stockout_id = #{stockoutId}</if>
<if test="outType != null and outType != ''"> and o.out_type = #{outType}</if>
<if test="departmentNo != null and departmentNo != ''"> and o.department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and o.customer_no = #{customerNo}</if>
<if test="createManId != null and createManId != ''"> and o.create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and o.status = #{status}</if>
<if test="stockoutSource != null and stockoutSource != ''"> and o.stockout_source = #{stockoutSource}</if>
<if test="warehouseId != null and warehouseId != ''"> and o.warehouse_id = #{warehouseId}</if>
<if test="classNowId != null and classNowId != ''"> and o.class_now_id = #{classNowId}</if>
<if test="exitId != null and exitId != ''"> and o.exit_id = #{exitId}</if>
<if test="carNumber != null and carNumber != ''"> and o.car_number = #{carNumber}</if>
<if test="FID != null and FID != ''"> and o.FID = #{FID}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and o.erp_stockout_id = #{erpStockoutId}</if>
<if test="startDate != null and startDate != ''"> and o.create_date &gt;= #{startDate}</if>
<if test="finishDate != null and finishDate != ''"> and o.create_date &lt;= #{finishDate}</if>
<if test="productId != null and productId != ''"> and d.product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
<if test="customerName != null and customerName != ''"> and bc.customer_name like concat('%', #{customerName}, '%')</if>
</where>
</select>
</mapper>