From 157abc191c34e57c1b958ae74fc3de6518ca8a30 Mon Sep 17 00:00:00 2001 From: zhaowc <526854230@qq.com> Date: 星期五, 28 二月 2025 11:06:36 +0800 Subject: [PATCH] 修改客户需求 --- Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | 76 +++++++++++++++++++------------------ 1 files changed, 39 insertions(+), 37 deletions(-) diff --git a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs index d163829..8597905 100644 --- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs +++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs @@ -156,6 +156,7 @@ data.ProductionTime = boxInfo.ProductionTime!= null ? ((DateTime)boxInfo.ProductionTime).ToString("yyyy-MM-dd"):""; data.ExpirationTime = boxInfo.ExpirationTime != null ? ((DateTime)boxInfo.ExpirationTime).ToString("yyyy-MM-dd") : ""; data.StoreTime = boxInfo.StoreTime != null ? ((DateTime)boxInfo.StoreTime).ToString("yyyy-MM-dd") : ""; + } } } @@ -163,6 +164,7 @@ var labelQty = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNDetailNo == id).Sum(m => m.Qty); var qty = detail.Qty - labelQty; data.Qty = qty.ToString(); + data.SupplierLot = detail.SupplierLot; return data; } catch (Exception e) @@ -213,7 +215,7 @@ break; case "6"://浠e偍鍏ュ簱 skuType = "(0,1,2,3,4)"; - IsPack = 2; //涓嶈创 + //IsPack = 2; //涓嶈创 break; case "7"://瀵勫瓨鍏ュ簱 //skuType = "(3)"; @@ -1269,45 +1271,45 @@ }; #region 閫氳繃鎺ュ彛鍙戦�佽嚦erp 鎴� mes - //绯荤粺瀵规帴鍚庢斁寮� - var jsonData = JsonConvert.SerializeObject(asnInfo); - var mesList = new List<string>() { "0", "4" }; //0 鎴愬搧鍏ュ簱 4浣欐枡閫�鍥炲叆搴� - var erpList = new List<string>() { "1", "2", "3" }; //1 閲囪喘鍏ュ簱 2涓棿鍝佸叆搴� 3 閫�璐у叆搴� + ////绯荤粺瀵规帴鍚庢斁寮� + //var jsonData = JsonConvert.SerializeObject(asnInfo); + //var mesList = new List<string>() { "0", "4" }; //0 鎴愬搧鍏ュ簱 4浣欐枡閫�鍥炲叆搴� + //var erpList = new List<string>() { "1", "2", "3" }; //1 閲囪喘鍏ュ簱 2涓棿鍝佸叆搴� 3 閫�璐у叆搴� - if (mesList.Contains(notice.Type)) // mes - { - //鑾峰彇浠ょ墝 - //var token = new Token().GetMesToken(mesTokenUrl); //娴嬭瘯涓嶄娇鐢═OKEN锛屾寮忚繍琛屾椂鏀惧紑 - var token = ""; - Dictionary<string, string> mesDic = new Dictionary<string, string>() - { - {"Authorization",token } - }; - var mesData = new FinishAsnModel() - { - no = asnInfo.OrderCode, - qty = asnInfo.AsnDetails.Sum(m=>m.Qty) - }; - jsonData = JsonConvert.SerializeObject(mesData); - //璋冪敤鎺ュ彛 - var response = HttpHelper.DoPost(mesUrl, jsonData, "鍏ュ簱鍗曞畬鎴愪笂浼�", "MES", mesDic); + //if (mesList.Contains(notice.Type)) // mes + //{ + // //鑾峰彇浠ょ墝 + // //var token = new Token().GetMesToken(mesTokenUrl); //娴嬭瘯涓嶄娇鐢═OKEN锛屾寮忚繍琛屾椂鏀惧紑 + // var token = ""; + // Dictionary<string, string> mesDic = new Dictionary<string, string>() + // { + // {"Authorization",token } + // }; + // var mesData = new FinishAsnModel() + // { + // no = asnInfo.OrderCode, + // qty = asnInfo.AsnDetails.Sum(m=>m.Qty) + // }; + // jsonData = JsonConvert.SerializeObject(mesData); + // //璋冪敤鎺ュ彛 + // var response = HttpHelper.DoPost(mesUrl, jsonData, "鍏ュ簱鍗曞畬鎴愪笂浼�", "MES", mesDic); - var obj = JsonConvert.DeserializeObject<MesModel>(response);//瑙f瀽杩斿洖鏁版嵁 - if (obj.status != "success") - { - throw new Exception("涓婁紶澶辫触" + obj.message); - } - } - else if (erpList.Contains(notice.Type)) //erp - { - var response = HttpHelper.DoPost(erpUrl, jsonData, "鍏ュ簱鍗曞畬鎴愪笂浼�", "ERP"); + // var obj = JsonConvert.DeserializeObject<MesModel>(response);//瑙f瀽杩斿洖鏁版嵁 + // if (obj.status != "success") + // { + // throw new Exception("涓婁紶澶辫触" + obj.message); + // } + //} + //else if (erpList.Contains(notice.Type)) //erp + //{ + // var response = HttpHelper.DoPost(erpUrl, jsonData, "鍏ュ簱鍗曞畬鎴愪笂浼�", "ERP"); - var obj = JsonConvert.DeserializeObject<ErpModel>(response);//瑙f瀽杩斿洖鏁版嵁 - if (obj.Success != 0) - { - throw new Exception("涓婁紶澶辫触" + obj.Message); - } - } + // var obj = JsonConvert.DeserializeObject<ErpModel>(response);//瑙f瀽杩斿洖鏁版嵁 + // if (obj.Success != 0) + // { + // throw new Exception("涓婁紶澶辫触" + obj.Message); + // } + //} #endregion -- Gitblit v1.8.0