Uat_Study
he 2022-04-06 13:49:30 +08:00
parent 25555d92dd
commit dfd48719dd
3 changed files with 20 additions and 5 deletions

View File

@ -107,8 +107,9 @@ namespace IRaCIS.Core.API.Controllers
/// <returns></returns> /// <returns></returns>
[HttpPost, Route("Inspection/configTrialBasicInfo/configTrialBasicInfo")] [HttpPost, Route("Inspection/configTrialBasicInfo/configTrialBasicInfo")]
public async Task<IResponseOutput> ConfigTrialBasicInfo(InsBasicTrialConfig opt) public async Task<IResponseOutput> ConfigTrialBasicInfo(DataInspectionDto<BasicTrialConfig> opt)
{ {
var fun = _trialConfigService.ConfigTrialBasicInfo; var fun = _trialConfigService.ConfigTrialBasicInfo;
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
} }
@ -120,7 +121,7 @@ namespace IRaCIS.Core.API.Controllers
/// <returns></returns> /// <returns></returns>
[HttpPost, Route("Inspection/configTrialBasicInfo/configTrialProcessInfo")] [HttpPost, Route("Inspection/configTrialBasicInfo/configTrialProcessInfo")]
public async Task<IResponseOutput> ConfigTrialProcessInfo(InsTrialProcessConfig opt) public async Task<IResponseOutput> ConfigTrialProcessInfo(DataInspectionDto<TrialProcessConfig> opt)
{ {
var fun = _trialConfigService.ConfigTrialProcessInfo; var fun = _trialConfigService.ConfigTrialProcessInfo;
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
@ -133,7 +134,7 @@ namespace IRaCIS.Core.API.Controllers
/// <returns></returns> /// <returns></returns>
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfo")] [HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfo")]
public async Task<IResponseOutput> ConfigTrialUrgentInfo(InsTrialUrgentConfig opt) public async Task<IResponseOutput> ConfigTrialUrgentInfo(DataInspectionDto<TrialUrgentConfig> opt)
{ {
var fun = _trialConfigService.ConfigTrialUrgentInfo; var fun = _trialConfigService.ConfigTrialUrgentInfo;
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);

View File

@ -1,5 +1,6 @@
using IRaCIS.Application.Contracts; using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Contracts; using IRaCIS.Core.Application.Contracts;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -142,6 +143,12 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public class DataInspectionDto<T> : InspectionBase, IInspectionDTO, ISignDTO public class DataInspectionDto<T> : InspectionBase, IInspectionDTO, ISignDTO
{ {
public DataInspectionDto()
{
this.AuditInfo.JsonDetail= JsonConvert.SerializeObject(this.OptCommand);
}
public T OptCommand { get; set; } 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 ModuleTypeName { get; set; } = string.Empty;
public string SignText { get; set; } = string.Empty;
} }

View File

@ -58,6 +58,11 @@ namespace IRaCIS.Core.Application.Service.Inspection
join OptTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = OptTyped.Id, ModuleType = data.OptType } equals new { ParentId = OptTypec.ParentId.Value, ModuleType = OptTypec.Value } into optTypetemp join OptTypec in _repository.GetQueryable<Dictionary>() on new { ParentId = OptTyped.Id, ModuleType = data.OptType } equals new { ParentId = OptTypec.ParentId.Value, ModuleType = OptTypec.Value } into optTypetemp
from leftOptType in optTypetemp.DefaultIfEmpty() from leftOptType in optTypetemp.DefaultIfEmpty()
join trialSign in _repository.GetQueryable<TrialSign>() on data.SignId equals trialSign.Id into trialSigntemp
from lefttrialSign in trialSigntemp.DefaultIfEmpty()
join frontAuditConfig in _repository.GetQueryable<FrontAuditConfig>().Where(x=>x.ObjectTypeId!=null) on new join frontAuditConfig in _repository.GetQueryable<FrontAuditConfig>().Where(x=>x.ObjectTypeId!=null) on new
{ {
ModuleTypeId = leftmoduleTypec.Id.ToString(), ModuleTypeId = leftmoduleTypec.Id.ToString(),
@ -112,6 +117,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
ObjectType=data.ObjectType, ObjectType=data.ObjectType,
Description=leftfrontAuditConfig.Description, Description=leftfrontAuditConfig.Description,
ModuleTypeName= leftmoduleTypec.ValueCN, ModuleTypeName= leftmoduleTypec.ValueCN,
SignText= lefttrialSign.SignText,
}; };
query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName) query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName)
@ -157,7 +163,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
{ {
return verifyResult; return verifyResult;
} }
await AddSignRecordAsync(SignInfo); //await AddSignRecordAsync(SignInfo);
} }
IResponseOutput bResult; IResponseOutput bResult;