From cd8800f471c9d7ee62dd915c4407f809638471af Mon Sep 17 00:00:00 2001 From: yuyou_x <2336760928@qq.com> Date: 星期六, 16 三月 2024 11:01:24 +0800 Subject: [PATCH] 调整储位图例 有移入移除状态 整排不显示 --- Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 73 ++++++++++++++++++++++++++++++------ 1 files changed, 60 insertions(+), 13 deletions(-) diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs index 93f165c..e49379c 100644 --- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs +++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs @@ -141,6 +141,7 @@ SupplierLot = stocks.First().SupplierLot, IsWave = "0", WaveNo = "", + IsIssueLotNo = string.IsNullOrWhiteSpace(d.LotNo)? "0":"1", CreateUser = 0, }; @@ -330,42 +331,60 @@ } } - public List<ExStockInfoDto> GetStockGroupList(string type, string msg) + public List<ExStockInfoDto> GetStockGroupList(string type, string ownerNo, string msg) { try { + if (string.IsNullOrEmpty(type)) + { + throw new Exception("璇烽�夋嫨鍑哄簱鍗曠被鍨�"); + } + if (type == "6" && string.IsNullOrEmpty(ownerNo)) + { + throw new Exception("浠e偍鍗曟嵁璇烽�夋嫨璐т富"); + } var plnList = new List<string>() { "100099" }; var skuList = new List<string>(); var sku = Db.Queryable<SysMaterials>().Where(m => m.IsDel == "0" && !plnList.Contains(m.SkuNo)); //鎺掗櫎绌烘墭鐩樼殑鐗╂枡闆嗗悎 string skuType = string.Empty; + string inspectStatus = string.Empty; switch (type)//0锛氬師鏂� 1锛氬寘鏉� 2锛氭垚鍝� 3锛氳�楁潗 4锛氬崐鎴愬搧 { - case "0"://鎴愬搧鍏ュ簱 + case "0"://鎴愬搧鍑哄簱 skuType = "(2)"; + inspectStatus = "1"; break; case "1"://棰嗘枡鍑哄簱 skuType = "(0,1,3)"; + inspectStatus = "1"; break; case "2"://鎶芥鍑哄簱 - skuType = "(2)"; + skuType = "(0,1,2,3)"; + inspectStatus = "0,1,2"; break; case "3"://鐗╂枡鍙栨牱鍑哄簱 - skuType = "(0)"; + skuType = "(0,1,2,3)"; + inspectStatus = "0"; break; case "4"://涓嶅悎鏍煎搧鍑哄簱 - skuType = "(2)"; + skuType = "(0,1,2,3)"; + inspectStatus = "2"; break; case "5"://涓棿鍝佸嚭搴� skuType = "(4)"; + inspectStatus = "0,1"; break; case "6"://浠e偍鍑哄簱 - skuType = "(2)"; + skuType = "(0,1,2,3)"; + inspectStatus = "0,1"; break; case "8"://瀵勫瓨鍑哄簱 - skuType = "(3)"; + skuType = "(0,1,2,3)"; + inspectStatus = "0,1"; break; default: //鍏跺畠鍑哄簱 skuType = "(0,1,2,3,4)"; + inspectStatus = "0,1"; break; } skuList = sku.Where(m => skuType.Contains(m.Type)).Select(m => m.SkuNo).ToList(); @@ -378,8 +397,9 @@ var stockDetailRst = new StockDetailServer(); Expression<Func<DataStockDetail, bool>> item = Expressionable.Create<DataStockDetail>() //.And(it => it.WareHouseNo == wareHouseNo) - .And(it => it.InspectStatus == "1") + .AndIF(!string.IsNullOrWhiteSpace(inspectStatus), it => inspectStatus.Contains(it.InspectStatus)) .And(m => skuList.Contains(m.SkuNo)) + .AndIF(type == "6", m => m.OwnerNo == ownerNo)//浠e偍鍑哄簱闇�瑕佸叧鑱旇揣涓� .AndIF(!string.IsNullOrWhiteSpace(msg), it => (it.SkuNo.Contains(msg) || it.SkuName.Contains(msg) || it.LotNo.Contains(msg))) .And(it => (it.Qty - it.LockQty - it.FrozenQty) > 0) .And(it => (it.Status == "0" || it.Status == "1")) @@ -2288,7 +2308,16 @@ //鑾峰彇鍌ㄤ綅淇℃伅 var locat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W01" && a.LocatNo == task.StartLocat); - + //鑾峰彇绉诲簱浠诲姟瀵瑰簲鐩爣鍌ㄤ綅淇℃伅 + SysStorageLocat endlocat = new SysStorageLocat(); + if (task.Type == "2") + { + endlocat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W03" && a.LocatNo == task.EndLocat); + if (endlocat == null) + { + throw new Exception("鏈煡璇㈠埌鐩爣鍌ㄤ綅淇℃伅"); + } + } if (locat == null) { Db.RollbackTran(); @@ -2296,6 +2325,11 @@ } locat.Status = "1"; //鏈夌墿鍝� Db.Updateable(locat).ExecuteCommand(); + if (endlocat != null) + { + endlocat.Status = "0"; //绌哄偍浣� 0 + Db.Updateable(endlocat).ExecuteCommand(); + } if (noticeDetail.FactQty == 0) { @@ -2546,18 +2580,22 @@ throw new Exception("搴撳瓨涓嶈冻,鏃犲彲鍑哄簱搴撳瓨"); } //0:鎴愬搧鍑哄簱銆�1:棰嗘枡鍑哄簱銆�2:鎶芥鍑哄簱銆�3锛氱墿鏂欏彇鏍峰嚭搴撱��4:涓嶅悎鏍煎搧鍑哄簱銆�5:涓棿鍝佸嚭搴撱��6:浠e偍鍑哄簱銆�7:鍏朵粬鍑哄簱銆�8:瀵勫瓨鍑哄簱 - if (notice.Type == "0" || notice.Type == "1" || notice.Type == "2" || notice.Type == "5")//鎴愬搧銆佸師杈呮枡鍑哄簱 + if (notice.Type == "0" || notice.Type == "1" )//鎴愬搧銆佸師杈呮枡鍑哄簱 { stockDetail = stockDetail.Where(m => m.InspectStatus == "1").ToList(); } - else if (notice.Type == "3" || notice.Type == "6" || notice.Type == "7" || notice.Type == "8")//鍙栨牱鍑哄簱 + else if (notice.Type == "3" )//鍙栨牱鍑哄簱 { stockDetail = stockDetail.Where(m => m.InspectStatus == "0").ToList(); + } + else if (notice.Type == "5" || notice.Type == "6" || notice.Type == "7" || notice.Type == "8") + { + stockDetail = stockDetail.Where(m => m.InspectStatus == "0" || m.InspectStatus == "1").ToList(); } else if (notice.Type == "4")//涓嶅悎鏍煎嚭搴� { stockDetail = stockDetail.Where(m => m.InspectStatus == "2").ToList(); - } + } #region 鍖呰淇℃伅 @@ -2804,6 +2842,15 @@ d.Status = "0"; d.UpdateUser = userId; d.UpdateTime = DateTime.Now; + + if (notice.Type == "1" || notice.Type == "5" || notice.Type == "6" || notice.Type == "7" || notice.Type == "8")//1锛氶鏂欏嚭搴撱�� + { + if (d.IsIssueLotNo != "1") + { + d.LotNo = ""; + } + + } } notice.Status = "0"; notice.UpdateUser = userId; @@ -2979,7 +3026,7 @@ { throw new Exception("鎿嶄綔澶辫触锛岄儴鍒嗗偍浣嶅簱瀛樺紓甯革紒"); } - if (st.Qty > (stock.Qty - stock.LockQty - stock.FrozenQty - stock.InspectQty)) + if (st.Qty > (stock.Qty - stock.LockQty - stock.FrozenQty)) // 杈撳叆鐨勬暟閲� - 鎵樼洏涓婂彲鐢ㄧ殑鏁伴噺锛堟墭鐩樹笂鏁伴噺-閿佸畾鐨勬暟閲�-鍐荤粨鐨勬暟閲忥級 { throw new Exception("鎿嶄綔澶辫触锛屽嚭搴撴暟閲忚秴鍑哄簱瀛樻暟閲忥紒"); } -- Gitblit v1.8.0