|
|
@ -28,7 +28,7 @@ public class ContainerRequestEventHandler |
|
|
|
private readonly IContainerNoteAppService _containerNoteApp; |
|
|
|
private readonly IContainerJobAppService _containerJobApp; |
|
|
|
private readonly IEquipmentLocAppService _equipmentLocApp; |
|
|
|
|
|
|
|
private readonly ILocationAppService _locationAppService; |
|
|
|
|
|
|
|
private readonly IContainerRequestManager _containerRequestManager; |
|
|
|
|
|
|
@ -36,12 +36,15 @@ public class ContainerRequestEventHandler |
|
|
|
IContainerNoteAppService containerNoteApp, |
|
|
|
IContainerJobAppService containerJobApp, |
|
|
|
IEquipmentLocAppService equipmentLocApp, |
|
|
|
ILocationAppService locationAppService, |
|
|
|
IContainerRequestManager containerRequestManager) |
|
|
|
{ |
|
|
|
_containerNoteApp = containerNoteApp; |
|
|
|
_containerJobApp = containerJobApp; |
|
|
|
_equipmentLocApp= equipmentLocApp; |
|
|
|
_containerRequestManager = containerRequestManager; |
|
|
|
_locationAppService = locationAppService; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -127,59 +130,25 @@ public class ContainerRequestEventHandler |
|
|
|
var createInput = ObjectMapper.Map<ContainerRequest, ContainerNoteEditInput>(request); |
|
|
|
ContainerNoteDetailInput detail=new ContainerNoteDetailInput(); |
|
|
|
|
|
|
|
//createInput.Details = new List<ContainerNoteDetailInput>();
|
|
|
|
//detail.ToLocationCode = request.RequestLocationCode;
|
|
|
|
|
|
|
|
//detail.FromLocationCode = "123";
|
|
|
|
//detail.FromPackingCode = "123";
|
|
|
|
//detail.ToPackingCode = "123";
|
|
|
|
//detail.FromLot = "123";
|
|
|
|
//detail.ToLot = "123";
|
|
|
|
//detail.FromLocationErpCode = "123";
|
|
|
|
//detail.FromWarehouseCode = "123";
|
|
|
|
//detail.ToLocationErpCode = "123";
|
|
|
|
//detail.ToWarehouseCode = "123";
|
|
|
|
//detail.Uom = "123";
|
|
|
|
//detail.ItemCode = "123";
|
|
|
|
//detail.ItemName = "123";
|
|
|
|
|
|
|
|
////var container = await _equipmentLocApp.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
|
|
|
|
|
|
|
|
////if (container != null)
|
|
|
|
////{
|
|
|
|
//// detail.ItemCode = container.Code;
|
|
|
|
////}
|
|
|
|
|
|
|
|
//createInput.Details.Add(detail);
|
|
|
|
|
|
|
|
|
|
|
|
return createInput; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private async Task<ContainerJobEditInput> BuildContainerJobsAsync(ContainerRequest request) |
|
|
|
{ |
|
|
|
|
|
|
|
var createInput = ObjectMapper.Map<ContainerRequest, ContainerJobEditInput>(request); |
|
|
|
|
|
|
|
createInput.WarehouseCode = "T8"; |
|
|
|
|
|
|
|
//ContainerJobDetailInput detail=new ContainerJobDetailInput();
|
|
|
|
|
|
|
|
//detail.FromLocationCode = "123";
|
|
|
|
//detail.ToLocationCode = "123";
|
|
|
|
|
|
|
|
//detail.ItemCode = "123";
|
|
|
|
//detail.ItemName = "123";
|
|
|
|
//detail.RecommendPackingCode = "123";
|
|
|
|
//detail.RecommendLot = "123";
|
|
|
|
//detail.RecommendFromLocationCode = "123";
|
|
|
|
//detail.RecommendFromLocationErpCode = "123";
|
|
|
|
//detail.Uom = "123";
|
|
|
|
|
|
|
|
|
|
|
|
//createInput.Details.Add(detail);
|
|
|
|
|
|
|
|
var toLocationDto = await _locationAppService.GetByCodeAsync(createInput.RequestLocationCode).ConfigureAwait(false); |
|
|
|
if(toLocationDto!=null) |
|
|
|
{ |
|
|
|
createInput.WarehouseCode = toLocationDto.WarehouseCode; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
createInput.WarehouseCode = ""; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return createInput ; |
|
|
|
} |
|
|
|
|
|
|
|