Browse Source

更新版本

Agv分支2024-11-19
赵新宇 4 months ago
parent
commit
6a516c26c6
  1. 23
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs
  2. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs

23
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/AgvJobs/AgvJobOutputService.cs

@ -51,9 +51,6 @@ public class AgvJobOutputService : ApplicationService
) )
{ {
_logger = logger; _logger = logger;
_unitOfWorkManager = unitOfWorkManager; _unitOfWorkManager = unitOfWorkManager;
_httpClientFactory = httpClientFactory; _httpClientFactory = httpClientFactory;
@ -110,10 +107,10 @@ public class AgvJobOutputService : ApplicationService
private async Task<AgvJobClient> GetAgvJobClient() private async Task<AgvJobClient> GetAgvJobClient()
{ {
var httpclient = _httpClientFactory.CreateClient(); var httpclient = _httpClientFactory.CreateClient();
_agvOptions.Value.Address = string.IsNullOrEmpty(_agvOptions.Value.Address) _agvOptions.Value.Address = string.IsNullOrEmpty(_agvOptions.Value.Address)
? "http://7e42682n64.goho.co:21171/" ? "http://7e42682n64.goho.co:21171/"
: _agvOptions.Value.Address; //测试地址 : _agvOptions.Value.Address; //测试地址
_agvOptions.Value.Token = _agvOptions.Value.Token =
string.IsNullOrEmpty(_agvOptions.Value.Token) ? string.Empty : _agvOptions.Value.Token; //测试token string.IsNullOrEmpty(_agvOptions.Value.Token) ? string.Empty : _agvOptions.Value.Token; //测试token
_agvOptions.Value.UserName = _agvOptions.Value.UserName =
@ -128,20 +125,20 @@ public class AgvJobOutputService : ApplicationService
if (!string.IsNullOrEmpty(_agvOptions.Value.Token)) if (!string.IsNullOrEmpty(_agvOptions.Value.Token))
{ {
var token = _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)) if (!string.IsNullOrEmpty(_agvOptions.Value.UserName) && !string.IsNullOrEmpty(_agvOptions.Value.Password))
{ {
var username = _agvOptions.Value.UserName; var username = _agvOptions.Value.UserName;
var password = _agvOptions.Value.Password; var password = _agvOptions.Value.Password;
httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", httpclient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"))); Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}")));
} }
var client = new AgvJobClient(_agvOptions.Value.Address, httpclient, _agvOptions.Value.Path); var client = new AgvJobClient(_agvOptions.Value.Address, httpclient, _agvOptions.Value.Path);
return client; return client;
} }
/////// <summary> /////// <summary>

24
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 ICustomerItemAppService _customerItemAppService;
private readonly ICustomerAppService _customerAppService; private readonly ICustomerAppService _customerAppService;
private readonly ICustomerItemRepository _customerItemRepository; //private readonly ICustomerItemRepository _customerItemRepository;
private readonly ISalePriceSheetAppService _salePriceSheetAppService; private readonly ISalePriceSheetAppService _salePriceSheetAppService;
public CustomerProductionReturnNoteAppService( public CustomerProductionReturnNoteAppService(
@ -41,17 +41,13 @@ public class CustomerProductionReturnNoteAppService :
, ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager , ICustomerProductionReturnNoteManager CustomerProductionReturnNoteManager
, ICustomerItemAppService customerItemAppService, , ICustomerItemAppService customerItemAppService,
ISalePriceSheetAppService salePriceSheetAppService, ISalePriceSheetAppService salePriceSheetAppService,
ICustomerAppService customerAppService, ICustomerAppService customerAppService
ICustomerItemRepository customerItemRepository // ICustomerItemRepository customerItemRepository
) : base(repository) ) : base(repository)
{ {
//_customerItemRepository = customerItemRepository;
_customerItemRepository = customerItemRepository;
_customerItemAppService = customerItemAppService; _customerItemAppService = customerItemAppService;
_salePriceSheetAppService = salePriceSheetAppService; _salePriceSheetAppService = salePriceSheetAppService;
_CustomerProductionReturnNoteManager = CustomerProductionReturnNoteManager; _CustomerProductionReturnNoteManager = CustomerProductionReturnNoteManager;
_customerAppService = customerAppService; _customerAppService = customerAppService;
} }
@ -154,14 +150,14 @@ public class CustomerProductionReturnNoteAppService :
} }
foreach (var itm in entity.Details) foreach (var itm in entity.Details)
{ {
itm.FromLocationCode = ""; itm.FromLocationCode = string.Empty;
itm.FromStatus = EnumInventoryStatus.OK; itm.FromStatus = EnumInventoryStatus.OK;
itm.ToStatus=EnumInventoryStatus.OK; itm.ToStatus=EnumInventoryStatus.OK;
itm.FromLocationArea = ""; itm.FromLocationArea = string.Empty;
itm.FromLocationErpCode= ""; itm.FromLocationErpCode= string.Empty;
itm.FromWarehouseCode = ""; itm.FromWarehouseCode = string.Empty;
itm.FromLocationGroup = ""; itm.FromLocationGroup = string.Empty;
itm.FromContainerCode = ""; itm.FromContainerCode = string.Empty;
itm.ToContainerCode =string.IsNullOrEmpty(itm.ToContainerCode)? "": itm.ToContainerCode; itm.ToContainerCode =string.IsNullOrEmpty(itm.ToContainerCode)? "": itm.ToContainerCode;
itm.ToWarehouseCode= string.IsNullOrEmpty(itm.ToWarehouseCode)? "": itm.ToContainerCode; itm.ToWarehouseCode= string.IsNullOrEmpty(itm.ToWarehouseCode)? "": itm.ToContainerCode;
} }

Loading…
Cancel
Save