添加12
This commit is contained in:
@@ -44,6 +44,25 @@
|
||||
FrontAuditConfigService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetDatabaseTables">
|
||||
<summary>
|
||||
获取数据库所有表
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetTableColumn(System.String)">
|
||||
<summary>
|
||||
获取表列名
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.BatchAddFrontAudit(IRaCIS.Core.Application.ViewModel.BatchAddFrontAudit)">
|
||||
<summary>
|
||||
批量添加字段
|
||||
</summary>
|
||||
<param name="data">数据集</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.SetInspectionEnumValue(IRaCIS.Core.Infra.EFCore.Dto.SetInspectionEnumValueDto)">
|
||||
<summary>
|
||||
翻译稽查数据
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using IRaCIS.Core.Infra.EFCore.Dto;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
/// <summary> FrontAuditConfigView 列表视图模型 </summary>
|
||||
@@ -30,6 +33,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
}
|
||||
|
||||
public class BatchAddFrontAudit
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid ParentId { get; set; }
|
||||
|
||||
public List<TableList> Columns { get; set; }
|
||||
}
|
||||
|
||||
public class GetChildrenItem
|
||||
{
|
||||
|
||||
|
||||
@@ -27,6 +27,54 @@ namespace IRaCIS.Core.Application.Service
|
||||
_frontAuditConfigRepository = frontAuditConfigRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据库所有表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<TableList>> GetDatabaseTables()
|
||||
{
|
||||
return await _frontAuditConfigRepository._dbContext.GetTableList().ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取表列名
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<TableList>> GetTableColumn(string tableName)
|
||||
{
|
||||
return await _frontAuditConfigRepository._dbContext.GetTableColumn(tableName).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量添加字段
|
||||
/// </summary>
|
||||
/// <param name="data">数据集</param>
|
||||
/// <returns></returns>
|
||||
public async Task BatchAddFrontAudit(BatchAddFrontAudit data)
|
||||
{
|
||||
var maxsort = await _frontAuditConfigRepository.Where(x => x.ParentId == data.ParentId).MaxAsync(x => x.Sort);
|
||||
|
||||
List<FrontAuditConfig> fronts=new List<FrontAuditConfig>();
|
||||
foreach (var item in data.Columns)
|
||||
{
|
||||
maxsort++;
|
||||
fronts.Add(new FrontAuditConfig()
|
||||
{
|
||||
|
||||
Sort = maxsort,
|
||||
Code = item.Name,
|
||||
ValueCN = item.Remake,
|
||||
IsEnable = true,
|
||||
ParentId = data.ParentId
|
||||
});
|
||||
}
|
||||
|
||||
await _frontAuditConfigRepository.AddRangeAsync(fronts);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 翻译稽查数据
|
||||
/// </summary>
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace IRaCIS.Application.Services
|
||||
x.Id,
|
||||
x.IsEnrollment,
|
||||
x.IsUrgent,
|
||||
|
||||
|
||||
});
|
||||
|
||||
List<SubjectVisit> subjectVisits = new List<SubjectVisit>();
|
||||
@@ -367,7 +367,6 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
BlindName = x.BlindName,
|
||||
IsBaseLine = x.IsBaseLine,
|
||||
|
||||
IsUrgent = false,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user