Browse Source

Merge branch 'Agv分支2024-11-19' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into Agv分支2024-11-19

Agv分支2024-11-19
郑勃旭 4 months ago
parent
commit
a965b9fd54
  1. 3
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAppService.cs
  2. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  3. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs
  4. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs
  5. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs
  6. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs
  7. 65
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs

3
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<List<ProductionLineItemDTO>> GetByProductLineCodeAsync(string productLineCode)
{
var entityList = await _repository.GetListAsync(p => p.ProdLineCode == productLineCode).ConfigureAwait(false);

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

@ -988,8 +988,8 @@ public class AssembleIssueJobAppService
/// <summary>
/// 返回信息
/// </summary>
/// <param name="Code">0成功其他失败</param>
/// <param name="Message">OK成功其他错误信息</param>
/// <param name="code">0成功其他失败</param>
/// <param name="message">OK成功其他错误信息</param>
/// <returns></returns>
private AgvResultObject ReturnMessage(string code, string message)
{

2
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<CoatingIssueJob, CoatingIssueJobDTO>(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)
{

2
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<InjectionIssueJob, InjectionIssueJobDTO>(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)
{

2
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<KittingIssueJob, KittingIssueJobDTO>(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)
{

2
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<SparePartIssueJob, SparePartIssueJobDTO>(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)
{

65
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<TransferNoteEditInput, TransferNote>(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<TransferNote, TransferNoteDTO>(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<TransferNote, TransferNoteDTO>(entity);
}
@ -426,6 +441,24 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
return ObjectMapper.Map<List<TransferNote>, List<TransferNoteDTO>>(resultEntity);
}
/// <summary>
/// 校验箱码
/// </summary>
/// <param name="packingCode"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
private async Task CheckPackingCode(string packingCode)
{
var packingcode = await _expectOutAppService.GetListByPackingCodeAsync(packingCode).ConfigureAwait(false);
if (packingcode != null)
{
throw new UserFriendlyException($"箱码{packingCode}在预计出中已存在!");
}
}
/// <summary>
/// 确认对应的记录单
/// </summary>
@ -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<TransferNoteDetailInput> transferNoteDetailInputs = new List<TransferNoteDetailInput>();
@ -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)

Loading…
Cancel
Save