Merge remote-tracking branch 'origin/S01-轨迹中台' into S01-轨迹中台
This commit is contained in:
commit
752f65b1e2
@ -1,6 +1,6 @@
|
|||||||
using SJZY.Track.Domain;
|
using SJZY.Expand.ABP.Core.Localization;
|
||||||
using SJZY.Expand.ABP.Core.Localization;
|
|
||||||
using SJZY.Track.Application.Localization;
|
using SJZY.Track.Application.Localization;
|
||||||
|
using SJZY.Track.Domain;
|
||||||
using SJZY.UserCenter.Contracts;
|
using SJZY.UserCenter.Contracts;
|
||||||
using SJZY.UserCenter.SharedModel;
|
using SJZY.UserCenter.SharedModel;
|
||||||
using Volo.Abp.AspNetCore.Mvc;
|
using Volo.Abp.AspNetCore.Mvc;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
using SJZY.Track.Application.Dtos.Demo;
|
||||||
using SJZY.Track.Domain.DemoAggregate;
|
using SJZY.Track.Domain.DemoAggregate;
|
||||||
using SJZY.Track.Domain.DemoAggregate.Dtos;
|
using SJZY.Track.Domain.DemoAggregate.Dtos;
|
||||||
using SJZY.Track.Application.Dtos.Demo;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Application.AutoMapper;
|
namespace SJZY.Track.Application.AutoMapper;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using SJZY.Track.Application.Dtos.TrackTemplates;
|
using SJZY.Track.Application.Dtos.TrackTemplates;
|
||||||
|
using SJZY.Track.Domain.TrackTemplateAggregate;
|
||||||
using SJZY.Track.Domain.TrackTemplateAggregate.Dtos;
|
using SJZY.Track.Domain.TrackTemplateAggregate.Dtos;
|
||||||
|
|
||||||
namespace SJZY.Track.Application.AutoMapper
|
namespace SJZY.Track.Application.AutoMapper
|
||||||
@ -14,6 +15,8 @@ namespace SJZY.Track.Application.AutoMapper
|
|||||||
CreateMap<GetTrackTemplateDetailVO, GetTrackTemplateDetailDto>(MemberList.None);
|
CreateMap<GetTrackTemplateDetailVO, GetTrackTemplateDetailDto>(MemberList.None);
|
||||||
|
|
||||||
//CreateMap<UnifyResultDto<GetTrackTemplateDetailVO>, UnifyResultDto<GetTrackTemplateDetailDto>>(MemberList.None);
|
//CreateMap<UnifyResultDto<GetTrackTemplateDetailVO>, UnifyResultDto<GetTrackTemplateDetailDto>>(MemberList.None);
|
||||||
|
|
||||||
|
CreateMap<EditTrackTemplateContentInput, TrackTemplateContentEntity>(MemberList.None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Application.Dtos.TrackStatus
|
||||||
|
{
|
||||||
|
public class EditTrackStatusInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Id
|
||||||
|
/// </summary>
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作类型
|
||||||
|
/// </summary>
|
||||||
|
public OptionType Options { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子系统id
|
||||||
|
/// </summary>
|
||||||
|
public int SubSystemId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属节点id
|
||||||
|
/// </summary>
|
||||||
|
public int NodeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态代码
|
||||||
|
/// </summary>
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态
|
||||||
|
/// </summary>
|
||||||
|
public string TrackStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态英文
|
||||||
|
/// </summary>
|
||||||
|
public string EntrackStatus { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
namespace SJZY.Track.Application.Dtos.TrackTemplates;
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public class EditTrackTemplateContentInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 操作类型
|
||||||
|
/// </summary>
|
||||||
|
public OptionTypeNoNull Options { get; set; }
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public int? Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否可删
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCanDelete { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否对外
|
||||||
|
/// </summary>
|
||||||
|
public bool IsExternal { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackContentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackTemplateId { get; set; }
|
||||||
|
}
|
||||||
@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace SJZY.Track.Application.Dtos.TrackTemplates
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Application.Dtos.TrackTemplates
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取轨迹模版分页输入
|
/// 获取轨迹模版分页输入
|
||||||
@ -20,5 +14,10 @@ namespace SJZY.Track.Application.Dtos.TrackTemplates
|
|||||||
/// 关键字
|
/// 关键字
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Keywords { get; set; }
|
public string Keywords { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模版id,轨迹映射的查询使用
|
||||||
|
/// </summary>
|
||||||
|
public int TrackTemplateId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,4 @@
|
|||||||
using Microsoft.OpenApi.Writers;
|
namespace SJZY.Track.Application.Dtos.TrackTemplates
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Application.Dtos.TrackTemplates
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取轨迹模版详情
|
/// 获取轨迹模版详情
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
global using Microsoft.Extensions.DependencyInjection;
|
global using Microsoft.Extensions.DependencyInjection;
|
||||||
global using SJZY.Expand.ABP.Common.Enums;
|
global using SJZY.Expand.ABP.Common.Enums;
|
||||||
global using SJZY.Expand.ABP.Core.Common.Dto;
|
global using SJZY.Expand.ABP.Core.Common.Dto;
|
||||||
global using SJZY.Track.Repository;
|
|
||||||
global using Volo.Abp;
|
global using Volo.Abp;
|
||||||
global using Volo.Abp.Application.Services;
|
global using Volo.Abp.Application.Services;
|
||||||
global using Volo.Abp.Validation;
|
global using Volo.Abp.Validation;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
using SJZY.Track.Domain.DemoAggregate;
|
using SJZY.Expand.ABP.Core.Common;
|
||||||
using SJZY.Track.Domain.DemoAggregate.Dtos;
|
|
||||||
using SJZY.Expand.ABP.Core.Common;
|
|
||||||
using SJZY.Track.Application.Dtos.Demo;
|
using SJZY.Track.Application.Dtos.Demo;
|
||||||
|
using SJZY.Track.Domain.DemoAggregate;
|
||||||
|
using SJZY.Track.Domain.DemoAggregate.Dtos;
|
||||||
|
|
||||||
namespace SJZY.Track.Application.Services.Demo
|
namespace SJZY.Track.Application.Services.Demo
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
using SJZY.Track.Application.Dtos.ProvideServices;
|
||||||
|
using SJZY.Track.Domain;
|
||||||
using SJZY.Track.Domain.OrderAggregate;
|
using SJZY.Track.Domain.OrderAggregate;
|
||||||
using SJZY.Track.Domain.TrackTemplateAggregate;
|
using SJZY.Track.Domain.TrackTemplateAggregate;
|
||||||
using SJZY.Track.Application.Dtos.ProvideServices;
|
using SJZY.Track.Application.Dtos.ProvideServices;
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Application.Services.TrackStatus
|
||||||
|
{
|
||||||
|
public interface ITrackStatusService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
using SJZY.Track.Application.Dtos.TrackStatus;
|
||||||
|
using SJZY.Track.Application.Dtos.TrackTemplates;
|
||||||
|
using SJZY.Track.Domain.TrackStatusAggregate;
|
||||||
|
using SJZY.Track.Domain.TrackTemplateAggregate;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Application.Services.TrackStatus
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态
|
||||||
|
/// </summary>
|
||||||
|
[ApiExplorerSettings(GroupName = "轨迹状态")]
|
||||||
|
[Route("/Track/Status")]
|
||||||
|
public class TrackStatusService : ApplicationService, ITransientDependency
|
||||||
|
{
|
||||||
|
private readonly ITrackStatusRepository _trackStatusRepository;
|
||||||
|
|
||||||
|
public TrackStatusService(
|
||||||
|
ITrackStatusRepository trackStatusRepository
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this._trackStatusRepository=trackStatusRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态编辑
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("Edit")]
|
||||||
|
public async Task<UnifyResultDto> EditAsync(EditTrackStatusInput input)
|
||||||
|
{
|
||||||
|
return input.Options switch
|
||||||
|
{
|
||||||
|
OptionType.新增 => await AddAsync(input),
|
||||||
|
OptionType.修改 => await UpdateAsync(input),
|
||||||
|
OptionType.删除 => await DeleteAsync(input),
|
||||||
|
_ => throw new BusinessException(message: "当前操作动作不合法")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 私有方法
|
||||||
|
private async Task<UnifyResultDto> AddAsync(EditTrackStatusInput input)
|
||||||
|
{
|
||||||
|
var entity = ObjectMapper.Map<EditTrackStatusInput, TrackStatusEntity>(input);
|
||||||
|
var isTrue = await _trackStatusRepository.InsertAsync(entity);
|
||||||
|
|
||||||
|
return new UnifyResultDto("200", "新增成功", isTrue);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<UnifyResultDto> UpdateAsync(EditTrackStatusInput input)
|
||||||
|
{
|
||||||
|
var templateEntity = await _trackStatusRepository.GetFirstAsync(a => a.Id == input.Id);
|
||||||
|
ObjectMapper.Map(input, templateEntity);
|
||||||
|
var isTrue = await _trackStatusRepository.UpdateAsync(templateEntity);
|
||||||
|
|
||||||
|
return new UnifyResultDto("200", "修改成功", isTrue);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<UnifyResultDto> DeleteAsync(EditTrackStatusInput input)
|
||||||
|
{
|
||||||
|
var isTrue = await _trackStatusRepository.SoftDeleteAsync(x => x.Id == input.Id);
|
||||||
|
|
||||||
|
return new UnifyResultDto("200", "删除成功", isTrue);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,10 +1,4 @@
|
|||||||
using System;
|
namespace SJZY.Track.Application.Services.TrackTemplates
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Application.Services.TrackTemplates
|
|
||||||
{
|
{
|
||||||
public interface ITrackTemplateService
|
public interface ITrackTemplateService
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
using SJZY.Track.Application.Dtos.TrackTemplates;
|
using Microsoft.Extensions.Localization;
|
||||||
|
using SJZY.Expand.ABP.Core.Localization;
|
||||||
|
using SJZY.Track.Application.Dtos.TrackTemplates;
|
||||||
|
using SJZY.Track.Application.Localization;
|
||||||
using SJZY.Track.Domain.TrackTemplateAggregate;
|
using SJZY.Track.Domain.TrackTemplateAggregate;
|
||||||
using SJZY.Track.Domain.TrackTemplateAggregate.Dtos;
|
using SJZY.Track.Domain.TrackTemplateAggregate.Dtos;
|
||||||
|
using System.Linq.Expressions;
|
||||||
using Volo.Abp.DependencyInjection;
|
using Volo.Abp.DependencyInjection;
|
||||||
|
|
||||||
namespace SJZY.Track.Application.Services.TrackTemplates;
|
namespace SJZY.Track.Application.Services.TrackTemplates;
|
||||||
@ -9,15 +13,18 @@ namespace SJZY.Track.Application.Services.TrackTemplates;
|
|||||||
/// 轨迹模版
|
/// 轨迹模版
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiExplorerSettings(GroupName = "轨迹模版")]
|
[ApiExplorerSettings(GroupName = "轨迹模版")]
|
||||||
[Route("/Track")]
|
[Route("/Track/Template")]
|
||||||
public class TrackTemplateService : ApplicationService, ITrackTemplateService, IScopedDependency
|
public class TrackTemplateService : ApplicationService, ITransientDependency
|
||||||
{
|
{
|
||||||
|
private readonly IStringLocalizer<TrackLocalizationResource> _stringLocalizer;
|
||||||
private readonly ITrackTemplateRepository _trackTemplateRepository;
|
private readonly ITrackTemplateRepository _trackTemplateRepository;
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
public TrackTemplateService(
|
public TrackTemplateService(
|
||||||
ITrackTemplateRepository trackTemplateRepository
|
IStringLocalizer<TrackLocalizationResource> stringLocalizer,
|
||||||
)
|
ITrackTemplateRepository trackTemplateRepository)
|
||||||
{
|
{
|
||||||
|
_stringLocalizer = stringLocalizer;
|
||||||
_trackTemplateRepository = trackTemplateRepository;
|
_trackTemplateRepository = trackTemplateRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +32,7 @@ public class TrackTemplateService : ApplicationService, ITrackTemplateService, I
|
|||||||
/// 轨迹模版编辑
|
/// 轨迹模版编辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("/Template/Edit")]
|
[HttpPost("Edit")]
|
||||||
public async Task<UnifyResultDto> EditAsync(EditTrackTemplateInput input)
|
public async Task<UnifyResultDto> EditAsync(EditTrackTemplateInput input)
|
||||||
{
|
{
|
||||||
return input.Options switch
|
return input.Options switch
|
||||||
@ -42,7 +49,7 @@ public class TrackTemplateService : ApplicationService, ITrackTemplateService, I
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("/Template/GetDetail")]
|
[HttpGet("GetDetail")]
|
||||||
public async Task<UnifyResultDto<GetTrackTemplateDetailDto>> GetDetailAsync(int id)
|
public async Task<UnifyResultDto<GetTrackTemplateDetailDto>> GetDetailAsync(int id)
|
||||||
{
|
{
|
||||||
var detailInfo = await _trackTemplateRepository.GetDetailAsync(id);
|
var detailInfo = await _trackTemplateRepository.GetDetailAsync(id);
|
||||||
@ -60,7 +67,7 @@ public class TrackTemplateService : ApplicationService, ITrackTemplateService, I
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("/Template/GetList")]
|
[HttpPost("GetList")]
|
||||||
public async Task<UnifyPageResultDto<GetTrackTemplateListDto>> GetPageTrackTemplate(GetPageTrackTemplateInput input)
|
public async Task<UnifyPageResultDto<GetTrackTemplateListDto>> GetPageTrackTemplate(GetPageTrackTemplateInput input)
|
||||||
{
|
{
|
||||||
var vo = ObjectMapper.Map<GetPageTrackTemplateInput, GetPageTrackTemplateVO>(input);
|
var vo = ObjectMapper.Map<GetPageTrackTemplateInput, GetPageTrackTemplateVO>(input);
|
||||||
@ -98,5 +105,78 @@ public class TrackTemplateService : ApplicationService, ITrackTemplateService, I
|
|||||||
return new UnifyResultDto("200", "删除成功", isTrue);
|
return new UnifyResultDto("200", "删除成功", isTrue);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion 私有方法
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板内容列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("GetContentPage")]
|
||||||
|
public async Task<UnifyPageResultDto<GetTrackTemplateContentPageOutputVO>> GetContentPageAsync([FromBody] GetTrackTemplateContentPageInputVO input)
|
||||||
|
{
|
||||||
|
return await _trackTemplateRepository.GetContentPageAsync(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板内容详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("GetContentDetail")]
|
||||||
|
public async Task<GetTrackTemplateContentDetailOutputVO> GetContentDetailAsync(int id)
|
||||||
|
{
|
||||||
|
return await _trackTemplateRepository.GetContentDetailAsync(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板内容编辑
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("EditContent")]
|
||||||
|
public async Task<bool> EditContentAsync([FromBody] EditTrackTemplateContentInput input)
|
||||||
|
{
|
||||||
|
if (input.Options != OptionTypeNoNull.删除)
|
||||||
|
{
|
||||||
|
Expression<Func<TrackTemplateContentEntity, bool>> isAnyExp = x =>
|
||||||
|
x.TrackTemplateId == input.TrackTemplateId && x.TrackContentId == input.TrackContentId;
|
||||||
|
if (input.Options == OptionTypeNoNull.修改) isAnyExp.And(x => x.Id != input.Id);
|
||||||
|
|
||||||
|
if (await _trackTemplateRepository.IsAnyAsync(isAnyExp))
|
||||||
|
throw new BusinessException(message: _stringLocalizer["IsTrackTemplateContentAny"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (input.Options)
|
||||||
|
{
|
||||||
|
case OptionTypeNoNull.新增:
|
||||||
|
|
||||||
|
var entity = ObjectMapper.Map<EditTrackTemplateContentInput, TrackTemplateContentEntity>(input);
|
||||||
|
|
||||||
|
await _trackTemplateRepository.InsertAsync(entity);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OptionTypeNoNull.修改:
|
||||||
|
|
||||||
|
var oldEntity = await _trackTemplateRepository.GetByIdAsync(input.Id!.Value) ?? throw new BusinessException(message: _stringLocalizer["NotFindData"]);
|
||||||
|
|
||||||
|
ObjectMapper.Map(input, oldEntity);
|
||||||
|
|
||||||
|
await _trackTemplateRepository.UpdateAsync(oldEntity);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OptionTypeNoNull.删除:
|
||||||
|
|
||||||
|
await _trackTemplateRepository.SoftDeleteContentAsync(input.Id!.Value);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new BusinessException(message: _stringLocalizer[SjzyBasicLocalization.Validation_IsInEnum, nameof(EditTrackTemplateContentInput.Options)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1,11 +1,5 @@
|
|||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using SJZY.Track.Application.Dtos.Demo;
|
|
||||||
using SJZY.Track.Application.Dtos.TrackTemplates;
|
using SJZY.Track.Application.Dtos.TrackTemplates;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Application.Validations.TrackTemplates
|
namespace SJZY.Track.Application.Validations.TrackTemplates
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
// Global using directives
|
// Global using directives
|
||||||
|
|
||||||
|
global using SJZY.Expand.ABP.Core.Common.Dto;
|
||||||
|
global using SJZY.Expand.ABP.Core.SqlSugar.Entitys;
|
||||||
|
global using SqlSugar;
|
||||||
global using System;
|
global using System;
|
||||||
global using System.Collections.Generic;
|
global using System.Collections.Generic;
|
||||||
global using System.Linq.Expressions;
|
global using System.Linq.Expressions;
|
||||||
global using System.Threading.Tasks;
|
global using System.Threading.Tasks;
|
||||||
global using SJZY.Expand.ABP.Core.Common.Dto;
|
|
||||||
global using SJZY.Expand.ABP.Core.SqlSugar.Entitys;
|
|
||||||
global using SqlSugar;
|
|
||||||
@ -11,4 +11,13 @@
|
|||||||
<PackageReference Include="SJZY.Expand.ElasticSearch" Version="7.0.17" />
|
<PackageReference Include="SJZY.Expand.ElasticSearch" Version="7.0.17" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="TrackContentAggregate\Dtos\" />
|
||||||
|
<Folder Include="TrackFlagAggregate\Dtos\" />
|
||||||
|
<Folder Include="TrackPullAggregate\Dtos\" />
|
||||||
|
<Folder Include="TrackPushAggregate\Dtos\" />
|
||||||
|
<Folder Include="TrackStatusAggregate\Dtos\" />
|
||||||
|
<Folder Include="TrackStatusAggregate\Dtos\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackContentAggregate
|
||||||
|
{
|
||||||
|
public interface ITrackContentRepository : IBasicRepository<TrackContentEntity>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackContentAggregate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("t_track_content")]
|
||||||
|
public class TrackContentEntity : IFullAuditedBasicEntitys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 自增主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Code")]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Content")]
|
||||||
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容英文
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "EnContent")]
|
||||||
|
public string EnContent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子系统id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "SubSystemId")]
|
||||||
|
public int SubSystemId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹标记id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackFlagId")]
|
||||||
|
public int TrackFlagId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属轨迹状态id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackStatusId")]
|
||||||
|
public int TrackStatusId { get; set; }
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackContentAggregate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容映射表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("t_track_content_map")]
|
||||||
|
public class TrackContentMapEntity : IFullAuditedBasicEntitys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 自增主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 映射轨迹内容id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "MapTrackContentId")]
|
||||||
|
public int MapTrackContentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 源轨迹内容id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackContentId")]
|
||||||
|
public int TrackContentId { get; set; }
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackFlagAggregate;
|
||||||
|
|
||||||
|
public interface ITrackFlagRepository : IBasicRepository<TrackFlagEntity>
|
||||||
|
{
|
||||||
|
}
|
||||||
32
src/SJZY.Track.Domain/TrackFlagAggregate/TrackFlagEntity.cs
Normal file
32
src/SJZY.Track.Domain/TrackFlagAggregate/TrackFlagEntity.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackFlagAggregate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹标记表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("t_track_flag")]
|
||||||
|
public class TrackFlagEntity : IFullAuditedBasicEntitys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 自增主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 标记代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Code")]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 标记名称
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子系统id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "SubSystemId")]
|
||||||
|
public int SubSystemId { get; set; }
|
||||||
|
}
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackPullAggregate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹拉取/推送参数配置
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("t_track_push_pull_params_config")]
|
||||||
|
public class TrackPushPullParamsConfigEntity : IFullAuditedBasicEntitys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 自增主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 扩展字段参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "ExpandFieldsName")]
|
||||||
|
public string ExpandFieldsName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推拉模式,0拉取,1推送
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "IsPush")]
|
||||||
|
public bool IsPush { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单号参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "OrderNoName")]
|
||||||
|
public string OrderNoName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推拉配置id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "PullOrPushConfigId")]
|
||||||
|
public int PullOrPushConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹时区参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TackTimeZoneName")]
|
||||||
|
public string TackTimeZoneName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹代码参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackContentCodeName")]
|
||||||
|
public string TrackContentCodeName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackContentName")]
|
||||||
|
public string TrackContentName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容英文参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackEnContentName")]
|
||||||
|
public string TrackEnContentName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹发生地参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackPlaceName")]
|
||||||
|
public string TrackPlaceName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackStatusName")]
|
||||||
|
public string TrackStatusName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹发生时间参数名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackTimeName")]
|
||||||
|
public string TrackTimeName { get; set; }
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackPushAggregate;
|
||||||
|
|
||||||
|
public interface ITrackPushConfigRepository : IBasicRepository<TrackPushConfigEntity>
|
||||||
|
{
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackPushAggregate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹推送配置表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("t_track_push_config")]
|
||||||
|
public class TrackPushConfigEntity : IFullAuditedBasicEntitys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 自增主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户id(外部主体id)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "CustomId")]
|
||||||
|
public int CustomId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否自动推送
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "IsAutoPush")]
|
||||||
|
public bool IsAutoPush { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 服务商id(客户:服务商 1:1)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "ServiceProviderId")]
|
||||||
|
public int ServiceProviderId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子系统id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "SubSystemId")]
|
||||||
|
public int SubSystemId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模板id(多个之间英文逗号分隔)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackTemplateId")]
|
||||||
|
public string TrackTemplateId { get; set; }
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackPushAggregate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹推送内容配置表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("t_track_push_content_config")]
|
||||||
|
public class TrackPushContentConfigEntity : IFullAuditedBasicEntitys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 自增主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 扩展字段参数值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "ExpandFieldsValue")]
|
||||||
|
public string ExpandFieldsValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推送单号类型(主数据枚举TrackOrderType)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "OrderNoType")]
|
||||||
|
public int OrderNoType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 推送轨迹排序
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Sort")]
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹代码参数值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackContentCodeValue")]
|
||||||
|
public string TrackContentCodeValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackContentId")]
|
||||||
|
public int TrackContentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容参数值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackContentValue")]
|
||||||
|
public string TrackContentValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容英文参数值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackEnContentValue")]
|
||||||
|
public string TrackEnContentValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹推送配置id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackPushConfigId")]
|
||||||
|
public int TrackPushConfigId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态参数值
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackStatusValue")]
|
||||||
|
public string TrackStatusValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹时区GMT
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "TrackTimeZone")]
|
||||||
|
public string TrackTimeZone { get; set; }
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackStatusAggregate;
|
||||||
|
|
||||||
|
public interface ITrackStatusRepository : IBasicRepository<TrackStatusEntity>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackStatusAggregate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable("t_track_status")]
|
||||||
|
public class TrackStatusEntity : IFullAuditedBasicEntitys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 自增主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Code")]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态英文
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "EnStatus")]
|
||||||
|
public string EnStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属节点(主数据枚举ServiceNode)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Node")]
|
||||||
|
public int Node { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Status")]
|
||||||
|
public string Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 子系统id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "SubSystemId")]
|
||||||
|
public int SubSystemId { get; set; }
|
||||||
|
}
|
||||||
@ -11,4 +11,14 @@ public class GetPageTrackTemplateVO : PageInfoInput
|
|||||||
/// 关键字
|
/// 关键字
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Keywords { get; set; }
|
public string Keywords { get; set; }
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 是否置顶
|
||||||
|
///// </summary>
|
||||||
|
//public bool IsTop { get; set; }=false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模版id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackTemplateId { get; set; }
|
||||||
}
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackTemplateAggregate.Dtos
|
||||||
|
{
|
||||||
|
public class GetTrackTemplateContentDetailOutputVO
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否可删
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCanDelete { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否对外
|
||||||
|
/// </summary>
|
||||||
|
public bool IsExternal { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容
|
||||||
|
/// </summary>
|
||||||
|
public string TrackContent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackContentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态
|
||||||
|
/// </summary>
|
||||||
|
public string TrackStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackStatusId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackTemplateAggregate.Dtos;
|
||||||
|
|
||||||
|
public class GetTrackTemplateContentPageInputVO : PageInfoInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板id
|
||||||
|
/// </summary>
|
||||||
|
public int TrackTemplateId { get; set; }
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
namespace SJZY.Track.Domain.TrackTemplateAggregate.Dtos;
|
||||||
|
|
||||||
|
public class GetTrackTemplateContentPageOutputVO
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容代码
|
||||||
|
/// </summary>
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容
|
||||||
|
/// </summary>
|
||||||
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建人
|
||||||
|
/// </summary>
|
||||||
|
public string CreateUser { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹内容英文
|
||||||
|
/// </summary>
|
||||||
|
public string EnContent { get; set; }
|
||||||
|
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否可删
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCanDelete { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否对外
|
||||||
|
/// </summary>
|
||||||
|
public bool IsExternal { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属节点
|
||||||
|
/// </summary>
|
||||||
|
public string Node { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
public long Sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹标记
|
||||||
|
/// </summary>
|
||||||
|
public string TrackFlag { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 所属状态
|
||||||
|
/// </summary>
|
||||||
|
public string TrackStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? UpdateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改人
|
||||||
|
/// </summary>
|
||||||
|
public string UpdateUser { get; set; }
|
||||||
|
}
|
||||||
@ -9,4 +9,28 @@ public interface ITrackTemplateRepository : IBasicRepository<TrackTemplateEntity
|
|||||||
Task<GetTrackTemplateDetailVO?> GetDetailAsync(int id);
|
Task<GetTrackTemplateDetailVO?> GetDetailAsync(int id);
|
||||||
|
|
||||||
Task<UnifyPageResultDto<GetTrackTemplateListVO>> GetPageTrackTemplate(GetPageTrackTemplateVO input);
|
Task<UnifyPageResultDto<GetTrackTemplateListVO>> GetPageTrackTemplate(GetPageTrackTemplateVO input);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板内容列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<UnifyPageResultDto<GetTrackTemplateContentPageOutputVO>> GetContentPageAsync(GetTrackTemplateContentPageInputVO input);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹模板内容详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<GetTrackTemplateContentDetailOutputVO> GetContentDetailAsync(int id);
|
||||||
|
|
||||||
|
Task<bool> IsAnyAsync(Expression<Func<TrackTemplateContentEntity, bool>> whereExpression);
|
||||||
|
|
||||||
|
Task<bool> InsertAsync(TrackTemplateContentEntity insertObj);
|
||||||
|
|
||||||
|
Task<TrackTemplateContentEntity> GetByIdAsync(int id);
|
||||||
|
|
||||||
|
Task<bool> UpdateAsync(TrackTemplateContentEntity updateObj);
|
||||||
|
|
||||||
|
Task<bool> SoftDeleteContentAsync(int id);
|
||||||
}
|
}
|
||||||
@ -6,7 +6,6 @@
|
|||||||
[SugarTable("t_track_template_content")]
|
[SugarTable("t_track_template_content")]
|
||||||
public class TrackTemplateContentEntity : IFullAuditedBasicEntitys
|
public class TrackTemplateContentEntity : IFullAuditedBasicEntitys
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -42,5 +41,4 @@ public class TrackTemplateContentEntity : IFullAuditedBasicEntitys
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "TrackTemplateId")]
|
[SugarColumn(ColumnName = "TrackTemplateId")]
|
||||||
public int TrackTemplateId { get; set; }
|
public int TrackTemplateId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
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,12 +1,11 @@
|
|||||||
namespace SJZY.Track.Repository.VData.Entitys
|
namespace SJZY.Track.Repository.VData.Entitys;
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 外部主体
|
/// 外部主体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarTable("v_external_subject")]
|
[SugarTable("v_external_subject")]
|
||||||
public class VExternalSubjectEntity : IFullAuditedBasicEntitys
|
public class VExternalSubjectEntity : IFullAuditedBasicEntitys
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -126,6 +125,4 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "VerifiedName")]
|
[SugarColumn(ColumnName = "VerifiedName")]
|
||||||
public string VerifiedName { get; set; }
|
public string VerifiedName { get; set; }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -6,7 +6,6 @@
|
|||||||
[SugarTable("v_service_provider")]
|
[SugarTable("v_service_provider")]
|
||||||
public class VServiceProviderEntity : IFullAuditedBasicEntitys
|
public class VServiceProviderEntity : IFullAuditedBasicEntitys
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -72,5 +71,4 @@ public class VServiceProviderEntity : IFullAuditedBasicEntitys
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "Types")]
|
[SugarColumn(ColumnName = "Types")]
|
||||||
public string Types { get; set; }
|
public string Types { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -6,7 +6,6 @@
|
|||||||
[SugarTable("v_system")]
|
[SugarTable("v_system")]
|
||||||
public class VSystemEntity : IFullAuditedBasicEntitys
|
public class VSystemEntity : IFullAuditedBasicEntitys
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 子系统id
|
/// 子系统id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -150,5 +149,4 @@ public class VSystemEntity : IFullAuditedBasicEntitys
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "Token")]
|
[SugarColumn(ColumnName = "Token")]
|
||||||
public string Token { get; set; }
|
public string Token { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -6,7 +6,6 @@
|
|||||||
[SugarTable("v_user")]
|
[SugarTable("v_user")]
|
||||||
public class VUserEntity : IFullAuditedBasicEntitys
|
public class VUserEntity : IFullAuditedBasicEntitys
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户id
|
/// 用户id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -102,5 +101,4 @@ public class VUserEntity : IFullAuditedBasicEntitys
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "UserOrigin")]
|
[SugarColumn(ColumnName = "UserOrigin")]
|
||||||
public bool? UserOrigin { get; set; }
|
public bool? UserOrigin { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
using System.Linq.Expressions;
|
using SJZY.Track.Domain;
|
||||||
using SJZY.Track.Domain;
|
using System.Linq.Expressions;
|
||||||
using Volo.Abp;
|
using Volo.Abp;
|
||||||
|
|
||||||
namespace SJZY.Track.Repository;
|
namespace SJZY.Track.Repository;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
using System.Transactions;
|
using SJZY.Track.Domain.DemoAggregate;
|
||||||
using SJZY.Track.Domain.DemoAggregate;
|
|
||||||
using SJZY.Track.Domain.DemoAggregate.Dtos;
|
using SJZY.Track.Domain.DemoAggregate.Dtos;
|
||||||
|
using System.Transactions;
|
||||||
|
|
||||||
namespace SJZY.Track.Repository
|
namespace SJZY.Track.Repository
|
||||||
{
|
{
|
||||||
|
|||||||
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")]
|
||||||
|
节点,
|
||||||
|
}
|
||||||
@ -24,15 +24,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="TrackContentMap\ValueObjects\" />
|
|
||||||
<Folder Include="TrackContent\ValueObjects\" />
|
|
||||||
<Folder Include="TrackFlag\ValueObjects\" />
|
|
||||||
<Folder Include="TrackPushConfig\ValueObjects\" />
|
|
||||||
<Folder Include="TrackPushContentConfig\ValueObjects\" />
|
|
||||||
<Folder Include="TrackPushPullParamsConfig\ValueObjects\" />
|
|
||||||
<Folder Include="TrackPushRecordDetails\ValueObjects\" />
|
<Folder Include="TrackPushRecordDetails\ValueObjects\" />
|
||||||
<Folder Include="TrackPushRecord\ValueObjects\" />
|
<Folder Include="TrackPushRecord\ValueObjects\" />
|
||||||
<Folder Include="TrackStatus\ValueObjects\" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,53 +0,0 @@
|
|||||||
namespace SJZY.Track.Repository.TrackContent.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容
|
|
||||||
/// </summary>
|
|
||||||
[SugarTable("t_track_content")]
|
|
||||||
public class TrackContentEntity : IFullAuditedBasicEntitys
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自增主键
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容代码
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Code")]
|
|
||||||
public string Code { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Content")]
|
|
||||||
public string Content { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容英文
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "EnContent")]
|
|
||||||
public string EnContent { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 子系统id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "SubSystemId")]
|
|
||||||
public int SubSystemId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹标记id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackFlagId")]
|
|
||||||
public int TrackFlagId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 所属轨迹状态id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackStatusId")]
|
|
||||||
public int TrackStatusId { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackContent.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackContent.Services
|
|
||||||
{
|
|
||||||
public interface ITrackContentRepository : ISimpleClient<TrackContentEntity>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackContent.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackContent.Services
|
|
||||||
{
|
|
||||||
public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrackContentRepository, IScopedDependency
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
namespace SJZY.Track.Repository.TrackContentMap.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容映射表
|
|
||||||
/// </summary>
|
|
||||||
[SugarTable("t_track_content_map")]
|
|
||||||
public class TrackContentMapEntity : IFullAuditedBasicEntitys
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自增主键
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 映射轨迹内容id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "MapTrackContentId")]
|
|
||||||
public int MapTrackContentId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 源轨迹内容id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackContentId")]
|
|
||||||
public int TrackContentId { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackContentMap.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackContentMap.Services
|
|
||||||
{
|
|
||||||
public interface ITrackContentMapRepository : ISimpleClient<TrackContentMapEntity>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackContentMap.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackContentMap.Services
|
|
||||||
{
|
|
||||||
public class TrackContentMapRepository : BasicRepository<TrackContentMapEntity>, ITrackContentMapRepository, IScopedDependency
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
7
src/SJZY.Track.Repository/TrackContentRepository.cs
Normal file
7
src/SJZY.Track.Repository/TrackContentRepository.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
using SJZY.Track.Domain.TrackContentAggregate;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Repository;
|
||||||
|
|
||||||
|
public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrackContentRepository, IScopedDependency
|
||||||
|
{
|
||||||
|
}
|
||||||
@ -1,8 +1,8 @@
|
|||||||
using Nest;
|
using Nest;
|
||||||
using SJZY.Track.Domain.TrackDetailsAggregate;
|
|
||||||
using SJZY.Expand.ABP.Core.Logger;
|
using SJZY.Expand.ABP.Core.Logger;
|
||||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||||
using SJZY.Expand.ElasticSearch.Services;
|
using SJZY.Expand.ElasticSearch.Services;
|
||||||
|
using SJZY.Track.Domain.TrackDetailsAggregate;
|
||||||
using SJZY.Track.Repository.TrackDetails;
|
using SJZY.Track.Repository.TrackDetails;
|
||||||
using SJZY.Track.Repository.TrackDetails.Dtos;
|
using SJZY.Track.Repository.TrackDetails.Dtos;
|
||||||
|
|
||||||
|
|||||||
@ -1,35 +0,0 @@
|
|||||||
namespace SJZY.Track.Repository.TrackFlag.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹标记表
|
|
||||||
/// </summary>
|
|
||||||
[SugarTable("t_track_flag")]
|
|
||||||
public class TrackFlagEntity : IFullAuditedBasicEntitys
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自增主键
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 标记代码
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Code")]
|
|
||||||
public string Code { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 标记名称
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Name")]
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 子系统id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "SubSystemId")]
|
|
||||||
public int SubSystemId { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackFlag.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackFlag.Services
|
|
||||||
{
|
|
||||||
public interface ITrackFlagRepository : ISimpleClient<TrackFlagEntity>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackFlag.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackFlag.Services
|
|
||||||
{
|
|
||||||
public class TrackFlagRepository : BasicRepository<TrackFlagEntity>, ITrackFlagRepository, IScopedDependency
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
7
src/SJZY.Track.Repository/TrackFlagRepository.cs
Normal file
7
src/SJZY.Track.Repository/TrackFlagRepository.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
using SJZY.Track.Domain.TrackFlagAggregate;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Repository;
|
||||||
|
|
||||||
|
public class TrackFlagRepository : BasicRepository<TrackFlagEntity>, ITrackFlagRepository, IScopedDependency
|
||||||
|
{
|
||||||
|
}
|
||||||
@ -1,9 +1,7 @@
|
|||||||
using SJZY.Track.Domain.TrackPullAggregate;
|
using SJZY.Track.Domain.TrackPullAggregate;
|
||||||
|
|
||||||
namespace SJZY.Track.Repository
|
namespace SJZY.Track.Repository;
|
||||||
{
|
|
||||||
public class TrackPullConfigRepository : BasicRepository<TrackPullConfigEntity>, ITrackPullConfigRepository, IScopedDependency
|
public class TrackPullConfigRepository : BasicRepository<TrackPullConfigEntity>, ITrackPullConfigRepository, IScopedDependency
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,47 +0,0 @@
|
|||||||
namespace SJZY.Track.Repository.TrackPushConfig.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹推送配置表
|
|
||||||
/// </summary>
|
|
||||||
[SugarTable("t_track_push_config")]
|
|
||||||
public class TrackPushConfigEntity : IFullAuditedBasicEntitys
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自增主键
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 客户id(外部主体id)
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "CustomId")]
|
|
||||||
public int CustomId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否自动推送
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "IsAutoPush")]
|
|
||||||
public bool IsAutoPush { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 服务商id(客户:服务商 1:1)
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "ServiceProviderId")]
|
|
||||||
public int ServiceProviderId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 子系统id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "SubSystemId")]
|
|
||||||
public int SubSystemId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 模板id(多个之间英文逗号分隔)
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackTemplateId")]
|
|
||||||
public string TrackTemplateId { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackPushConfig.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackPushConfig.Services
|
|
||||||
{
|
|
||||||
public interface ITrackPushConfigRepository : ISimpleClient<TrackPushConfigEntity>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackPushConfig.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackPushConfig.Services
|
|
||||||
{
|
|
||||||
public class TrackPushConfigRepository : BasicRepository<TrackPushConfigEntity>, ITrackPushConfigRepository, IScopedDependency
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
7
src/SJZY.Track.Repository/TrackPushConfigRepository.cs
Normal file
7
src/SJZY.Track.Repository/TrackPushConfigRepository.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
using SJZY.Track.Domain.TrackPushAggregate;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Repository;
|
||||||
|
|
||||||
|
public class TrackPushConfigRepository : BasicRepository<TrackPushConfigEntity>, ITrackPushConfigRepository, IScopedDependency
|
||||||
|
{
|
||||||
|
}
|
||||||
@ -1,77 +0,0 @@
|
|||||||
namespace SJZY.Track.Repository.TrackPushContentConfig.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹推送内容配置表
|
|
||||||
/// </summary>
|
|
||||||
[SugarTable("t_track_push_content_config")]
|
|
||||||
public class TrackPushContentConfigEntity : IFullAuditedBasicEntitys
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自增主键
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 扩展字段参数值
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "ExpandFieldsValue")]
|
|
||||||
public string ExpandFieldsValue { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 推送单号类型(主数据枚举TrackOrderType)
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "OrderNoType")]
|
|
||||||
public int OrderNoType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 推送轨迹排序
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Sort")]
|
|
||||||
public int Sort { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹代码参数值
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackContentCodeValue")]
|
|
||||||
public string TrackContentCodeValue { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackContentId")]
|
|
||||||
public int TrackContentId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容参数值
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackContentValue")]
|
|
||||||
public string TrackContentValue { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容英文参数值
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackEnContentValue")]
|
|
||||||
public string TrackEnContentValue { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹推送配置id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackPushConfigId")]
|
|
||||||
public int TrackPushConfigId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹状态参数值
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackStatusValue")]
|
|
||||||
public string TrackStatusValue { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹时区GMT
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackTimeZone")]
|
|
||||||
public string TrackTimeZone { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackPushContentConfig.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackPushContentConfig.Services
|
|
||||||
{
|
|
||||||
public interface ITrackPushContentConfigRepository : ISimpleClient<TrackPushContentConfigEntity>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackPushContentConfig.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackPushContentConfig.Services
|
|
||||||
{
|
|
||||||
public class TrackPushContentConfigRepository : BasicRepository<TrackPushContentConfigEntity>, ITrackPushContentConfigRepository, IScopedDependency
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
namespace SJZY.Track.Repository.TrackPushPullParamsConfig.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹拉取/推送参数配置
|
|
||||||
/// </summary>
|
|
||||||
[SugarTable("t_track_push_pull_params_config")]
|
|
||||||
public class TrackPushPullParamsConfigEntity : IFullAuditedBasicEntitys
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自增主键
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 扩展字段参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "ExpandFieldsName")]
|
|
||||||
public string ExpandFieldsName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 推拉模式,0拉取,1推送
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "IsPush")]
|
|
||||||
public bool IsPush { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 单号参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "OrderNoName")]
|
|
||||||
public string OrderNoName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 推拉配置id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "PullOrPushConfigId")]
|
|
||||||
public int PullOrPushConfigId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹时区参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TackTimeZoneName")]
|
|
||||||
public string TackTimeZoneName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹代码参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackContentCodeName")]
|
|
||||||
public string TrackContentCodeName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackContentName")]
|
|
||||||
public string TrackContentName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容英文参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackEnContentName")]
|
|
||||||
public string TrackEnContentName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹发生地参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackPlaceName")]
|
|
||||||
public string TrackPlaceName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹状态参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackStatusName")]
|
|
||||||
public string TrackStatusName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹发生时间参数名
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "TrackTimeName")]
|
|
||||||
public string TrackTimeName { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackPushPullParamsConfig.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackPushPullParamsConfig.Services
|
|
||||||
{
|
|
||||||
public interface ITrackPushPullParamsConfigRepository : ISimpleClient<TrackPushPullParamsConfigEntity>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackPushPullParamsConfig.Entitys;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackPushPullParamsConfig.Services
|
|
||||||
{
|
|
||||||
public class TrackPushPullParamsConfigRepository : BasicRepository<TrackPushPullParamsConfigEntity>, ITrackPushPullParamsConfigRepository, IScopedDependency
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
namespace SJZY.Track.Repository.TrackStatus.Entitys
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹状态表
|
|
||||||
/// </summary>
|
|
||||||
[SugarTable("t_track_status")]
|
|
||||||
public class TrackStatusEntity : IFullAuditedBasicEntitys
|
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 自增主键
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹状态代码
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Code")]
|
|
||||||
public string Code { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹状态英文
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "EnStatus")]
|
|
||||||
public string EnStatus { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 所属节点(主数据枚举ServiceNode)
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Node")]
|
|
||||||
public int Node { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹状态
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "Status")]
|
|
||||||
public string Status { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 子系统id
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "SubSystemId")]
|
|
||||||
public int SubSystemId { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackStatus.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackStatus.Services
|
|
||||||
{
|
|
||||||
public interface ITrackStatusRepository : ISimpleClient<TrackStatusEntity>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
using SJZY.Track.Repository.TrackStatus.Entitys;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.TrackStatus.Services
|
|
||||||
{
|
|
||||||
public class TrackStatusRepository : BasicRepository<TrackStatusEntity>, ITrackStatusRepository, IScopedDependency
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
12
src/SJZY.Track.Repository/TrackStatusRepository.cs
Normal file
12
src/SJZY.Track.Repository/TrackStatusRepository.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using SJZY.Track.Domain.TrackStatusAggregate;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Repository;
|
||||||
|
|
||||||
|
public class TrackStatusRepository : BasicRepository<TrackStatusEntity>, ITrackStatusRepository, IScopedDependency
|
||||||
|
{
|
||||||
|
public TrackStatusRepository()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,9 +1,17 @@
|
|||||||
using SJZY.Track.Domain.TrackTemplateAggregate;
|
using SJZY.Expand.ABP.Core.Common.Dto;
|
||||||
|
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.TrackTemplateAggregate.Dtos;
|
||||||
using SJZY.Track.Domain.VEntities;
|
using SJZY.Track.Domain.VEntities;
|
||||||
|
using SJZY.Track.Repository.Enum;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
|
||||||
namespace SJZY.Track.Repository;
|
namespace SJZY.Track.Repository;
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITrackTemplateRepository, IScopedDependency
|
public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITrackTemplateRepository, IScopedDependency
|
||||||
{
|
{
|
||||||
public Task<TemplateContentDto> GetTemplateContentsAsync(List<int> distinctTemplateIds)
|
public Task<TemplateContentDto> GetTemplateContentsAsync(List<int> distinctTemplateIds)
|
||||||
@ -33,7 +41,6 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 分页获取轨迹模版
|
/// 分页获取轨迹模版
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -41,7 +48,8 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<UnifyPageResultDto<GetTrackTemplateListVO>> GetPageTrackTemplate(GetPageTrackTemplateVO input)
|
public async Task<UnifyPageResultDto<GetTrackTemplateListVO>> GetPageTrackTemplate(GetPageTrackTemplateVO input)
|
||||||
{
|
{
|
||||||
var pagedList = await Context.Queryable<TrackTemplateEntity>().LeftJoin<VSystemEntity>((a, b) => a.SubSystemId==b.Id)
|
UnifyPageResultDto<GetTrackTemplateListVO> pagedList = new UnifyPageResultDto<GetTrackTemplateListVO>();
|
||||||
|
pagedList = await Context.Queryable<TrackTemplateEntity>().LeftJoin<VSystemEntity>((a, b) => a.SubSystemId == b.Id)
|
||||||
.WhereIF(input.SubSystemId > 0, (a, b) => a.SubSystemId == input.SubSystemId)
|
.WhereIF(input.SubSystemId > 0, (a, b) => a.SubSystemId == input.SubSystemId)
|
||||||
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(), (a, b) => a.Name.Contains(input.Keywords) || a.Code.Contains(input.Keywords))
|
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(), (a, b) => a.Name.Contains(input.Keywords) || a.Code.Contains(input.Keywords))
|
||||||
.Select((a, b) => new GetTrackTemplateListVO
|
.Select((a, b) => new GetTrackTemplateListVO
|
||||||
@ -53,6 +61,117 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
SubSystem = b.CnName
|
SubSystem = b.CnName
|
||||||
})
|
})
|
||||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||||
|
//如果轨迹模版id传值了,就置顶在第一条
|
||||||
|
if (input.TrackTemplateId>0&& (!pagedList.List.IsNullOrEmpty()))
|
||||||
|
{
|
||||||
|
if (input.PageIndex==1)
|
||||||
|
{
|
||||||
|
bool existCurrent = pagedList.List.Any(x => x.Id==input.TrackTemplateId);
|
||||||
|
if (existCurrent)
|
||||||
|
{
|
||||||
|
var item = pagedList.List.FirstOrDefault(x => x.Id==input.TrackTemplateId);
|
||||||
|
pagedList.List.Remove(item);
|
||||||
|
pagedList.List.Insert(0, item);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var item = await Context.Queryable<TrackTemplateEntity>().LeftJoin<VSystemEntity>((a, b) => a.SubSystemId == b.Id)
|
||||||
|
.Where((a, b) => a.Id==input.TrackTemplateId)
|
||||||
|
.Select((a, b) => new GetTrackTemplateListVO
|
||||||
|
{
|
||||||
|
Id = a.Id,
|
||||||
|
Code = a.Code,
|
||||||
|
CreateTime = a.CreateTime,
|
||||||
|
Name = a.Name,
|
||||||
|
SubSystem = b.CnName
|
||||||
|
})
|
||||||
|
.FirstAsync();
|
||||||
|
if (item!=null)
|
||||||
|
{
|
||||||
|
var removeItem = pagedList.List.LastOrDefault();
|
||||||
|
pagedList.List.Remove(removeItem);
|
||||||
|
pagedList.List.Insert(0, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return pagedList;
|
return pagedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<UnifyPageResultDto<GetTrackTemplateContentPageOutputVO>> GetContentPageAsync(GetTrackTemplateContentPageInputVO input)
|
||||||
|
{
|
||||||
|
return await Context.Queryable<TrackTemplateContentEntity>()
|
||||||
|
.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 GetTrackTemplateContentPageOutputVO
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<GetTrackTemplateContentDetailOutputVO> GetContentDetailAsync(int id)
|
||||||
|
{
|
||||||
|
return await Context.Queryable<TrackTemplateContentEntity>()
|
||||||
|
.InnerJoin<TrackContentEntity>((templateContent, trackContent) => templateContent.TrackContentId == trackContent.Id && !trackContent.IsDeleted)
|
||||||
|
.LeftJoin<TrackStatusEntity>((templateContent, trackContent, trackStatus) => trackContent.TrackStatusId == trackStatus.Id && !trackStatus.IsDeleted)
|
||||||
|
.Filter(null, true)
|
||||||
|
.Where(templateContent => templateContent.Id == id && !templateContent.IsDeleted)
|
||||||
|
.Select((templateContent, trackContent, trackStatus) => new GetTrackTemplateContentDetailOutputVO
|
||||||
|
{
|
||||||
|
Id = templateContent.Id,
|
||||||
|
TrackContent = trackContent.Code + "-" + trackContent.Content,
|
||||||
|
TrackStatus = trackStatus.Status
|
||||||
|
}, true)
|
||||||
|
.SingleAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<bool> IsAnyAsync(Expression<Func<TrackTemplateContentEntity, bool>> whereExpression)
|
||||||
|
{
|
||||||
|
return await Context.Queryable<TrackTemplateContentEntity>().Where(whereExpression).AnyAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<bool> InsertAsync(TrackTemplateContentEntity insertObj)
|
||||||
|
{
|
||||||
|
return await Context.Insertable(insertObj).ExecuteCommandAsync() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<TrackTemplateContentEntity> GetByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await Context.Queryable<TrackTemplateContentEntity>().InSingleAsync(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<bool> UpdateAsync(TrackTemplateContentEntity updateObj)
|
||||||
|
{
|
||||||
|
return await Context.Updateable(updateObj).ExecuteCommandHasChangeAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<bool> SoftDeleteContentAsync(int id)
|
||||||
|
{
|
||||||
|
return await Context.Updateable<TrackTemplateContentEntity>()
|
||||||
|
.Where(x => x.Id == id)
|
||||||
|
.SetColumns(nameof(ISoftDeleteBasicEntity.IsDeleted), true)
|
||||||
|
.ExecuteCommandHasChangeAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user