修改代码模板
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-09-17 10:13:23 +08:00
parent 3813158b00
commit 581e412106
12 changed files with 3013 additions and 3038 deletions

View File

@ -1371,7 +1371,7 @@
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetDialogList(IRaCIS.Core.Infra.EFCore.Common.Dto.AccessToDialogueInDto)">
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetDialogList(IRaCIS.Core.Application.ViewModel.AccessToDialogueInDto)">
<summary>
获取查询对象
</summary>
@ -1384,7 +1384,7 @@
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.CopyFrontAuditConfigItem(IRaCIS.Core.Infra.EFCore.Common.Dto.CopyFrontAuditConfigItemDto)">
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.CopyFrontAuditConfigItem(IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto)">
<summary>
复制配置项及其子项
</summary>
@ -1398,14 +1398,14 @@
<param name="data">数据集</param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.SetInspectionEnumValue(IRaCIS.Core.Infra.EFCore.Common.Dto.SetInspectionEnumValueDto)">
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.SetInspectionEnumValue(IRaCIS.Core.Application.ViewModel.SetInspectionEnumValueDto)">
<summary>
翻译稽查数据
</summary>
<param name="dto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.SetInspectionEnumValueDataList(IRaCIS.Core.Infra.EFCore.Common.Dto.SetInspectionEnumValueDto,System.Guid)">
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.SetInspectionEnumValueDataList(IRaCIS.Core.Application.ViewModel.SetInspectionEnumValueDto,System.Guid)">
<summary>
翻译稽查数据
</summary>
@ -10839,6 +10839,21 @@
<member name="T:IRaCIS.Core.Application.ViewModel.SystemAnonymizationAddOrEdit">
<summary> SystemAnonymizationAddOrEdit 列表查询参数模型</summary>
</member>
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
<summary>
质疑
</summary>
</member>
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
<summary>
一致性核查
</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
<summary>
复制
</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
<summary> SystemNoticeView 列表视图模型 </summary>
</member>

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using IRaCIS.Core.Infra.EFCore.Common.Dto;
using IRaCIS.Core.Infra.EFCore.Common;
namespace IRaCIS.Core.Application.ViewModel
{

View File

@ -0,0 +1,73 @@
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.ViewModel;
public class DateDto
{
public string Code { get; set; }
public string DateType { get; set; }
public string Identification { get; set; }
}
public class SetInspectionEnumValueDto
{
[NotDefault]
public Guid TrialId { get; set; }
[NotDefault]
public List<Guid> AuditDataIds { get; set; }
}
public class AccessToDialogueInDto
{
public Guid Id { get; set; }
public AccessToDialogueEnum Type { get; set; }
public DateTime Createtime { get; set; }
}
public class AccessToDialogueOutDto
{
public string CreateUserName { get; set; }
public string TalkContent { get; set; }
public DateTime CreateTime { get; set; }
public bool IsTitle { get; set; }
}
public enum AccessToDialogueEnum
{
/// <summary>
/// ÖÊÒÉ
/// </summary>
Question = 0,
/// <summary>
/// Ò»ÖÂÐԺ˲é
/// </summary>
Consistency = 1,
}
/// <summary>
/// ¸´ÖÆ
/// </summary>
public class CopyFrontAuditConfigItemDto
{
public Guid ParentId { get; set; }
public Guid ChildId { get; set; }
}

View File

@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using MassTransit;
using IRaCIS.Core.Infra.EFCore.Common.Dto;
using Microsoft.Data.SqlClient;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@ -19,6 +18,7 @@ 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
{

View File

@ -1,6 +1,5 @@
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common.Dto;
using IRaCIS.Core.Infrastructure;
using IRaCIS.Core.Infrastructure.Extention;
using MassTransit;

View File

@ -7,20 +7,8 @@ using System.ComponentModel.DataAnnotations;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Infra.EFCore.Common.Dto
namespace IRaCIS.Core.Infra.EFCore.Common
{
public class SetInspectionEnumValueDto
{
[NotDefault]
public Guid TrialId { get; set; }
[NotDefault]
public List<Guid> AuditDataIds { get; set; }
}
public class SetInspectionEnumDataDto
{
public Guid Id { get; set; }
@ -34,8 +22,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
public Guid? ObjectRelationParentId2 { get; set; }
public Guid? ObjectRelationParentId3 { get; set; }
/// <summary>
/// 批次Id
/// </summary>
@ -46,69 +32,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
public class AddInterface
{
public Guid ParentId { get; set; }
public List<string> Names { get; set; }
}
public class AccessToDialogueInDto
{
public Guid Id { get; set; }
public AccessToDialogueEnum Type { get; set; }
public DateTime Createtime { get; set; }
}
public class AccessToDialogueOutDto
{
public string CreateUserName { get; set; }
public string TalkContent { get; set; }
public DateTime CreateTime { get; set; }
public bool IsTitle { get; set; }
}
public enum AccessToDialogueEnum
{
/// <summary>
/// 质疑
/// </summary>
Question = 0,
/// <summary>
/// 一致性核查
/// </summary>
Consistency = 1,
}
/// <summary>
/// 复制
/// </summary>
public class CopyFrontAuditConfigItemDto
{
public Guid ParentId { get; set; }
public Guid ChildId { get; set; }
}
public class UnitData
{
/// <summary>
/// 单位
/// </summary>
public ValueUnit? Unit { get; set; }
public string UnitName { get; set; }
}
/// <summary>
/// 稽查数据
/// </summary>
@ -120,20 +43,32 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
public object CommonData { get; set; }
}
public class UnitData
{
/// <summary>
/// 单位
/// </summary>
public ValueUnit? Unit { get; set; }
public string UnitName { get; set; }
}
public class VisitTaskAuditingDto
{
public string UserRealName { get; set; }
public string UserRealName { get; set; }
public string SubjectCode { get; set; }
public string SubjectCode { get; set; }
public string R1 { get; set; }
public string R1 { get; set; }
public string R2 { get; set; }
public string R2 { get; set; }
public string CutOffVisitName { get; set; }
public string CutOffVisitName { get; set; }
public string SelectResult { get; set; }
}
public string SelectResult { get; set; }
}
public class InspectionConvertDTO : DataInspection
{
/// <summary>
@ -172,10 +107,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
public string BlindName { get; set; } = string.Empty;
/// <summary>
/// 标识操作 是否区分接口
/// </summary>
public bool IsDistinctionInterface=true;
/// <summary>
/// 标识操作 是否区分接口
/// </summary>
public bool IsDistinctionInterface = true;
public bool IsSelfDefine = false;
@ -195,9 +130,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
/// </summary>
public Guid? TrialId { get; set; }
public Guid? TrialSiteId { get;set; }
public Guid? TrialSiteId { get; set; }
/// <summary>
/// 受试者
@ -238,20 +171,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
/// </summary>
public string SubjectVisitName { get; set; }
// /// <summary>
///// 创建人名称
///// </summary>
//public string CreateUserName { get; set; }
// /// <summary>
// /// 角色名称
// /// </summary>
// public string RoleName { get; set; }
}
public class SetInspectionEnum
@ -268,9 +187,4 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
public string Remake { get; set; }
}
}

