Browse Source

修改 注塑任务

dev_DY_CC
Zheng 1 year ago
parent
commit
44511ce4bc
  1. 22
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs
  2. 31
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs
  3. 62
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs
  4. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

22
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs

@ -41,6 +41,12 @@ public class InjectionJobAppService
_transferLibJobAppService = transferLibJobAppService;
}
/// <summary>
/// 批量创建
/// </summary>
/// <param name="inputs"></param>
/// <returns></returns>
[HttpPost("create-many")]
public override async Task<List<InjectionJobDTO>> CreateManyAsync(List<InjectionJobEditInput> inputs)
{
foreach (var input in inputs)
@ -51,6 +57,12 @@ public class InjectionJobAppService
return await base.CreateManyAsync(inputs).ConfigureAwait(false);
}
/// <summary>
/// 创建
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("")]
public override async Task<InjectionJobDTO> CreateAsync(InjectionJobEditInput input)
{
await CheckMinRowAndSetStatusAsync(input).ConfigureAwait(false);
@ -70,10 +82,8 @@ public class InjectionJobAppService
var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode)
.ConfigureAwait(false);
if (loctionDto.RowCode != 1)
if (loctionDto.RowCode == 1)
{
input.JobStatus = EnumJobStatus.Wait;
jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate;
jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode;
jobDetailInputdetail.TransferLibFromExpireDate = jobDetailInputdetail.RecommendFromExpireDate;
@ -102,6 +112,10 @@ public class InjectionJobAppService
jobDetailInputdetail.TransferLibToSupplierBatch = jobDetailInputdetail.RecommendToSupplierBatch;
jobDetailInputdetail.TransferLibToWarehouseCode = jobDetailInputdetail.RecommendToWarehouseCode;
}
else
{
input.JobStatus = EnumJobStatus.Wait;
}
}
[HttpPost("cancel-by-request/{injectionNumber}")]
@ -135,7 +149,7 @@ public class InjectionJobAppService
return ObjectMapper.Map<List<InjectionJob>, List<InjectionJobDTO>>(entitys);
}
[HttpPost("Do-Call-Back")]
[HttpPost("do-call-back")]
public async Task<Tuple<bool?, string>> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum)
{
var job = await _repository.FindAsync(p => p.Number == jobNum).ConfigureAwait(false);

31
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs

@ -30,6 +30,37 @@ public class InjectionJobManager : SfsJobManagerBase<InjectionJob, InjectionJobD
{
var entity = await Repository.FindAsync(input.Id).ConfigureAwait(false);
var inputDetail = input.Details.First();
var detail = entity.Details.First();
detail.HandledFromArriveDate = inputDetail.RecommendFromArriveDate;
detail.HandledFromContainerCode = inputDetail.RecommendFromContainerCode;
detail.HandledFromExpireDate = inputDetail.RecommendFromExpireDate;
detail.HandledFromLocationArea = inputDetail.RecommendFromLocationArea;
detail.HandledFromLocationCode = inputDetail.RecommendFromLocationCode;
detail.HandledFromLocationErpCode = inputDetail.RecommendFromLocationErpCode;
detail.HandledFromLocationGroup = inputDetail.RecommendFromLocationGroup;
detail.HandledFromLot = inputDetail.RecommendFromLot;
detail.HandledFromPackingCode = inputDetail.RecommendFromPackingCode;
detail.HandledFromProduceDate = inputDetail.RecommendFromProduceDate;
detail.HandledFromQty = inputDetail.RecommendFromQty;
detail.HandledFromSupplierBatch = inputDetail.RecommendFromSupplierBatch;
detail.HandledFromWarehouseCode = inputDetail.RecommendFromWarehouseCode;
detail.HandledToArriveDate = inputDetail.RecommendToArriveDate;
detail.HandledToContainerCode = inputDetail.RecommendToContainerCode;
detail.HandledToExpireDate = inputDetail.RecommendToExpireDate;
detail.HandledToLocationArea = inputDetail.RecommendToLocationArea;
detail.HandledToLocationCode = inputDetail.RecommendToLocationCode;
detail.HandledToLocationErpCode = inputDetail.RecommendToLocationErpCode;
detail.HandledToLocationGroup = inputDetail.RecommendToLocationGroup;
detail.HandledToLot = inputDetail.RecommendToLot;
detail.HandledToPackingCode = inputDetail.RecommendToPackingCode;
detail.HandledToProduceDate = inputDetail.RecommendToProduceDate;
detail.HandledToQty = inputDetail.RecommendToQty;
detail.HandledToSupplierBatch = inputDetail.RecommendToSupplierBatch;
detail.HandledToWarehouseCode = inputDetail.RecommendToWarehouseCode;
return await base.CompleteAsync(entity, user).ConfigureAwait(false);
}

62
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs

@ -120,6 +120,8 @@ public class InjectionJobEventHandler :
}
await _expectOutAppService.AddManyAsync(expectOutEditInputs).ConfigureAwait(false);
await Task.CompletedTask.ConfigureAwait(false);
}
/// <summary>
@ -148,29 +150,41 @@ public class InjectionJobEventHandler :
detailInput.JobStatus = EnumJobStatus.Open;
detailInput.ItemCode = detail.ItemCode;
//detailInput.Qty = detail.RecommendFromQty;
//detailInput.ArriveDate = detailInput.ArriveDate;
//detailInput.ExpireDate = detailInput.ExpireDate;
//detailInput.ProduceDate = detail.RecommendFromProduceDate;
//detailInput.ToLocationCode = detail.RecommendToLocationCode;
//detailInput.ToWarehouseCode = detail.RecommendToWarehouseCode;
//detailInput.ToLocationErpCode = detail.RecommendToLocationErpCode;
//detailInput.ToLocationGroup = detail.RecommendToLocationGroup;
//detailInput.ToLocationArea = detail.RecommendToLocationArea;
//detailInput.FromLocationCode = detail.RecommendFromLocationCode;
//detailInput.FromLocationArea = detail.RecommendFromLocationArea;
//detailInput.FromLocationGroup = detail.RecommendFromLocationGroup;
//detailInput.FromLocationErpCode = detail.RecommendFromLocationErpCode;
//detailInput.FromWarehouseCode = detail.RecommendFromWarehouseCode;
//detailInput.FromLot = detail.RecommendFromLot;
//detailInput.ToLot = detail.RecommendToLot;
//detailInput.Qty = detail.RecommendFromQty;
//detailInput.StdPackQty = detail.StdPackQty;
//detailInput.Uom = detail.Uom;
//detailInput.SupplierBatch = detail.RecommendFromSupplierBatch;
detailInput.StdPackQty = detail.StdPackQty;
detailInput.Uom = detail.Uom;
detailInput.Status = detail.Status;
detailInput.RecommendFromQty = detail.RecommendFromQty;
detailInput.RecommendFromLot = detail.RecommendFromLot;
detailInput.RecommendFromPackingCode = detailInput.RecommendFromPackingCode;
detailInput.RecommendToLot = detail.RecommendToLot;
detailInput.RecommendFromArriveDate = detail.RecommendFromArriveDate;
detailInput.RecommendFromExpireDate = detail.RecommendFromExpireDate;
detailInput.RecommendFromProduceDate = detail.RecommendFromProduceDate;
detailInput.RecommendFromSupplierBatch = detail.RecommendFromSupplierBatch;
detailInput.RecommendFromLocationCode = detail.RecommendFromLocationCode;
detailInput.RecommendFromLocationGroup = detail.RecommendFromLocationGroup;
detailInput.RecommendFromLocationArea = detail.RecommendFromLocationArea;
detailInput.RecommendFromLocationErpCode = detail.RecommendFromLocationErpCode;
detailInput.RecommendFromWarehouseCode = detail.RecommendFromWarehouseCode;
detailInput.RecommendToQty = detail.RecommendToQty;
detailInput.RecommendToLot = detail.RecommendToLot;
detailInput.RecommendToPackingCode = detailInput.RecommendToPackingCode;
detailInput.RecommendToLot = detail.RecommendToLot;
detailInput.RecommendToArriveDate = detail.RecommendToArriveDate;
detailInput.RecommendToExpireDate = detail.RecommendToExpireDate;
detailInput.RecommendToProduceDate = detail.RecommendToProduceDate;
detailInput.RecommendToSupplierBatch = detail.RecommendToSupplierBatch;
detailInput.RecommendToLocationCode = detail.RecommendToLocationCode;
detailInput.RecommendToLocationGroup = detail.RecommendToLocationGroup;
detailInput.RecommendToLocationArea = detail.RecommendToLocationArea;
detailInput.RecommendToLocationErpCode = detail.RecommendToLocationErpCode;
detailInput.RecommendToWarehouseCode = detail.RecommendToWarehouseCode;
await _transferLibRequestAppService.CreateAsync(input).ConfigureAwait(false);
}
@ -216,7 +230,7 @@ public class InjectionJobEventHandler :
var loctionDto = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode)
.ConfigureAwait(false);
if (loctionDto.ColumnCode != 1)
if (loctionDto.RowCode == 1)
{
return true;
}

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

@ -52,6 +52,8 @@ public class TransferLibRequestEventHandler
var entity = eventData.Entity;
var enumTransSubType = Enum.Parse<EnumTransSubType>(entity.Type);
return;
if (entity.DirectCreateNote)
{
//todo 等云峰做完处理

Loading…
Cancel
Save