From f908cf621faa5d2bb168c45d0cc4d85f47565204 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 13 三月 2024 11:15:15 +0800
Subject: [PATCH] PDA平库入库增加维护货主信息;入库完成增加维护供应商信息;

---
 Wms/WMS.Entity/DataEntity/DataStockDetail.cs          |   14 +++++++
 Pda/View/AsnSetting/pingKuEnter.html                  |    2 
 Wms/Model/ModelDto/DataDto/StockDetailDto.cs          |   13 ++++++
 HTML/views/StatisticalReport/InventoryStatistics.html |    2 +
 Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs               |   11 +++++
 Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs              |   20 +++++++++
 Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs          |   23 ++++++++---
 Wms/WMS.BLL/DataServer/StockServer.cs                 |    6 ++
 8 files changed, 82 insertions(+), 9 deletions(-)

diff --git a/HTML/views/StatisticalReport/InventoryStatistics.html b/HTML/views/StatisticalReport/InventoryStatistics.html
index d48b2e1..966a76e 100644
--- a/HTML/views/StatisticalReport/InventoryStatistics.html
+++ b/HTML/views/StatisticalReport/InventoryStatistics.html
@@ -527,6 +527,8 @@
 						{field: 'LotNo',title: '鎵规鍙�',align: 'center'}, 
 						{field: 'OwnerNo',title: '璐т富缂栫爜',align: 'center'},
 						{field: 'OwnerName',title: '璐т富鍚嶇О',align: 'center'}, 
+						{field: 'SupplierNo',title: '渚涘簲鍟嗙紪鐮�',align: 'center'},
+						{field: 'SupplierName',title: '渚涘簲鍟嗗悕绉�',align: 'center'}, 
 						{field: 'Qty',title: '搴撳瓨鏁伴噺',width: 110,align: 'center'}, 
 						{field: 'LockQty',title: '閿佸畾鏁伴噺',width: 110,align: 'center'},
 						{field: 'Status',templet: '#buttonTpl',title: '搴撳瓨鐘舵��',width: 90,align: 'center'}, 
diff --git a/Pda/View/AsnSetting/pingKuEnter.html b/Pda/View/AsnSetting/pingKuEnter.html
index 9f3ec0a..a483601 100644
--- a/Pda/View/AsnSetting/pingKuEnter.html
+++ b/Pda/View/AsnSetting/pingKuEnter.html
@@ -236,7 +236,7 @@
 				form.render('select');
 
 				var param = {
-					Type: '0,1,2,3',
+					Type: '0,1,2,3,4,5,6,7',
 				};
 				sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) {
 					if (res.code == 0) { //鎴愬姛
diff --git a/Wms/Model/ModelDto/DataDto/StockDetailDto.cs b/Wms/Model/ModelDto/DataDto/StockDetailDto.cs
index 3c1efd9..e2b0d12 100644
--- a/Wms/Model/ModelDto/DataDto/StockDetailDto.cs
+++ b/Wms/Model/ModelDto/DataDto/StockDetailDto.cs
@@ -179,6 +179,19 @@
         /// </summary>           
         public string OwnerName { get; set; }
 
+        /// <summary>
+        /// Desc:渚涘簲鍟嗙紪鍙�
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string SupplierNo { get; set; }
+
+        /// <summary>
+        /// Desc:渚涘簲鍟嗗悕绉�
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string SupplierName { get; set; }
 
         /// <summary>
         /// Desc:澶囨敞
diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
index 8a95a3a..5075348 100644
--- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -1639,13 +1639,21 @@
                                 IsBelt = item.IsBelt,
                                 Demo = item.Demo,
 
-                                OwnerNo = ownerNo,
-                                OwnerName = ownerName,
-
                                 IsDel = "0",
                                 CreateUser = 0,
                                 CreateTime = comTime
                             };
+                            //缁存姢搴撳瓨鏄庣粏璐т富/渚涘簲鍟嗕俊鎭�
+                            if (notice.Type == "0" || notice.Type == "2" || notice.Type == "4" || notice.Type == "6" || notice.Type == "7")//0:鎴愬搧鍏ュ簱锛�2:涓棿鍝佸叆搴�,4:杞﹂棿浣欐枡鍏ュ簱,6:浠e偍鍏ュ簱,7:瀵勫瓨鍏ュ簱
+                            {
+                                sd.OwnerNo = notice.CustomerNo;//璐т富缂栫爜
+                                sd.OwnerName = notice.CustomerName;//璐т富鍚嶇О
+                            }
+                            else if (notice.Type == "1" || notice.Type == "5")//1:閲囪喘鍏ュ簱,2:鍏跺畠鍏ュ簱
+                            { 
+                                sd.SupplierNo= notice.CustomerNo;//渚涘簲鍟嗙紪鐮�
+                                sd.SupplierName = notice.CustomerName;//渚涘簲鍟嗗悕绉�
+                            }
 
                             //if (quality.Count() > 0)
                             //{
@@ -1730,13 +1738,16 @@
                                     LockQty = 0,
                                     FrozenQty = 0,
 
-                                    OwnerNo = ownerNo,
-                                    OwnerName = ownerName,
-
                                     IsDel = "0",
                                     CreateUser = userId,
                                     CreateTime = comTime
                                 };
