Browse Source

提交更新装配任务

Agv分支2024-11-19
赵新宇 5 months ago
parent
commit
2e0a838fa1
  1. 15
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  2. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs
  3. 14
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferRequestEventHandler.cs

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

@ -867,7 +867,6 @@ public class AssembleIssueJobAppService
{ {
successList.Add(jobres.Message); successList.Add(jobres.Message);
} }
if (errors.Count > 0) if (errors.Count > 0)
{ {
res.Code = -1; res.Code = -1;
@ -964,18 +963,14 @@ public class AssembleIssueJobAppService
{ {
errors.Add($"零件号{detail.MatCode}不存在!"); errors.Add($"零件号{detail.MatCode}不存在!");
} }
var entity = itmDetails.FirstOrDefault(p => p.ItemCode == detail.MatCode); var entity = itmDetails.FirstOrDefault(p => p.ItemCode == detail.MatCode);
if (entity == null) if (entity == null)
{ {
errors.Add($"零件号{detail.MatCode}不在任务明细内!"); errors.Add($"零件号{detail.MatCode}不在任务明细内!");
} }
if (errors.Count > 0) if (errors.Count > 0)
{ {
await unitOfWork.RollbackAsync().ConfigureAwait(false);
return ret = new AgvResultObject() return ret = new AgvResultObject()
{ {
Code = "-1", Code = "-1",
@ -985,7 +980,7 @@ public class AssembleIssueJobAppService
} }
var dto = new AssembleIssueJobDetailDTO(); var dto = new AssembleIssueJobDetailDTO();
dto.InjectFrom(entity); dto.InjectFrom(entity);
dto.HandledToLocationCode = toloc.Code; dto.HandledToLocationCode = tolocation.Code;
dto.HandledToLocationGroup = tolocation.LocationGroupCode; dto.HandledToLocationGroup = tolocation.LocationGroupCode;
dto.HandledToLocationArea = tolocation.AreaCode; dto.HandledToLocationArea = tolocation.AreaCode;
dto.HandledToLocationErpCode = tolocation.ErpLocationCode; dto.HandledToLocationErpCode = tolocation.ErpLocationCode;
@ -1006,14 +1001,12 @@ public class AssembleIssueJobAppService
details.Add(dto); details.Add(dto);
//await ExecuteDetailExtAsync(itm.Id, entity.Id, dto).ConfigureAwait(false); //await ExecuteDetailExtAsync(itm.Id, entity.Id, dto).ConfigureAwait(false);
} }
if (errors.Count > 0) if (errors.Count > 0)
{ {
await unitOfWork.RollbackAsync().ConfigureAwait(false);
ret = new AgvResultObject() ret = new AgvResultObject()
{ {
Code = "-1", Code = "-1",
@ -1040,7 +1033,7 @@ public class AssembleIssueJobAppService
ReqCode = job.AssembleRequestNumber, ReqCode = job.AssembleRequestNumber,
Message = ex.Message, Message = ex.Message,
}; };
await unitOfWork.RollbackAsync(); await unitOfWork.RollbackAsync().ConfigureAwait(false);
return ret; return ret;
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs

@ -695,9 +695,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
transfer.Type = EnumTransSubType.Agv_Transfer_WIP.ToString(); transfer.Type = EnumTransSubType.Agv_Transfer_WIP.ToString();
transfer.Worker = "Agv"; transfer.Worker = "Agv";
transfer.UseOnTheWayLocation = false; transfer.UseOnTheWayLocation = false;
List<TransferNoteDetailInput> transferNoteDetailInputs = new List<TransferNoteDetailInput>(); List<TransferNoteDetailInput> transferNoteDetailInputs = new List<TransferNoteDetailInput>();
TransferNoteDetailInput detailInput = new TransferNoteDetailInput(); TransferNoteDetailInput detailInput = new TransferNoteDetailInput();
var fromloc = await _postionLocationAppService.GetByCodeAsync(detail.BeginPosition).ConfigureAwait(false); var fromloc = await _postionLocationAppService.GetByCodeAsync(detail.BeginPosition).ConfigureAwait(false);
if (fromloc == null) if (fromloc == null)

14
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferRequestEventHandler.cs

@ -49,8 +49,8 @@ public class TransferRequestEventHandler
{ {
try //try
{ //{
var entity = eventData.Entity; var entity = eventData.Entity;
var enumTransSubType = Enum.Parse<EnumTransSubType>(entity.Type); var enumTransSubType = Enum.Parse<EnumTransSubType>(entity.Type);
@ -85,11 +85,11 @@ public class TransferRequestEventHandler
} }
} }
} //}
catch (Exception e) //catch (Exception e)
{ //{
throw new UserFriendlyException($"{e.Message}"); // throw new UserFriendlyException($"{e.Message}");
} //}
} }

Loading…
Cancel
Save