From a356468e8421332d47fb1006b4dbdac5d639bde3 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期三, 29 十月 2025 11:50:24 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/FangCangZhiNeng

---
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs |   49 ++++++++++--------------
 新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs    |   48 ++++++++++-------------
 2 files changed, 42 insertions(+), 55 deletions(-)

diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
index 2013638..e78cd75 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
@@ -316,7 +316,7 @@
                         Warehouse_no = order.warehouse_no,
                         Details = order.details.Select(d => new Dt_CabinOrderDetail
                         {
-                            Reservoirarea=order.warehouse_no,
+                            Reservoirarea = order.warehouse_no,
                             Goods_no = d.goods_no,
                             Order_qty = Math.Abs(d.order_qty),
                             Batch_num = d.batch_num,
@@ -757,35 +757,29 @@
 
                 foreach (var item in cabinOrders)
                 {
-                    if (item.Order_type == InOrderTypeEnum.Allocat.ObjToInt().ToString())
-                    {
-                        if (item.Details != null)
-                        {
-                            _cabinOrderDetailServices.Repository.DeleteAndMoveIntoHty(item.Details, OperateTypeEnum.浜哄伐瀹屾垚);
-                            item.Details = null;
-                        }
-                    }
-                    else
-                    {
-                        if (item.Details != null)
-                            _cabinOrderDetailServices.Repository.DeleteAndMoveIntoHty(item.Details, OperateTypeEnum.浜哄伐瀹屾垚);
-                        item.Modifier = App.User.UserName;
-                        item.ModifyDate = DateTime.Now;
-                        item.Details = null;
-                    }
-                  
+                    if (item.Details != null)
+                        _cabinOrderDetailServices.Repository.DeleteAndMoveIntoHty(item.Details, OperateTypeEnum.浜哄伐瀹屾垚);
+                    item.Modifier = App.User.UserName;
+                    item.ModifyDate = DateTime.Now;
+                    item.Details = null;
                 }
                 BaseDal.DeleteAndMoveIntoHty(cabinOrders, OperateTypeEnum.浜哄伐瀹屾垚);
-                var url = "http://121.37.118.63:80/GYZ2/95fck/outOrderOk";
-                var requestDate = new
+
+                if (cabinOrder.Order_type == InOrderTypeEnum.Allocat.ObjToInt().ToString())
+                    _unitOfWorkManage.CommitTran();
+                else
                 {
-                    order_no = cabinOrder.Order_no
-                };
-                var result = HttpHelper.Post(url, requestDate.ToJsonString());
-                var response = JsonConvert.DeserializeObject<UpstreamOrderResponse>(result);
-                if (response == null) throw new Exception("涓婃姤ERP鍏ュ簱鍗曞畬鎴愬け璐ワ紒");
-                if (response.resultCode != "0") throw new Exception(response.resultMsg);
-                _unitOfWorkManage.CommitTran();
+                    var url = "http://121.37.118.63:80/GYZ2/95fck/outOrderOk";
+                    var requestDate = new
+                    {
+                        order_no = cabinOrder.Order_no
+                    };
+                    var result = HttpHelper.Post(url, requestDate.ToJsonString());
+                    var response = JsonConvert.DeserializeObject<UpstreamOrderResponse>(result);
+                    if (response == null) throw new Exception("涓婃姤ERP鍏ュ簱鍗曞畬鎴愬け璐ワ紒");
+                    if (response.resultCode != "0") throw new Exception(response.resultMsg);
+                    _unitOfWorkManage.CommitTran();
+                }
                 content.OK();
             }
             catch (Exception ex)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
index e91b4f9..4b83ef1 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs"
@@ -996,36 +996,29 @@
 
                 foreach (var item in deliveryOrders)
                 {
-                    if (item.Out_type==OutOrderTypeEnum.Allocate.ObjToInt().ToString())
-                    {
-                        if (item.Details!=null)
-                        {
-                            _deliveryOrderDetailServices.Repository.DeleteAndMoveIntoHty(item.Details, OperateTypeEnum.浜哄伐瀹屾垚);
-                            item.Details =null;
-                        }
-                    }
-                    else
-                    {
-                        if (item.Details != null)
-                            _deliveryOrderDetailServices.Repository.DeleteAndMoveIntoHty(item.Details, OperateTypeEnum.浜哄伐瀹屾垚);
-                        item.Modifier = App.User.UserName;
-                        item.ModifyDate = DateTime.Now;
-                        item.Details = null;
-                      
-                    }
-                    BaseDal.DeleteAndMoveIntoHty(deliveryOrders, OperateTypeEnum.浜哄伐瀹屾垚);
+                    if (item.Details != null)
+                        _deliveryOrderDetailServices.Repository.DeleteAndMoveIntoHty(item.Details, OperateTypeEnum.浜哄伐瀹屾垚);
+                    item.Modifier = App.User.UserName;
+                    item.ModifyDate = DateTime.Now;
+                    item.Details = null;
                 }
-                var url = "http://121.37.118.63:80/GYZ2/95fck/outOrderOk";
-
-                var requestDate = new
+                BaseDal.DeleteAndMoveIntoHty(deliveryOrders, OperateTypeEnum.浜哄伐瀹屾垚);
+                if (deliveryOrder.Out_type == OutOrderTypeEnum.Allocate.ObjToInt().ToString())
+                    _unitOfWorkManage.CommitTran();
+                else
                 {
-                    order_no = deliveryOrder.Out_no
-                };
-                var result = HttpHelper.Post(url, requestDate.ToJsonString());
-                var response = JsonConvert.DeserializeObject<UpstreamOrderResponse>(result);
-                if (response == null) throw new Exception("涓婃姤ERP鍑哄簱鍗曞畬鎴愬け璐ワ紒");
-                if (response.resultCode != "0") throw new Exception(response.resultMsg);
-                _unitOfWorkManage.CommitTran();
+                    var url = "http://121.37.118.63:80/GYZ2/95fck/outOrderOk";
+
+                    var requestDate = new
+                    {
+                        order_no = deliveryOrder.Out_no
+                    };
+                    var result = HttpHelper.Post(url, requestDate.ToJsonString());
+                    var response = JsonConvert.DeserializeObject<UpstreamOrderResponse>(result);
+                    if (response == null) throw new Exception("涓婃姤ERP鍑哄簱鍗曞畬鎴愬け璐ワ紒");
+                    if (response.resultCode != "0") throw new Exception(response.resultMsg);
+                    _unitOfWorkManage.CommitTran();
+                }
                 content.OK();
             }
             catch (Exception ex)

--
Gitblit v1.9.3