|
|
@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using MyNamespace; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.ObjectMapping; |
|
|
|
using Win_in.Sfs.Basedata.Application.Contracts; |
|
|
|
using Win_in.Sfs.Shared.Domain.Shared; |
|
|
|
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; |
|
|
@ -60,6 +61,14 @@ public class CoatingIssueJobAppService |
|
|
|
_transferLibRequestAppService = transferLibRequestAppService; |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost("get-by-number-2")] |
|
|
|
public async Task<CoatingIssueJobDTO> GetByNumber2Async(string number) |
|
|
|
{ |
|
|
|
var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false); |
|
|
|
|
|
|
|
return ObjectMapper.Map<CoatingIssueJob, CoatingIssueJobDTO>(entity); |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost("add-many")] |
|
|
|
public override async Task<List<CoatingIssueJobDTO>> CreateManyAsync(List<CoatingIssueJobEditInput> inputs) |
|
|
|
{ |
|
|
@ -190,8 +199,22 @@ public class CoatingIssueJobAppService |
|
|
|
{ |
|
|
|
var coatingIssueJob = await _repository.GetAsync(masterId).ConfigureAwait(false); |
|
|
|
coatingIssueJob.JobStatus = EnumJobStatus.Doing; |
|
|
|
|
|
|
|
|
|
|
|
var coatingIssueJobDto = ObjectMapper.Map<CoatingIssueJob, CoatingIssueJobDTO>(coatingIssueJob); |
|
|
|
|
|
|
|
var fromLocationDto=await _locationAppService.GetByCodeAsync(issueJobDetailDto.HandledFromLocationCode).ConfigureAwait(false); |
|
|
|
var toLocationDto = await _locationAppService.GetByCodeAsync(issueJobDetailDto.HandledToLocationCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
issueJobDetailDto.HandledFromLocationArea = fromLocationDto.AreaCode; |
|
|
|
issueJobDetailDto.HandledFromLocationGroup = fromLocationDto.LocationGroupCode; |
|
|
|
issueJobDetailDto.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode; |
|
|
|
issueJobDetailDto.HandledFromWarehouseCode = fromLocationDto.WarehouseCode; |
|
|
|
|
|
|
|
issueJobDetailDto.HandledToLocationArea = toLocationDto.AreaCode; |
|
|
|
issueJobDetailDto.HandledToLocationGroup = toLocationDto.LocationGroupCode; |
|
|
|
issueJobDetailDto.HandledToLocationErpCode = toLocationDto.ErpLocationCode; |
|
|
|
issueJobDetailDto.HandledToWarehouseCode = toLocationDto.WarehouseCode; |
|
|
|
|
|
|
|
coatingIssueJobDto.Details = new List<CoatingIssueJobDetailDTO> { issueJobDetailDto }; |
|
|
|
var coatingIssueNoteEditInput = await BuildCoatingIssueNoteAsync(coatingIssueJobDto).ConfigureAwait(false); |
|
|
|
await _coatingIssueNoteAppService.CreateAsync(coatingIssueNoteEditInput).ConfigureAwait(false); |
|
|
|