diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index ba9ebdec1..1cae76a89 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -107,8 +107,9 @@ namespace IRaCIS.Core.API.Controllers /// [HttpPost, Route("Inspection/configTrialBasicInfo/configTrialBasicInfo")] - public async Task ConfigTrialBasicInfo(InsBasicTrialConfig opt) + public async Task ConfigTrialBasicInfo(DataInspectionDto opt) { + var fun = _trialConfigService.ConfigTrialBasicInfo; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } @@ -120,7 +121,7 @@ namespace IRaCIS.Core.API.Controllers /// [HttpPost, Route("Inspection/configTrialBasicInfo/configTrialProcessInfo")] - public async Task ConfigTrialProcessInfo(InsTrialProcessConfig opt) + public async Task ConfigTrialProcessInfo(DataInspectionDto opt) { var fun = _trialConfigService.ConfigTrialProcessInfo; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); @@ -133,7 +134,7 @@ namespace IRaCIS.Core.API.Controllers /// [HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfo")] - public async Task ConfigTrialUrgentInfo(InsTrialUrgentConfig opt) + public async Task ConfigTrialUrgentInfo(DataInspectionDto opt) { var fun = _trialConfigService.ConfigTrialUrgentInfo; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index c339dccdf..cf00aa670 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -1,5 +1,6 @@ using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Contracts; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -142,6 +143,12 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public class DataInspectionDto : InspectionBase, IInspectionDTO, ISignDTO { + public DataInspectionDto() + { + this.AuditInfo.JsonDetail= JsonConvert.SerializeObject(this.OptCommand); + } + + public T OptCommand { get; set; } } @@ -207,7 +214,8 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public string ModuleTypeName { get; set; } = string.Empty; - + + public string SignText { get; set; } = string.Empty; } diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index cb6290a75..6cac2a5da 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -58,6 +58,11 @@ namespace IRaCIS.Core.Application.Service.Inspection join OptTypec in _repository.GetQueryable() on new { ParentId = OptTyped.Id, ModuleType = data.OptType } equals new { ParentId = OptTypec.ParentId.Value, ModuleType = OptTypec.Value } into optTypetemp from leftOptType in optTypetemp.DefaultIfEmpty() + + join trialSign in _repository.GetQueryable() on data.SignId equals trialSign.Id into trialSigntemp + from lefttrialSign in trialSigntemp.DefaultIfEmpty() + + join frontAuditConfig in _repository.GetQueryable().Where(x=>x.ObjectTypeId!=null) on new { ModuleTypeId = leftmoduleTypec.Id.ToString(), @@ -112,6 +117,7 @@ namespace IRaCIS.Core.Application.Service.Inspection ObjectType=data.ObjectType, Description=leftfrontAuditConfig.Description, ModuleTypeName= leftmoduleTypec.ValueCN, + SignText= lefttrialSign.SignText, }; query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName) @@ -157,7 +163,7 @@ namespace IRaCIS.Core.Application.Service.Inspection { return verifyResult; } - await AddSignRecordAsync(SignInfo); + //await AddSignRecordAsync(SignInfo); } IResponseOutput bResult;