修改参与人员导表
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2025-01-08 13:22:24 +08:00
parent 86c871bc9f
commit 8111b60d4f
3 changed files with 23 additions and 18 deletions

View File

@ -80,7 +80,24 @@ namespace IRaCIS.Core.Application.Service.Common
t => t.UserRole.OrganizationName.Contains(param.OrganizationName))
.WhereIf(!string.IsNullOrWhiteSpace(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.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);

View File

@ -96,38 +96,22 @@ namespace IRaCIS.Application.Contracts
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")]
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; }
//[ExporterHeader(Format = "yyyy-mm-DD")]
[ExcelFormat("yyyy-MM-dd")]
public DateTime? RemoveTime { get; set; }
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 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; }

View File

@ -7,6 +7,7 @@ using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using MassTransit.Serialization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Storage.Json;
using System;
namespace IRaCIS.Core.Application.Service
@ -114,7 +115,10 @@ namespace IRaCIS.Core.Application.Service
[HttpPut]
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();
}