+                                //缁存姢搴撳瓨璐т富淇℃伅
+                                if (notice.Type == "0" || notice.Type == "2" || notice.Type == "4" || notice.Type == "6" || notice.Type == "7")//0:鎴愬搧鍏ュ簱锛�2:涓棿鍝佸叆搴�,4:杞﹂棿浣欐枡鍏ュ簱,6:浠e偍鍏ュ簱,7:瀵勫瓨鍏ュ簱
+                                {
+                                    stock.OwnerNo = notice.CustomerNo;//璐т富缂栫爜
+                                    stock.OwnerName = notice.CustomerName;//璐т富鍚嶇О
+                                }
                                 Db.Insertable(stock).ExecuteCommand();
                             }
                             #endregion
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index 1d8d751..8d0d9c4 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -2224,7 +2224,7 @@
                     #endregion
 
                     #region 绠辩爜淇℃伅
-                    var boxInfoList = Db.Queryable<BllBoxInfo>().Where(w => w.IsDel == "0" && w.ASNNo == model.ASNNo).ToList();
+                    var boxInfoList = Db.Queryable<BllBoxInfo>().Where(w => w.IsDel == "0" && w.ASNNo == model.ASNNo && w.PalletNo == model.PalletNo).ToList();
                     // type 0:鎴愬搧鍏ュ簱 1:閲囪喘鍏ュ簱 2:涓棿鍝佸叆搴� 3:閫�璐у叆搴� 4:杞﹂棿浣欐枡閫�鍥炲叆搴� 5:鍏跺畠鍏ュ簱 6:浠e偍鍏ュ簱 7:瀵勫瓨鍏ュ簱
                     if (notice.Type == "2" || notice.Type == "6" || notice.Type == "7")
                     {
@@ -2298,6 +2298,12 @@
                             CreateUser = (int)model.CreateUser,
                             CreateTime = serverTime
                         };
+                        //缁存姢搴撳瓨璐т富淇℃伅
+                        if (notice.Type == "0" || notice.Type == "2" || notice.Type == "4" || notice.Type == "6" || notice.Type == "7")//0:鎴愬搧鍏ュ簱锛�2:涓棿鍝佸叆搴�,4:杞﹂棿浣欐枡鍏ュ簱,6:浠e偍鍏ュ簱,7:瀵勫瓨鍏ュ簱
+                        {
+                            stockModel.OwnerNo = notice.CustomerNo;//璐т富缂栫爜
+                            stockModel.OwnerName = notice.CustomerName;//璐т富鍚嶇О
+                        }
                         //鏂板搴撳瓨鎬讳俊鎭�
                         Db.Insertable<DataStock>(stockModel).ExecuteCommand();
                     }
@@ -2350,9 +2356,21 @@
                             PackagNo = sku.PackagNo,
                             IsBale = bindInfo.IsBale,
                             IsBelt = bindInfo.IsBelt,
+
                             CreateUser = (int)model.CreateUser,
                             CreateTime = serverTime
                         };
