From 16803b849f5b3fac16bcdfa6593841d461060440 Mon Sep 17 00:00:00 2001
From: moyongzhen <2534173414@qq.com>
Date: Wed, 28 Feb 2024 11:50:45 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TrackStatusAggregate/Dtos/GetTrackStatusListVO.cs | 11 +++++++++--
src/SJZY.Track.Repository/TrackStatusRepository.cs | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/SJZY.Track.Domain/TrackStatusAggregate/Dtos/GetTrackStatusListVO.cs b/src/SJZY.Track.Domain/TrackStatusAggregate/Dtos/GetTrackStatusListVO.cs
index bf0f622d..a3863273 100644
--- a/src/SJZY.Track.Domain/TrackStatusAggregate/Dtos/GetTrackStatusListVO.cs
+++ b/src/SJZY.Track.Domain/TrackStatusAggregate/Dtos/GetTrackStatusListVO.cs
@@ -1,4 +1,6 @@
-using System;
+using SJZY.Expand.ABP.Core.PublicMethords;
+using SJZY.Track.Domain.Eunms;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -18,10 +20,15 @@ namespace SJZY.Track.Domain.TrackStatusAggregate.Dtos
///
public string SubSystem { get; set; }
+ ///
+ /// 节点id
+ ///
+ public int NodeId { get; set; }
+
///
/// 所属节点
///
- public string Node { get; set; }
+ public string Node => NodeId.GetDescription();
///
/// 所属轨迹状态
diff --git a/src/SJZY.Track.Repository/TrackStatusRepository.cs b/src/SJZY.Track.Repository/TrackStatusRepository.cs
index 17bc0a33..54adf695 100644
--- a/src/SJZY.Track.Repository/TrackStatusRepository.cs
+++ b/src/SJZY.Track.Repository/TrackStatusRepository.cs
@@ -53,8 +53,8 @@ public class TrackStatusRepository : BasicRepository, ITrackS
Id = a.Id,
Code = a.Code,
EntrackStatus = a.EnStatus,
+ NodeId=a.Node,
TrackStatus=a.Status,
- Node="",
CreateTime = a.CreateTime,
CreateUser = c.Name,
UpdateTime = a.UpdateTime,
From db4e0c658713ebfa95a36fa9bf7020e22de9c987 Mon Sep 17 00:00:00 2001
From: moyongzhen <2534173414@qq.com>
Date: Wed, 28 Feb 2024 14:10:38 +0800
Subject: [PATCH 2/5] =?UTF-8?q?dto=E6=B7=BB=E5=8A=A0=E5=B1=9E=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Dtos/TrackStatus/GetTrackStatusListVO.cs | 99 +++++++++++--------
.../SJZY.Track.Domain.csproj | 4 +-
2 files changed, 58 insertions(+), 45 deletions(-)
diff --git a/src/SJZY.Track.Domain/Dtos/TrackStatus/GetTrackStatusListVO.cs b/src/SJZY.Track.Domain/Dtos/TrackStatus/GetTrackStatusListVO.cs
index 38a75ed0..ff570fc0 100644
--- a/src/SJZY.Track.Domain/Dtos/TrackStatus/GetTrackStatusListVO.cs
+++ b/src/SJZY.Track.Domain/Dtos/TrackStatus/GetTrackStatusListVO.cs
@@ -1,54 +1,67 @@
-namespace SJZY.Track.Domain.Dtos.TrackStatus;
+using SJZY.Expand.ABP.Core.PublicMethords;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
-public class GetTrackStatusListVO
+namespace SJZY.Track.Domain.Dtos.TrackStatus
{
- ///
- /// Id
- ///
- public int Id { get; set; }
+ public class GetTrackStatusListVO
+ {
+ ///
+ /// Id
+ ///
+ public int Id { get; set; }
- ///
- /// 子系统
- ///
- public string SubSystem { get; set; }
+ ///
+ /// 子系统
+ ///
+ public string SubSystem { get; set; }
- ///
- /// 所属节点
- ///
- public string Node { get; set; }
+ ///
+ /// 节点id
+ ///
+ public int NodeId { get; set; }
- ///
- /// 所属轨迹状态
- ///
- public string TrackStatus { get; set; }
+ ///
+ /// 所属节点
+ ///
+ public string Node { get; set; }
- ///
- /// 轨迹状态代码
- ///
- public string Code { get; set; }
+ ///
+ /// 所属轨迹状态
+ ///
+ public string TrackStatus { get; set; }
- ///
- /// 轨迹内容英文
- ///
- public string EntrackStatus { get; set; }
+ ///
+ /// 轨迹状态代码
+ ///
+ public string Code { get; set; }
- ///
- /// 创建人
- ///
- public string CreateUser { get; set; }
+ ///
+ /// 轨迹内容英文
+ ///
+ public string EntrackStatus { get; set; }
- ///
- /// 创建时间
- ///
- public DateTime? CreateTime { get; set; }
+ ///
+ /// 创建人
+ ///
+ public string CreateUser { get; set; }
- ///
- /// 修改人
- ///
- public string UpdateUser { get; set; }
+ ///
+ /// 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
- ///
- /// 修改时间
- ///
- public DateTime? UpdateTime { get; set; }
-}
\ No newline at end of file
+ ///
+ /// 修改人
+ ///
+ public string UpdateUser { get; set; }
+
+ ///
+ /// 修改时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+ }
+}
diff --git a/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj b/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
index b40c78be..aac0e12d 100644
--- a/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
+++ b/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
@@ -1,4 +1,4 @@
-
+
@@ -12,7 +12,7 @@
-
+
From ca2792180a979eea935b6f50299e48ac0dcd1946 Mon Sep 17 00:00:00 2001
From: moyongzhen <2534173414@qq.com>
Date: Wed, 28 Feb 2024 14:28:19 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BD=A8=E8=BF=B9?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=E6=9C=8D=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TrackContents/ITrackContentService.cs | 13 +++++++++++
.../TrackContents/TrackContentService.cs | 22 +++++++++++++++++++
.../TrackStatus/TrackStatusService.cs | 3 ++-
.../TrackContentRepository.cs | 7 ++++++
4 files changed, 44 insertions(+), 1 deletion(-)
create mode 100644 src/SJZY.Track.Application/Services/TrackContents/ITrackContentService.cs
create mode 100644 src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
diff --git a/src/SJZY.Track.Application/Services/TrackContents/ITrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/ITrackContentService.cs
new file mode 100644
index 00000000..8747af44
--- /dev/null
+++ b/src/SJZY.Track.Application/Services/TrackContents/ITrackContentService.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SJZY.Track.Application.Services.TrackContents
+{
+ public interface ITrackContentService
+ {
+
+ }
+}
diff --git a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
new file mode 100644
index 00000000..a96b960c
--- /dev/null
+++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
@@ -0,0 +1,22 @@
+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.TrackContents
+{
+ [ApiExplorerSettings(GroupName = "轨迹内容")]
+ [Route("/Track/Content")]
+ public class TrackContentService : ApplicationService, ITransientDependency
+ {
+
+ public TrackContentService()
+ {
+
+ }
+
+
+ }
+}
diff --git a/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs b/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs
index acf14311..9db46c6f 100644
--- a/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs
+++ b/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs
@@ -1,6 +1,7 @@
using SJZY.Track.Application.Dtos.TrackStatus;
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
using SJZY.Track.Domain.Dtos.TrackStatus;
+using Volo.Abp.DependencyInjection;
namespace SJZY.Track.Application.Services.TrackStatus;
@@ -9,7 +10,7 @@ namespace SJZY.Track.Application.Services.TrackStatus;
///
[ApiExplorerSettings(GroupName = "轨迹状态")]
[Route("/Track/Status")]
-public class TrackStatusService : ApplicationService
+public class TrackStatusService : ApplicationService, ITransientDependency
{
private readonly ITrackStatusRepository _trackStatusRepository;
diff --git a/src/SJZY.Track.Repository/TrackContentRepository.cs b/src/SJZY.Track.Repository/TrackContentRepository.cs
index 1bf04097..075b925a 100644
--- a/src/SJZY.Track.Repository/TrackContentRepository.cs
+++ b/src/SJZY.Track.Repository/TrackContentRepository.cs
@@ -4,4 +4,11 @@ namespace SJZY.Track.Repository;
public class TrackContentRepository : BasicRepository, ITrackContentRepository, IScopedDependency
{
+
+ public TrackContentRepository()
+ {
+
+ }
+
+
}
\ No newline at end of file
From bee28546b43dd661e53c8442fc72604c8c202a6f Mon Sep 17 00:00:00 2001
From: moyongzhen <2534173414@qq.com>
Date: Wed, 28 Feb 2024 14:38:33 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E5=86=85=E5=AE=B9?=
=?UTF-8?q?=E7=BC=96=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TrackContents/EditTrackContentInput.cs | 51 +++++++++++++++++
.../TrackContents/TrackContentService.cs | 55 ++++++++++++++++++-
2 files changed, 103 insertions(+), 3 deletions(-)
create mode 100644 src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs
diff --git a/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs b/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs
new file mode 100644
index 00000000..87cc3632
--- /dev/null
+++ b/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SJZY.Track.Application.Dtos.TrackContents
+{
+ public class EditTrackContentInput
+ {
+ ///
+ /// Id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 操作类型
+ ///
+ public OptionType Options { get; set; }
+
+ ///
+ /// 子系统id
+ ///
+ public int SubSystemId { get; set; }
+
+ ///
+ /// 所属轨迹状态id
+ ///
+ public int TrackStatusId { get; set; }
+
+ ///
+ /// 轨迹内容代码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 轨迹内容
+ ///
+ public string Content { get; set; }
+
+ ///
+ /// 轨迹内容英文
+ ///
+ public string EnContent { get; set; }
+
+ ///
+ /// 轨迹标记id
+ ///
+ public int TrackFlagId { get; set; }
+ }
+}
diff --git a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
index a96b960c..dc5c40c2 100644
--- a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
+++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
@@ -1,4 +1,7 @@
-using System;
+using SJZY.Track.Application.Dtos.TrackContents;
+using SJZY.Track.Application.Dtos.TrackStatus;
+using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -7,16 +10,62 @@ using Volo.Abp.DependencyInjection;
namespace SJZY.Track.Application.Services.TrackContents
{
+ ///
+ /// 轨迹内容服务
+ ///
[ApiExplorerSettings(GroupName = "轨迹内容")]
[Route("/Track/Content")]
public class TrackContentService : ApplicationService, ITransientDependency
{
+ private readonly ITrackContentRepository _trackContentRepository;
- public TrackContentService()
+ public TrackContentService(
+ ITrackContentRepository trackContentRepository
+ )
{
-
+ this._trackContentRepository=trackContentRepository;
}
+ ///
+ /// 轨迹内容编辑
+ ///
+ ///
+ [HttpPost("Edit")]
+ public async Task EditAsync(EditTrackContentInput 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 AddAsync(EditTrackContentInput input)
+ {
+ var entity = ObjectMapper.Map(input);
+ var isTrue = await _trackContentRepository.InsertAsync(entity);
+
+ return new UnifyResultDto("200", "新增成功", isTrue);
+ }
+
+ private async Task UpdateAsync(EditTrackContentInput input)
+ {
+ var templateEntity = await _trackContentRepository.GetFirstAsync(a => a.Id == input.Id);
+ ObjectMapper.Map(input, templateEntity);
+ var isTrue = await _trackContentRepository.UpdateAsync(templateEntity);
+
+ return new UnifyResultDto("200", "修改成功", isTrue);
+ }
+
+ private async Task DeleteAsync(EditTrackContentInput input)
+ {
+ var isTrue = await _trackContentRepository.SoftDeleteAsync(x => x.Id == input.Id);
+
+ return new UnifyResultDto("200", "删除成功", isTrue);
+ }
+ #endregion
}
}
From 047e9b48851e2596558b79b27156594a937138d6 Mon Sep 17 00:00:00 2001
From: moyongzhen <2534173414@qq.com>
Date: Wed, 28 Feb 2024 15:48:48 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E5=86=85=E5=AE=B9?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TrackContents/EditTrackContentInput.cs | 64 ++++++++++++--
.../TrackContents/GetPageTrackContentInput.cs | 84 +++++++++++++++++++
.../TrackContents/TrackContentService.cs | 37 ++++++++
.../ITrackContentRepository.cs | 7 +-
.../TrackContents/GetPageTrackContentVO.cs | 84 +++++++++++++++++++
.../TrackContents/GetTrackContentDetailVO.cs | 61 ++++++++++++++
.../TrackContentRepository.cs | 66 +++++++++++++++
7 files changed, 397 insertions(+), 6 deletions(-)
create mode 100644 src/SJZY.Track.Application/Dtos/TrackContents/GetPageTrackContentInput.cs
create mode 100644 src/SJZY.Track.Domain/Dtos/TrackContents/GetPageTrackContentVO.cs
create mode 100644 src/SJZY.Track.Domain/Dtos/TrackContents/GetTrackContentDetailVO.cs
diff --git a/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs b/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs
index 87cc3632..23294dfe 100644
--- a/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs
+++ b/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs
@@ -11,22 +11,70 @@ namespace SJZY.Track.Application.Dtos.TrackContents
///
/// Id
///
- public int Id { get; set; }
+ public int Id { get; set; }
///
/// 操作类型
///
- public OptionType Options { get; set; }
+ public OptionType Options { get; set; }
///
/// 子系统id
///
- public int SubSystemId { get; set; }
+ public int SubSystemId { get; set; }
///
/// 所属轨迹状态id
///
- public int TrackStatusId { get; set; }
+ public int TrackStatusId { get; set; }
+
+ ///
+ /// 轨迹内容代码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 轨迹内容
+ ///
+ public string Content { get; set; }
+
+ ///
+ /// 轨迹内容英文
+ ///
+ public string EnContent { get; set; }
+
+ ///
+ /// 轨迹标记id
+ ///
+ public int TrackFlagId { get; set; }
+ }
+
+ public class GetTrackContentDetailDto
+ {
+ ///
+ /// Id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 子系统id
+ ///
+ public int SubSystemId { get; set; }
+
+ ///
+ /// 子系统
+ ///
+ public string SubSystem { get; set; }
+
+ ///
+ /// 所属轨迹状态id
+ ///
+ public int TrackStatusId { get; set; }
+
+ ///
+ /// 所属轨迹状态
+ ///
+ public string TrackStatus { get; set; }
///
/// 轨迹内容代码
@@ -41,11 +89,17 @@ namespace SJZY.Track.Application.Dtos.TrackContents
///
/// 轨迹内容英文
///
- public string EnContent { get; set; }
+ public string EnContent { get; set; }
///
/// 轨迹标记id
///
public int TrackFlagId { get; set; }
+
+ ///
+ /// 轨迹标记
+ ///
+ public string TrackFlag { get; set; }
}
}
+
diff --git a/src/SJZY.Track.Application/Dtos/TrackContents/GetPageTrackContentInput.cs b/src/SJZY.Track.Application/Dtos/TrackContents/GetPageTrackContentInput.cs
new file mode 100644
index 00000000..a494d030
--- /dev/null
+++ b/src/SJZY.Track.Application/Dtos/TrackContents/GetPageTrackContentInput.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SJZY.Track.Application.Dtos.TrackContents
+{
+ public class GetPageTrackContentInput : PageInfoInput
+ {
+ ///
+ /// 子系统id
+ ///
+ public int SubSystemId { get; set; }
+
+ ///
+ /// 关键字
+ ///
+ public string Keywords { get; set; }
+ }
+
+ public class GetTrackContentListDto
+ {
+ ///
+ /// Id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 子系统
+ ///
+ public string SubSystem { get; set; }
+
+ ///
+ /// 轨迹内容代码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 轨迹内容
+ ///
+ public string Content { get; set; }
+
+ ///
+ /// 轨迹内容英文
+ ///
+ public string EnContent { get; set; }
+
+ ///
+ /// 所属状态
+ ///
+ public string TrackStatus { get; set; }
+
+ ///
+ /// 所属节点
+ ///
+ public string Node { get; set; }
+
+ ///
+ /// 轨迹标记
+ ///
+ public string TrackFlag { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 修改时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 修改人
+ ///
+ public string UpdateUser { get; set; }
+ }
+}
diff --git a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
index dc5c40c2..fb7bacb5 100644
--- a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
+++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
@@ -1,6 +1,8 @@
using SJZY.Track.Application.Dtos.TrackContents;
using SJZY.Track.Application.Dtos.TrackStatus;
using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
+using SJZY.Track.Domain.Dtos.TrackContents;
+using SJZY.Track.Domain.Dtos.TrackStatus;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -42,6 +44,41 @@ namespace SJZY.Track.Application.Services.TrackContents
};
}
+ ///
+ /// 根据内容id获取轨迹内容
+ ///
+ ///
+ ///
+ [HttpGet("GetDetail")]
+ public async Task> GetDetailAsync(int id)
+ {
+ var detailInfo = await _trackContentRepository.GetDetailAsync(id);
+ if (detailInfo == null)
+ {
+ return new UnifyResultDto(false, null, "未查询到轨迹状态");
+ }
+
+ var dto = ObjectMapper.Map(detailInfo);
+ return new UnifyResultDto("200", "", dto);
+ }
+
+ ///
+ /// 获取分页轨迹内容
+ ///
+ ///
+ ///
+ [HttpPost("GetList")]
+ public async Task> GetPageTrackContent(GetPageTrackContentInput input)
+ {
+ var vo = ObjectMapper.Map(input);
+ var resultDto = await _trackContentRepository.GetPageTrackContent(vo);
+ var pageResultDto =
+ ObjectMapper.Map, UnifyPageResultDto>(
+ resultDto);
+
+ return pageResultDto;
+ }
+
#region 私有方法
private async Task AddAsync(EditTrackContentInput input)
{
diff --git a/src/SJZY.Track.Domain/Aggregates/TrackContentAggregate/ITrackContentRepository.cs b/src/SJZY.Track.Domain/Aggregates/TrackContentAggregate/ITrackContentRepository.cs
index b343163b..fbd0e412 100644
--- a/src/SJZY.Track.Domain/Aggregates/TrackContentAggregate/ITrackContentRepository.cs
+++ b/src/SJZY.Track.Domain/Aggregates/TrackContentAggregate/ITrackContentRepository.cs
@@ -1,5 +1,10 @@
-namespace SJZY.Track.Domain.Aggregates.TrackContentAggregate;
+using SJZY.Track.Domain.Dtos.TrackContents;
+using SJZY.Track.Domain.Dtos.TrackStatus;
+
+namespace SJZY.Track.Domain.Aggregates.TrackContentAggregate;
public interface ITrackContentRepository : IBasicRepository
{
+ Task GetDetailAsync(int id);
+ Task> GetPageTrackContent(GetPageTrackContentVO input);
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Dtos/TrackContents/GetPageTrackContentVO.cs b/src/SJZY.Track.Domain/Dtos/TrackContents/GetPageTrackContentVO.cs
new file mode 100644
index 00000000..f093836d
--- /dev/null
+++ b/src/SJZY.Track.Domain/Dtos/TrackContents/GetPageTrackContentVO.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SJZY.Track.Domain.Dtos.TrackContents
+{
+ public class GetPageTrackContentVO : PageInfoInput
+ {
+ ///
+ /// 子系统id
+ ///
+ public int SubSystemId { get; set; }
+
+ ///
+ /// 关键字
+ ///
+ public string Keywords { get; set; }
+ }
+
+ public class GetTrackContentListVO
+ {
+ ///
+ /// Id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 子系统
+ ///
+ public string SubSystem { get; set; }
+
+ ///
+ /// 轨迹内容代码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 轨迹内容
+ ///
+ public string Content { get; set; }
+
+ ///
+ /// 轨迹内容英文
+ ///
+ public string EnContent { get; set; }
+
+ ///
+ /// 所属状态
+ ///
+ public string TrackStatus { get; set; }
+
+ ///
+ /// 所属节点
+ ///
+ public string Node { get; set; }
+
+ ///
+ /// 轨迹标记
+ ///
+ public string TrackFlag { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ public string CreateUser { get; set; }
+
+ ///
+ /// 修改时间
+ ///
+ public DateTime? UpdateTime { get; set; }
+
+ ///
+ /// 修改人
+ ///
+ public string UpdateUser { get; set; }
+ }
+}
diff --git a/src/SJZY.Track.Domain/Dtos/TrackContents/GetTrackContentDetailVO.cs b/src/SJZY.Track.Domain/Dtos/TrackContents/GetTrackContentDetailVO.cs
new file mode 100644
index 00000000..b58df450
--- /dev/null
+++ b/src/SJZY.Track.Domain/Dtos/TrackContents/GetTrackContentDetailVO.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SJZY.Track.Domain.Dtos.TrackContents
+{
+ public class GetTrackContentDetailVO
+ {
+ ///
+ /// Id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 子系统id
+ ///
+ public int SubSystemId { get; set; }
+
+ ///
+ /// 子系统
+ ///
+ public string SubSystem { get; set; }
+
+ ///
+ /// 所属轨迹状态id
+ ///
+ public int TrackStatusId { get; set; }
+
+ ///
+ /// 所属轨迹状态
+ ///
+ public string TrackStatus { get; set; }
+
+ ///
+ /// 轨迹内容代码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 轨迹内容
+ ///
+ public string Content { get; set; }
+
+ ///
+ /// 轨迹内容英文
+ ///
+ public string EnContent { get; set; }
+
+ ///
+ /// 轨迹标记id
+ ///
+ public int TrackFlagId { get; set; }
+
+ ///
+ /// 轨迹标记
+ ///
+ public string TrackFlag { get; set; }
+ }
+}
diff --git a/src/SJZY.Track.Repository/TrackContentRepository.cs b/src/SJZY.Track.Repository/TrackContentRepository.cs
index 075b925a..1671ac80 100644
--- a/src/SJZY.Track.Repository/TrackContentRepository.cs
+++ b/src/SJZY.Track.Repository/TrackContentRepository.cs
@@ -1,4 +1,8 @@
using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
+using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
+using SJZY.Track.Domain.Dtos.TrackContents;
+using SJZY.Track.Domain.Dtos.TrackStatus;
+using SJZY.Track.Domain.VEntities;
namespace SJZY.Track.Repository;
@@ -10,5 +14,67 @@ public class TrackContentRepository : BasicRepository, ITrac
}
+ ///
+ /// 获取轨迹内容明细
+ ///
+ ///
+ ///
+ public async Task GetDetailAsync(int id)
+ {
+ var detail = await Context.Queryable()
+ .LeftJoin((a, b) => a.SubSystemId == b.Id)
+ .Where((a, b) => a.Id == id)
+ .Select((a, b) => new GetTrackContentDetailVO
+ {
+ Id = a.Id,
+ SubSystemId = a.SubSystemId,
+ SubSystem = b.CnName,
+ TrackStatusId=a.TrackStatusId,
+ TrackStatus= "",
+ Code = a.Code,
+ Content = a.Content,
+ EnContent = a.EnContent,
+ TrackFlagId=a.TrackFlagId,
+ TrackFlag=""
+ })
+ .FirstAsync();
+ return detail;
+ }
+ ///
+ /// 分页获取轨迹内容
+ ///
+ ///
+ ///
+ public async Task> GetPageTrackContent(GetPageTrackContentVO input)
+ {
+ UnifyPageResultDto pagedList = new UnifyPageResultDto();
+ pagedList = await Context.Queryable()
+ .LeftJoin((a, b) => a.SubSystemId == b.Id)
+ .LeftJoin((a, b, c) => a.CreateUserId == c.Id)
+ .LeftJoin((a, b, c, d) => a.UpdateUserId == d.Id)
+ .WhereIF(input.SubSystemId > 0, (a, b, c, d) => a.SubSystemId == input.SubSystemId)
+ .WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
+ (a, b, c, d) => a.Code.Contains(input.Keywords)
+ )
+ .Select((a, b, c, d) => new GetTrackContentListVO
+ {
+ Id = a.Id,
+ SubSystem = b.CnName,
+ Code = a.Code,
+ Content = a.Content,
+ EnContent = a.EnContent,
+ TrackStatus= "",
+ Node = "",
+ TrackFlag= "",
+ CreateTime = a.CreateTime,
+ CreateUser = c.Name,
+ UpdateTime = a.UpdateTime,
+ UpdateUser = d.Name,
+
+ })
+ .ToPagedListAsync(input.PageIndex, input.PageSize);
+
+ return pagedList;
+ }
}
\ No newline at end of file