From d11b1f9c98e8765d3cee15abd4474b0e05a5acbc Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期六, 01 三月 2025 10:33:56 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 39 ++++++++++++++++++++++++++++++++++----- 1 files changed, 34 insertions(+), 5 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" index f9cb2f3..c046eec 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" @@ -473,9 +473,9 @@ PalletCode = model.CarrierCode, PalletType = palletTypeInfo.PalletType, WarehouseId = warehouse.WarehouseId, - StockStatus = stockInfoDetail.StockQuantity<=0.0? StockStatusEmun.MES绌烘墭閫�搴�.ObjToInt():StockStatusEmun.MES閫�搴�.ObjToInt(), + StockStatus = stockInfoDetail.StockQuantity <= 0.0 ? StockStatusEmun.MES绌烘墭閫�搴�.ObjToInt() : StockStatusEmun.MES閫�搴�.ObjToInt(), Details = new List<Dt_StockInfoDetail> { stockInfoDetail }, - Remark= stockInfoDetail.StockQuantity <= 0.0 ? StockStatusEmun.MES绌烘墭閫�搴�.ToString() : StockStatusEmun.MES閫�搴�.ToString() + Remark = stockInfoDetail.StockQuantity <= 0.0 ? StockStatusEmun.MES绌烘墭閫�搴�.ToString() : StockStatusEmun.MES閫�搴�.ToString() }; //Dt_Task task = new Dt_Task() //{ @@ -522,7 +522,7 @@ { return MesResponseContent.Instance.Error("浠撳簱淇℃伅鏈厤缃�"); } - Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == item.CarrierCode); + Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == item.CarrierCode || x.WarehouseId == warehouse.WarehouseId); if (stockInfo == null) { return MesResponseContent.Instance.Error("鏈壘鍒版杞藉叿缂栧彿搴撳瓨"); @@ -883,8 +883,6 @@ } } - - /// <summary> /// PP搴撳瓨鏌ヨ /// </summary> @@ -895,6 +893,7 @@ MesResponseContent content = new MesResponseContent(); try { + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString()); List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && @@ -967,5 +966,35 @@ return content; } + /// <summary> + /// 鎴愬搧杩斿伐鎻愬簱 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public MesResponseContent RworkTask(RworkTaskModel model) + { + try + { + Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA72.ToString()); + //鑾峰彇搴撳瓨璁板綍 + List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => + x.WarehouseId == warehouse.WarehouseId && + x.StockStatus == (int)StockStatusEmun.鍏ュ簱瀹屾垚).Includes(x => x.Details).ToList(); + Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(x => x.BatchNo == model.ProductVersion)); + if (stockInfo == null) + { + return MesResponseContent.Instance.Error($"灏炬暟浠�:{model.ProductVersion}鏃犲彲鐢ㄥ簱瀛�"); + } + Dt_Task exsit2 = Repository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode); + + } + catch (Exception ex) + { + + throw; + } + return MesResponseContent.Instance.OK(); + } + } } -- Gitblit v1.9.3