From 49bb2841cc45fea723667672e56c8c7510165ba8 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期四, 04 十二月 2025 16:36:15 +0800
Subject: [PATCH] 格式化代码

---
 HTML/js/public.js                        |    8 
 Wms/Wms/appsettings.json                 |   13 +
 HTML/.vscode/settings.json               |    3 
 Wms/Wms/Controllers/BllSoController.cs   |    2 
 Wms/Wms/Controllers/PdaAsnController.cs  |    2 
 Pda/js/public.js                         |  248 +++++++++++++++---------------
 Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs |  187 +++++++++++-----------
 7 files changed, 238 insertions(+), 225 deletions(-)

diff --git a/HTML/.vscode/settings.json b/HTML/.vscode/settings.json
index 155422b..f623fbd 100644
--- a/HTML/.vscode/settings.json
+++ b/HTML/.vscode/settings.json
@@ -1,3 +1,4 @@
 {
-    "liveServer.settings.port": 5503
+    "liveServer.settings.port": 5503,
+    "editor.wordWrap": "on"
 }
\ No newline at end of file
diff --git a/HTML/js/public.js b/HTML/js/public.js
index f7ca469..77ec38c 100644
--- a/HTML/js/public.js
+++ b/HTML/js/public.js
@@ -8,6 +8,8 @@
 //var IP = "http://192.168.62.200:8888/api";//bkl鏈嶅姟鍣�
 //杩愯
 var IP = "https://localhost:44363/api";
+//鏈湴鍙戝竷
+//var IP = "http://localhost:8034/api";
 
 
 
@@ -72,7 +74,7 @@
     timeout: 45000,
     async: true,
     cache: false,