+                        //缁存姢搴撳瓨鏄庣粏璐т富/渚涘簲鍟嗕俊鎭�
+                        if (notice.Type == "0" || notice.Type == "2" || notice.Type == "4" || notice.Type == "6" || notice.Type == "7")//0:鎴愬搧鍏ュ簱锛�2:涓棿鍝佸叆搴�,4:杞﹂棿浣欐枡鍏ュ簱,6:浠e偍鍏ュ簱,7:瀵勫瓨鍏ュ簱
+                        {
+                            detailModel.OwnerNo = notice.CustomerNo;//璐т富缂栫爜
+                            detailModel.OwnerName = notice.CustomerName;//璐т富鍚嶇О
+                        }
+                        else if (notice.Type == "1" || notice.Type == "5")//1:閲囪喘鍏ュ簱,2:鍏跺畠鍏ュ簱
+                        {
+                            detailModel.SupplierNo = notice.CustomerNo;//渚涘簲鍟嗙紪鐮�
+                            detailModel.SupplierName = notice.CustomerName;//渚涘簲鍟嗗悕绉�
+                        }
                         stId = Db.Insertable<DataStockDetail>(detailModel).ExecuteReturnIdentity();
 
                     }
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
index 0afc859..13d05b0 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -890,6 +890,11 @@
             {
                 string EndLocat = string.Empty;//鐩爣浣嶇疆                
 
+                var log = Db.Queryable<LogTask>().First(w => w.IsDel == "0" && w.PalletNo == palletNo && (w.Status == "0" || w.Status == "1"));
+                if (log != null)
+                {
+                    throw new Exception("璇ユ墭鐩樺凡鏈夊皬杞︾瓑寰呮墽琛屾垨姝e湪鎵ц鐨勪换鍔�!");
+                }                
                 var stockDetail = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.PalletNo == palletNo);
                 if (stockDetail == null)
                 {
@@ -1002,6 +1007,12 @@
             }
             try
             {
+                var log = Db.Queryable<LogTask>().First(w => w.IsDel == "0" && w.PalletNo == palletNo && (w.Status == "0" || w.Status == "1"));
+                if (log != null)
+                {
+                    throw new Exception("璇ユ墭鐩樺凡鏈夊皬杞︾瓑寰呮墽琛屾垨姝e湪鎵ц鐨勪换鍔�!");
+                }
+
                 var notice = Db.Queryable<BllExportNotice>().First(w => w.IsDel == "0" && w.SONo == soNo);
                 if (notice == null)
                 {
diff --git a/Wms/WMS.BLL/DataServer/StockServer.cs b/Wms/WMS.BLL/DataServer/StockServer.cs
index b2012da..5327b92 100644
--- a/Wms/WMS.BLL/DataServer/StockServer.cs
+++ b/Wms/WMS.BLL/DataServer/StockServer.cs
@@ -135,11 +135,15 @@
             {
                 str += " and detail.LotNo = @lotno";
             }
+            if (!string.IsNullOrEmpty(skuNo) && string.IsNullOrEmpty(lotNo))
+            {
+                str += " and detail.LotNo = ''";
+            }
             //鍒ゆ柇鍌ㄤ綅鍦板潃鏄惁涓虹┖
             if (!string.IsNullOrEmpty(locatNo))
             {
                 str += " and detail.LocatNo = @locatno";
-            }
+            }            
             //鍒ゆ柇鎵樼洏鏉$爜鏄惁涓虹┖
             if (!string.IsNullOrEmpty(palletNo))
             {
diff --git a/Wms/WMS.Entity/DataEntity/DataStockDetail.cs b/Wms/WMS.Entity/DataEntity/DataStockDetail.cs
index ccd3218..e839ce4 100644
--- a/Wms/WMS.Entity/DataEntity/DataStockDetail.cs
+++ b/Wms/WMS.Entity/DataEntity/DataStockDetail.cs
@@ -47,6 +47,20 @@
         public string OwnerName { get; set; }
 
         /// <summary>
+        /// Desc:渚涘簲鍟嗙紪鍙�
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string SupplierNo { get; set; }
+
+        /// <summary>
+        /// Desc:渚涘簲鍟嗗悕绉�
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string SupplierName { get; set; }
+
+        /// <summary>
         /// Desc:鐗╂枡缂栫爜
         /// Default:
         /// Nullable:True

--
Gitblit v1.8.0