From 4cfeced9bc8985cdd89fdb540e6fe984f8469481 Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期四, 21 十一月 2024 11:02:40 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" index 06ac083..1b7364f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" @@ -49,6 +49,7 @@ using WIDESEA_ITaskInfoService; using WIDESEA_Model.Models; using WIDESEA_TaskInfoRepository; +using static WIDESEA_ITaskInfoService.ITaskService; namespace WIDESEA_TaskInfoService { @@ -125,16 +126,23 @@ Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode); //鏌ヨ揣浣� Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); - Dt_StockInfoDetail dt_StockInfodetail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.StockId == stockInfo.Id); + Dt_StockInfoDetail dt_StockInfodetail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.OrderNo == task.PalletCode); CheckCompleted(stockInfo, locationInfo); + if (stockInfo.MaterialType == (int)InventoryMaterialType.绌烘墭) + { + string currentTime = DateTime.Now.ToString("HHmmss"); + stockInfo.PalletCode = "KTP" + currentTime; + } stockInfo.LocationCode = task.TargetAddress; stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt(); _stockService.StockInfoService.Repository.UpdateData(stockInfo); - dt_StockInfodetail.Status = StockStatusEmun.宸插叆搴�.ObjToInt(); - _stockService.StockInfoDetailService.Repository.UpdateData(dt_StockInfodetail); - + if(dt_StockInfodetail != null) + { + dt_StockInfodetail.Status = StockStatusEmun.宸插叆搴�.ObjToInt(); + _stockService.StockInfoDetailService.Repository.UpdateData(dt_StockInfodetail); + } beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity); int beforeStatus = locationInfo.LocationStatus; @@ -204,10 +212,10 @@ return (false, "鏈壘鍒拌揣浣嶄俊鎭�"); } - if (isCheckStockDetail && (stockInfo.Details == null || stockInfo.Details.Count == 0)) + /*if (isCheckStockDetail && (stockInfo.Details == null || stockInfo.Details.Count == 0)) { return (false, "鏈壘鍒扮粍鐩樻槑缁嗕俊鎭�"); - } + }*/ return (true, "鎴愬姛"); } @@ -282,12 +290,12 @@ return WebResponseContent.Instance.OK(); } - public WebResponseContent RelocationTaskCompleted(string PalletCode,string SourceAddress, string TargetAddress) + public WebResponseContent RelocationTaskCompleted(GenerateInv2 generate) { - Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(PalletCode); + Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(generate.PalletCode); - Dt_LocationInfo locationpoint = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == SourceAddress); - Dt_LocationInfo locationEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == TargetAddress); + Dt_LocationInfo locationpoint = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == generate.SourceAddress); + Dt_LocationInfo locationEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == generate.TargetAddress); List<Dt_LocationInfo> loca = new List<Dt_LocationInfo>(); stockInfo.LocationCode = locationEnd.LocationCode; -- Gitblit v1.9.3