View File

@ -1,23 +0,0 @@
using IRaCIS.Core.Domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Infra.EFCore.Common.Dto
{
public class DateDto
{
public string Code { get; set; }
public string DateType { get; set; }
public string Identification { get; set; }
}
public class ForeignKey
{
public string Text { get; set; }
}
}

View File

@ -16,7 +16,6 @@ using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.ValueGeneration;
using UserTypeGroup = IRaCIS.Core.Domain.Models.UserTypeGroup;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infra.EFCore.Common.Dto;
using Microsoft.Identity.Client;
using EntityFramework.Exceptions.Common;
using System.Data;

View File

@ -11,62 +11,61 @@ using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Infrastructure.Extention;
using System.Threading.Tasks;
using IRaCIS.Core.Infra.EFCore;
namespace IRaCIS.Core.Application.Service
{
namespace IRaCIS.Core.Application.Service;
[ ApiExplorerSettings(GroupName = "Test")]
public class {{TableName}}Service(IRepository<{{TableName}}> {{LowercaseRepositoryName}}): BaseService, I{{TableName}}Service
{
[ ApiExplorerSettings(GroupName = "Test")]
public class {{TableName}}Service(IRepository<{{TableName}}> {{LowercaseRepositoryName}}): BaseService, I{{TableName}}Service
{
{% if IsPaged %}
[HttpPost]
public async Task<PageOutput<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery)
{
{% if IsPaged %}
[HttpPost]
public async Task<PageOutput<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery)
{
var {{LowercaseQueryableName}} ={{LowercaseRepositoryName}}
.ProjectTo<{{TableNameView}}>(_mapper.ConfigurationProvider);
var {{LowercaseQueryableName}} ={{LowercaseRepositoryName}}
.ProjectTo<{{TableNameView}}>(_mapper.ConfigurationProvider);
var pageList= await {{LowercaseQueryableName}}.ToPagedListAsync(inQuery);
var pageList= await {{LowercaseQueryableName}}.ToPagedListAsync(inQuery);
return pageList;
}
{% else %}
[HttpPost]
public async Task<List<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery)
{
return pageList;
}
{% else %}
[HttpPost]
public async Task<List<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery)
{
var {{LowercaseQueryableName}} ={{LowercaseRepositoryName}}
.ProjectTo<{{TableNameView}}>(_mapper.ConfigurationProvider);
var {{LowercaseQueryableName}} ={{LowercaseRepositoryName}}
.ProjectTo<{{TableNameView}}>(_mapper.ConfigurationProvider);
return await {{LowercaseQueryableName}}.ToListAsync();
}
{% endif %}
return await {{LowercaseQueryableName}}.ToListAsync();
}
{% endif %}
public async Task<IResponseOutput> AddOrUpdate{{TableName}}({{TableName}}AddOrEdit addOrEdit{{TableName}})
{
// 在此处拷贝automapper 映射
public async Task<IResponseOutput> AddOrUpdate{{TableName}}({{TableName}}AddOrEdit addOrEdit{{TableName}})
{
// 在此处拷贝automapper 映射
CreateMap<{{TableName}}, {{TableNameView}}>();
CreateMap<{{TableName}},{{TableNameAddOrEdit}}>().ReverseMap();
CreateMap<{{TableName}}, {{TableNameView}}>();
CreateMap<{{TableName}},{{TableNameAddOrEdit}}>().ReverseMap();
var entity = await {{LowercaseRepositoryName}}.InsertOrUpdateAsync(addOrEdit{{TableName}}, true);
var entity = await {{LowercaseRepositoryName}}.InsertOrUpdateAsync(addOrEdit{{TableName}}, true);
return ResponseOutput.Ok(entity.Id.ToString());
return ResponseOutput.Ok(entity.Id.ToString());
}
}
[HttpDelete("{{ '{' }}{{LowercaseTableNameId}}:guid{{ '}' }}")]
public async Task<IResponseOutput> Delete{{TableName}}(Guid {{LowercaseTableNameId}})
{
var success = await _<#=char.ToLower(tableName[0]) + tableName.Substring(1)#>Repository.DeleteFromQueryAsync(t => t.Id == {{LowercaseTableNameId}},true);
return ResponseOutput.Ok();
}
[HttpDelete("{{ '{' }}{{LowercaseTableNameId}}:guid{{ '}' }}")]
public async Task<IResponseOutput> Delete{{TableName}}(Guid {{LowercaseTableNameId}})
{
var success = await _<#=char.ToLower(tableName[0]) + tableName.Substring(1)#>Repository.DeleteFromQueryAsync(t => t.Id == {{LowercaseTableNameId}},true);
return ResponseOutput.Ok();
}
}
}
}