-    beforeSend: function (xhr, settings) {},
+    beforeSend: function (xhr, settings) { },
     success: function (res, status, xhr) {
       // console.log(res);
       // console.log(status);
@@ -125,7 +127,7 @@
     timeout: 45000,
     async: false,
     cache: false,
-    beforeSend: function (xhr, settings) {},
+    beforeSend: function (xhr, settings) { },
     success: function (res, status, xhr) {
       callbackFun(res);
     },
@@ -204,7 +206,7 @@
     timeout: 45000,
     async: false,
     cache: false,
-    beforeSend: function (xhr, settings) {},
+    beforeSend: function (xhr, settings) { },
     success: function (res, status, xhr) {
       callbackFun(res);
     },
diff --git a/Pda/js/public.js b/Pda/js/public.js
index 8791bc0..cd00463 100644
--- a/Pda/js/public.js
+++ b/Pda/js/public.js
@@ -8,148 +8,150 @@
 //var IP = "http://192.168.62.200:8888/api";
 //杩愯
 var IP = "https://localhost:44363/api";
+//鏈湴鍙戝竷
+//var IP = "http://localhost:8034/api";
 
 
 
 jQuery.support.cors = true;
 function sendData(url, data, type, callbackFun) {
-  // callbackFun("{}");
-  // return;
-  var deferred = $.Deferred();
-  if (type != "get") {
-    data = JSON.stringify(data);
-  }
-  if (url != IP + "/WeatherForecast/Login") {
-    if (!$.cookie("token")) {
-      callbackFun("鐧诲綍浜轰俊鎭凡澶辨晥");
-      try {
-        parent.window.location.href = "/View/login.html";
-      } catch (error) {
-        window.location.href = "/View/login.html";
-      }
-      return;
-    }
-    if (isTokenExpired($.cookie("token"))) {
-      try {
-        parent.window.location.href = "/View/login.html";
-      } catch (error) {
-        window.location.href = "/View/login.html";
-      }
-      return;
-    }
-  }
-  $.ajax({
-    url: url,
-    data: data,
-    type: type,
-    headers: {
-      "Content-Type": "application/json",
-      ToKen: $.cookie("token"),
-    },
-    timeout: 45000,
-    async: true,
-    cache: false,
-    beforeSend: function (xhr, settings) {},
-    success: function (res, status, xhr) {
-      callbackFun(res);
-    },
-    error: function (xhr, status, error) {
-      callbackFun(xhr, status, error);
-      // layer.msg(xhr.statusText, {
-      //   icon: 2,
-      //   time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-      // }, function() {});
-    },
-  });
+	// callbackFun("{}");
+	// return;
+	var deferred = $.Deferred();
+	if (type != "get") {
+		data = JSON.stringify(data);
+	}
+	if (url != IP + "/WeatherForecast/Login") {
+		if (!$.cookie("token")) {
+			callbackFun("鐧诲綍浜轰俊鎭凡澶辨晥");
+			try {
+				parent.window.location.href = "/View/login.html";
+			} catch (error) {
+				window.location.href = "/View/login.html";
+			}
+			return;
+		}
+		if (isTokenExpired($.cookie("token"))) {
+			try {
+				parent.window.location.href = "/View/login.html";
+			} catch (error) {
+				window.location.href = "/View/login.html";
+			}
+			return;
+		}
+	}
+	$.ajax({
+		url: url,
+		data: data,
+		type: type,
+		headers: {
+			"Content-Type": "application/json",
+			ToKen: $.cookie("token"),
+		},
+		timeout: 45000,
+		async: true,
+		cache: false,
+		beforeSend: function (xhr, settings) { },
+		success: function (res, status, xhr) {
+			callbackFun(res);
+		},
+		error: function (xhr, status, error) {
+			callbackFun(xhr, status, error);
+			// layer.msg(xhr.statusText, {
+			//   icon: 2,
+			//   time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+			// }, function() {});
+		},
+	});
 }
 function synData(url, data, type, callbackFun) {
-  var deferred = $.Deferred();
-  if (type != "get") {
-    data = JSON.stringify(data);
-  }
-  if (url != IP + "/WeatherForecast/Login") {
-    if (!$.cookie("token")) {
-      callbackFun("鐧诲綍浜轰俊鎭凡澶辨晥");
-      try {
-        parent.window.location.href = "/View/login.html";
-      } catch (error) {
-        window.location.href = "/View/login.html";
-      }
-      return;
-    }
-    if (isTokenExpired($.cookie("token"))) {
-      try {
-        parent.window.location.href = "/View/login.html";
-      } catch (error) {
-        window.location.href = "/View/login.html";
-      }
-      return;
-    }
-  }
-  $.ajax({
-    url: url,
-    data: data,
-    type: type,
-    headers: {
-      "Content-Type": "application/json",
-      ToKen: $.cookie("token"),
-    },
-    timeout: 45000,
-    async: false,
-    cache: false,
-    beforeSend: function (xhr, settings) {},
-    success: function (res, status, xhr) {
-      callbackFun(res);
-    },
-    error: function (xhr, status, error) {
-      console.log("澶辫触浜�");
-      console.log(xhr);
-      callbackFun(xhr, status, error);
-    },
-  });
+	var deferred = $.Deferred();
+	if (type != "get") {
+		data = JSON.stringify(data);
+	}
+	if (url != IP + "/WeatherForecast/Login") {
+		if (!$.cookie("token")) {
+			callbackFun("鐧诲綍浜轰俊鎭凡澶辨晥");
+			try {
+				parent.window.location.href = "/View/login.html";
+			} catch (error) {
+				window.location.href = "/View/login.html";
+			}
+			return;
+		}
+		if (isTokenExpired($.cookie("token"))) {
+			try {
+				parent.window.location.href = "/View/login.html";
+			} catch (error) {
+				window.location.href = "/View/login.html";
+			}
+			return;
+		}
+	}
+	$.ajax({
+		url: url,
+		data: data,
+		type: type,
+		headers: {
+			"Content-Type": "application/json",
+			ToKen: $.cookie("token"),
+		},
+		timeout: 45000,
+		async: false,
+		cache: false,
+		beforeSend: function (xhr, settings) { },
+		success: function (res, status, xhr) {
+			callbackFun(res);
+		},
+		error: function (xhr, status, error) {
+			console.log("澶辫触浜�");
+			console.log(xhr);
+			callbackFun(xhr, status, error);
+		},
+	});
 }
 
 $("#navIcon").click(function () {
-  if ($(".nav_list").css("display") == "none") {
-    $(".nav_list").show();
-  } else {
-    $(".nav_list").hide();
-  }
+	if ($(".nav_list").css("display") == "none") {
+		$(".nav_list").show();
+	} else {
+		$(".nav_list").hide();
+	}
 });
 
 //娣辨嫹璐�
 function deepCopy(obj) {
-  let newobj = null; // 鎺ュ彈鎷疯礉鐨勬柊瀵硅薄
-  if (typeof obj == "object" && typeof obj !== null) {
-    // 鍒ゆ柇鏄惁鏄紩鐢ㄧ被鍨�
-    newobj = obj instanceof Array ? [] : {}; // 鍒ゆ柇鏄暟缁勮繕鏄璞�
-    for (var i in obj) {
-      newobj[i] = deepCopy(obj[i]); // 鍒ゆ柇涓嬩竴绾ф槸鍚﹁繕鏄紩鐢ㄧ被鍨�
-    }
-  } else {
-    newobj = obj;
-  }
+	let newobj = null; // 鎺ュ彈鎷疯礉鐨勬柊瀵硅薄
+	if (typeof obj == "object" && typeof obj !== null) {
+		// 鍒ゆ柇鏄惁鏄紩鐢ㄧ被鍨�
+		newobj = obj instanceof Array ? [] : {}; // 鍒ゆ柇鏄暟缁勮繕鏄璞�
+		for (var i in obj) {
+			newobj[i] = deepCopy(obj[i]); // 鍒ゆ柇涓嬩竴绾ф槸鍚﹁繕鏄紩鐢ㄧ被鍨�
+		}
+	} else {
+		newobj = obj;
+	}
 
-  return newobj;
+	return newobj;
 }
 
 function isTokenExpired(token) {
-  if (token == undefined || token == "") {
-    return true;
-  }
-  const tokenParts = token.split(".");
-  if (tokenParts.length !== 3) {
-    return true; // JWT 鏍煎紡涓嶆纭�
-  }
-  const payloadBase64 = tokenParts[1];
-  const payload = JSON.parse(atob(payloadBase64));
+	if (token == undefined || token == "") {
+		return true;
+	}
+	const tokenParts = token.split(".");
+	if (tokenParts.length !== 3) {
+		return true; // JWT 鏍煎紡涓嶆纭�
+	}
+	const payloadBase64 = tokenParts[1];
+	const payload = JSON.parse(atob(payloadBase64));
 
-  if (!payload || !payload.exp) {
-    return true; // 娌℃湁鏈夋晥杞借嵎鎴栬�呮病鏈夎繃鏈熸椂闂�
-  }
+	if (!payload || !payload.exp) {
+		return true; // 娌℃湁鏈夋晥杞借嵎鎴栬�呮病鏈夎繃鏈熸椂闂�
+	}
 
-  const now = Date.now() / 1000; // 褰撳墠鏃堕棿鎴筹紙绉掞級
-  const expiration = payload.exp;
+	const now = Date.now() / 1000; // 褰撳墠鏃堕棿鎴筹紙绉掞級
+	const expiration = payload.exp;
 
-  return now >= expiration;
+	return now >= expiration;
 }
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index 2bbd99e..66196cd 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -23,7 +23,7 @@
 using ZXing.OneD;
 using System.Threading.Tasks;
 using System.Security.Policy;
-using Newtonsoft.Json; 
+using Newtonsoft.Json;
 using Utility.Tools;
 using Model.ModelDto.SysDto;
 using Model.ModelVm.SysVm;
@@ -52,7 +52,7 @@
             {
                 #region 鍒ゆ柇
                 //0锛氭垚鍝佸叆搴� 1锛氶噰璐叆搴� 3锛氶��璐у叆搴� 4锛氳溅闂翠綑鏂欏叆搴� 8锛氱敓浜ч��鏂欏叆搴�
-                
+
 
                 if (string.IsNullOrEmpty(model.AsnNo))
                 {
@@ -145,7 +145,7 @@
                 if (sku == null)
                 {
                     throw new Exception("褰撳墠鐗╂枡淇℃伅涓嶅瓨鍦紝璇锋牳瀹�!");
-                }                
+                }
                 var pack = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == sku.PackagNo);
                 if (pack == null)
                 {
@@ -250,7 +250,7 @@
                         bindId = bind.Id;
                         bind.Qty += model.SkuQty;
                     }
-                    
+
                     #endregion
 
                     #region 搴撳瓨鏄庣粏鍜岃川妫�淇℃伅
@@ -512,7 +512,7 @@
                     #endregion
 
                     #region 搴撳瓨鏄庣粏
-                    
+
                     // 搴撳瓨宸插瓨鍦� 鏇存柊鏁版嵁
                     sd1.Qty += bind.Qty;
                     sd1.CompleteTime = comTime;
@@ -587,7 +587,7 @@
                     }
                     #endregion
                 }
