From 5a4e283dc5329d8e26647eeafb8d04d4f72dd4dc Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 11 十一月 2024 16:28:40 +0800
Subject: [PATCH] 修改优化页面

---
 north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml b/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
index 7bf5c91..508c9e2 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
@@ -437,7 +437,7 @@
     </select>
 
     <select id="findDeliverydetailsum"  >
-        select sum(quantity) from sd.`delivery_detail`  where delivery_id=#{deliveryId} and delivery_detail_state=#{deliveryDetailState}
+        select ifnull(sum(quantity),0) from sd.`delivery_detail`  where delivery_id=#{deliveryId} and delivery_detail_state=#{deliveryDetailState}
     </select>
 
     <update id="updateOrderWarehousingState">
@@ -461,13 +461,19 @@
 
     <update id="updateIntOrderNumberConut">
         update sd.order_detail
-        set warehouse_num=warehouse_num+${quantity}
+        set warehouse_num=warehouse_num+${quantity},update_time=now()
         where order_number=#{orderNumber} and order_id=#{orderId}
     </update>
 
     <update id="updateOutOrderNumberConut">
         update sd.order_detail
         set warehouse_num=warehouse_num-${quantity}
+        where order_number=#{orderNumber} and order_id=#{orderId}
+    </update>
+
+    <update id="updateOrderNumberConut">
+        update sd.order_detail
+        set warehouse_num=${quantity},update_time=now()
         where order_number=#{orderNumber} and order_id=#{orderId}
     </update>
 
@@ -537,6 +543,13 @@
     <select id="findOrderNumberd" >
         select *
         from  mm.`finished_goods_inventory`
+        where order_number = #{orderNumber} and order_id=#{orderId};
+
+    </select>
+
+    <select id="findOrderDetailNumberd" >
+        select *
+        from  sd.`order_detail`
         where order_number = #{orderNumber} and order_id=#{orderId};
 
     </select>
@@ -879,6 +892,16 @@
         where order_number=#{orderDetail.orderNumber}  and order_id=#{orderDetail.orderId}
     </update>
 
+    <select id="findFlowCard">
+        select * from pp.flow_card
+        where order_number=#{orderNumber} and process_id=#{processId} and order_id=#{order.orderId} group by process_id
+    </select>
+
+    <select id="findDeliverydetail">
+        select * from sd.delivery_detail
+        where order_number=#{orderNumber}  and order_id=#{orderId} and delivery_id=#{deliveryId} and delivery_detail_state=0
+    </select>
+
 
 
 

--
Gitblit v1.8.0