View File

@ -7,38 +7,38 @@
using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
namespace IRaCIS.Core.Application.ViewModel
namespace IRaCIS.Core.Application.ViewModel;
public class {{ TableNameView }} : {{ TableNameAddOrEdit }}
{
public class {{ TableNameView }} : {{ TableNameAddOrEdit }}
{
{% for field in ViewListFieldList %}
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
{% endfor %}
}
{% for field in ViewListFieldList %}
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
{% endfor %}
}
public class {{ TableNameAddOrEdit }}
{
{%- for field in AddOrUpdateFieldList -%}
{% if field.IsPrimarykey %}
public {{ field.CSharpType }}? {{ field.FieldName }} { get; set; }
{% else %}
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
{% endif %}
{%- endfor -%}
}
public class {{ TableNameAddOrEdit }}
{
{%- for field in AddOrUpdateFieldList -%}
{% if field.IsPrimarykey %}
public {{ field.CSharpType }}? {{ field.FieldName }} { get; set; }
{% else %}
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
{% endif %}
{%- endfor -%}
}
public class {{ TableNameQuery }}
{
{%- for field in QueryListFieldList -%}
{% if field.IsNullable and field.IsCSharpString == false %}
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
{% else %}
public {{ field.CSharpType }}? {{ field.FieldName }} { get; set; }
{% endif %}
{%- endfor -%}
}
public class {{ TableNameQuery }}
{
{%- for field in QueryListFieldList -%}
{% if field.IsNullable and field.IsCSharpString == false %}
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
{% else %}
public {{ field.CSharpType }}? {{ field.FieldName }} { get; set; }
{% endif %}
{%- endfor -%}
}

View File

@ -8,18 +8,18 @@ using System;
using IRaCIS.Core.Infrastructure.Extention;
using System.Threading.Tasks;
using IRaCIS.Core.Application.ViewModel;
namespace IRaCIS.Core.Application.Interfaces
{
public interface I{{TableName}}Service
{
{% if IsPaged %}
Task<PageOutput<<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery);
{% else %}
Task<List<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery);
{% endif %}
Task<IResponseOutput> AddOrUpdate{{TableName}}({{TableNameAddOrEdit}} addOrEdit{{TableName}});
namespace IRaCIS.Core.Application.Interfaces;
Task<IResponseOutput> Delete{{TableNameView}}(Guid {{LowercaseTableNameId}});
}
public interface I{{TableName}}Service
{
{% if IsPaged %}
Task<PageOutput<<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery);
{% else %}
Task<List<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery);
{% endif %}
Task<IResponseOutput> AddOrUpdate{{TableName}}({{TableNameAddOrEdit}} addOrEdit{{TableName}});
Task<IResponseOutput> Delete{{TableNameView}}(Guid {{LowercaseTableNameId}});
}