修改代码模板
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3813158b00
commit
581e412106
|
@ -1371,7 +1371,7 @@
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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>
|
||||||
获取查询对象
|
获取查询对象
|
||||||
</summary>
|
</summary>
|
||||||
|
@ -1384,7 +1384,7 @@
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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>
|
||||||
复制配置项及其子项
|
复制配置项及其子项
|
||||||
</summary>
|
</summary>
|
||||||
|
@ -1398,14 +1398,14 @@
|
||||||
<param name="data">数据集</param>
|
<param name="data">数据集</param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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>
|
||||||
翻译稽查数据
|
翻译稽查数据
|
||||||
</summary>
|
</summary>
|
||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</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>
|
||||||
翻译稽查数据
|
翻译稽查数据
|
||||||
</summary>
|
</summary>
|
||||||
|
@ -10839,6 +10839,21 @@
|
||||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemAnonymizationAddOrEdit">
|
<member name="T:IRaCIS.Core.Application.ViewModel.SystemAnonymizationAddOrEdit">
|
||||||
<summary> SystemAnonymizationAddOrEdit 列表查询参数模型</summary>
|
<summary> SystemAnonymizationAddOrEdit 列表查询参数模型</summary>
|
||||||
</member>
|
</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">
|
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
||||||
<summary> SystemNoticeView 列表视图模型 </summary>
|
<summary> SystemNoticeView 列表视图模型 </summary>
|
||||||
</member>
|
</member>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,7 @@ using System;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common.Dto;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.ViewModel
|
namespace IRaCIS.Core.Application.ViewModel
|
||||||
{
|
{
|
||||||
|
|
|
@ -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; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Application.Interfaces;
|
using IRaCIS.Core.Application.Interfaces;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common.Dto;
|
|
||||||
using Microsoft.Data.SqlClient;
|
using Microsoft.Data.SqlClient;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
@ -19,6 +18,7 @@ using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Npgsql;
|
using Npgsql;
|
||||||
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common.Dto;
|
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
|
|
|
@ -7,20 +7,8 @@ using System.ComponentModel.DataAnnotations;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
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 class SetInspectionEnumDataDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
@ -34,8 +22,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
||||||
public Guid? ObjectRelationParentId2 { get; set; }
|
public Guid? ObjectRelationParentId2 { get; set; }
|
||||||
|
|
||||||
public Guid? ObjectRelationParentId3 { get; set; }
|
public Guid? ObjectRelationParentId3 { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批次Id
|
/// 批次Id
|
||||||
/// </summary>
|
/// </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>
|
||||||
/// 稽查数据
|
/// 稽查数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -120,20 +43,32 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
||||||
public object CommonData { get; set; }
|
public object CommonData { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class UnitData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 单位
|
||||||
|
/// </summary>
|
||||||
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
|
public string UnitName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class VisitTaskAuditingDto
|
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
|
public class InspectionConvertDTO : DataInspection
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -172,10 +107,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
||||||
public string BlindName { get; set; } = string.Empty;
|
public string BlindName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标识操作 是否区分接口
|
/// 标识操作 是否区分接口
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsDistinctionInterface=true;
|
public bool IsDistinctionInterface = true;
|
||||||
|
|
||||||
public bool IsSelfDefine = false;
|
public bool IsSelfDefine = false;
|
||||||
|
|
||||||
|
@ -195,9 +130,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? TrialId { get; set; }
|
public Guid? TrialId { get; set; }
|
||||||
|
|
||||||
public Guid? TrialSiteId { get;set; }
|
public Guid? TrialSiteId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 受试者
|
/// 受试者
|
||||||
|
@ -238,20 +171,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SubjectVisitName { get; set; }
|
public string SubjectVisitName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
///// 创建人名称
|
|
||||||
///// </summary>
|
|
||||||
//public string CreateUserName { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 角色名称
|
|
||||||
// /// </summary>
|
|
||||||
// public string RoleName { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SetInspectionEnum
|
public class SetInspectionEnum
|
||||||
|
@ -268,9 +187,4 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
||||||
|
|
||||||
public string Remake { get; set; }
|
public string Remake { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -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; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,7 +16,6 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.ValueGeneration;
|
using Microsoft.EntityFrameworkCore.ValueGeneration;
|
||||||
using UserTypeGroup = IRaCIS.Core.Domain.Models.UserTypeGroup;
|
using UserTypeGroup = IRaCIS.Core.Domain.Models.UserTypeGroup;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common.Dto;
|
|
||||||
using Microsoft.Identity.Client;
|
using Microsoft.Identity.Client;
|
||||||
using EntityFramework.Exceptions.Common;
|
using EntityFramework.Exceptions.Common;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
|
|
@ -11,62 +11,61 @@ using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
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")]
|
{% if IsPaged %}
|
||||||
public class {{TableName}}Service(IRepository<{{TableName}}> {{LowercaseRepositoryName}}): BaseService, I{{TableName}}Service
|
[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}}
|
var {{LowercaseQueryableName}} ={{LowercaseRepositoryName}}
|
||||||
.ProjectTo<{{TableNameView}}>(_mapper.ConfigurationProvider);
|
.ProjectTo<{{TableNameView}}>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var pageList= await {{LowercaseQueryableName}}.ToPagedListAsync(inQuery);
|
var pageList= await {{LowercaseQueryableName}}.ToPagedListAsync(inQuery);
|
||||||
|
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
{% else %}
|
{% else %}
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery)
|
public async Task<List<{{TableNameView}}>> Get{{TableName}}List({{TableNameQuery}} inQuery)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var {{LowercaseQueryableName}} ={{LowercaseRepositoryName}}
|
var {{LowercaseQueryableName}} ={{LowercaseRepositoryName}}
|
||||||
.ProjectTo<{{TableNameView}}>(_mapper.ConfigurationProvider);
|
.ProjectTo<{{TableNameView}}>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
return await {{LowercaseQueryableName}}.ToListAsync();
|
return await {{LowercaseQueryableName}}.ToListAsync();
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
public async Task<IResponseOutput> AddOrUpdate{{TableName}}({{TableName}}AddOrEdit addOrEdit{{TableName}})
|
public async Task<IResponseOutput> AddOrUpdate{{TableName}}({{TableName}}AddOrEdit addOrEdit{{TableName}})
|
||||||
{
|
{
|
||||||
// 在此处拷贝automapper 映射
|
// 在此处拷贝automapper 映射
|
||||||
|
|
||||||
CreateMap<{{TableName}}, {{TableNameView}}>();
|
CreateMap<{{TableName}}, {{TableNameView}}>();
|
||||||
CreateMap<{{TableName}},{{TableNameAddOrEdit}}>().ReverseMap();
|
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{{ '}' }}")]
|
[HttpDelete("{{ '{' }}{{LowercaseTableNameId}}:guid{{ '}' }}")]
|
||||||
public async Task<IResponseOutput> Delete{{TableName}}(Guid {{LowercaseTableNameId}})
|
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);
|
var success = await _<#=char.ToLower(tableName[0]) + tableName.Substring(1)#>Repository.DeleteFromQueryAsync(t => t.Id == {{LowercaseTableNameId}},true);
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -7,38 +7,38 @@
|
||||||
using System;
|
using System;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System.Collections.Generic;
|
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; }
|
||||||
{% for field in ViewListFieldList %}
|
{% endfor %}
|
||||||
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
|
}
|
||||||
{% endfor %}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class {{ TableNameAddOrEdit }}
|
public class {{ TableNameAddOrEdit }}
|
||||||
{
|
{
|
||||||
{%- for field in AddOrUpdateFieldList -%}
|
{%- for field in AddOrUpdateFieldList -%}
|
||||||
{% if field.IsPrimarykey %}
|
{% if field.IsPrimarykey %}
|
||||||
public {{ field.CSharpType }}? {{ field.FieldName }} { get; set; }
|
public {{ field.CSharpType }}? {{ field.FieldName }} { get; set; }
|
||||||
{% else %}
|
{% else %}
|
||||||
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
|
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class {{ TableNameQuery }}
|
public class {{ TableNameQuery }}
|
||||||
{
|
{
|
||||||
{%- for field in QueryListFieldList -%}
|
{%- for field in QueryListFieldList -%}
|
||||||
{% if field.IsNullable and field.IsCSharpString == false %}
|
{% if field.IsNullable and field.IsCSharpString == false %}
|
||||||
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
|
public {{ field.CSharpType }} {{ field.FieldName }} { get; set; }
|
||||||
{% else %}
|
{% else %}
|
||||||
public {{ field.CSharpType }}? {{ field.FieldName }} { get; set; }
|
public {{ field.CSharpType }}? {{ field.FieldName }} { get; set; }
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,18 +8,18 @@ using System;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
namespace IRaCIS.Core.Application.Interfaces
|
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}});
|
|
||||||
|
|
||||||
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}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue