Browse Source

添加是否完成状态判断

dev_DY_CC
赵新宇 5 months ago
parent
commit
618af1f89c
  1. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/ITransferLibJobAppService.cs
  2. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs
  3. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  4. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs
  5. 10
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs
  6. 14
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs
  7. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs
  8. 20
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
  9. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/ITransferLibJobAppService.cs

@ -8,4 +8,7 @@ public interface ITransferLibJobAppService
{
Task<List<TransferLibJobDTO>> GetByRequestNumberAsync(string requestNumber);
Task CompleteByRequestAsync(string requestNumber);
}

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs

@ -22,5 +22,7 @@ public interface ITransferLibRequestAppService
Task CompleteByCallRequestNumberAsync(string callRequestNumber);
Task CompleteByJobNumAsync(string jobNumber);
Task<bool> IsCompleted(string jobNumber);
}

12
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs

@ -873,10 +873,20 @@ public class AssembleIssueJobAppService
//await _expectOutAppService.RemoveByNumberAsync(assembleIssueJob.Number).ConfigureAwait(false);
await AssembleIssueRequestAppService.UpdateStatusCompletedAsync(assembleIssueJob.AssembleRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CompleteByJobNumAsync(assembleIssueJob.Number).ConfigureAwait(false);
var flag=await _transferLibRequestAppService.IsCompleted(assembleIssueJob.Number).ConfigureAwait(false);
if (flag==false)
{
await _transferLibRequestAppService.CompleteByJobNumAsync(assembleIssueJob.Number).ConfigureAwait(false);
}

12
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs

@ -693,7 +693,17 @@ public class CoatingIssueJobAppService
await CoatingIssueRequestAppService.UpdateStatusCompletedAsync(coatingIssueJob.CoatingRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CompleteByJobNumAsync(coatingIssueJob.Number).ConfigureAwait(false);
// await _transferLibRequestAppService.CompleteByJobNumAsync(coatingIssueJob.Number).ConfigureAwait(false);
var flag = await _transferLibRequestAppService.IsCompleted(coatingIssueJob.Number).ConfigureAwait(false);
if (flag == false)
{
await _transferLibRequestAppService.CompleteByJobNumAsync(coatingIssueJob.Number).ConfigureAwait(false);
}
await Task.CompletedTask.ConfigureAwait(false);
}

10
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs

@ -640,7 +640,15 @@ public class InjectionIssueJobAppService
await InjectionIssueRequestAppService.UpdateStatusCompletedAsync(injectionIssueJob.InjectionRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CompleteByJobNumAsync(injectionIssueJob.Number).ConfigureAwait(false);
var flag = await _transferLibRequestAppService.IsCompleted(injectionIssueJob.Number).ConfigureAwait(false);
if (flag == false)
{
await _transferLibRequestAppService.CompleteByJobNumAsync(injectionIssueJob.Number).ConfigureAwait(false);
}
await Task.CompletedTask.ConfigureAwait(false);
}

14
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs

@ -652,7 +652,19 @@ public class KittingIssueJobAppService
await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber,kittingIssueJob.Number)
.ConfigureAwait(false);
await _transferLibRequestAppService.CompleteByJobNumAsync(kittingIssueJob.Number).ConfigureAwait(false);
var flag = await _transferLibRequestAppService.IsCompleted(kittingIssueJob.Number).ConfigureAwait(false);
if (flag == false)
{
await _transferLibRequestAppService.CompleteByJobNumAsync(kittingIssueJob.Number).ConfigureAwait(false);
}
// await _transferLibRequestAppService.CompleteByJobNumAsync(kittingIssueJob.Number).ConfigureAwait(false);
await Task.CompletedTask.ConfigureAwait(false);
}

13
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs

@ -628,8 +628,17 @@ public class SparePartIssueJobAppService
//await _expectOutAppService.RemoveByNumberAsync(sparePartIssueJob.Number).ConfigureAwait(false);
await SparePartIssueRequestAppService.UpdateStatusCompletedAsync(sparePartIssueJob.SparePartRequestNumber)
.ConfigureAwait(false);
var flag = await _transferLibRequestAppService.IsCompleted(sparePartIssueJob.Number).ConfigureAwait(false);
if (flag == false)
{
await _transferLibRequestAppService.CompleteByJobNumAsync(sparePartIssueJob.Number).ConfigureAwait(false);
}
//await SparePartIssueRequestAppService.UpdateStatusCompletedAsync(sparePartIssueJob.SparePartRequestNumber)
// .ConfigureAwait(false);

20
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs

@ -299,6 +299,26 @@ public class TransferLibJobAppService
return ObjectMapper.Map<List<TransferLibJob>, List<TransferLibJobDTO>>(list);
}
[HttpPost("get-by-job/Id")]
[UnitOfWork]
public async Task<bool> IsCompleted(string jobNumber)
{
var list = await _repository.GetListAsync(p => p.JobNumber == jobNumber).ConfigureAwait(false);
if (list.Count > 0)
{
return true;
}
return false;
}
public override async Task CancelAcceptAsync(Guid id)
{
var job = await _repository.FindAsync(p => p.Id == id).ConfigureAwait(false);

15
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs

@ -493,4 +493,19 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase
protected void ChecktQty(TransferLibRequestImportInput importInput, List<ValidationResult> validationRresult)
{
}
public async Task<bool> IsCompleted(string jobNumber)
{
var list = await _repository.GetListAsync(p => p.CallJobNumber == jobNumber).ConfigureAwait(false);
if (list.Count > 0)
{
var entity=list.FirstOrDefault();
if (entity.RequestStatus == EnumRequestStatus.Completed)
{
return true;
}
}
return false;
}
}

Loading…
Cancel
Save