|
|
@ -43,7 +43,7 @@ public class InspectJobAppService |
|
|
|
var result = await _inspectJobManager.AddAsync(entity).ConfigureAwait(false); |
|
|
|
|
|
|
|
var dto = ObjectMapper.Map<InspectJob, InspectJobDTO>(result); |
|
|
|
|
|
|
|
|
|
|
|
return dto; |
|
|
|
} |
|
|
|
|
|
|
@ -55,18 +55,27 @@ public class InspectJobAppService |
|
|
|
public virtual async Task<InspectJobSummaryDetailDTO> CompleteSummaryDetailStatusAsync(Guid id, |
|
|
|
Guid summaryDetailId, InspectJobCompleteSummaryDetailInput input) |
|
|
|
{ |
|
|
|
if (input.FilesList != null && input.FilesList.Any()) |
|
|
|
try |
|
|
|
{ |
|
|
|
var dict = await _fileAppService.CreateManyHasDictAsync(input.FilesList).ConfigureAwait(false); |
|
|
|
input.InspectReport = JsonSerializer.Serialize(dict); |
|
|
|
} |
|
|
|
if (input.FilesList != null && input.FilesList.Any()) |
|
|
|
{ |
|
|
|
var dict = await _fileAppService.CreateManyHasDictAsync(input.FilesList).ConfigureAwait(false); |
|
|
|
input.InspectReport = JsonSerializer.Serialize(dict); |
|
|
|
} |
|
|
|
|
|
|
|
var summaryDetail = ObjectMapper.Map<InspectJobCompleteSummaryDetailInput, InspectJobSummaryDetail>(input); |
|
|
|
var summaryDetail = ObjectMapper.Map<InspectJobCompleteSummaryDetailInput, InspectJobSummaryDetail>(input); |
|
|
|
|
|
|
|
var entity = await _inspectJobManager |
|
|
|
.CompleteSummaryDetailStatusAsync(id, summaryDetailId, summaryDetail, CurrentUser).ConfigureAwait(false); |
|
|
|
var entity = await _inspectJobManager |
|
|
|
.CompleteSummaryDetailStatusAsync(id, summaryDetailId, summaryDetail, CurrentUser).ConfigureAwait(false); |
|
|
|
|
|
|
|
return ObjectMapper.Map<InspectJobSummaryDetail, InspectJobSummaryDetailDTO>(entity); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
|
|
|
|
throw new UserFriendlyException($"{ex.Message}"); |
|
|
|
} |
|
|
|
|
|
|
|
return ObjectMapper.Map<InspectJobSummaryDetail, InspectJobSummaryDetailDTO>(entity); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|