diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 84315adeb..84d4d4756 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1409,6 +1409,14 @@ + + + 新增文件夹 + + + + + 新增稽查文档 diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs index 405ebfce5..efed114e2 100644 --- a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs @@ -62,12 +62,34 @@ public class AuditDocumentService(IRepository _auditDocumentRepos return ResponseOutput.Ok(result.Id); } - /// - /// 新增稽查文档 - /// - /// - /// - [HttpPost] + /// + /// 新增文件夹 + /// + /// + /// + /// + [HttpPost] + public async Task AddFolder(AuditDocumentAddOrEdit inDto) + { + + if (await _auditDocumentRepository.AnyAsync(x => x.Name == inDto.Name && x.AuditDocumentTypeEnum == inDto.AuditDocumentTypeEnum && x.ParentId == inDto.ParentId)) + { + throw new BusinessValidationFailedException(_localizer["AuditDocument_CanNotAddFolder"]); + } + + List auditDocumentAddOrEdits = new List(); + + auditDocumentAddOrEdits.Add(inDto); + var result= await AddAuditDocument(auditDocumentAddOrEdits); + return ResponseOutput.Ok(result); + } + + /// + /// 新增稽查文档 + /// + /// + /// + [HttpPost] public async Task AddAuditDocument(List inDto) { List resultData = new List(); @@ -396,7 +418,11 @@ public class AuditDocumentService(IRepository _auditDocumentRepos })).CurrentPageData; List auditDocumentAddOrEdits = _mapper.Map>(data); - auditDocumentAddOrEdits.ForEach(x => x.IsUpdate = false); + auditDocumentAddOrEdits.ForEach(x => { + x.IsUpdate = false; + x.Id = null; + x.ParentId = inDto.ParentId; + }); await addData(auditDocumentAddOrEdits); } @@ -410,7 +436,7 @@ public class AuditDocumentService(IRepository _auditDocumentRepos item.Children.ForEach(x => { x.ParentId = result.Id; x.IsUpdate = false; - + x.Id = null; }); if (item.Children.Count() > 0) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 67b7efc07..355a0b673 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -863,8 +863,8 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.OptTypeList != null && inQuery.OptTypeList.Count > 0, t => inQuery.OptTypeList.Contains(t.OptType)) .WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate) .WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate) - .WhereIf(inQuery.IsLoginUncommonly != null && inQuery.IsLoginUncommonly.Value, t => t.IsLoginUncommonly&&!t.IsIgnoreUncommonly) - .WhereIf(inQuery.IsLoginUncommonly != null && !inQuery.IsLoginUncommonly.Value, t => !t.IsLoginUncommonly || t.IsIgnoreUncommonly) + .WhereIf(inQuery.IsLoginUncommonly != null , t => t.IsLoginUncommonly== inQuery.IsLoginUncommonly) + .WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.ActionUserName.Contains(inQuery.LoginUserName!)) .WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.ActionUserName.Contains(inQuery.LoginFaildName!)) .WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP!))