From 5ab19c977cfb0551a88b3885b0648183fbfff672 Mon Sep 17 00:00:00 2001 From: libo <Administrator@DESKTOP-1A6QMNS> Date: 星期一, 31 三月 2025 10:10:12 +0800 Subject: [PATCH] 调整wms出入库、返库逻辑,调整与比亚迪接口对接的类型和方法,调整配置参数,写入服务器上数据库密码 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" index 2c2445f..8f11034 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" @@ -12,6 +12,7 @@ using System.Net.Http.Headers; using System.Security.Policy; using Newtonsoft.Json; +using WIDESEA_Core.LogHelper; namespace WIDESEA_TaskInfoService { @@ -77,10 +78,16 @@ WebResponseContent content = new WebResponseContent(); try { + + //Logger.Write_Log("System/test_in", "", "1.0 ", ""); Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(palletCode); + //Logger.Write_Log("System/test_in", "", "1.1 ", ""); (bool, string) result = CheckRequestInbound(stationCode, palletCode, true, stockInfo); + //Logger.Write_Log("System/test_in", "", "1.2 ", ""); if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2); + //Logger.Write_Log("System/test_in", "", "1.3 ", ""); content = AssignLocUpdateData(stationCode, TaskTypeEnum.Inbound.ObjToInt(), palletCode, true, stockInfo); + //Logger.Write_Log("System/test_in", "", "1.4 ", ""); } catch (Exception ex) { @@ -129,10 +136,15 @@ WebResponseContent content = new WebResponseContent(); try { + //Logger.Write_Log("System/test_in", "", "2.0 "); _unitOfWorkManage.BeginTran(); Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(stationCode, taskType,palletCode); + + //Logger.Write_Log("System/test_in", "", "2.1 "); if (locationInfo != null) { + + //Logger.Write_Log("System/test_in", "", "2.2 "); List<Dt_Task> tasks = new List<Dt_Task>(); Dt_Task task = new() { @@ -151,16 +163,22 @@ BaseDal.AddData(task); int beforeStatus = locationInfo.LocationStatus; + //Logger.Write_Log("System/test_in", "", "2.3 "); if (isUpdateStock) { + //Logger.Write_Log("System/test_in", "", "2.3.1 "); locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); if (locationInfo.Depth == 2) { + //Logger.Write_Log("System/test_in", "", "2.3.1.1 "); _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false); } + //Logger.Write_Log("System/test_in", "", "2.3.1.2 "); if (stockInfo != null && stockInfo.Details != null && stockInfo.Details.Count > 0) { + + //Logger.Write_Log("System/test_in", "", "2.3.1.3 "); orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? ""; stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(); @@ -168,11 +186,14 @@ } else { + + //Logger.Write_Log("System/test_in", "", "2.3.1.4 "); return content = WebResponseContent.Instance.Error("鏈壘鍒板簱瀛樹俊鎭�"); } } else { + //Logger.Write_Log("System/test_in", "", "2.3.2 "); locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); if (locationInfo.Depth == 2) { @@ -180,19 +201,26 @@ } task.Grade = 1; } + + //Logger.Write_Log("System/test_in", "", "2.4 "); _basicService.LocationInfoService.Repository.UpdateData(locationInfo); tasks.Add(task); _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum); + //Logger.Write_Log("System/test_in", "", "2.5 "); var response = HttpHelper.Post<WebResponseContent>(url + "ReceiveTask/", tasks, "鍏ュ簱浠诲姟涓嬪彂"); if (!response.Status) { _unitOfWorkManage.RollbackTran(); return content = WebResponseContent.Instance.Error($"{response.Message}"); } + _unitOfWorkManage.CommitTran(); + + //Logger.Write_Log("System/test_in", "", "2.6 "); return content = WebResponseContent.Instance.OK(); + } return content = WebResponseContent.Instance.Error("鏈壘鍒板彲鍒嗛厤璐т綅"); } -- Gitblit v1.9.3