|
|
@ -937,14 +937,28 @@ 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); |
|
|
|
var toloc =await _locationAppService.GetByCodeAsync(detail.RecommendToLocationCode).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"); |
|
|
|
} |
|
|
|