增加Global Using
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-20 10:19:08 +08:00
parent 115017197b
commit fc30cb39ee
408 changed files with 11031 additions and 12556 deletions
@@ -2,14 +2,7 @@
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Contracts.DTO;
using IRaCIS.Core.Domain.Share;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.Service.Inspection.DTO
{
@@ -181,8 +174,8 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public class SetNeedReuploadDto
{
public Guid trialId { get; set; }
public Guid qcChallengeId { get; set; }
public Guid trialId { get; set; }
public Guid qcChallengeId { get; set; }
}
public class SetVisitUrgentDto
@@ -195,7 +188,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public class UpdateTrialStateDto
{
public Guid trialId {get; set; }
public Guid trialId { get; set; }
public string trialStatusStr { get; set; }
public string? reason { get; set; }
@@ -204,7 +197,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
{
public Guid trialId { get; set; }
public Guid subjectVisitId { get; set; }
public AuditStateEnum auditState { get; set; }
}
@@ -250,7 +243,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
}
public class SetCheckPassDt
public class SetCheckPassDt
{
public string ManualPassReason { get; set; } = string.Empty;
@@ -260,7 +253,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public class ObtainOrCancelQCTaskDto
{
public Guid trialId { get; set; }
public Guid trialId { get; set; }
public Guid subjectVisitId { get; set; }
public bool obtaionOrCancel { get; set; }
}
@@ -270,7 +263,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
/// <summary>
/// 阅片临床数据ID
/// </summary>
public Guid ReadingClinicalDataId { get; set; }
public Guid ReadingClinicalDataId { get; set; }
[NotDefault]
public Guid TrialReadingCriterionId { get; set; }
@@ -290,16 +283,16 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
/// 稽查泛型Dto
/// </summary>
/// <typeparam name="T">泛型</typeparam>
public class DataInspectionDto<T>
public class DataInspectionDto<T>
{
public T Data { get; set; }
public SignDTO? SignInfo { get; set; }
}
#region Qc
@@ -342,14 +335,14 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
#endregion
/// <summary>
/// 用户 签名某个文档 Dto
/// </summary>
public class TrialDocumentConfirmDTO : InspectionBase, IInspectionDTO, ISignDTO
{
{
public UserConfirmCommand OptCommand { get; set; }
}
@@ -416,21 +409,21 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public class UpdateTrialState
{
public Guid trialId { get; set; }
public string trialStatusStr { get; set; }
public string reason { get; set; }
public Guid trialId { get; set; }
public string trialStatusStr { get; set; }
public string reason { get; set; }
}
public class AbandonTrial
{
public Guid trialId { get; set; }
public bool isAbandon { get; set; }
public Guid trialId { get; set; }
public bool isAbandon { get; set; }
}
public class GetDataInspectionDto : PageInput
{
/// <summary>
/// 项目iD
@@ -445,7 +438,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
/// <summary>
/// 受试者
/// </summary>
public string SubjectInfo { get; set; } = string.Empty;
public string SubjectInfo { get; set; } = string.Empty;
/// <summary>
///
@@ -491,10 +484,10 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
/// </summary>
public string RoleName { get; set; } = string.Empty;
/// <summary>
/// 是否有签名
/// </summary>
public bool? IsSign { get; set; }
/// <summary>
/// 是否有签名
/// </summary>
public bool? IsSign { get; set; }
/// <summary>
/// 批次Id
@@ -1,4 +1,3 @@
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.ViewModel;
@@ -4,21 +4,18 @@
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Domain.Share.Management;
using IRaCIS.Core.Infra.EFCore.Common;
using MassTransit;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Data.SqlClient;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Domain.Share.Management;
using System.Text.Json.Nodes;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.EntityFrameworkCore;
using Npgsql;
using IRaCIS.Core.Infra.EFCore.Common;
namespace IRaCIS.Core.Application.Service
{
@@ -609,7 +606,7 @@ namespace IRaCIS.Core.Application.Service
{
jsonDataValueDic[item.Key] = string.Join(",", _frontAuditConfigRepository._dbContext.Database.SqlQueryRaw<string>
(sql, new NpgsqlParameter("@para",para)).ToList());
(sql, new NpgsqlParameter("@para", para)).ToList());
}
else
{
@@ -2,7 +2,6 @@
using IRaCIS.Core.Application.Service.Inspection.DTO;
using IRaCIS.Core.Application.Service.Inspection.Interface;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure;
using Panda.DynamicWebApi.Attributes;
@@ -23,7 +22,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
IRepository<VisitTask> _visitTaskRepository,
IRepository<FrontAuditConfig> _frontAuditConfigRepository) : BaseService, IInspectionService
{
@@ -45,7 +44,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
from leftrial in trialtemp.DefaultIfEmpty()
join trialSite in _trialSiteRepository.Where().IgnoreQueryFilters() on data.TrialSiteId equals trialSite.Id into trialSitetemp
join trialSite in _trialSiteRepository.Where().IgnoreQueryFilters() on data.TrialSiteId equals trialSite.Id into trialSitetemp
from lefttrialSite in trialSitetemp.DefaultIfEmpty()
@@ -126,9 +125,9 @@ namespace IRaCIS.Core.Application.Service.Inspection
//CreateUserName = leftuser.UserName,
//RoleName = leftusertype.UserTypeShortName,
CreateUserRealName=data.CreateUserRealName,
CreateUserRealName = data.CreateUserRealName,
CreateUserName = data.CreateUserName,
RoleName=data.RoleName,
RoleName = data.RoleName,
//UserFirstName = leftuser.FirstName,
@@ -136,16 +135,16 @@ namespace IRaCIS.Core.Application.Service.Inspection
ExperimentName = leftrial.ExperimentName,
//SubjectCode = leftvisttask.BlindSubjectCode.IsNullOrEmpty()? leftsubject.Code: leftvisttask.BlindSubjectCode,
SubjectCode = leftvisttask.IsAnalysisCreate? leftvisttask.BlindSubjectCode: leftsubject.Code ,
SubjectCode = leftvisttask.IsAnalysisCreate ? leftvisttask.BlindSubjectCode : leftsubject.Code,
SiteCode = lefttrialSite.TrialSiteCode,
ResearchProgramNo = leftrial.ResearchProgramNo,
ObjectTypeId = data.ObjectTypeId,
Description = leftfrontAuditConfig.Description,
DescriptionCN=leftfrontAuditConfig.DescriptionCN,
DescriptionCN = leftfrontAuditConfig.DescriptionCN,
ModuleTypeName = leftmoduleTypec.Value,
ModuleTypeNameCN=leftmoduleTypec.ValueCN,
ModuleTypeNameCN = leftmoduleTypec.ValueCN,
SignText = lefttrialSign.SignText,
Identification = leftfrontAuditConfig.Identification,
@@ -161,13 +160,13 @@ namespace IRaCIS.Core.Application.Service.Inspection
ObjectRelationParentId = data.ObjectRelationParentId,
GeneralId = data.GeneralId,
TrialReadingCriterionId=data.TrialReadingCriterionId,
TrialReadingCriterionId = data.TrialReadingCriterionId,
TrialReadingCriterionName = data.TrialReadingCriterion.CriterionName
};
query = query.WhereIf(inQuery.TrialSiteId != null, x => x.TrialSiteId == inQuery.TrialSiteId)
//.Where(x => (x.TrialId == dto.TrialId) || (x.TrialId == null && x.CreateTime >= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime))
.Where(x => x.TrialId == inQuery.TrialId )
.Where(x => x.TrialId == inQuery.TrialId)
#region
// .WhereIf(dto.BatchId != null && dto.ObjectRelationParentId == null && dto.GeneralId == null, x => x.BatchId == dto.BatchId)
@@ -189,18 +188,18 @@ namespace IRaCIS.Core.Application.Service.Inspection
.WhereIf(inQuery.TrialReadingCriterionId != null, x => x.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
.WhereIf(!inQuery.TaskName.IsNullOrEmpty(), x => x.TaskName.Contains(inQuery.TaskName) || x.BlindName.Contains(inQuery.TaskName))
.WhereIf(!inQuery.TaskName.IsNullOrEmpty(), x => x.TaskName.Contains(inQuery.TaskName) || x.BlindName.Contains(inQuery.TaskName))
.WhereIf(!inQuery.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(inQuery.SubjectInfo))
.WhereIf(!inQuery.RoleName.IsNullOrEmpty(), x => x.RoleName.Contains(inQuery.RoleName))
//.WhereIf(dto.VisitPlanInfo != null&& dto.VisitPlanInfo!=(decimal) 1.11, x => x.VisitNum == dto.VisitPlanInfo)
//.WhereIf(dto.VisitPlanInfo != (decimal)1.11,x=>x.InPlan!=null&& x.InPlan==false)
.WhereIf(inQuery.StartTime != null, x => x.CreateTime >= inQuery.StartTime)
.WhereIf(!inQuery.RoleName.IsNullOrEmpty(), x => x.RoleName.Contains(inQuery.RoleName))
//.WhereIf(dto.VisitPlanInfo != null&& dto.VisitPlanInfo!=(decimal) 1.11, x => x.VisitNum == dto.VisitPlanInfo)
//.WhereIf(dto.VisitPlanInfo != (decimal)1.11,x=>x.InPlan!=null&& x.InPlan==false)
.WhereIf(inQuery.StartTime != null, x => x.CreateTime >= inQuery.StartTime)
.WhereIf(inQuery.EndTime != null, x => x.CreateTime <= inQuery.EndTime)
.WhereIf(inQuery.ModuleType != null, x => x.ModuleTypeId == inQuery.ModuleType)
.WhereIf(!inQuery.Description.IsNullOrEmpty(), x => x.Description.Contains(inQuery.Description)|| x.DescriptionCN.Contains(inQuery.Description))
.WhereIf(!inQuery.Description.IsNullOrEmpty(), x => x.Description.Contains(inQuery.Description) || x.DescriptionCN.Contains(inQuery.Description))
.WhereIf(!inQuery.OpByUserName.IsNullOrEmpty(), x => x.CreateUserName.Contains(inQuery.OpByUserName))
.WhereIf(!inQuery.CreateUserName.IsNullOrEmpty(), x => x.CreateUserName.Contains(inQuery.CreateUserName) || x.CreateUserRealName.Contains(inQuery.CreateUserName))
//.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo))
.WhereIf(inQuery.IsSign != null, x => x.IsSign == inQuery.IsSign);
#endregion
@@ -213,7 +212,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
{
query = query.Where(x => x.InPlan == false);
}
return await query.ToPagedListAsync(inQuery, nameof(GetDataInspectionOutDto.CreateTime) );
return await query.ToPagedListAsync(inQuery, nameof(GetDataInspectionOutDto.CreateTime));
}
@@ -1,10 +1,5 @@
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Service.Inspection.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.Service.Inspection.Interface
{
@@ -13,11 +8,11 @@ namespace IRaCIS.Core.Application.Service.Inspection.Interface
Task<PageOutput<GetDataInspectionOutDto>> GetInspectionList(GetDataInspectionDto dto);
Task<Guid> AddSignRecordAsync(SignDTO signDTO);
Task<Guid> RecordSing(SignDTO SignInfo);
Task<Guid> RecordSing(SignDTO SignInfo);
Task CompletedSign(Guid signId, IResponseOutput response);
@@ -1,12 +1,6 @@
using AutoMapper;
using AutoMapper.EquivalencyExpression;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Contracts.DTO;
using IRaCIS.Core.Application.Service.Inspection.DTO;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Application.Service
{
@@ -14,14 +8,14 @@ namespace IRaCIS.Core.Application.Service
{
public InspectionConfig()
{
CreateMap<DataInspectionAddDTO, DataInspection>();
CreateMap<FrontAuditConfig, FrontAuditConfigDTO>();