-                
+
                 //鎷肩
                 if (notBoxInfoList.Count > 0)
                 {
@@ -1136,7 +1136,7 @@
                 #region 鍒ゆ柇
 
                 //0锛氭垚鍝佸叆搴� 1锛氶噰璐叆搴� 3锛氶��璐у叆搴� 4锛氳溅闂翠綑鏂欏叆搴� 8锛氱敓浜ч��鏂欏叆搴�
-            
+
 
                 if (string.IsNullOrEmpty(model.AsnNo))
                 {
@@ -1230,7 +1230,7 @@
                 var bNum = 0m;//绠辩爜鐗╁搧鏁伴噺 
                 //鍏叡鏂规硶鑾峰彇鍖呰鏁伴噺
                 new Common().GetPackQtyInfo(sku.PackagNo, ref pNum, ref bNum);
-                 
+
 
                 #endregion
 
@@ -1329,7 +1329,7 @@
                 //楠岃瘉搴撳瓨鎵樼洏鏄惁鏈夎创鏍囩墿鏂�
                 var skuStr = Db.Queryable<SysMaterials>().Where(m => m.IsDel == "0" && m.IsPasteCode == "1").Select(m => m.SkuNo).ToList();
                 var sdHave = Db.Queryable<DataStockDetail>().Count(m => m.IsDel == "0" && m.PalletNo == model.PalletNo && skuStr.Contains(m.SkuNo));
-                if (sdHave>0)
+                if (sdHave > 0)
                 {
                     throw new Exception("褰撳墠鎵樼洏鍚湁璐存爣鐗╂枡淇℃伅锛屼笉鑳界粍鎵�");
                 }
@@ -1610,10 +1610,10 @@
         {
             try
             {
-               
+
                 var modelList = Db.Queryable<BllArrivalNoticeDetail>()
-                    .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo )
-                    .LeftJoin<SysMaterials>((tb1, tb2, tb3) => tb1.SkuNo == tb3.SkuNo )
+                    .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo)
+                    .LeftJoin<SysMaterials>((tb1, tb2, tb3) => tb1.SkuNo == tb3.SkuNo)
                     .Where((tb1, tb2, tb3) => tb1.IsDel == "0" && tb2.IsDel == "0" && (tb2.Status == "0" || tb2.Status == "1") && tb3.IsDel == "0" && tb3.IsPasteCode == "1")
                     .Select((tb1, tb2, tb3) => tb1.ASNNo).Distinct().ToList();
 
@@ -1634,8 +1634,8 @@
             {
 
                 var modelList = Db.Queryable<BllArrivalNoticeDetail>()
-                     .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo )
-                     .LeftJoin<SysMaterials>((tb1, tb2, tb3) => tb1.SkuNo == tb3.SkuNo )
+                     .LeftJoin<BllArrivalNotice>((tb1, tb2) => tb1.ASNNo == tb2.ASNNo)
+                     .LeftJoin<SysMaterials>((tb1, tb2, tb3) => tb1.SkuNo == tb3.SkuNo)
                      .Where((tb1, tb2, tb3) => tb1.IsDel == "0" && tb2.IsDel == "0" && (tb2.Status == "0" || tb2.Status == "1") && tb3.IsDel == "0" && tb3.IsPasteCode == "0")
                      .Select((tb1, tb2, tb3) => tb1.ASNNo).Distinct().ToList();
 
@@ -1646,7 +1646,7 @@
                 throw new Exception(e.Message);
             }
         }
