添加接口
parent
0ca9eb0b54
commit
2a9adcb1d6
|
@ -44,6 +44,13 @@
|
||||||
FrontAuditConfigService
|
FrontAuditConfigService
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.CopyOtherToThisItem(IRaCIS.Core.Application.ViewModel.CopyOtherToThisItem)">
|
||||||
|
<summary>
|
||||||
|
Cope子项数据
|
||||||
|
</summary>
|
||||||
|
<param name="item"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetFrontAuditConfigList(IRaCIS.Core.Application.ViewModel.FrontAuditConfigQuery)">
|
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetFrontAuditConfigList(IRaCIS.Core.Application.ViewModel.FrontAuditConfigQuery)">
|
||||||
<summary>
|
<summary>
|
||||||
获取列表
|
获取列表
|
||||||
|
|
|
@ -62,6 +62,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class CopyOtherToThisItem
|
||||||
|
{
|
||||||
|
public List<Guid?> DataSource { get; set; }=new List<Guid?>(){ };
|
||||||
|
|
||||||
|
public Guid AddItem { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
///<summary>FrontAuditConfigQuery 列表查询参数模型</summary>
|
///<summary>FrontAuditConfigQuery 列表查询参数模型</summary>
|
||||||
public class FrontAuditConfigQuery
|
public class FrontAuditConfigQuery
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,6 +24,50 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public FrontAuditConfigService(IRepository<FrontAuditConfig> frontAuditConfigRepository)
|
public FrontAuditConfigService(IRepository<FrontAuditConfig> frontAuditConfigRepository)
|
||||||
{
|
{
|
||||||
_frontAuditConfigRepository = frontAuditConfigRepository;
|
_frontAuditConfigRepository = frontAuditConfigRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Cope子项数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> CopyOtherToThisItem(CopyOtherToThisItem item)
|
||||||
|
{
|
||||||
|
var c = _frontAuditConfigRepository.Where(x => item.DataSource.Contains(x.ParentId)).ToList();
|
||||||
|
var list = _frontAuditConfigRepository.Where(x => item.DataSource.Contains(x.ParentId)).ToList().GroupBy(x => new { x.ValueCN }, (key, lst) => new FrontAuditConfig
|
||||||
|
{
|
||||||
|
Sort = lst.Select(x => x.Sort).FirstOrDefault(),
|
||||||
|
IsShowByTrialConfig= lst.Select(x => x.IsShowByTrialConfig).FirstOrDefault(),
|
||||||
|
ByTrialConfig = lst.Select(x => x.ByTrialConfig).FirstOrDefault(),
|
||||||
|
Code = lst.Select(x => x.Code).FirstOrDefault(),
|
||||||
|
ConfigType = lst.Select(x => x.ConfigType).FirstOrDefault(),
|
||||||
|
CreateTime = DateTime.Now,
|
||||||
|
Description = lst.Select(x => x.Description).FirstOrDefault(),
|
||||||
|
EnumList = lst.Select(x => x.EnumList).FirstOrDefault(),
|
||||||
|
IsConfig = lst.Select(x => x.IsConfig).FirstOrDefault(),
|
||||||
|
IsShowParent = lst.Select(x => x.IsShowParent).FirstOrDefault(),
|
||||||
|
ParentId = item.AddItem,
|
||||||
|
CreateUserId = _userInfo.Id,
|
||||||
|
IsEnable = lst.Select(x => x.IsEnable).FirstOrDefault(),
|
||||||
|
DictionaryKey = lst.Select(x => x.DictionaryKey).FirstOrDefault(),
|
||||||
|
EnumType = lst.Select(x => x.EnumType).FirstOrDefault(),
|
||||||
|
UpdateTime = DateTime.Now,
|
||||||
|
ValueCN = lst.Select(x => x.ValueCN).FirstOrDefault(),
|
||||||
|
Value = lst.Select(x => x.Value).FirstOrDefault(),
|
||||||
|
UpdateUserId = _userInfo.Id,
|
||||||
|
Id=Guid.NewGuid(),
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
await _repository.AddRangeAsync(list);
|
||||||
|
await _repository.SaveChangesAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue