完成 轨迹模板内容列表 接口
This commit is contained in:
parent
bf1a9e0169
commit
0a3a9b1822
@ -1,4 +1,6 @@
|
||||
using SJZY.Track.Application.Dtos.TrackTemplates;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using SJZY.Track.Application.Dtos.TrackTemplates;
|
||||
using SJZY.Track.Application.Localization;
|
||||
using SJZY.Track.Domain.TrackTemplateAggregate;
|
||||
using SJZY.Track.Domain.TrackTemplateAggregate.Dtos;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
@ -12,13 +14,15 @@ namespace SJZY.Track.Application.Services.TrackTemplates;
|
||||
[Route("/Track/Template")]
|
||||
public class TrackTemplateService : ApplicationService, ITrackTemplateService, IScopedDependency
|
||||
{
|
||||
private readonly IStringLocalizer<TrackLocalizationResource> _stringLocalizer;
|
||||
private readonly ITrackTemplateRepository _trackTemplateRepository;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public TrackTemplateService(
|
||||
ITrackTemplateRepository trackTemplateRepository
|
||||
)
|
||||
IStringLocalizer<TrackLocalizationResource> stringLocalizer,
|
||||
ITrackTemplateRepository trackTemplateRepository)
|
||||
{
|
||||
_stringLocalizer = stringLocalizer;
|
||||
_trackTemplateRepository = trackTemplateRepository;
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ public class GetContentPageOutputVO
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public string CreateTime { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
@ -62,7 +62,7 @@ public class GetContentPageOutputVO
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public string UpdateTime { get; set; }
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改人
|
||||
|
||||
50
src/SJZY.Track.Domain/VEntities/VEnumValueInfo.cs
Normal file
50
src/SJZY.Track.Domain/VEntities/VEnumValueInfo.cs
Normal file
@ -0,0 +1,50 @@
|
||||
namespace SJZY.Track.Domain.VEntities;
|
||||
|
||||
/// <summary>
|
||||
/// 主数据枚举
|
||||
/// </summary>
|
||||
[SugarTable("v_enum_value_info")]
|
||||
public class VEnumValueInfoEntity : IFullAuditedBasicEntitys
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// '属性 开发人员设定,禁止用户修改'
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Property")]
|
||||
public string Property { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// '关键字;外部使用:系统自动生成 同一个Property的Enumkey 自动排序递增 内部使用:开发人员设定'
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Enumkey")]
|
||||
public int Enumkey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Disp")]
|
||||
public string Disp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述英文名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "EnDisp")]
|
||||
public string EnDisp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否内部使用, 1是 0不是,外部使用,无需设置此值.
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsInside")]
|
||||
public int IsInside { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
@ -1,131 +1,128 @@
|
||||
namespace SJZY.Track.Repository.VData.Entitys
|
||||
namespace SJZY.Track.Repository.VData.Entitys;
|
||||
|
||||
/// <summary>
|
||||
/// 外部主体
|
||||
/// </summary>
|
||||
[SugarTable("v_external_subject")]
|
||||
public class VExternalSubjectEntity : IFullAuditedBasicEntitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 外部主体
|
||||
///
|
||||
/// </summary>
|
||||
[SugarTable("v_external_subject")]
|
||||
public class VExternalSubjectEntity : IFullAuditedBasicEntitys
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 公司简称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Abbreviation")]
|
||||
public string Abbreviation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司简称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Abbreviation")]
|
||||
public string Abbreviation { get; set; }
|
||||
/// <summary>
|
||||
/// 所属网络(主数据枚举表 (属性=AffiliatedNetwork)WCA,WEB,Atlas,CCA,CTN,CLN,GLN,PCN,SCN,WPA,EGLN,Other)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "AffiliatedNetwork")]
|
||||
public int? AffiliatedNetwork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属网络(主数据枚举表 (属性=AffiliatedNetwork)WCA,WEB,Atlas,CCA,CTN,CLN,GLN,PCN,SCN,WPA,EGLN,Other)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "AffiliatedNetwork")]
|
||||
public int? AffiliatedNetwork { get; set; }
|
||||
/// <summary>
|
||||
/// 公司代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Code")]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Code")]
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
/// (主数据枚举表 (属性=CustomerQuality)国内同行,国外同行,国内直客,国外直客,海外代理,国内贸易公司,国外贸易公司,仅供应商,内部子公司,个人,内部子部门)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CooperationNature")]
|
||||
public int? CooperationNature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (主数据枚举表 (属性=CustomerQuality)国内同行,国外同行,国内直客,国外直客,海外代理,国内贸易公司,国外贸易公司,仅供应商,内部子公司,个人,内部子部门)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CooperationNature")]
|
||||
public int? CooperationNature { get; set; }
|
||||
/// <summary>
|
||||
/// 公司英文名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "EnName")]
|
||||
public string EnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司英文名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "EnName")]
|
||||
public string EnName { get; set; }
|
||||
/// <summary>
|
||||
/// 是否核准
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsApprove")]
|
||||
public bool IsApprove { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否核准
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsApprove")]
|
||||
public bool IsApprove { get; set; }
|
||||
/// <summary>
|
||||
/// 是否黑名单
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsBlacklist")]
|
||||
public bool IsBlacklist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否黑名单
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsBlacklist")]
|
||||
public bool IsBlacklist { get; set; }
|
||||
/// <summary>
|
||||
/// 是否订香港
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsBookingHongKong")]
|
||||
public bool? IsBookingHongKong { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否订香港
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsBookingHongKong")]
|
||||
public bool? IsBookingHongKong { get; set; }
|
||||
/// <summary>
|
||||
/// 是否海外代理
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsOverseasAgent")]
|
||||
public bool IsOverseasAgent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否海外代理
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsOverseasAgent")]
|
||||
public bool IsOverseasAgent { get; set; }
|
||||
/// <summary>
|
||||
/// 是否自行结算
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsSelfSettlement")]
|
||||
public bool IsSelfSettlement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否自行结算
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsSelfSettlement")]
|
||||
public bool IsSelfSettlement { get; set; }
|
||||
/// <summary>
|
||||
/// 是否结算主体
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsSettlementSubject")]
|
||||
public bool IsSettlementSubject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否结算主体
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsSettlementSubject")]
|
||||
public bool IsSettlementSubject { get; set; }
|
||||
/// <summary>
|
||||
/// 主网络,从多选的所属网络中选其中一个
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MainNetwork")]
|
||||
public int? MainNetwork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主网络,从多选的所属网络中选其中一个
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "MainNetwork")]
|
||||
public int? MainNetwork { get; set; }
|
||||
/// <summary>
|
||||
/// 公司名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公司名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Name")]
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 性质,t_enum_value_info表Property="CompanyQuality;1 国有企业,2 国有控股企业,3 外资企业,4 合资企业,5 股份企业,6 私营企业,7 个体户
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Nature")]
|
||||
public int? Nature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 性质,t_enum_value_info表Property="CompanyQuality;1 国有企业,2 国有控股企业,3 外资企业,4 合资企业,5 股份企业,6 私营企业,7 个体户
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Nature")]
|
||||
public int? Nature { get; set; }
|
||||
/// <summary>
|
||||
/// 内部组织id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "OrgId")]
|
||||
public int? OrgId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 内部组织id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "OrgId")]
|
||||
public int? OrgId { get; set; }
|
||||
/// <summary>
|
||||
/// 母公司id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public int? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 母公司id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public int? ParentId { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 类型,位运算存储;t_enum_value_info表Property="SubjectType;1客户,2供应商,4内部子公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型,位运算存储;t_enum_value_info表Property="SubjectType;1客户,2供应商,4内部子公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已验证公司名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "VerifiedName")]
|
||||
public string VerifiedName { get; set; }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 已验证公司名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "VerifiedName")]
|
||||
public string VerifiedName { get; set; }
|
||||
}
|
||||
@ -6,7 +6,6 @@
|
||||
[SugarTable("v_service_provider")]
|
||||
public class VServiceProviderEntity : IFullAuditedBasicEntitys
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 自增主键
|
||||
/// </summary>
|
||||
@ -72,5 +71,4 @@ public class VServiceProviderEntity : IFullAuditedBasicEntitys
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Types")]
|
||||
public string Types { get; set; }
|
||||
|
||||
}
|
||||
@ -1,12 +1,11 @@
|
||||
namespace SJZY.Track.Domain.VEntities;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
[SugarTable("v_system")]
|
||||
public class VSystemEntity : IFullAuditedBasicEntitys
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 子系统id
|
||||
/// </summary>
|
||||
@ -150,5 +149,4 @@ public class VSystemEntity : IFullAuditedBasicEntitys
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Token")]
|
||||
public string Token { get; set; }
|
||||
|
||||
}
|
||||
@ -6,7 +6,6 @@
|
||||
[SugarTable("v_user")]
|
||||
public class VUserEntity : IFullAuditedBasicEntitys
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
@ -102,5 +101,4 @@ public class VUserEntity : IFullAuditedBasicEntitys
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "UserOrigin")]
|
||||
public bool? UserOrigin { get; set; }
|
||||
|
||||
}
|
||||
15
src/SJZY.Track.Repository/Enum/Enums.cs
Normal file
15
src/SJZY.Track.Repository/Enum/Enums.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace SJZY.Track.Repository.Enum;
|
||||
|
||||
/// <summary>
|
||||
/// 枚举属性
|
||||
/// </summary>
|
||||
public enum EnumPropertyEnums
|
||||
{
|
||||
/// <summary>
|
||||
/// 节点
|
||||
/// </summary>
|
||||
[Description("ServiceNode")]
|
||||
节点,
|
||||
}
|
||||
@ -1,7 +1,11 @@
|
||||
using SJZY.Track.Domain.TrackContentAggregate;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
using SJZY.Track.Domain.TrackContentAggregate;
|
||||
using SJZY.Track.Domain.TrackFlagAggregate;
|
||||
using SJZY.Track.Domain.TrackStatusAggregate;
|
||||
using SJZY.Track.Domain.TrackTemplateAggregate;
|
||||
using SJZY.Track.Domain.TrackTemplateAggregate.Dtos;
|
||||
using SJZY.Track.Domain.VEntities;
|
||||
using SJZY.Track.Repository.Enum;
|
||||
|
||||
namespace SJZY.Track.Repository;
|
||||
|
||||
@ -56,14 +60,32 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
||||
return pagedList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹模板内容列表
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<UnifyPageResultDto<GetContentPageOutputVO>> GetContentPageAsync(GetContentPageInputVO input)
|
||||
{
|
||||
return await AsSugarClient().Queryable<TrackTemplateContentEntity>()
|
||||
.InnerJoin<TrackContentEntity>((templateContent, trackContent) => templateContent.TrackContentId == trackContent.Id)
|
||||
.Where(templateContent => templateContent.TrackTemplateId == input.TrackTemplateId)
|
||||
.Select((templateContent, trackContent) => new GetContentPageOutputVO
|
||||
.InnerJoin<TrackContentEntity>((templateContent, trackContent) => templateContent.TrackContentId == trackContent.Id && !trackContent.IsDeleted)
|
||||
.LeftJoin<TrackStatusEntity>((templateContent, trackContent, trackStatus) => trackContent.TrackStatusId == trackStatus.Id && !trackStatus.IsDeleted)
|
||||
.LeftJoin<VEnumValueInfoEntity>((templateContent, trackContent, trackStatus, enumValue) => enumValue.Property == EnumPropertyEnums.节点.GetDescription() && trackStatus.Node == enumValue.Enumkey && !enumValue.IsDeleted)
|
||||
.LeftJoin<TrackFlagEntity>((templateContent, trackContent, trackStatus, enumValue, trackFlag) => trackContent.TrackFlagId == trackFlag.Id && !trackFlag.IsDeleted)
|
||||
.LeftJoin<VUserEntity>((templateContent, trackContent, trackStatus, enumValue, trackFlag, createUser) => templateContent.CreateUserId == createUser.Id && !createUser.IsDeleted)
|
||||
.LeftJoin<VUserEntity>((templateContent, trackContent, trackStatus, enumValue, trackFlag, createUser, updateUser) => templateContent.UpdateUserId == updateUser.Id && !updateUser.IsDeleted)
|
||||
.Filter(null, true)
|
||||
.Where(templateContent => templateContent.TrackTemplateId == input.TrackTemplateId && !templateContent.IsDeleted)
|
||||
.Select((templateContent, trackContent, trackStatus, enumValue, trackFlag, createUser, updateUser) => new GetContentPageOutputVO
|
||||
{
|
||||
Id = templateContent.Id
|
||||
Id = templateContent.Id,
|
||||
TrackStatus = trackStatus.Status,
|
||||
Node = enumValue.Disp,
|
||||
TrackFlag = trackFlag.Name,
|
||||
CreateTime = templateContent.CreateTime,
|
||||
CreateUser = createUser.Name,
|
||||
UpdateTime = templateContent.UpdateTime,
|
||||
UpdateUser = updateUser.Name
|
||||
}, true)
|
||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user