From ab335a89280e8bc22068c8dc42787959dfbfb466 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 29 八月 2024 15:30:03 +0800
Subject: [PATCH] 新增物料出库打印
---
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml
index e79a190..4c28901 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml
@@ -151,6 +151,10 @@
select sum(quantity) from sd.order_detail where order_id=#{orderId}
</select>
+ <select id="selectOrderDetailDeliveryCount">
+ SELECT * FROM sd.order_detail where order_id=#{orderDetail.orderId} and order_number=#{orderDetail.orderNumber}
+ </select>
+
<insert id="insertDeliveryDetail" useGeneratedKeys="true" >
insert into sd.delivery_detail (delivery_id,delivery_number,order_number,
@@ -170,7 +174,7 @@
dd.delivery_number,
fgi.quantity_available + dd.quantity as quantity_available,
od.order_number,
- od.quantity-dd.quantity as t_quantity,
+ od.quantity-od.delivery_num as t_quantity,
od.quantity as o_quantity,
dd.quantity as d_quantity,
od.building_number,
@@ -1002,13 +1006,9 @@
<select id="getSelectOrderPrinting" >
select od.order_id,od.product_id,p.remarks as product_name,sum(od.compute_gross_area) as area,sum(od.gross_amount) as gross_amount ,sum(od.quantity) as quantity from
order_detail od left join product p on od.product_id=p.id
-
- <where>
- <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
- and od.order_id like concat('%',#{orderDetail.orderId},'%')
- </if>
- </where>
- group by od.product_name,od.product_id
+ where od.order_id = #{orderId}
+ and od.product_id = #{productId}
+ group by od.product_name,od.product_id ;
</select>
<select id="getSelectDeliveryDetailPrinting" >
@@ -1043,7 +1043,7 @@
</select>
<select id="getSelectOrderotherMoney" >
- select bom.alias,oom.price,#{value}*od.quantity as count,oom.price*#{value}*od.quantity as monery
+ select bom.alias,ifnull(oom.price,0) as price,#{value}*od.quantity as count,ifnull(oom.price,0)*#{value}*od.quantity as monery
from order_detail od
left join order_other_money oom on oom.order_id=od.order_id and oom.column=#{key}
left join basic_other_money bom on bom.`column`=oom.`column`
--
Gitblit v1.8.0