From 8dbd0c5af65835a1f99a2ac359660d1fa964d945 Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@DESKTOP-5BIMHQ3> Date: 星期二, 25 六月 2024 11:44:12 +0800 Subject: [PATCH] 修改问题 --- Wms/WMS.BLL/BllTransServer/NoticeServer.cs | 94 ++++++++++++++++++++++++++--------------------- Wms/WMS.BLL/DataServer/StockDetailServer.cs | 12 ++++++ Wms/Wms/Controllers/BllSoController.cs | 2 3 files changed, 65 insertions(+), 43 deletions(-) diff --git a/Wms/WMS.BLL/BllTransServer/NoticeServer.cs b/Wms/WMS.BLL/BllTransServer/NoticeServer.cs index 53992db..9887f0a 100644 --- a/Wms/WMS.BLL/BllTransServer/NoticeServer.cs +++ b/Wms/WMS.BLL/BllTransServer/NoticeServer.cs @@ -471,22 +471,8 @@ break; #endregion - #region 浠诲姟瀹屾垚 - case "2": - //璧峰鍌ㄤ綅淇℃伅 - var startLocatInfo2 = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == taskInfo.StartLocat && w.IsDel == "0"); - if (startLocatInfo2 == null) - { - resultModel.Message = "璧峰鍌ㄤ綅淇℃伅涓嶅瓨鍦�!"; - return resultModel; - } - //鐩爣鍌ㄤ綅淇℃伅 - var endLocatInfo2 = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == taskInfo.EndLocat && w.IsDel == "0"); - if (endLocatInfo2 == null) - { - resultModel.Message = "鐩爣鍌ㄤ綅淇℃伅涓嶅瓨鍦�!"; - return resultModel; - } + #region 绉诲簱瀹屾垚 + case "3": //搴撳瓨鏄庣粏 var sd3 = Db.Queryable<DataStockDetail>().First(w => w.PalletNo == taskInfo.PalletNo); if (sd3 == null) @@ -494,37 +480,61 @@ resultModel.Message = "搴撳瓨淇℃伅涓嶅瓨鍦�!"; return resultModel; } - sd3.WareHouseNo = endLocatInfo2.WareHouseNo;//鎵�灞炰粨搴� - sd3.RoadwayNo = endLocatInfo2.RoadwayNo;//鎵�灞炲贩閬� - sd3.AreaNo = endLocatInfo2.AreaNo;//鎵�灞炲尯鍩� - sd3.LocatNo = endLocatInfo2.LocatNo;//鍌ㄤ綅鍦板潃 - if (endLocatInfo2.AreaNo == "A01")//娲佸噣鍖� + if (taskInfo.Type == "0")//鍏ュ簱浠诲姟 { - sd3.PalletStatus = "0"; - } - else if (endLocatInfo2.AreaNo == "A02")//棰勬贩鍖� - { - sd3.PalletStatus = "1"; - } - else if (endLocatInfo2.AreaNo == "A03")//鍗婃垚鍝佸尯 - { - sd3.PalletStatus = "2"; - } - else if (endLocatInfo2.AreaNo == "A04")//鑴忔《鍖� - { - sd3.PalletStatus = "3"; - } + //鐩爣鍌ㄤ綅淇℃伅 + var endLocatInfo2 = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == taskInfo.EndLocat && w.IsDel == "0"); + if (endLocatInfo2 == null) + { + resultModel.Message = "鐩爣鍌ㄤ綅淇℃伅涓嶅瓨鍦�!"; + return resultModel; + } + endLocatInfo2.Status = "1";//鏈夌墿鍝� + //淇敼鐩爣鍌ㄤ綅鐘舵�� + Db.Updateable(endLocatInfo2).ExecuteCommand(); + sd3.WareHouseNo = endLocatInfo2.WareHouseNo;//鎵�灞炰粨搴� + sd3.RoadwayNo = endLocatInfo2.RoadwayNo;//鎵�灞炲贩閬� + sd3.AreaNo = endLocatInfo2.AreaNo;//鎵�灞炲尯鍩� + sd3.LocatNo = endLocatInfo2.LocatNo;//鍌ㄤ綅鍦板潃 + if (endLocatInfo2.AreaNo == "A01")//娲佸噣鍖� + { + sd3.PalletStatus = "0"; + } + else if (endLocatInfo2.AreaNo == "A02")//棰勬贩鍖� + { + sd3.PalletStatus = "1"; + } + else if (endLocatInfo2.AreaNo == "A03")//鍗婃垚鍝佸尯 + { + sd3.PalletStatus = "2"; + } + else if (endLocatInfo2.AreaNo == "A04")//鑴忔《鍖� + { + sd3.PalletStatus = "3"; + } + } + if (taskInfo.Type == "1")//鍑哄簱浠诲姟 + { + //璧峰鍌ㄤ綅淇℃伅 + var startLocatInfo2 = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == taskInfo.StartLocat && w.IsDel == "0"); + if (startLocatInfo2 == null) + { + resultModel.Message = "璧峰鍌ㄤ綅淇℃伅涓嶅瓨鍦�!"; + return resultModel; + } + startLocatInfo2.Status = "0";//绌哄偍浣� + //淇敼璧峰鍌ㄤ綅鐘舵�� + Db.Updateable(startLocatInfo2).ExecuteCommand(); + + sd3.WareHouseNo = "";//鎵�灞炰粨搴� + sd3.RoadwayNo = "";//鎵�灞炲贩閬� + sd3.AreaNo = "";//鎵�灞炲尯鍩� + sd3.LocatNo = "";//鍌ㄤ綅鍦板潃 + } //淇敼搴撳瓨鏄庣粏 Db.Updateable(sd3).ExecuteCommand(); - startLocatInfo2.Status = "0";//绌哄偍浣� - //淇敼璧峰鍌ㄤ綅鐘舵�� - Db.Updateable(startLocatInfo2).ExecuteCommand(); - - endLocatInfo2.Status = "1";//鏈夌墿鍝� - //淇敼鐩爣鍌ㄤ綅鐘舵�� - Db.Updateable(endLocatInfo2).ExecuteCommand(); break; #endregion } diff --git a/Wms/WMS.BLL/DataServer/StockDetailServer.cs b/Wms/WMS.BLL/DataServer/StockDetailServer.cs index 6b1cfdc..530330e 100644 --- a/Wms/WMS.BLL/DataServer/StockDetailServer.cs +++ b/Wms/WMS.BLL/DataServer/StockDetailServer.cs @@ -9,6 +9,7 @@ using WMS.Entity.BllQualityEntity; using WMS.Entity.Context; using WMS.Entity.DataEntity; +using WMS.Entity.SysEntity; using WMS.IBLL.IDataServer; namespace WMS.BLL.DataServer @@ -437,6 +438,13 @@ { throw new Exception($"搴撳瓨涓凡鏈夌紪鍙蜂负锛歿PalletNo}鐨勬槑缁嗭紝璇峰嬁閲嶅娣诲姞!"); } + //鐩爣鍌ㄤ綅淇℃伅 + var locatInfo = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == LocatNo && w.Status == "0" && w.IsDel == "0"); + if (locatInfo == null) + { + throw new Exception("鍌ㄤ綅鍦板潃涓嶅瓨鍦�!"); + } + Db.BeginTran(); var comTime = DateTime.Now; @@ -474,6 +482,10 @@ //鎻掑叆搴撳瓨鏄庣粏 Db.Insertable(model).ExecuteCommand(); + locatInfo.Status = "1";//鏈夌墿鍝� + //淇敼鐩爣鍌ㄤ綅鐘舵�� + Db.Updateable(locatInfo).ExecuteCommand(); + Db.CommitTran(); } catch (Exception e) diff --git a/Wms/Wms/Controllers/BllSoController.cs b/Wms/Wms/Controllers/BllSoController.cs index 6e9040d..c6d4647 100644 --- a/Wms/Wms/Controllers/BllSoController.cs +++ b/Wms/Wms/Controllers/BllSoController.cs @@ -724,7 +724,7 @@ { try { - var type = new List<string>(){"1","4"}; + var type = new List<string>(){"1","3","4"}; var bolls = _taskSvc.GetTaskList( type, model.Type,model.Status,model.TaskNo,model.IsSuccess,model.PalletNo,model.Msg,model.Page, model.Limit, out int count); return Ok(new { code = 0, count, msg = "鍑哄簱浠诲姟淇℃伅", data = bolls }); -- Gitblit v1.8.0