diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs index 36e28c021..0b1fdb6c8 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs @@ -113,8 +113,7 @@ public class ProductionLineItemAppService : validationRresult.Add(new ValidationResult("[来源]成品/半成品库位 或 [来源]原材料库位 或 [完工]线边库位 不能都为空")); } } - - [HttpPost("get-by-product")] + [HttpPost("get-by-product")] public virtual async Task> GetByProductLineCodeAsync(string productLineCode) { var entityList = await _repository.GetListAsync(p => p.ProdLineCode == productLineCode).ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs index 0ec163a40..8e512d2a7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs @@ -988,8 +988,8 @@ public class AssembleIssueJobAppService /// /// 返回信息 /// - /// 0成功其他失败 - /// OK成功其他错误信息 + /// 0成功其他失败 + /// OK成功其他错误信息 /// private AgvResultObject ReturnMessage(string code, string message) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs index c7564d9ec..ca050194a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs @@ -263,7 +263,7 @@ public class CoatingIssueJobAppService var jobDto = ObjectMapper.Map(job); - var isDoingAgv = await DoingAgvAsync(jobDto, jobDetail.TransferLibToLocationCode, jobDetail.RecommendToLocationCode).ConfigureAwait(false); + var isDoingAgv = await DoingAgvAsync(jobDto, jobDetail.TransferLibToLocationCode, jobDetail.HandledToLocationCode).ConfigureAwait(false); if (isDoingAgv) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs index f0031ae2b..d821f923d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs @@ -259,7 +259,7 @@ public class InjectionIssueJobAppService jobDetail.TransferLibToSupplierBatch = transferLibNoteDetail.HandledToSupplierBatch; jobDetail.TransferLibToWarehouseCode = transferLibNoteDetail.HandledToWarehouseCode; var jobDto = ObjectMapper.Map(job); - var isDoingAgv = await DoingAgvAsync(jobDto, jobDetail.TransferLibToLocationCode, jobDetail.RecommendToLocationCode).ConfigureAwait(false); + var isDoingAgv = await DoingAgvAsync(jobDto, jobDetail.TransferLibToLocationCode, jobDetail.HandledToLocationCode).ConfigureAwait(false); if (isDoingAgv) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs index 4e7d72604..6e83fcd96 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs @@ -259,7 +259,7 @@ public class KittingIssueJobAppService var jobDto = ObjectMapper.Map(job); - var isDoingAgv = await DoingAgvAsync(jobDto, jobDetail.TransferLibToLocationCode, jobDetail.RecommendToLocationCode).ConfigureAwait(false); + var isDoingAgv = await DoingAgvAsync(jobDto, jobDetail.TransferLibToLocationCode, jobDetail.HandledToLocationCode).ConfigureAwait(false); if (isDoingAgv) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs index c384967c8..142458c8d 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs @@ -260,7 +260,7 @@ public class SparePartIssueJobAppService var jobDto = ObjectMapper.Map(job); - var isDoingAgv = await DoingAgvAsync(jobDto, jobDetail.TransferLibToLocationCode, jobDetail.RecommendToLocationCode).ConfigureAwait(false); + var isDoingAgv = await DoingAgvAsync(jobDto, jobDetail.TransferLibToLocationCode, jobDetail.HandledToLocationCode).ConfigureAwait(false); if (isDoingAgv) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index 2bf7ba934..d446f24b2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -129,6 +129,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase CheckLocation(toLocationDto, detail); CheckFromLocation(fromLocationDto, detail); + await CheckPackingCode(detail.FromPackingCode).ConfigureAwait(false); if (toLocationDto.Type != fromLocationDto.Type) { throw new UserFriendlyException($"来源库位与目标库位类型不一致"); @@ -398,7 +399,14 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { var entity = ObjectMapper.Map(input); - entity=await _transferNoteManager.CreateAsync(entity).ConfigureAwait(false); + foreach (var detail in entity.Details) + { + if (!string.IsNullOrEmpty(detail.FromPackingCode)) + { + await CheckPackingCode(detail.FromPackingCode).ConfigureAwait(false); + } + } + entity =await _transferNoteManager.CreateAsync(entity).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); @@ -419,6 +427,13 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase foreach (var entity in entitys) { + foreach (var detail in entity.Details) + { + if (!string.IsNullOrEmpty(detail.FromPackingCode)) + { + await CheckPackingCode(detail.FromPackingCode).ConfigureAwait(false); + } + } resultEntity.Add(await _transferNoteManager.CreateAsync(entity).ConfigureAwait(false)); _ = ObjectMapper.Map(entity); } @@ -426,6 +441,24 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase return ObjectMapper.Map, List>(resultEntity); } + /// + /// 校验箱码 + /// + /// + /// + /// + private async Task CheckPackingCode(string packingCode) + { + var packingcode = await _expectOutAppService.GetListByPackingCodeAsync(packingCode).ConfigureAwait(false); + if (packingcode != null) + { + throw new UserFriendlyException($"箱码{packingCode}在预计出中已存在!"); + } + } + + + + /// /// 确认对应的记录单 /// @@ -703,7 +736,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { TransferNoteEditInput transfer = new TransferNoteEditInput(); transfer.CallJobNumber = detail.OrderNum; - transfer.Type = EnumTransSubType.Agv_Transfer_WIP.ToString(); + transfer.Worker = "Agv"; transfer.UseOnTheWayLocation = false; List transferNoteDetailInputs = new List(); @@ -724,19 +757,21 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase { errors.Add($"结束点{detail.EndPosition}库位没查到"); } - -// if(tolocation.WorkGroupCode) - -// tolocation.LocationGroupCode= - - -//APA-KWZ -//PPA-KWZ -//IPA-KWZ - - - - + switch (tolocation.WarehouseCode) + { + case "APA-KWZ":// 装配线边库位组 + transfer.Type = EnumTransSubType.Transfer_Assemble.ToString(); + break; + case "PPA-KWZ"://涂装线边库位组 + transfer.Type = EnumTransSubType.Transfer_Coating.ToString(); + break; + case "IPA-KWZ"://注塑线边库位组 + transfer.Type = EnumTransSubType.Transfer_Injection.ToString(); + break; + default: + throw new UserFriendlyException("结束库位、不是喷涂、注塑、涂装等线边类型!"); + + } var item = await _itemBasicAppService.GetByCodeAsync(detail.MatCode).ConfigureAwait(false); if (item == null)