Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
60a5cc4602
|
@ -80,7 +80,24 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
t => t.UserRole.OrganizationName.Contains(param.OrganizationName))
|
t => t.UserRole.OrganizationName.Contains(param.OrganizationName))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserRealName),
|
.WhereIf(!string.IsNullOrWhiteSpace(param.UserRealName),
|
||||||
t => (t.UserRole.FullName).Contains(param.UserRealName))
|
t => (t.UserRole.FullName).Contains(param.UserRealName))
|
||||||
.ProjectTo<TrialMaintenanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.Select(t=>new TrialMaintenanceDTO()
|
||||||
|
{
|
||||||
|
UserRealName=t.UserRole.IdentityUser.FullName,
|
||||||
|
UserName=t.UserRole.IdentityUser.UserName,
|
||||||
|
UserType=t.UserRole.UserTypeRole.UserTypeShortName,
|
||||||
|
Phone=t.UserRole.IdentityUser.Phone,
|
||||||
|
EMail=t.UserRole.IdentityUser.EMail,
|
||||||
|
OrganizationName= t.UserRole.IdentityUser.OrganizationName,
|
||||||
|
|
||||||
|
IsDeleted=t.TrialUser.IsDeleted,
|
||||||
|
JoinTime=t.TrialUser.JoinTime,
|
||||||
|
RemoveTime=t.TrialUser.RemoveTime,
|
||||||
|
|
||||||
|
//角色授权禁用时间
|
||||||
|
CreateTime=t.CreateTime,
|
||||||
|
DeletedTime=t.DeletedTime,
|
||||||
|
}).OrderBy(t=>t.UserRealName)
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||||
|
|
|
@ -58,12 +58,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public string RealName { get; set; } = string.Empty;
|
public string RealName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
//[JsonIgnore]
|
public string DocTypeCode { get; set; }
|
||||||
//public string IdentityUserTypes { get; set; }
|
|
||||||
|
|
||||||
//[JsonIgnore]
|
|
||||||
//public string DocNeedSignUserTypes { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public List<string> UserConfirmedUserTypeList => (DocNeedSignUserTypeList != null && IdentityUserTypeList != null) ? IdentityUserTypeList.Intersect(DocNeedSignUserTypeList).ToList() : new List<string>();
|
public List<string> UserConfirmedUserTypeList => (DocNeedSignUserTypeList != null && IdentityUserTypeList != null) ? IdentityUserTypeList.Intersect(DocNeedSignUserTypeList).ToList() : new List<string>();
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
var query = from sysDoc in _systemDocumentRepository.AsQueryable(true)
|
var query = from sysDoc in _systemDocumentRepository.AsQueryable(true)
|
||||||
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
||||||
//外部人员 只签署 文档类型枚举值有值的
|
//外部人员 只签署 外部需要签署的
|
||||||
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
||||||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||||
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.IdentityUserId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.IdentityUserId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||||
|
@ -178,6 +178,8 @@ namespace IRaCIS.Core.Application.Services
|
||||||
RealName = user.FullName,
|
RealName = user.FullName,
|
||||||
UserName = user.UserName,
|
UserName = user.UserName,
|
||||||
|
|
||||||
|
DocTypeCode=sysDoc.FileType.Code
|
||||||
|
|
||||||
//UserTypeId = user.UserTypeId,
|
//UserTypeId = user.UserTypeId,
|
||||||
//UserTypeShortName = user.UserTypeRole.UserTypeShortName
|
//UserTypeShortName = user.UserTypeRole.UserTypeShortName
|
||||||
};
|
};
|
||||||
|
@ -187,7 +189,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
.Where(t => !(t.IsDeleted == true && t.ConfirmTime == null))
|
.Where(t => !(t.IsDeleted == true && t.ConfirmTime == null))
|
||||||
.WhereIf(inQuery.IsSigned == true, t => t.ConfirmTime != null)
|
.WhereIf(inQuery.IsSigned == true, t => t.ConfirmTime != null)
|
||||||
.WhereIf(inQuery.IsSigned == false, t => t.ConfirmTime == null)
|
.WhereIf(inQuery.IsSigned == false, t => t.ConfirmTime == null)
|
||||||
.ToPagedListAsync(inQuery);
|
.ToPagedListAsync(inQuery,nameof(UnionDocumentWithConfirmInfoView.DocTypeCode));
|
||||||
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -461,6 +461,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public bool IsHaveSysDocNeedNeedSign { get; set; }
|
public bool IsHaveSysDocNeedNeedSign { get; set; }
|
||||||
|
|
||||||
|
public bool IsFirstSysDocNeedSign { get; set; }
|
||||||
|
|
||||||
//public List<TrialDocNeedSign> TrialNeedSignList { get; set; }=new List<TrialDocNeedSign>();
|
//public List<TrialDocNeedSign> TrialNeedSignList { get; set; }=new List<TrialDocNeedSign>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,38 +96,22 @@ namespace IRaCIS.Application.Contracts
|
||||||
|
|
||||||
public class TrialMaintenanceDTO : UserTrialCommand
|
public class TrialMaintenanceDTO : UserTrialCommand
|
||||||
{
|
{
|
||||||
//[JsonIgnore]
|
|
||||||
//public int No { get; set; }
|
|
||||||
//For MiniExcel ExcelFormat
|
|
||||||
public string State => IsDeleted ? "退出" : "加入";
|
|
||||||
|
|
||||||
|
|
||||||
//[ValueMapping(text: "退出", true)]
|
|
||||||
//[ValueMapping(text: "加入", false)]
|
|
||||||
|
|
||||||
[DictionaryTranslateAttribute("IsUserExitTrial")]
|
[DictionaryTranslateAttribute("IsUserExitTrial")]
|
||||||
public bool IsDeleted { get; set; }
|
public bool IsDeleted { get; set; }
|
||||||
|
|
||||||
//[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")]
|
|
||||||
[ExcelFormat("yyyy-MM-dd hh:mm:ss")]
|
|
||||||
public DateTime? DeletedTime { get; set; }
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
//[ExporterHeader(Format = "yyyy-mm-DD")]
|
|
||||||
[ExcelFormat("yyyy-MM-dd")]
|
|
||||||
public DateTime? RemoveTime { get; set; }
|
public DateTime? RemoveTime { get; set; }
|
||||||
|
|
||||||
public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||||
|
|
||||||
|
|
||||||
//[ExporterHeader(Format = "yyyy-mm-DD")]
|
|
||||||
[ExcelFormat("yyyy-MM-dd")]
|
|
||||||
public DateTime? JoinTime { get; set; }
|
public DateTime? JoinTime { get; set; }
|
||||||
|
|
||||||
public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||||
|
|
||||||
//[ExporterHeader(Format = "yyyy-mm-DD hh:mm:ss")]
|
|
||||||
[ExcelFormat("yyyy-MM-dd HH:mm:ss")]
|
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -665,7 +665,7 @@ namespace IRaCIS.Core.Application
|
||||||
{
|
{
|
||||||
|
|
||||||
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||||
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t=>t.UserRole.UserTypeId==_userInfo.UserTypeId)))
|
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||||
.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
|
.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
|
||||||
.Select(t => new ImageQualityToBeDoneDto()
|
.Select(t => new ImageQualityToBeDoneDto()
|
||||||
{
|
{
|
||||||
|
@ -1124,10 +1124,18 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
var needSignSysDocCont = await _systemDocumentRepository.AsQueryable(true)
|
var needSignSysDocCont = await _systemDocumentRepository.AsQueryable(true)
|
||||||
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
|
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
|
||||||
//外部人员 只签署 文档类型枚举值有值的
|
//外部人员 只签署 外部需要签署的
|
||||||
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
||||||
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||||
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
||||||
|
//电子阅片声明是否已经签署
|
||||||
|
|
||||||
|
var isfirstSysDocNeedSign = await _systemDocumentRepository.AsQueryable(true)
|
||||||
|
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
|
||||||
|
//外部人员 只签署 外部需要签署的
|
||||||
|
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
|
||||||
|
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||||
|
.AnyAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId && t.SystemDocument.FileType.Code == "-1");
|
||||||
|
|
||||||
var signedTrialCount = await _trialDocumentRepository.AsQueryable(true)
|
var signedTrialCount = await _trialDocumentRepository.AsQueryable(true)
|
||||||
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
|
||||||
|
@ -1135,7 +1143,7 @@ namespace IRaCIS.Core.Application
|
||||||
.Where(t => t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)).CountAsync();
|
.Where(t => t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)).CountAsync();
|
||||||
|
|
||||||
var signedSysDocCont = await _systemDocumentRepository.AsQueryable(true)
|
var signedSysDocCont = await _systemDocumentRepository.AsQueryable(true)
|
||||||
.Where(t => t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
|
.Where(t => t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
|
||||||
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||||
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
||||||
|
|
||||||
|
@ -1170,7 +1178,7 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
var record = new UserToBeDoneRecord()
|
var record = new UserToBeDoneRecord()
|
||||||
{
|
{
|
||||||
|
IsFirstSysDocNeedSign= isfirstSysDocNeedSign,
|
||||||
IsHaveSysDocNeedNeedSign = needSignSysDocCont > 0,
|
IsHaveSysDocNeedNeedSign = needSignSysDocCont > 0,
|
||||||
//TrialNeedSignList= trialNeedSignList,
|
//TrialNeedSignList= trialNeedSignList,
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using MassTransit.Serialization;
|
using MassTransit.Serialization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.Json;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
|
@ -114,7 +115,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPut]
|
[HttpPut]
|
||||||
public async Task<IResponseOutput> UpdateTrialUserRole(UpdateTrialUserRoleCommand updateCommand)
|
public async Task<IResponseOutput> UpdateTrialUserRole(UpdateTrialUserRoleCommand updateCommand)
|
||||||
{
|
{
|
||||||
await _trialUseRoleRepository.UpdatePartialFromQueryAsync(t => updateCommand.IdList.Contains(t.Id), u => new TrialUserRole() { IsDeleted = updateCommand.IsDeleted }, true, true);
|
|
||||||
|
DateTime? deleteTime = updateCommand.IsDeleted ? DateTime.Now : null;
|
||||||
|
|
||||||
|
await _trialUseRoleRepository.UpdatePartialFromQueryAsync(t => updateCommand.IdList.Contains(t.Id), u => new TrialUserRole() { IsDeleted = updateCommand.IsDeleted, DeletedTime = deleteTime }, true, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue