From 6a516c26c6386085fe51c2794a0dfb5dd65ea4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 16 Jan 2025 10:43:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Jobs/AgvJobs/AgvJobOutputService.cs | 23 ++++++++---------- .../CustomerProductionReturnNoteAppService.cs | 24 ++++++++----------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs index 7aefca551..057aa8062 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs @@ -51,9 +51,6 @@ public class AgvJobOutputService : ApplicationService ) { - - - _logger = logger; _unitOfWorkManager = unitOfWorkManager; _httpClientFactory = httpClientFactory; @@ -110,10 +107,10 @@ public class AgvJobOutputService : ApplicationService private async Task GetAgvJobClient() { - var httpclient = _httpClientFactory.CreateClient(); - _agvOptions.Value.Address = string.IsNullOrEmpty(_agvOptions.Value.Address) - ? "http://7e42682n64.goho.co:21171/" - : _agvOptions.Value.Address; //测试地址 + var httpclient = _httpClientFactory.CreateClient(); + _agvOptions.Value.Address = string.IsNullOrEmpty(_agvOptions.Value.Address) + ? "http://7e42682n64.goho.co:21171/" + : _agvOptions.Value.Address; //测试地址 _agvOptions.Value.Token = string.IsNullOrEmpty(_agvOptions.Value.Token) ? string.Empty : _agvOptions.Value.Token; //测试token _agvOptions.Value.UserName = @@ -128,20 +125,20 @@ public class AgvJobOutputService : ApplicationService if (!string.IsNullOrEmpty(_agvOptions.Value.Token)) { var token = _agvOptions.Value.Token; - httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); -} + httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); + } if (!string.IsNullOrEmpty(_agvOptions.Value.UserName) && !string.IsNullOrEmpty(_agvOptions.Value.Password)) { var username = _agvOptions.Value.UserName; -var password = _agvOptions.Value.Password; -httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", - Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"))); + var password = _agvOptions.Value.Password; + httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", + Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"))); } var client = new AgvJobClient(_agvOptions.Value.Address, httpclient, _agvOptions.Value.Path); return client; -} + } /////// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs index 51165c654..e4d0af6fb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs @@ -33,7 +33,7 @@ public class CustomerProductionReturnNoteAppService : private readonly ICustomerItemAppService _customerItemAppService; private readonly ICustomerAppService _customerAppService; - private readonly ICustomerItemRepository _customerItemRepository; + //private readonly ICustomerItemRepository _customerItemRepository; private readonly ISalePriceSheetAppService _salePriceSheetAppService; public CustomerProductionReturnNoteAppService( @@ -41,17 +41,13 @@ public class CustomerProductionReturnNoteAppService : , ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager , ICustomerItemAppService customerItemAppService, ISalePriceSheetAppService salePriceSheetAppService, - ICustomerAppService customerAppService, - ICustomerItemRepository customerItemRepository + ICustomerAppService customerAppService + // ICustomerItemRepository customerItemRepository ) : base(repository) { - - _customerItemRepository = customerItemRepository; - + //_customerItemRepository = customerItemRepository; _customerItemAppService = customerItemAppService; - _salePriceSheetAppService = salePriceSheetAppService; - _CustomerProductionReturnNoteManager = CustomerProductionReturnNoteManager; _customerAppService = customerAppService; } @@ -154,14 +150,14 @@ public class CustomerProductionReturnNoteAppService : } foreach (var itm in entity.Details) { - itm.FromLocationCode = ""; + itm.FromLocationCode = string.Empty; itm.FromStatus = EnumInventoryStatus.OK; itm.ToStatus=EnumInventoryStatus.OK; - itm.FromLocationArea = ""; - itm.FromLocationErpCode= ""; - itm.FromWarehouseCode = ""; - itm.FromLocationGroup = ""; - itm.FromContainerCode = ""; + itm.FromLocationArea = string.Empty; + itm.FromLocationErpCode= string.Empty; + itm.FromWarehouseCode = string.Empty; + itm.FromLocationGroup = string.Empty; + itm.FromContainerCode = string.Empty; itm.ToContainerCode =string.IsNullOrEmpty(itm.ToContainerCode)? "": itm.ToContainerCode; itm.ToWarehouseCode= string.IsNullOrEmpty(itm.ToWarehouseCode)? "": itm.ToContainerCode; }