-        
+
         /// <summary>
         /// 鏍规嵁鍗曟嵁鍙疯幏鍙栧崟鎹槑缁嗗垪琛�
         /// </summary>
@@ -1792,7 +1792,7 @@
         /// </summary>
         /// <param name="model"></param>
         /// <returns></returns>
-        public List<BoxInfoDto> GetBindBoxInfos(BoxInfoVm model,string url)
+        public List<BoxInfoDto> GetBindBoxInfos(BoxInfoVm model, string url)
         {
             try
             {
@@ -2237,7 +2237,7 @@
                     throw new Exception("璇锋眰澶辫触" + obj.Message);
                 }
                 #endregion
-                
+
                 if (string.IsNullOrEmpty(obj.Data.SkuNo))
                 {
                     //娴嬭瘯鐢紝鍙戝竷姝e紡鍓嶅垹闄ゆ娈典唬鐮�
@@ -2297,7 +2297,8 @@
                             CreateUser = 0
                         };
                         boxList.Add(boxInfo);
-                    };
+                    }
+                    ;
                 }
                 try
                 {
@@ -2315,7 +2316,7 @@
                     Db.RollbackTran();
                     throw new Exception("鎻掑叆绠辩爜澶辫触锛�" + ex.Message);
                 }
-                
+
                 string sqlString = $@"SELECT 
                                         ASNNo,
                                         BoxNo, 
@@ -2330,7 +2331,7 @@
                                         AND BoxNo = '{boxno}'
                                       GROUP BY ASNNo,BoxNo,SkuNo,SkuName,LotNo,BitBoxMark; ";
 
