Browse Source

非生产领料

dev_DY_CC
郑勃旭 6 months ago
parent
commit
26ac95edef
  1. 12
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs
  2. 10
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs
  3. 12
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs
  4. 14
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs
  5. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/ITransferLibJobAppService.cs
  6. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs
  7. 31
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  8. 18
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs
  9. 21
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs
  10. 23
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs
  11. 21
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs
  12. 20
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
  13. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs
  14. 33
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs

12
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs

@ -44,7 +44,7 @@ public class AssembleIssueJobsController : AbpController
if (jobStatus == "ALL")
{
status.Add((int)EnumJobStatus.Open);
// status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
@ -52,10 +52,10 @@ public class AssembleIssueJobsController : AbpController
{
status.Add((int)EnumJobStatus.Open);
}
//else if (jobStatus == "Wait")
//{
// status.Add((int)EnumJobStatus.Wait);
//}
else if (jobStatus == "Wait")
{
status.Add((int)EnumJobStatus.Wait);
}
else
{
status.Add((int)EnumJobStatus.Done);
@ -121,7 +121,7 @@ public class AssembleIssueJobsController : AbpController
var status = new List<int>
{
(int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial
//, (int)EnumJobStatus.Wait
, (int)EnumJobStatus.Wait
};
var jsonStatus = JsonSerializer.Serialize(status);

10
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs

@ -44,7 +44,7 @@ public class CoatingIssueJobsController : AbpController
if (jobStatus == "ALL")
{
status.Add((int)EnumJobStatus.Open);
//status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
@ -52,10 +52,10 @@ public class CoatingIssueJobsController : AbpController
{
status.Add((int)EnumJobStatus.Open);
}
//else if (jobStatus == "Wait")
//{
// status.Add((int)EnumJobStatus.Wait);
//}
else if (jobStatus == "Wait")
{
status.Add((int)EnumJobStatus.Wait);
}
else
{
status.Add((int)EnumJobStatus.Done);

12
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs

@ -44,7 +44,7 @@ public class InjectionIssueJobsController : AbpController
if (jobStatus == "ALL")
{
status.Add((int)EnumJobStatus.Open);
//status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
@ -52,10 +52,10 @@ public class InjectionIssueJobsController : AbpController
{
status.Add((int)EnumJobStatus.Open);
}
//else if (jobStatus == "Wait")
//{
// status.Add((int)EnumJobStatus.Wait);
//}
else if (jobStatus == "Wait")
{
status.Add((int)EnumJobStatus.Wait);
}
else
{
status.Add((int)EnumJobStatus.Done);
@ -121,7 +121,7 @@ public class InjectionIssueJobsController : AbpController
var status = new List<int>
{
(int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial
//, (int)EnumJobStatus.Wait
, (int)EnumJobStatus.Wait
};
var jsonStatus = JsonSerializer.Serialize(status);

14
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs

@ -44,7 +44,7 @@ public class KittingIssueJobsController : AbpController
if (jobStatus=="ALL")
{
status.Add((int)EnumJobStatus.Open);
//status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
@ -52,10 +52,10 @@ public class KittingIssueJobsController : AbpController
{
status.Add((int)EnumJobStatus.Open);
}
//else if(jobStatus == "Wait")
//{
// status.Add((int)EnumJobStatus.Wait);
//}
else if (jobStatus == "Wait")
{
status.Add((int)EnumJobStatus.Wait);
}
else
{
status.Add((int)EnumJobStatus.Done);
@ -120,8 +120,8 @@ public class KittingIssueJobsController : AbpController
{
var status = new List<int>
{
(int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial
//(int)EnumJobStatus.Wait
(int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial,
(int)EnumJobStatus.Wait
};
var jsonStatus = JsonSerializer.Serialize(status);

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);
}

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

@ -20,4 +20,9 @@ public interface ITransferLibRequestAppService
Task CompleteByJobAsync(string requestNumber);
Task CancelByCallRequestNumberAsync(string callJobNumber);
Task CompleteByCallRequestNumberAsync(string callRequestNumber);
Task CompleteByJobNumAsync(string jobNumber);
Task<bool> IsCompleted(string jobNumber);
}

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

@ -129,15 +129,17 @@ public class AssembleIssueJobAppService
{
throw new UserFriendlyException($"未找到ID为 {id} 的任务");
}
if (assembleJob.JobStatus == EnumJobStatus.Open ||
assembleJob.JobStatus == EnumJobStatus.Partial ||
assembleJob.JobStatus == EnumJobStatus.Wait ||
assembleJob.JobStatus == EnumJobStatus.Doing)
{
await _expectOutAppService.RemoveByNumberAsync(assembleJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(assembleJob.AssembleRequestNumber)
.ConfigureAwait(false);
//await _transferLibRequestAppService.CancelByCallRequestNumberAsync(assembleJob.Number)
// .ConfigureAwait(false);
await _transferLibRequestAppService.CompleteByJobNumAsync(assembleJob.Number)
.ConfigureAwait(false);
assembleJob.JobStatus = EnumJobStatus.Cancelled;
await _repository.UpdateAsync(assembleJob).ConfigureAwait(false);
@ -378,7 +380,7 @@ public class AssembleIssueJobAppService
await AssembleIssueRequestAppService.UpdateStatusCompletedAsync(assembleIssueJob.AssembleRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(assembleIssueJob.AssembleRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(assembleIssueJob.Number)
.ConfigureAwait(false);
await _repository.UpdateAsync(assembleIssueJob).ConfigureAwait(false);
@ -400,7 +402,7 @@ public class AssembleIssueJobAppService
assembleIssueJob.JobStatus = EnumJobStatus.Done;
await _repository.UpdateAsync(assembleIssueJob).ConfigureAwait(false);
await _expectOutAppService.RemoveByNumberAsync(assembleIssueJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(assembleIssueJob.AssembleRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(assembleIssueJob.Number)
.ConfigureAwait(false);
}
}
@ -746,12 +748,12 @@ public class AssembleIssueJobAppService
if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode != 1)
{
input.JobStatus = EnumJobStatus.Open;
input.JobStatus = EnumJobStatus.Wait;
}
else if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode == 1)
{
input.JobStatus = EnumJobStatus.Wait;
jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate;
jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode;
@ -871,9 +873,24 @@ public class AssembleIssueJobAppService
//await _expectOutAppService.RemoveByNumberAsync(assembleIssueJob.Number).ConfigureAwait(false);
await AssembleIssueRequestAppService.UpdateStatusCompletedAsync(assembleIssueJob.AssembleRequestNumber)
.ConfigureAwait(false);
var flag=await _transferLibRequestAppService.IsCompleted(assembleIssueJob.Number).ConfigureAwait(false);
if (flag==false)
{
await _transferLibRequestAppService.CompleteByJobNumAsync(assembleIssueJob.Number).ConfigureAwait(false);
}
await Task.CompletedTask.ConfigureAwait(false);
}

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

@ -125,8 +125,7 @@ public class CoatingIssueJobAppService
coatingJob.JobStatus == EnumJobStatus.Doing)
{
await _expectOutAppService.RemoveByNumberAsync(coatingJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(coatingJob.CoatingRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CompleteByJobNumAsync(coatingJob.Number).ConfigureAwait(false);
coatingJob.JobStatus = EnumJobStatus.Cancelled;
await _repository.UpdateAsync(coatingJob).ConfigureAwait(false);
@ -299,7 +298,7 @@ public class CoatingIssueJobAppService
await CoatingIssueRequestAppService.UpdateStatusCompletedAsync(coatingIssueJob.CoatingRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(coatingIssueJob.CoatingRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(coatingIssueJob.Number)
.ConfigureAwait(false);
await _repository.UpdateAsync(coatingIssueJob).ConfigureAwait(false);
@ -321,7 +320,7 @@ public class CoatingIssueJobAppService
coatingIssueJob.JobStatus = EnumJobStatus.Done;
await _repository.UpdateAsync(coatingIssueJob).ConfigureAwait(false);
await _expectOutAppService.RemoveByNumberAsync(coatingIssueJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(coatingIssueJob.CoatingRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(coatingIssueJob.Number)
.ConfigureAwait(false);
}
}
@ -694,6 +693,17 @@ public class CoatingIssueJobAppService
await CoatingIssueRequestAppService.UpdateStatusCompletedAsync(coatingIssueJob.CoatingRequestNumber)
.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);
}

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

@ -117,8 +117,8 @@ public class InjectionIssueJobAppService
injectionJob.JobStatus == EnumJobStatus.Doing)
{
await _expectOutAppService.RemoveByNumberAsync(injectionJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(injectionJob.InjectionRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CompleteByJobNumAsync(injectionJob.Number).ConfigureAwait(false);
injectionJob.JobStatus = EnumJobStatus.Cancelled;
await _repository.UpdateAsync(injectionJob).ConfigureAwait(false);
@ -276,7 +276,7 @@ public class InjectionIssueJobAppService
await InjectionIssueRequestAppService.UpdateStatusCompletedAsync(injectionIssueJob.InjectionRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(injectionIssueJob.InjectionRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(injectionIssueJob.Number)
.ConfigureAwait(false);
await _repository.UpdateAsync(injectionIssueJob).ConfigureAwait(false);
@ -298,7 +298,7 @@ public class InjectionIssueJobAppService
injectionIssueJob.JobStatus = EnumJobStatus.Done;
await _repository.UpdateAsync(injectionIssueJob).ConfigureAwait(false);
await _expectOutAppService.RemoveByNumberAsync(injectionIssueJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(injectionIssueJob.InjectionRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(injectionIssueJob.Number)
.ConfigureAwait(false);
}
}
@ -537,11 +537,11 @@ public class InjectionIssueJobAppService
if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode != 1)
{
input.JobStatus = EnumJobStatus.Open;
input.JobStatus = EnumJobStatus.Wait;
}
else if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode == 1)
{
input.JobStatus = EnumJobStatus.Wait;
jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate;
jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode;
jobDetailInputdetail.TransferLibFromExpireDate = jobDetailInputdetail.RecommendFromExpireDate;
@ -641,6 +641,15 @@ public class InjectionIssueJobAppService
await InjectionIssueRequestAppService.UpdateStatusCompletedAsync(injectionIssueJob.InjectionRequestNumber)
.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);
}

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

@ -125,7 +125,7 @@ public class KittingIssueJobAppService
kittingJob.JobStatus == EnumJobStatus.Doing)
{
await _expectOutAppService.RemoveByNumberAsync(kittingJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(kittingJob.KittingRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(kittingJob.KittingRequestNumber)
.ConfigureAwait(false);
kittingJob.JobStatus = EnumJobStatus.Cancelled;
@ -283,7 +283,7 @@ public class KittingIssueJobAppService
await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber, kittingIssueJob.Number)
.ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(kittingIssueJob.KittingRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(kittingIssueJob.Number)
.ConfigureAwait(false);
await _repository.UpdateAsync(kittingIssueJob).ConfigureAwait(false);
@ -305,7 +305,7 @@ public class KittingIssueJobAppService
kittingIssueJob.JobStatus = EnumJobStatus.Done;
await _repository.UpdateAsync(kittingIssueJob).ConfigureAwait(false);
await _expectOutAppService.RemoveByNumberAsync(kittingIssueJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(kittingIssueJob.KittingRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(kittingIssueJob.Number)
.ConfigureAwait(false);
}
}
@ -542,12 +542,12 @@ public class KittingIssueJobAppService
if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode != 1)
{
input.JobStatus = EnumJobStatus.Open;
input.JobStatus = EnumJobStatus.Wait;
}
else if (loctionDto.Type == EnumLocationType.RAW && loctionDto.RowCode == 1)
{
input.JobStatus = EnumJobStatus.Wait;
jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate;
jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode;
@ -653,6 +653,19 @@ public class KittingIssueJobAppService
await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber,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);
}

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

@ -118,7 +118,7 @@ public class SparePartIssueJobAppService
sparePartJob.JobStatus == EnumJobStatus.Doing)
{
await _expectOutAppService.RemoveByNumberAsync(sparePartJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(sparePartJob.SparePartRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(sparePartJob.SparePartRequestNumber)
.ConfigureAwait(false);
sparePartJob.JobStatus = EnumJobStatus.Cancelled;
@ -277,7 +277,7 @@ public class SparePartIssueJobAppService
await SparePartIssueRequestAppService.UpdateStatusCompletedAsync(sparePartIssueJob.SparePartRequestNumber)
.ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(sparePartIssueJob.SparePartRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(sparePartIssueJob.Number)
.ConfigureAwait(false);
await _repository.UpdateAsync(sparePartIssueJob).ConfigureAwait(false);
@ -299,7 +299,7 @@ public class SparePartIssueJobAppService
sparePartIssueJob.JobStatus = EnumJobStatus.Done;
await _repository.UpdateAsync(sparePartIssueJob).ConfigureAwait(false);
await _expectOutAppService.RemoveByNumberAsync(sparePartIssueJob.Number).ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(sparePartIssueJob.SparePartRequestNumber)
await _transferLibRequestAppService.CompleteByJobNumAsync(sparePartIssueJob.Number)
.ConfigureAwait(false);
}
}
@ -628,8 +628,19 @@ 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);
await Task.CompletedTask.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);

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedIssueJobs/UnplannedIssueJobAppService.cs

@ -161,7 +161,7 @@ public class UnplannedIssueJobAppService
foreach (var requestDtoDetail in requestDto.Details) //非计划领料明细
{
var locationCodes = await _locationAppService
.GetListByErpLocationCodes(new StringList(requestDtoDetail.LocationErpCode))
.GetListByErpLocationCodes(new StringList(requestDtoDetail.FromErpLocationCode))
.ConfigureAwait(false); //获取存放库位
if (locationCodes.Count == 0)
{

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

@ -378,7 +378,7 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase
}
else
{
throw new UserFriendlyException($"【{request.RequestStatus.GetDisplayName()}】状态不允许取消");
throw new UserFriendlyException($"【{request.RequestStatus.GetDisplayName()}】状态不允许完成");
}
await _transferLibJobAppService.CompleteByRequestAsync(request.Number).ConfigureAwait(false);
@ -401,11 +401,25 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase
{
if (request.RequestStatus != EnumRequestStatus.Completed)
{
throw new UserFriendlyException($"【{request.RequestStatus.GetDisplayName()}】状态不允许取消");
throw new UserFriendlyException($"【{request.RequestStatus.GetDisplayName()}】状态不允许完成");
}
}
}
[HttpPost("Complete-By-JobNum")]
public async Task CompleteByJobNumAsync(string jobNumber)
{
var list = await _repository.GetListAsync(p => p.CallJobNumber == jobNumber).ConfigureAwait(false);
foreach (var request in list)
{
await CompleteAsync(request.Id).ConfigureAwait(false);
}
}
/// <summary>
/// 【创建】库移请求
/// </summary>
@ -479,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