修改默认值
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
7c1c45417f
commit
8ee7d7018f
|
|
@ -16121,6 +16121,13 @@
|
||||||
<param name="outEnrollTime"></param>
|
<param name="outEnrollTime"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.TestService.SiteSuveryEquipment">
|
||||||
|
<summary>
|
||||||
|
维护中心调研设备默认配置
|
||||||
|
</summary>
|
||||||
|
<param name="modelVerify"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.TestService.MaskImage">
|
<member name="M:IRaCIS.Core.Application.Service.TestService.MaskImage">
|
||||||
<summary>
|
<summary>
|
||||||
遮挡影像
|
遮挡影像
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using MiniExcelLibs;
|
using MiniExcelLibs;
|
||||||
using Minio.DataModel;
|
using Minio.DataModel;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using NPOI.SS.Formula.Functions;
|
using NPOI.SS.Formula.Functions;
|
||||||
using NPOI.XWPF.UserModel;
|
using NPOI.XWPF.UserModel;
|
||||||
using SharpCompress.Common;
|
using SharpCompress.Common;
|
||||||
|
|
@ -107,6 +108,59 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public DateTime? DateTimeNUllValue { get; set; }
|
public DateTime? DateTimeNUllValue { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 维护中心调研设备默认配置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="modelVerify"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[AllowAnonymous]
|
||||||
|
[HttpPost("{email}")]
|
||||||
|
public async Task<IResponseOutput> SiteSuveryEquipment()
|
||||||
|
{
|
||||||
|
//默认配置
|
||||||
|
var trialExtalConfig = new TrialExtraConfig()
|
||||||
|
{
|
||||||
|
EquipmentControlFieldList = new List<SiteSurveyEquipmentField> {
|
||||||
|
new SiteSurveyEquipmentField() { FiledName = "EquipmentTypeEnum", ShowOrder = 0, IsView = true },
|
||||||
|
new SiteSurveyEquipmentField() { FiledName = "OtherEquipmentType", ShowOrder = 1, IsView = true },
|
||||||
|
|
||||||
|
new SiteSurveyEquipmentField() { FiledName = "Parameters", ShowOrder = 2, IsView = true },
|
||||||
|
|
||||||
|
new SiteSurveyEquipmentField() { FiledName = "ManufacturerType", ShowOrder = 3, IsView = true },
|
||||||
|
new SiteSurveyEquipmentField() { FiledName = "ManufacturerName", ShowOrder = 4, IsView = true },
|
||||||
|
|
||||||
|
new SiteSurveyEquipmentField() { FiledName = "ScannerType", ShowOrder = 4, IsView = true },
|
||||||
|
|
||||||
|
new SiteSurveyEquipmentField() { FiledName = "Note", ShowOrder = 5, IsView = true },
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var list = _trialRepository.Where(t => t.TrialExtraConfigJsonStr != "").Select(t => new { t.Id, t.TrialExtraConfigJsonStr }).ToList();
|
||||||
|
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
var extralConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(item.TrialExtraConfigJsonStr);
|
||||||
|
|
||||||
|
extralConfig.EquipmentControlFieldList = trialExtalConfig.EquipmentControlFieldList;
|
||||||
|
|
||||||
|
var jsonInfo = extralConfig.ToJsonStr();
|
||||||
|
|
||||||
|
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new Trial() { TrialExtraConfigJsonStr = jsonInfo });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var info = trialExtalConfig.ToJsonStr();
|
||||||
|
|
||||||
|
var idQuery = _trialRepository.Where(t => t.TrialExtraConfigJsonStr == "").Select(t => t.Id);
|
||||||
|
|
||||||
|
await _trialRepository.BatchUpdateNoTrackingAsync(t => idQuery.Contains(t.Id), u => new Trial() { TrialExtraConfigJsonStr = info });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
//创建一个模型验证的方法
|
//创建一个模型验证的方法
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue