From 225d1bcc777149a5cad91e1376473e00fec9ff4c Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期五, 23 五月 2025 14:23:17 +0800
Subject: [PATCH] 修改问题

---
 Wms/WMS.BLL/HttpServer.cs                               |   19 ++++++++-
 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs           |    3 +
 Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs         |    2 +
 Pda/View/SoSetting/ExNoticeOut.html                     |   59 +++++++++++++----------------
 Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs |    9 ++++
 Wms/Wms/Controllers/DownApiController.cs                |    2 
 6 files changed, 57 insertions(+), 37 deletions(-)

diff --git a/Pda/View/SoSetting/ExNoticeOut.html b/Pda/View/SoSetting/ExNoticeOut.html
index 46e0d74..09b6c98 100644
--- a/Pda/View/SoSetting/ExNoticeOut.html
+++ b/Pda/View/SoSetting/ExNoticeOut.html
@@ -221,22 +221,22 @@
                             
                             if (i == 0) {
                                 if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
-                                    $("#goodSelect").append('<option value =' + res.data[i].SoDetailId + '-' + i + ' selected>' + res.data[i]
+                                    $("#goodSelect").append('<option value =' + res.data[i].SoDetailId + ' selected>' + res.data[i]
                                         .SkuName +
                                         '</option>');
                                 } else {
-                                    $("#goodSelect").append('<option value =' + res.data[i].SoDetailId + '-' + i + ' selected>' + res.data[i]
+                                    $("#goodSelect").append('<option value =' + res.data[i].SoDetailId + ' selected>' + res.data[i]
                                         .SkuName + "-" + res.data[i].LotNo +
                                         '</option>');
                                 }
 
                             } else {
                                 if (res.data[i].LotNo == '' || res.data[i].LotNo == null) {
-                                    $("#goodSelect").append('<option value =' + res.data[i].ISoDetailIdd + '-' + i + '>' + res.data[i]
+                                    $("#goodSelect").append('<option value =' + res.data[i].ISoDetailIdd+ i + '>' + res.data[i]
                                         .SkuName +
                                         '</option>');
                                 } else {
-                                    $("#goodSelect").append('<option value =' + res.data[i].SoDetailId + '-' + i + '>' + res.data[i]
+                                    $("#goodSelect").append('<option value =' + res.data[i].SoDetailId+ '>' + res.data[i]
                                         .SkuName + "-" + res.data[i].LotNo +
                                         '</option>');
                                 }
@@ -264,38 +264,33 @@
  
  
 			form.on('submit(formBind)', function (data) {
-
-				if (!$("#PalletNo").val()) {
-					layer.msg('璇锋壂鎻忔墭鐩樻潯鐮�', {
-						icon: 2,
-						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-					});
-					return;
-				}
-
+ 
 				var param = {
 					SoNo: $("#bar").val(),
-					PalletNo: $("#PalletNo").val(),
+					soDetailId: $("#goodSelect").val(),
+					outMode:$("#endSelect").val(),
 				}
-				// sendData(IP + "/PdaSo/PlaneExportSuccess", param, 'get', function (res) {
-				// 	if (res.code == 0) { //鎴愬姛 
-				// 		layer.msg(res.msg, {
-				// 			icon: 1,
-				// 			time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-				// 		}, function () {
+				console.log(param);
+				
+				sendData(IP + "/DownApi/PDAIssueOut", param, 'get', function (res) {
+					if (res.Success == "0") { //鎴愬姛 
+						layer.msg(res.Message, {
+							icon: 1,
+							time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () {
 
-				// 			clearTable()
-				// 			$("#PalletNo").val('')
-				// 		});
-				// 	} else { //涓嶆垚鍔�
-				// 		layer.msg(res.msg, {
-				// 			icon: 2,
-				// 			time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-				// 		}, function () {
-				// 			//鍥炶皟
-				// 		});
-				// 	}
-				// });
+							// clearTable()
+							// $("#PalletNo").val('')
+						});
+					} else { //涓嶆垚鍔�
+						layer.msg(res.Message, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () {
+							//鍥炶皟
+						});
+					}
+				});
 				return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
 			}); 
 			//-------------------------------------------------------------------------------------------------
diff --git a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
index 33bac31..6075b7c 100644
--- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -611,6 +611,8 @@
                                 IsBelt = detailModel.IsBelt,
                                 SupplierLot = detailModel.SupplierLot,
                                 Status = "0",
+                                IsSampling = "0",
+                                InspectStatus = "0",
                                 Lot1 = detailModel.Lot1,
                                 Lot2 = detailModel.Lot2,
                                 UDF1 = detailModel.UDF1,
diff --git a/Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs b/Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs
index 74c2f51..330a533 100644
--- a/Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs
+++ b/Wms/WMS.BLL/BllQualityServer/InspectionRequestServer.cs
@@ -359,7 +359,14 @@
                         .Where(m => m.LocatNo == pallet.LocatNo && m.WareHouseNo == pallet.WareHouseNo 
                         && m.IsDel == "0").ToList().FirstOrDefault();
                     var Locats2 = Db.Queryable<SysStorageLocat>().Where(m => m.LocatNo == model.Code && m.IsDel == "0").ToList().FirstOrDefault();
-                    
+                    if (Locats2 == null)
+                    {
+                        throw new Exception("鐩爣鍌ㄤ綅閿欒");
+                    }
+                    if (Locats2.Status != "0")
+                    {
+                        throw new Exception("鐩爣鍌ㄤ綅鐘舵�佷笉鏄┖鍌ㄤ綅锛岃鏍稿疄");
+                    }
                     var taskNo2 = new Common().GetMaxNo("TK");
                     var exTask2 = new LogTask();    //鍑哄簱浠诲姟
                     exTask2.TaskNo = taskNo2;
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index c83fc82..507c75b 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -1014,10 +1014,11 @@
                     skuList = skuList.Where(m => m.SkuNo == "100088").ToList();
                 }
                 skuStrList = skuList.Select(m => m.SkuNo).ToList();
+                var areaStr = new List<string>() { "B02", "B05", "B08" };
                 var stockRst = new StockServer();
                 var stockDetailRst = new StockDetailServer();
                 Expression<Func<DataStockDetail, bool>> item = Expressionable.Create<DataStockDetail>()
-                    .And(it => it.WareHouseNo == house || string.IsNullOrWhiteSpace(it.LocatNo))
+                    .And(it => it.WareHouseNo == house || string.IsNullOrWhiteSpace(it.LocatNo) || (it.WareHouseNo == "W04" && !areaStr.Contains(it.AreaNo)))
                     .AndIF(!string.IsNullOrWhiteSpace(inspectStatus), it => inspectStatus.Contains(it.InspectStatus))
                     .And(m => skuStrList.Contains(m.SkuNo))
                     .AndIF(type == "6", m => m.OwnerNo == ownerNo)//浠e偍鍑哄簱闇�瑕佸叧鑱旇揣涓�
diff --git a/Wms/WMS.BLL/HttpServer.cs b/Wms/WMS.BLL/HttpServer.cs
index 0f5f9a3..b758081 100644
--- a/Wms/WMS.BLL/HttpServer.cs
+++ b/Wms/WMS.BLL/HttpServer.cs
@@ -1463,7 +1463,22 @@
                         str = "鍌ㄤ綅鎹熷潖涓嶈兘鍑哄簱";
                         return outDto1;
                     }
-
+                    if (locate.WareHouseNo != "W02")
+                    {
+                        str = "鎵樼洏涓嶅湪璐ф灦搴撲笂";
+                        return outDto1;
+                    }
+                    var locate2 = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == outModeLocate && m.IsDel == "0");//褰撳墠鍑哄簱鐨勭洰鏍囧偍浣嶄俊鎭�
+                    if (locate2 == null)
+                    {
+                        str = "鍑哄簱鐨勬墭鐩樺偍浣嶄俊鎭敊璇�(鍦ㄥ偍浣嶈〃涓湭鏌ヨ鍒�)";
+                        return outDto1;
+                    }
+                    else if (locate2.Status != "0")
+                    {
+                        str = "鐩爣鍌ㄤ綅鐘舵�佷笉鏄┖鍌ㄤ綅";
+                        return outDto1;
+                    }
                     #endregion
 
                     if (locate.Status == "1") //鏈夌墿鍝�
@@ -1614,7 +1629,7 @@
 
                             //瑙f瀽杩斿洖鏁版嵁 
                             var wcsModel = JsonConvert.DeserializeObject<WcsModel2>(response);
-                            if (wcsModel.code == 0)
+                            if (wcsModel.code == 200)
                             {
                                 //鏇存敼浠诲姟鐨勫彂閫佽繑鍥炴椂闂�//
                                 new TaskServer().EditTaskIssueOk(list2, time1, time2);
diff --git a/Wms/Wms/Controllers/DownApiController.cs b/Wms/Wms/Controllers/DownApiController.cs
index 5446a99..1e324c3 100644
--- a/Wms/Wms/Controllers/DownApiController.cs
+++ b/Wms/Wms/Controllers/DownApiController.cs
@@ -188,7 +188,7 @@
                 }
                 else if (house == "W02")
                 {
-                    var list = _exNoticeSvc.IssueOutHouseLk(soNo, outMode, int.Parse(userId), _config.WcsHost + _config.IssueComApiUrl, out string str);
+                    var list = _http.IssueOutHouseLk(soNo,soDetailId, outMode, int.Parse(userId), _config.WcsHost + _config.IssueComApiUrl, out string str);
 
                     return Ok(new HttpReturnModel { Success = "0", Message = str, Data = list});
                 }

--
Gitblit v1.8.0