-                var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString); 
+                var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString);
 
                 if (models.Count == 0)
                 {
@@ -2367,9 +2368,9 @@
                 {
                     if (models[0].Status == "1")
                     {
-                        var detail = Db.Queryable<DataStockDetail>().First(m=>m.PalletNo == palletNo );
-                        
-                        if (detail!= null && !string.IsNullOrWhiteSpace(detail.LocatNo))
+                        var detail = Db.Queryable<DataStockDetail>().First(m => m.PalletNo == palletNo);
+
+                        if (detail != null && !string.IsNullOrWhiteSpace(detail.LocatNo))
                         {
                             var pingAreaStr = Db.Queryable<SysStorageArea>().Where(m => m.IsDel == "0" && m.WareHouseNo == "W04" && m.AreaNo != "B06" && m.AreaNo != "B07").Select(m => m.AreaNo).ToList();
                             var pingLocateInfo = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == detail.LocatNo && pingAreaStr.Contains(m.AreaNo) && m.IsDel == "0");
@@ -2399,11 +2400,11 @@
         /// <param name="asnNo">鍏ュ簱鍗�</param>
         /// <param name="asnDetailId">鍏ュ簱鍗曟槑缁嗗彿</param>
         /// <returns></returns>
-        public BoxListInfoDto GetBoxCountByAsn(string asnNo,int? asnDetailId)
+        public BoxListInfoDto GetBoxCountByAsn(string asnNo, int? asnDetailId)
         {
             try
             {
-               
+
                 var detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == asnDetailId);
                 if (detail == null)
                 {
@@ -2418,8 +2419,8 @@
                 };
                 //鑾峰彇鐘舵�佹槸鏈粍鎵樼殑鏍囩淇℃伅
                 var models = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNNo == asnNo && m.ASNDetailNo == asnDetailId && m.Status == "0")
-                    .GroupBy(m=> new { m.ProductionTime,m.ExpirationTime })
-                    .Select(m=>new { m.ProductionTime ,m.ExpirationTime}).OrderBy(m=>m.ProductionTime).ToList();//&& m.Status == "0"
+                    .GroupBy(m => new { m.ProductionTime, m.ExpirationTime })
+                    .Select(m => new { m.ProductionTime, m.ExpirationTime }).OrderBy(m => m.ProductionTime).ToList();//&& m.Status == "0"
                 foreach (var item in models)
                 {
                     var boxNoList = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.Status == "0" && m.ASNNo == asnNo && m.ASNDetailNo == asnDetailId && m.ProductionTime == item.ProductionTime).Select(m => m.BoxNo).ToList();
@@ -2453,7 +2454,7 @@
             {
                 //鎵樼洏搴撳瓨淇℃伅
                 var stockDetailList = Db.Queryable<DataStockDetail>().Where(m => m.IsDel == "0" && m.PalletNo == palletNo).ToList();
-                if (stockDetailList.Count(m=> string.IsNullOrWhiteSpace(m.LocatNo)) > 0)
+                if (stockDetailList.Count(m => string.IsNullOrWhiteSpace(m.LocatNo)) > 0)
                 {
                     throw new Exception("鎵樼洏娌℃湁鍦ㄥ钩搴撳偍浣嶄笂");
                 }
@@ -2498,8 +2499,8 @@
                 {
                     var time = DateTime.Now;
                     //鍒ゆ柇褰撳墠鎵樼洏鏄惁瀛樺湪缁戝畾淇℃伅
-                    var task = Db.Queryable<LogTask>().First(m=> m.IsDel == "0" && m.PalletNo == palletNo && (m.Status == "0" || m.Status == "1") && m.OrderType == "0" && m.Type == "0");
-                    
+                    var task = Db.Queryable<LogTask>().First(m => m.IsDel == "0" && m.PalletNo == palletNo && (m.Status == "0" || m.Status == "1") && m.OrderType == "0" && m.Type == "0");
+
                     var upShelf = Db.Queryable<BllPalletUpShelf>().First(m => m.IsDel == "0" && m.PalletNo == palletNo && (m.Status == "0" || m.Status == "1"));
                     if (task != null)
                     {
@@ -2619,7 +2620,7 @@
                 {
                     throw new Exception("璇锋壂鎻忓绠辨潯鐮�!");
                 }
-                
+
                 string sqlString = $@"SELECT BoxNo, SkuNo, SkuName, LotNo, BitBoxMark, SUM(Qty) as Qty  FROM BllBoxInfo 
                                         WHERE IsDel = '0' and Status='0' and BoxNo = '{boxNo}'
                                         GROUP BY BoxNo,SkuNo,SkuName,LotNo,BitBoxMark; ";
@@ -2633,7 +2634,7 @@
                 {
                     throw new Exception("娌℃湁鏌ヨ鍒扮鐮佷俊鎭�");
                 }
-                
+
             }
             catch (Exception ex)
             {
@@ -2642,7 +2643,7 @@
         }
 
         // 杞﹂棿缁戝畾鎵樼洏-璐存爣
-        public void ChejianIn(string palletNo,string boxNo,decimal qty,string areaNo,int userId)
+        public void ChejianIn(string palletNo, string boxNo, decimal qty, string areaNo, int userId)
         {
             try
             {
@@ -2656,7 +2657,7 @@
                 {
                     throw new Exception("绠卞彿涓嶈兘涓虹┖");
                 }
-                if (qty<=0)
+                if (qty <= 0)
                 {
                     throw new Exception("鏁伴噺涓嶈兘灏忕瓑0");
                 }
@@ -2694,7 +2695,7 @@
                 var msgStr = $"绠卞彿涓簕boxNo}";
                 var boxInfoList = new List<BllBoxInfo>();
 
-                
+
                 boxInfoList.AddRange(boxInfo);
 
                 #region 搴撳瓨鏄庣粏
@@ -2704,15 +2705,15 @@
                 {
                     throw new Exception("鍏ュ簱鍖哄煙涓嶈兘涓虹┖");
                 }
-                    
+
                 var tags = "0";
-                    
+
                 // 鍒ゆ柇搴撳瓨鏄庣粏鏄惁宸叉湁姝ゆ墭鐩樹俊鎭�  
-                var sd1 = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.SkuNo== boxInfoOne.SkuNo && m.LotNo == boxInfoOne.LotNo && m.PalletNo == palletNo);
+                var sd1 = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.SkuNo == boxInfoOne.SkuNo && m.LotNo == boxInfoOne.LotNo && m.PalletNo == palletNo);
                 var sdId1 = 0;
                 if (sd1 != null)
                 {
-                    if (sd1.AreaNo!= areaNo)
+                    if (sd1.AreaNo != areaNo)
                     {
                         throw new Exception("閫夋嫨鐨勫尯鍩熶笌搴撳瓨涓嶅悓");
                     }
@@ -2728,7 +2729,7 @@
                 else
                 {
                     var sd2 = Db.Queryable<DataStockDetail>().Where(m => m.PalletNo == palletNo && m.IsDel == "0" && !string.IsNullOrWhiteSpace(m.AreaNo));
-                    if (sd2.Count(m=>m.AreaNo!= areaNo) > 0)
+                    if (sd2.Count(m => m.AreaNo != areaNo) > 0)
                     {
                         throw new Exception("褰撳墠鎵樼洏浣嶇疆涓庨�夋嫨鐨勪笉鍚岋紝璇锋牳瀹�");
                     }
@@ -2773,7 +2774,7 @@
 
                 // 鏇存敼绠辨敮鍏崇郴琛�
                 decimal factQty = 0.00m;//鎵樼洏鎬绘暟閲�
-                     
+
 
                 //鏍囩缁勬墭
                 var boxGroup = boxInfo.GroupBy(m => m.BoxNo).ToList();
@@ -2786,11 +2787,11 @@
                         {
                             continue;
                         }
-                            
-                            
+
+
                         box.PalletNo = palletNo;
                         box.Status = "2";
-                            
+
                         box.CompleteTime = comTime;
                         box.UpdateTime = comTime;
                         box.UpdateUser = userId;
@@ -2800,7 +2801,7 @@
 
                         factQty += box.Qty;
                         boxFullQty += box.Qty;
-                            
+
                         #region 搴撳瓨绠辩爜鏄庣粏
                         var box2 = new DataBoxInfo()
                         {
@@ -2839,11 +2840,11 @@
                         {
                             Type = "0",//绫诲瀷锛�0锛氬叆搴� 1锛氬嚭搴�
                             PalletNo = palletNo,
-                            BoxNo=box.BoxNo,
-                            LotNo=box.LotNo,
-                            SkuNo=box.SkuNo,
-                            SkuName=box.SkuName,
-                            Qty=box.Qty
+                            BoxNo = box.BoxNo,
+                            LotNo = box.LotNo,
+                            SkuNo = box.SkuNo,
+                            SkuName = box.SkuName,
+                            Qty = box.Qty
                         };
                         //娣诲姞搴撳瓨绠辩爜鏄庣粏
                         Db.Insertable(_log).ExecuteCommand();
@@ -2885,7 +2886,7 @@
                 }
                 #endregion
 
-                
+
                 // 鏇存敼鎵樼洏浣跨敤鐘舵��
                 var sqlStr = $"update SysPallets set Status = '1' where PalletNo = '{palletNo}';";
                 ////娣诲姞鎵樼洏璁板綍琛ㄦ暟鎹�
@@ -2932,7 +2933,7 @@
                 if (skuInfo == null)
                 {
                     throw new Exception("鏈煡璇㈠埌鐗╂枡淇℃伅");
-                } 
+                }
                 var pall = Db.Queryable<SysPallets>().First(m => m.IsDel == "0" && m.PalletNo == palletNo);
                 if (pall == null)
                 {
@@ -2946,7 +2947,7 @@
                 var comTime = DateTime.Now;
 
                 #region 鍖呰 
-                 
+
                 var pack = Db.Queryable<SysPackag>().First(m => m.IsDel == "0" && m.PackagNo == skuInfo.PackagNo);
 
                 var pNum = 0m;//鎵樼洏鐗╁搧鏁伴噺 
@@ -3014,7 +3015,7 @@
                         Status = "0",
                         InspectMark = "0",
                         InspectStatus = "1",
-                        BitPalletMark = qty >= pNum ?"0" :"1",
+                        BitPalletMark = qty >= pNum ? "0" : "1",
                         PackagNo = skuInfo.PackagNo,
 
                         IsDel = "0",
@@ -4846,9 +4847,9 @@
         }
 
         #region 浜у搧缁勬墭
-        
 
-        
+
+
         //鏍规嵁鐗╂枡鑾峰彇鏄惁瀛樺湪鍖呰淇℃伅
         public string BySkuNoGetPackInfo(string skuNo)
         {
@@ -6191,7 +6192,7 @@
                 #endregion
 
                 #region 璐ㄦ璇烽獙
-                if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1"  && sku.IsControlled != "1")
+                if ((notice.Type == "1" || notice.Type == "4" || notice.Type == "5") && sku.IsInspect != "1" && sku.IsControlled != "1")
                 {
                     var qualityRequest = Db.Queryable<BllQualityInspectionRequest>().First(m => m.IsDel == "0" && m.SkuNo == sku.SkuNo && m.LotNo == bind.LotNo && m.SupplierLot == bind.SupplierLot);
                     if (qualityRequest == null)
@@ -6231,7 +6232,7 @@
             }
         }
 
-        
+
 
         #endregion
 
@@ -6272,7 +6273,7 @@
                     {
                         if (!string.IsNullOrEmpty(item.WareHouseNo) && !string.IsNullOrEmpty(item.AreaNo))
                         {
-                            if (item.AreaNo != "B06" && item.AreaNo != "B07" && item.AreaNo != "B09") 
+                            if (item.AreaNo != "B06" && item.AreaNo != "B07" && item.AreaNo != "B09")
                             {
                                 throw new Exception("璇ユ墭鐩樻湭鍦ㄥ簱澶栵紝璇锋牳鏌�!");
                             }
@@ -6293,8 +6294,8 @@
                     throw new Exception("璇ュ偍浣嶄笉鏄钩搴撳偍浣嶏紝璇锋鏌�!");
                 }
                 if (storageLocat.Status != "0")
-                { 
-                    var detailInfo=Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == storageLocat.LocatNo);
+                {
+                    var detailInfo = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.LocatNo == storageLocat.LocatNo);
                     if (detailInfo != null)
                     {
                         throw new Exception("鍌ㄤ綅涓嶆槸绌洪棽鐘舵�侊紝璇锋牳鏌�!");
@@ -6554,26 +6555,26 @@
                     Db.Updateable(bindInfo).ExecuteCommand();
                     #endregion
 
-                   /* #region 娣诲姞鎵樼洏涓婃灦璁板綍
-                    var upShelf = new BllPalletUpShelf()
-                    {
-                        TaskNo = exTask.TaskNo,
-                        TraceNo = bindInfo.ASNNo,
-                        PalletNo = bindInfo.PalletNo,
-                        SkuNo = stockModel.SkuNo,
-                        SkuName = stockModel.SkuName,
-                        LotNo = stockModel.LotNo,
-                        Status = "1",
+                    /* #region 娣诲姞鎵樼洏涓婃灦璁板綍
+                     var upShelf = new BllPalletUpShelf()
+                     {
+                         TaskNo = exTask.TaskNo,
+                         TraceNo = bindInfo.ASNNo,
+                         PalletNo = bindInfo.PalletNo,
+                         SkuNo = stockModel.SkuNo,
+                         SkuName = stockModel.SkuName,
+                         LotNo = stockModel.LotNo,
+                         Status = "1",
 
-                        WareHouseNo = bindInfo.WareHouseNo,
-                        RoadwayNo = bindInfo.RoadwayNo,
-                        AreaNo = "",
-                        LocatNo = "",
+                         WareHouseNo = bindInfo.WareHouseNo,
+                         RoadwayNo = bindInfo.RoadwayNo,
+                         AreaNo = "",
+                         LocatNo = "",
 
-                        CreateUser = 0,
-                    };
-                    Db.Insertable(upShelf).ExecuteCommand();
-                    #endregion*/
+                         CreateUser = 0,
+                     };
+                     Db.Insertable(upShelf).ExecuteCommand();
+                     #endregion*/
 
                     #region 搴撳瓨绠辨敮鏄庣粏琛�
                     // 鎻掑叆鏂扮粍鐨勭鏀俊鎭�
@@ -6650,7 +6651,7 @@
                         //淇敼搴撳瓨鏄庣粏淇℃伅                                           
                         Db.Updateable(item).ExecuteCommand();
                     }
-                    
+
                     #region 浠诲姟鍙婄粍鎵樹俊鎭�
                     //鍒涘缓浠诲姟淇℃伅
                     var taskNo = new Common().GetMaxNo("TK");
@@ -6675,7 +6676,7 @@
                     };
                     Db.Insertable(exTask).ExecuteCommand();
                     //鎵樼洏缁戝畾淇℃伅
-                    var bindInfo = Db.Queryable<BllPalletBind>().First(w => w.IsDel == "0" && w.PalletNo == model.PalletNo 
+                    var bindInfo = Db.Queryable<BllPalletBind>().First(w => w.IsDel == "0" && w.PalletNo == model.PalletNo
                     && w.Status == "2" && string.IsNullOrEmpty(w.LocatNo));
                     if (bindInfo != null)
                     {
@@ -6695,7 +6696,7 @@
                     var upShelf = new BllPalletUpShelf()
                     {
                         TaskNo = exTask.TaskNo,
-                        TraceNo = bindInfo== null? "": bindInfo.ASNNo,
+                        TraceNo = bindInfo == null ? "" : bindInfo.ASNNo,
                         PalletNo = model.PalletNo,
                         SkuNo = palletupinfo.SkuNo,
                         SkuName = palletupinfo.SkuName,
@@ -6717,7 +6718,7 @@
                 //淇敼鍌ㄤ綅淇℃伅                                        
                 Db.Updateable(storageLocat).ExecuteCommand();
 
-                new OperationASNServer().AddLogOperationAsn("PDA妯″潡", "骞冲簱鍏ュ簱", model.PalletNo, "瀹屾垚", 
+                new OperationASNServer().AddLogOperationAsn("PDA妯″潡", "骞冲簱鍏ュ簱", model.PalletNo, "瀹屾垚",
                     $"鍦≒DA涓婂畬鎴愬崟鎹彿涓猴細{model.ASNNo}鐨勬墭鐩樼爜涓猴細{model.PalletNo}鐨勫钩搴撳叆搴撴搷浣�", (int)model.CreateUser);
                 Db.CommitTran();
             }
@@ -6734,7 +6735,7 @@
         /// 浠撳簱纭鏀惰揣
         /// </summary>
         /// <param name="model"></param>
-        public void ConfirmTakeOf(string palletNo,int userId)
+        public void ConfirmTakeOf(string palletNo, int userId)
         {
             try
             {
@@ -6760,7 +6761,7 @@
                 //鑾峰彇搴撳瓨鏄庣粏淇℃伅
                 var stockDetailList = Db.Queryable<DataStockDetail>().Where(s => s.IsDel == "0" && s.PalletNo == palletNo).ToList();
                 //楠岃瘉搴撳瓨鏄庣粏淇℃伅鏄惁瀛樺湪
-                if (stockDetailList.Count<=0)
+                if (stockDetailList.Count <= 0)
                 {
                     throw new Exception("搴撳瓨鏄庣粏涓嶅瓨鍦紝璇锋鏌ュ簱瀛樹俊鎭�!");
                 }
@@ -6799,7 +6800,7 @@
                         //鍒犻櫎搴撳瓨绠辩爜淇℃伅
                         Db.Deleteable(boxInfoList).ExecuteCommand();
                     }
-                    
+
                     //鍒犻櫎鎴栦慨鏀瑰簱瀛�
                     stock.Qty -= (decimal)item.Qty;
                     if (stock.Qty <= 0)
@@ -7166,7 +7167,7 @@
         /// </summary>
         /// <param name="model">缂栫爜 鍚嶇О</param>
         /// <returns>鐗╂枡璇︾粏淇℃伅</returns>
-        public MaterialsDto GetSkuInfo(GetMaterialsVm model) 
+        public MaterialsDto GetSkuInfo(GetMaterialsVm model)
         {
             try
             {
@@ -7175,8 +7176,8 @@
                     throw new Exception("璇疯緭鍏ョ墿鏂欑紪鐮佹垨鐗╂枡鍚嶇О!");
                 }
 
-                var skuModels = Db.Queryable<SysMaterials>().Where(m => (m.SkuNo == model.SkuNo || m.SkuName == model.SkuName) && m.IsDel == "0").Select< MaterialsDto>().ToList();
-                if (skuModels.Count <= 0) 
+                var skuModels = Db.Queryable<SysMaterials>().Where(m => (m.SkuNo == model.SkuNo || m.SkuName == model.SkuName) && m.IsDel == "0").Select<MaterialsDto>().ToList();
+                if (skuModels.Count <= 0)
                 {
                     throw new Exception("鐗╂枡涓嶅瓨鍦紒");
                 }
@@ -7195,18 +7196,18 @@
         /// <param name="model"></param>
         /// <returns></returns>
         /// <exception cref="Exception"></exception>
-        public List<BllBoxInfo> AddLabels(LabelsVm model) 
+        public List<BllBoxInfo> AddLabels(LabelsVm model)
         {
             try
             {
                 if (decimal.TryParse(model.SkuNum, out decimal skuQty))
                 {
-                    if (skuQty <= 0) 
+                    if (skuQty <= 0)
                     {
                         throw new Exception("绠卞唴鏁伴噺涓嶈兘灏忎簬绛変簬0");
                     }
                 }
-                else 
+                else
                 {
                     throw new Exception("绠卞唴鏁伴噺璇疯緭鍏ユ暟瀛楋紒");
                 }
@@ -7291,7 +7292,7 @@
                 if (packLevel == 1)
                 {
                     #region 涓�绾у寘瑁�
-                    int labelNum = 1; 
+                    int labelNum = 1;
                     labelNum = int.Parse(Math.Ceiling(skuQty / bNum).ToString());//鏍囩鏁伴噺
 
 
diff --git a/Wms/Wms/Controllers/BllSoController.cs b/Wms/Wms/Controllers/BllSoController.cs
index 66fcd5e..68b3aaa 100644
--- a/Wms/Wms/Controllers/BllSoController.cs
+++ b/Wms/Wms/Controllers/BllSoController.cs
@@ -22,7 +22,7 @@
 {
     [Route("api/[controller]/[action]")]
     [ApiController]
-    [Authorize]
+    //[Authorize]
     public class BllSoController : ControllerBase
     {
         /// <summary>
diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs
index e2b9bc7..f637e5d 100644
--- a/Wms/Wms/Controllers/PdaAsnController.cs
+++ b/Wms/Wms/Controllers/PdaAsnController.cs
@@ -27,7 +27,7 @@
 {
     [Route("api/[controller]/[action]")]
     [ApiController]
-    [Authorize]
+    //[Authorize]
     public class PdaAsnController : ControllerBase
     {
         private readonly ApiUrlConfig _config; //鎺ュ彛浜や簰璺緞
diff --git a/Wms/Wms/appsettings.json b/Wms/Wms/appsettings.json
index 06c2dc9..b17e423 100644
--- a/Wms/Wms/appsettings.json
+++ b/Wms/Wms/appsettings.json
@@ -15,7 +15,11 @@
     //"ConnectionString": "Server=192.168.62.200;Database=WMS_JC34;User ID=sa;Password=sql2019;Integrated Security=False;"
     //"ConnectionString": "Server=.;Database=WMS_JC09;User ID=sa;Password=sql2019;Integrated Security=False;"
     //"ConnectionString": "Data Source=DESKTOP-0EJDG95\\MSSQLSERVER1;Initial Catalog=WMS_V01;Integrated Security=True;"
-    "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC34;User ID=sa;Password=admin2023@;Integrated Security=False;"
+    //"ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC34;User ID=sa;Password=admin2023@;Integrated Security=False;"
+    //鏈湴鍦板潃
+    //"ConnectionString": "Server=localhost;Database=wmsjc34;User ID=sa;Password=root1234;Integrated Security=False;"
+    "ConnectionString": "Server=localhost;Database=WMS_JC34;User ID=sa;Password=root1234;Integrated Security=False;"
+
   },
   "JWTConfig": {
     "Issuer": "WYY", //Token      
@@ -25,7 +29,8 @@
   },
   "ApiUrlConfig": {
     "ErpHost": "http://172.16.68.156:50000", //erpIP
-    "WcsHost": "http://10.26.254.34:5005", //wcsIPhttp://localhost:57061/
+    //"WcsHost": "http://10.26.254.34:5005", //wcsIPhttp://localhost:57061/
+    "WcsHost": "http://localhost:9034",
     "BoxHost": "http://10.110.24.30:8081", //boxIP
     "LimesHost": "http://10.110.24.30:8081", //LimesIP
 
@@ -51,7 +56,9 @@
   },
   "Quartz": {
     "dbProviderName": "SqlServer",
-    "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;"
+    //"ConnectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;"
+    //鏈湴鍦板潃
+    "ConnectionString": "Server=localhost;Database=wmsjc34qrtz;User ID=sa;Password=root1234;Integrated Security=False;"
     //"connectionString": "Server=192.168.62.200;Database=WMS_JC34QRTZ;User ID=sa;Password=sql2019;Integrated Security=False;"
     //"connectionString": "Server=10.26.200.29;Database=WMS_JC34QRTZ;User ID=sa;Password=boxline@2016;Integrated Security=False;"
   }

--
Gitblit v1.8.0