Browse Source

up

Agv分支2024-11-19
赵新宇 4 months ago
parent
commit
4932c3447f
  1. 23
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  2. 21
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs
  3. 19
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs
  4. 21
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs

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

@ -937,13 +937,27 @@ public class AssembleIssueJobAppService
return ReturnMessage("-1", $"{entity.Number}任务单据已结束!");
}
try
{
foreach (var detail in entity.Details)
{
var detailDto = new AssembleIssueJobDetailDTO();
var detailDto = new KittingIssueJobDetailDTO();
if (!string.IsNullOrEmpty(detail.TransferLibFromLocationCode))
{
var fromloc = new LocationDTO();
if (detail.TransferLibFromLocationCode == detail.RecommendFromLocationCode &&
detail.TransferLibToLocationCode == detail.RecommendToLocationCode)
{
//库移的最终目标 挪到 推荐的目标
fromloc = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode).ConfigureAwait(false);
}
else
{
//库移的最终目标 挪到 推荐的目标
var fromloc = await _locationAppService.GetByCodeAsync(detail.TransferLibToLocationCode).ConfigureAwait(false);
fromloc = await _locationAppService.GetByCodeAsync(detail.TransferLibToLocationCode).ConfigureAwait(false);
}
var toloc = await _locationAppService.GetByCodeAsync(detail.RecommendToLocationCode).ConfigureAwait(false);
detailDto.InjectFrom(detail);
@ -994,6 +1008,11 @@ public class AssembleIssueJobAppService
await ExecuteDetailExtAsync(entity.Id, entity.Details.First().Id, detailDto).ConfigureAwait(false);
}
}
catch (Exception e)
{
return ReturnMessage("-1", e.Message);
}
return ReturnMessage("0", "OK");
}

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

@ -908,13 +908,27 @@ public class InjectionIssueJobAppService
return ReturnMessage("-1", $"{entity.Number}任务单据已结束!");
}
try
{
foreach (var detail in entity.Details)
{
var detailDto = new InjectionIssueJobDetailDTO();
if (!string.IsNullOrEmpty(detail.TransferLibFromLocationCode))
{
var fromloc = new LocationDTO();
if (detail.TransferLibFromLocationCode == detail.RecommendFromLocationCode &&
detail.TransferLibToLocationCode == detail.RecommendToLocationCode)
{
//库移的最终目标 挪到 推荐的目标
fromloc = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode).ConfigureAwait(false);
}
else
{
//库移的最终目标 挪到 推荐的目标
var fromloc = await _locationAppService.GetByCodeAsync(detail.TransferLibToLocationCode).ConfigureAwait(false);
fromloc = await _locationAppService.GetByCodeAsync(detail.TransferLibToLocationCode).ConfigureAwait(false);
}
var toloc = await _locationAppService.GetByCodeAsync(detail.RecommendToLocationCode).ConfigureAwait(false);
detailDto.InjectFrom(detail);
@ -965,6 +979,11 @@ public class InjectionIssueJobAppService
await ExecuteDetailExtAsync(entity.Id, entity.Details.First().Id, detailDto).ConfigureAwait(false);
}
}
catch (Exception e)
{
return ReturnMessage("-1", e.Message);
}
return ReturnMessage("0", "OK");
}

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

@ -916,9 +916,21 @@ public class KittingIssueJobAppService
{
var detailDto = new KittingIssueJobDetailDTO();
if (!string.IsNullOrEmpty(detail.TransferLibFromLocationCode))
{
var fromloc = new LocationDTO();
if (detail.TransferLibFromLocationCode == detail.RecommendFromLocationCode &&
detail.TransferLibToLocationCode == detail.RecommendToLocationCode)
{
//库移的最终目标 挪到 推荐的目标
fromloc = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode).ConfigureAwait(false);
}
else
{
//库移的最终目标 挪到 推荐的目标
var fromloc = await _locationAppService.GetByCodeAsync(detail.TransferLibToLocationCode).ConfigureAwait(false);
fromloc = await _locationAppService.GetByCodeAsync(detail.TransferLibToLocationCode).ConfigureAwait(false);
}
var toloc = await _locationAppService.GetByCodeAsync(detail.RecommendToLocationCode).ConfigureAwait(false);
detailDto.InjectFrom(detail);
@ -966,12 +978,13 @@ public class KittingIssueJobAppService
detailDto.HandledFromLot = detail.RecommendToLot;
detailDto.HandledFromPackingCode = detail.RecommendToPackingCode;
}
await ExecuteDetailExtAsync(entity.Id, entity.Details.First().Id, detailDto).ConfigureAwait(false);
}
}
catch (Exception ex)
catch (Exception e)
{
return ReturnMessage("-1", ex.Message);
return ReturnMessage("-1", e.Message);
}
return ReturnMessage("0", "OK");
}

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

@ -908,13 +908,27 @@ public class SparePartIssueJobAppService
{
return ReturnMessage("-1", $"{entity.Number}任务单据已结束!");
}
try
{
foreach (var detail in entity.Details)
{
var detailDto = new SparePartIssueJobDetailDTO();
if (!string.IsNullOrEmpty(detail.TransferLibFromLocationCode))
{
var fromloc = new LocationDTO();
if (detail.TransferLibFromLocationCode == detail.RecommendFromLocationCode &&
detail.TransferLibToLocationCode == detail.RecommendToLocationCode)
{
//库移的最终目标 挪到 推荐的目标
fromloc = await _locationAppService.GetByCodeAsync(detail.RecommendFromLocationCode).ConfigureAwait(false);
}
else
{
//库移的最终目标 挪到 推荐的目标
var fromloc = await _locationAppService.GetByCodeAsync(detail.TransferLibToLocationCode).ConfigureAwait(false);
fromloc = await _locationAppService.GetByCodeAsync(detail.TransferLibToLocationCode).ConfigureAwait(false);
}
var toloc = await _locationAppService.GetByCodeAsync(detail.RecommendToLocationCode).ConfigureAwait(false);
detailDto.InjectFrom(detail);
@ -965,6 +979,11 @@ public class SparePartIssueJobAppService
await ExecuteDetailExtAsync(entity.Id, entity.Details.First().Id, detailDto).ConfigureAwait(false);
}
}
catch (Exception e)
{
return ReturnMessage("-1", e.Message);
}
return new AgvResultObject
{

Loading…
Cancel
Save