From a1c804eed3b8d936e6392ce3ca82e9ad65e12094 Mon Sep 17 00:00:00 2001 From: 刘磊 <1161824510@qq.com> Date: 星期二, 26 十一月 2024 08:47:47 +0800 Subject: [PATCH] 同步 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 30 ++++++++++++------------------ 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs index a54dac6..980ddb5 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs @@ -1,18 +1,9 @@ -锘縰sing log4net.Core; -using Mapster; +锘縰sing Mapster; using Masuit.Tools; -using Masuit.Tools.Models; -using Microsoft.EntityFrameworkCore; -using System.Linq; -using System.Threading.Tasks; using WIDESEA_DTO.MOM; using WIDESEA_DTO.WMS; -using WIDESEA_IStorageBasicRepository; using WIDESEA_IStoragIntegrationServices; -using WIDESEA_Model.Models; using WIDESEA_StorageBasicRepository; -using WIDESEA_StorageTaskRepository; -using WIDESEA_StoragIntegrationServices; using WIDESEAWCS_BasicInfoRepository; namespace WIDESEA_StorageOutTaskServices; @@ -120,7 +111,8 @@ await UpdateLocationAsync(loc); await DeleteStockInfoAsync(stock.Id); await DeleteStockInfoDetailsAsync(stock.StockInfoDetails); - //await DeleteTaskAsync(task.TaskId); + if (task.Roadway.Contains("FR")) //濡傛灉鏄垎瀹� 灏嗕换鍔″垹闄� + await DeleteTaskAsync(task.TaskId); }); return content.OK("浠诲姟瀹屾垚鎴愬姛"); @@ -317,7 +309,7 @@ // 鎵ц鏁版嵁搴撲簨鍔� - bool isResult = await ExecuteTransaction(stock, taskHty, locationInf, task.TaskId); + bool isResult = await ExecuteTransaction(stock, taskHty, locationInf, task.TaskId, boxing); if (isResult) { content.OK("鍏ュ簱浠诲姟瀹屾垚鎴愬姛"); @@ -434,7 +426,7 @@ stock.LinedProcessFeedbackTime = respone.LinedProcessFeedbackTime; stock.SpecialParameterDuration = respone.SpecialParameterDuration; //2024骞�11鏈�16鏃ワ細鏂板瀛楁璁$畻搴斿嚭搴撴椂闂� - stock.OutboundTime = Convert.ToDateTime(respone.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(respone.SpecialParameterDuration)); + stock.OutboundTime = Convert.ToDateTime(respone.LinedProcessFeedbackTime == null ? DateTime.Now : respone.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(respone.SpecialParameterDuration)); stock.ProductionLine = respone.ProductionLine; stock.ParameterInfos = respone.ParameterInfos.ToJsonString(); stock.StockStatus = 1; @@ -573,7 +565,7 @@ // TODO 鍒涘缓浠诲姟閫佽嚦NG鎺掑嚭鍙� var efg = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position && x.stationArea == area.AreaCode).ToList(); //List<string> NGStation = input.Position == "1088" ? new List<string>() { "1020" } : new List<string>() { "JZSC01" }; - if(efg.Count <= 0) + if (efg.Count <= 0) { throw new Exception("鏈壘鍒癗G鍏ュ簱绔欏彴閰嶇疆"); } @@ -592,6 +584,7 @@ content = await RequestTrayInTaskAsync(input); return content; } + //Console.WriteLine("qqqqq"); // TODO 鑾峰彇鏈湴鏂欐灞炴�т笌鏁寸洏鐢佃姱灞炴�ц幏鍙栫殑鍊艰繘琛屽姣旓紝濡傛灉涓�鑷村垯缁х画锛屽惁鍒欒繑鍥為敊璇俊鎭� //var productions = await _productionRepository.QueryDataAsync(x => result.TrayBarcodePropertys.Select(x => x.TrayBarcodeProperty).ToList().Contains(x.TrayBarcodeProperty)); @@ -601,6 +594,7 @@ // 璋冪敤CreateBoxingInfo鏂规硶锛屽垱寤虹粍鐩樹俊鎭� var boxing = CreateBoxingInfo(result, input.PalletCode); + //Console.WriteLine(boxing.ToJsonString()); if (boxing == null) return content.Error("缁勭洏澶辫触"); // 璋冪敤GetProcessApplyAsync鏂规硶锛岃幏鍙栧伐鑹鸿矾绾� @@ -630,8 +624,8 @@ { throw new Exception("鏈壘鍒癗G鍏ュ簱绔欏彴閰嶇疆"); } - List<string> strings = stationManagers.Select(x=>x.Roadway).ToList(); - // 璋冪敤CreateNewTask鏂规硶锛屽垱寤烘柊浠诲姟 + List<string> strings = stationManagers.Select(x => x.Roadway).ToList(); + //// 璋冪敤CreateNewTask鏂规硶锛屽垱寤烘柊浠诲姟 content = await CreateNewTask(input, strings); if (content.Status) { @@ -1240,8 +1234,8 @@ if (boxingInfo != null) { isDeleteBoxing = await _boxingInfoRepository.Db.DeleteNav<DtBoxingInfo>(x => x.Id == boxingInfo.Id) - .Include(x => x.BoxingInfoDetails) - .ExecuteCommandAsync(); + .Include(x => x.BoxingInfoDetails) + .ExecuteCommandAsync(); } } -- Gitblit v1.9.3