diff --git a/SJZY.Track.Api.sln b/SJZY.Track.Api.sln
index 8a9c51e8..3de8a025 100644
--- a/SJZY.Track.Api.sln
+++ b/SJZY.Track.Api.sln
@@ -10,9 +10,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DAC93270-5A2
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0E2537C3-6EF3-4085-9BD2-CF923E53F82A}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SJZY.Track.Repository", "src\SJZY.Track.Repository\SJZY.Track.Repository.csproj", "{D9CF5706-1972-414F-821E-AA32C13B8570}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SJZY.Track.Infrastructure", "src\SJZY.Track.Infrastructure\SJZY.Track.Infrastructure.csproj", "{D9CF5706-1972-414F-821E-AA32C13B8570}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SJZY.Track.HttpApi", "src\SJZY.Track.HttpApi\SJZY.Track.HttpApi.csproj", "{390A44FB-0DB5-4B66-86AB-7712DC3030F5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SJZY.Track.Application.Contract", "src\SJZY.Track.Application.Contract\SJZY.Track.Application.Contract.csproj", "{390A44FB-0DB5-4B66-86AB-7712DC3030F5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SJZY.Track.Test", "test\SJZY.Track.Test\SJZY.Track.Test.csproj", "{3A53539C-4A85-4E5D-A071-7B4B193AB0E0}"
EndProject
diff --git a/SJZY.Track.Api.sln.DotSettings b/SJZY.Track.Api.sln.DotSettings
new file mode 100644
index 00000000..2363a683
--- /dev/null
+++ b/SJZY.Track.Api.sln.DotSettings
@@ -0,0 +1,2 @@
+
+ True
\ No newline at end of file
diff --git a/src/SJZY.Track.Api/Program.cs b/src/SJZY.Track.Api/Program.cs
index 9d6d0ed4..db266046 100644
--- a/src/SJZY.Track.Api/Program.cs
+++ b/src/SJZY.Track.Api/Program.cs
@@ -10,10 +10,10 @@ try
.AddConfigurationContainer()
.AddOptionsFromConfiguration()
.UseSerilogDefault()
- .Host.AddAppSettingsSecretsJson()
+ .Host.AddAppSettingsSecretsJson()
.UseAutofac();
- await builder.AddApplicationAsync();
+ await builder.AddApplicationAsync();
var app = builder.Build();
await app.InitializeApplicationAsync();
diff --git a/src/SJZY.Track.Api/SJZY.Track.Api.csproj b/src/SJZY.Track.Api/SJZY.Track.Api.csproj
index 44113706..a2a8fad3 100644
--- a/src/SJZY.Track.Api/SJZY.Track.Api.csproj
+++ b/src/SJZY.Track.Api/SJZY.Track.Api.csproj
@@ -1,34 +1,26 @@
-
- net7.0
- enable
- enable
- True
- Linux
- ..\..
-
+
-
-
-
-
-
-
+
+ net7.0
+ True
+ Linux
+ ..\..
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
diff --git a/src/SJZY.Track.Api/SJZYTrackApiModule.cs b/src/SJZY.Track.Api/SjzyTrackApiModule.cs
similarity index 95%
rename from src/SJZY.Track.Api/SJZYTrackApiModule.cs
rename to src/SJZY.Track.Api/SjzyTrackApiModule.cs
index 93e04188..443495ce 100644
--- a/src/SJZY.Track.Api/SJZYTrackApiModule.cs
+++ b/src/SJZY.Track.Api/SjzyTrackApiModule.cs
@@ -9,7 +9,7 @@ using SJZY.Expand.ABP.Core.Prometheus;
using SJZY.Expand.ABP.Core.Redis;
using SJZY.Expand.ABP.Core.Swagger;
using SJZY.Track.Application;
-using SJZY.Track.Repository;
+using SJZY.Track.Infrastructure;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Serilog;
@@ -27,10 +27,10 @@ namespace SJZY.Track.Api
typeof(SjzyAbpCodeModule),
typeof(AbpAspNetCoreMvcModule),
typeof(AbpAspNetCoreSerilogModule),
- typeof(ApplicationModule),
- typeof(SJZYTrackRepositoryModule)
+ typeof(SjzyTrackApplicationModule),
+ typeof(SjzyTrackInfrastructureModule)
)]
- public class SJZYTrackApiModule : AbpModule
+ public class SjzyTrackApiModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
diff --git a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/DeleteOrderInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/DeleteOrderInput.cs
new file mode 100644
index 00000000..7d8d79c0
--- /dev/null
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/DeleteOrderInput.cs
@@ -0,0 +1,5 @@
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
+
+public class DeleteOrderInput : OrderNoInfo
+{
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/GetOrderDetailsInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetOrderDetailsInput.cs
similarity index 85%
rename from src/SJZY.Track.Application/Dtos/ProvideServices/GetOrderDetailsInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetOrderDetailsInput.cs
index d1b7cb92..c82bf122 100644
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/GetOrderDetailsInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetOrderDetailsInput.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.ProvideServices
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices
{
public class GetOrderDetailsInput
{
@@ -30,7 +24,7 @@ namespace SJZY.Track.Application.Dtos.ProvideServices
/// 轨迹内容
///
public string Content { get; set; }
-
+
///
/// 轨迹内容英文
///
@@ -51,4 +45,4 @@ namespace SJZY.Track.Application.Dtos.ProvideServices
///
public string TrackTimeZone { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetPageTrackOrderInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetPageTrackOrderInput.cs
new file mode 100644
index 00000000..2f8d31e0
--- /dev/null
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetPageTrackOrderInput.cs
@@ -0,0 +1,95 @@
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
+
+public class GetPageTrackOrderInput : PageInfoInput
+{
+ ///
+ /// 子系统id
+ ///
+ public int SubSystemId { get; set; }
+
+ ///
+ /// 单号
+ ///
+ public List? OrderNos { get; set; }
+
+ ///
+ /// 创建时间开始
+ ///
+ public DateTime? CreateTimeStart { get; set; }
+
+ ///
+ /// 创建时间截止
+ ///
+ public DateTime? CreateTimeEnd { get; set; }
+}
+
+///
+/// 轨迹订单Dto
+///
+public class TrackOrderDto
+{
+ ///
+ /// 轨迹订单id
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 订单类型id
+ ///
+ public int OrderType { get; set; }
+
+ ///
+ /// 订单号
+ ///
+ public string? OrderNumber { get; set; }
+
+ ///
+ /// 轨迹模版
+ ///
+ public string? TrackTemplateNames { get; set; }
+
+ ///
+ /// 客户简称
+ ///
+ public string? CustomerShortName { get; set; }
+
+ ///
+ /// 客户代码
+ ///
+ public string? CustomerCode { get; set; }
+
+ ///
+ /// 订单明细(json)
+ ///
+ public string? OrderDetails { get; set; }
+
+ ///
+ /// 最新轨迹内容
+ ///
+ public string? NewestTrackContent { get; set; }
+
+ ///
+ /// 最新轨迹内容英文
+ ///
+ public string? NewestTrackEnContent { get; set; }
+
+ ///
+ /// 最新轨迹发生地
+ ///
+ public string? NewestTrackPlace { get; set; }
+
+ ///
+ /// 是否完结
+ ///
+ public bool IsFinish { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 子系统
+ ///
+ public string SubSystem { get; set; }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/GetTrackInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetTrackInput.cs
similarity index 92%
rename from src/SJZY.Track.Application/Dtos/ProvideServices/GetTrackInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetTrackInput.cs
index d455a5b2..578c31b2 100644
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/GetTrackInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetTrackInput.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.ProvideServices;
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class GetTrackInput
{
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/GetTrackOutput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetTrackOutput.cs
similarity index 87%
rename from src/SJZY.Track.Application/Dtos/ProvideServices/GetTrackOutput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetTrackOutput.cs
index b6b77862..eda7ecbc 100644
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/GetTrackOutput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/GetTrackOutput.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.ProvideServices;
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class GetTrackOutput
{
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/LinkOrderInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/LinkOrderInput.cs
similarity index 90%
rename from src/SJZY.Track.Application/Dtos/ProvideServices/LinkOrderInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/ProvideServices/LinkOrderInput.cs
index ae3dfd9d..cf3e5b79 100644
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/LinkOrderInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/LinkOrderInput.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
-namespace SJZY.Track.Application.Dtos.ProvideServices;
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class LinkOrderInput
{
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/OrderNoInfo.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/OrderNoInfo.cs
similarity index 84%
rename from src/SJZY.Track.Application/Dtos/ProvideServices/OrderNoInfo.cs
rename to src/SJZY.Track.Application.Contract/Dtos/ProvideServices/OrderNoInfo.cs
index 6f98fafc..b4283022 100644
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/OrderNoInfo.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/OrderNoInfo.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
-namespace SJZY.Track.Application.Dtos.ProvideServices;
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class OrderNoInfo
{
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/UpdateOrderInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpdateOrderInput.cs
similarity index 93%
rename from src/SJZY.Track.Application/Dtos/ProvideServices/UpdateOrderInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpdateOrderInput.cs
index d614db45..a6faf08b 100644
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/UpdateOrderInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpdateOrderInput.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.ProvideServices;
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class UpdateOrderInput : OrderNoInfo
{
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/UpsertOrderInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertOrderInput.cs
similarity index 91%
rename from src/SJZY.Track.Application/Dtos/ProvideServices/UpsertOrderInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertOrderInput.cs
index c03d2478..f6c7cb78 100644
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/UpsertOrderInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertOrderInput.cs
@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
-namespace SJZY.Track.Application.Dtos.ProvideServices;
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class UpsertOrderInput : UpdateOrderInput
{
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/UpsertTrackInput.cs b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertTrackInput.cs
similarity index 87%
rename from src/SJZY.Track.Application/Dtos/ProvideServices/UpsertTrackInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertTrackInput.cs
index fa2112ee..91d5429c 100644
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/UpsertTrackInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/ProvideServices/UpsertTrackInput.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.ProvideServices;
+namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class UpsertTrackInput : OrderNoInfo
{
diff --git a/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/EditTrackContentInput.cs
similarity index 85%
rename from src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackContents/EditTrackContentInput.cs
index 9879ffb8..d2a829ca 100644
--- a/src/SJZY.Track.Application/Dtos/TrackContents/EditTrackContentInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/EditTrackContentInput.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.TrackContents
+namespace SJZY.Track.Application.Contract.Dtos.TrackContents
{
public class EditTrackContentInput
{
@@ -79,12 +73,12 @@ namespace SJZY.Track.Application.Dtos.TrackContents
///
/// 轨迹内容代码
///
- public string Code { get; set; }
+ public string Code { get; set; }
///
/// 轨迹内容
///
- public string Content { get; set; }
+ public string Content { get; set; }
///
/// 轨迹内容英文
@@ -94,12 +88,11 @@ namespace SJZY.Track.Application.Dtos.TrackContents
///
/// 轨迹标记id
///
- public int TrackFlagId { get; set; }
+ public int TrackFlagId { get; set; }
///
/// 轨迹标记
///
- public string TrackFlag { get; set; }
+ public string TrackFlag { get; set; }
}
-}
-
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/TrackContents/GetPageTrackContentInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetPageTrackContentInput.cs
similarity index 90%
rename from src/SJZY.Track.Application/Dtos/TrackContents/GetPageTrackContentInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetPageTrackContentInput.cs
index 7a009ccb..9628067c 100644
--- a/src/SJZY.Track.Application/Dtos/TrackContents/GetPageTrackContentInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetPageTrackContentInput.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.TrackContents
+namespace SJZY.Track.Application.Contract.Dtos.TrackContents
{
public class GetPageTrackContentInput : PageInfoInput
{
@@ -81,4 +75,4 @@ namespace SJZY.Track.Application.Dtos.TrackContents
///
public string UpdateUser { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/TrackFlags/EditTrackFlagInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackFlags/EditTrackFlagInput.cs
similarity index 86%
rename from src/SJZY.Track.Application/Dtos/TrackFlags/EditTrackFlagInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackFlags/EditTrackFlagInput.cs
index 901f5e5a..f4c1083e 100644
--- a/src/SJZY.Track.Application/Dtos/TrackFlags/EditTrackFlagInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackFlags/EditTrackFlagInput.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.TrackFlags
+namespace SJZY.Track.Application.Contract.Dtos.TrackFlags
{
public class EditTrackFlagInput
{
@@ -54,7 +48,7 @@ namespace SJZY.Track.Application.Dtos.TrackFlags
///
/// 子系统
///
- public string SubSystem { get; set; }
+ public string SubSystem { get; set; }
///
/// 代码
@@ -71,4 +65,4 @@ namespace SJZY.Track.Application.Dtos.TrackFlags
///
public bool IsFinish { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/TrackFlags/GetTrackFlagListDto.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackFlags/GetTrackFlagListDto.cs
similarity index 88%
rename from src/SJZY.Track.Application/Dtos/TrackFlags/GetTrackFlagListDto.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackFlags/GetTrackFlagListDto.cs
index 714203f2..1ca2c4df 100644
--- a/src/SJZY.Track.Application/Dtos/TrackFlags/GetTrackFlagListDto.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackFlags/GetTrackFlagListDto.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.TrackFlags
+namespace SJZY.Track.Application.Contract.Dtos.TrackFlags
{
public class GetTrackFlagListDto
{
@@ -66,4 +60,4 @@ namespace SJZY.Track.Application.Dtos.TrackFlags
/////
//public string Keywords { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/TrackPull/EditTrackPullConfigInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackPull/EditTrackPullConfigInput.cs
similarity index 96%
rename from src/SJZY.Track.Application/Dtos/TrackPull/EditTrackPullConfigInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackPull/EditTrackPullConfigInput.cs
index 71fe55cf..61e15c3e 100644
--- a/src/SJZY.Track.Application/Dtos/TrackPull/EditTrackPullConfigInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackPull/EditTrackPullConfigInput.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.TrackPull;
+namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
public class EditTrackPullConfigInput
{
diff --git a/src/SJZY.Track.Application/Dtos/TrackPull/UpdateTrackPullContentInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackPull/UpdateTrackPullContentInput.cs
similarity index 94%
rename from src/SJZY.Track.Application/Dtos/TrackPull/UpdateTrackPullContentInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackPull/UpdateTrackPullContentInput.cs
index 74a54567..84d7e335 100644
--- a/src/SJZY.Track.Application/Dtos/TrackPull/UpdateTrackPullContentInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackPull/UpdateTrackPullContentInput.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.TrackPull;
+namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
public class UpdateTrackPullContentInput
{
diff --git a/src/SJZY.Track.Application/Dtos/TrackStatus/EditTrackStatusInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackStatus/EditTrackStatusInput.cs
similarity index 83%
rename from src/SJZY.Track.Application/Dtos/TrackStatus/EditTrackStatusInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackStatus/EditTrackStatusInput.cs
index ce9a0ebf..61a9d98e 100644
--- a/src/SJZY.Track.Application/Dtos/TrackStatus/EditTrackStatusInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackStatus/EditTrackStatusInput.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.TrackStatus
+namespace SJZY.Track.Application.Contract.Dtos.TrackStatus
{
public class EditTrackStatusInput
{
@@ -43,4 +37,4 @@ namespace SJZY.Track.Application.Dtos.TrackStatus
///
public string? EntrackStatus { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/TrackStatus/GetTrackStatusDetailDto.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackStatus/GetTrackStatusDetailDto.cs
similarity index 61%
rename from src/SJZY.Track.Application/Dtos/TrackStatus/GetTrackStatusDetailDto.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackStatus/GetTrackStatusDetailDto.cs
index 6779d6da..fe39c418 100644
--- a/src/SJZY.Track.Application/Dtos/TrackStatus/GetTrackStatusDetailDto.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackStatus/GetTrackStatusDetailDto.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.TrackStatus
+namespace SJZY.Track.Application.Contract.Dtos.TrackStatus
{
public class GetTrackStatusDetailDto
{
@@ -21,26 +15,26 @@ namespace SJZY.Track.Application.Dtos.TrackStatus
///
/// 子系统
///
- public string SubSystem { get; set; }
+ public string SubSystem { get; set; }
///
/// 节点id
///
- public int NodeId { get; set; }
+ public int NodeId { get; set; }
///
/// 所属轨迹状态
///
- public string TrackStatus { get; set; }
+ public string TrackStatus { get; set; }
///
/// 轨迹状态代码
///
- public string Code { get; set; }
+ public string Code { get; set; }
///
/// 轨迹内容英文
///
- public string EntrackStatus { get; set; }
+ public string EntrackStatus { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/TrackStatus/GetTrackStatusListDto.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackStatus/GetTrackStatusListDto.cs
similarity index 89%
rename from src/SJZY.Track.Application/Dtos/TrackStatus/GetTrackStatusListDto.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackStatus/GetTrackStatusListDto.cs
index ecdb123d..8cadc1ea 100644
--- a/src/SJZY.Track.Application/Dtos/TrackStatus/GetTrackStatusListDto.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackStatus/GetTrackStatusListDto.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.TrackStatus
+namespace SJZY.Track.Application.Contract.Dtos.TrackStatus
{
public class GetTrackStatusListDto
{
@@ -72,4 +66,4 @@ namespace SJZY.Track.Application.Dtos.TrackStatus
///
public string Keywords { get; set; } = "";
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/TrackTemplates/EditTrackTemplateContentInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/EditTrackTemplateContentInput.cs
similarity index 91%
rename from src/SJZY.Track.Application/Dtos/TrackTemplates/EditTrackTemplateContentInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/EditTrackTemplateContentInput.cs
index bb45dc74..0c7144fc 100644
--- a/src/SJZY.Track.Application/Dtos/TrackTemplates/EditTrackTemplateContentInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/EditTrackTemplateContentInput.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.TrackTemplates;
+namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
///
public class EditTrackTemplateContentInput
diff --git a/src/SJZY.Track.Application/Dtos/TrackTemplates/GetPageTrackTemplateInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/GetPageTrackTemplateInput.cs
similarity index 89%
rename from src/SJZY.Track.Application/Dtos/TrackTemplates/GetPageTrackTemplateInput.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/GetPageTrackTemplateInput.cs
index 3be009ac..ba54db15 100644
--- a/src/SJZY.Track.Application/Dtos/TrackTemplates/GetPageTrackTemplateInput.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/GetPageTrackTemplateInput.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.TrackTemplates
+namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates
{
///
/// 获取轨迹模版分页输入
@@ -20,4 +20,4 @@
///
public int TrackTemplateId { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/TrackTemplates/GetTrackDetailDto.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/GetTrackDetailDto.cs
similarity index 96%
rename from src/SJZY.Track.Application/Dtos/TrackTemplates/GetTrackDetailDto.cs
rename to src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/GetTrackDetailDto.cs
index f4ac73d8..86e5db45 100644
--- a/src/SJZY.Track.Application/Dtos/TrackTemplates/GetTrackDetailDto.cs
+++ b/src/SJZY.Track.Application.Contract/Dtos/TrackTemplates/GetTrackDetailDto.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Application.Dtos.TrackTemplates
+namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates
{
///
/// 获取轨迹模版详情
@@ -92,4 +92,4 @@
///
public string? Code { set; get; }
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application.Contract/GlobalUsings.cs b/src/SJZY.Track.Application.Contract/GlobalUsings.cs
new file mode 100644
index 00000000..99b0e5e1
--- /dev/null
+++ b/src/SJZY.Track.Application.Contract/GlobalUsings.cs
@@ -0,0 +1,4 @@
+// Global using directives
+
+global using SJZY.Expand.ABP.Common.Enums;
+global using SJZY.Expand.ABP.Core.Common.Dto;
\ No newline at end of file
diff --git a/src/SJZY.Track.HttpApi/SJZY.Track.HttpApi.csproj b/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj
similarity index 62%
rename from src/SJZY.Track.HttpApi/SJZY.Track.HttpApi.csproj
rename to src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj
index 1d376964..a7a570d0 100644
--- a/src/SJZY.Track.HttpApi/SJZY.Track.HttpApi.csproj
+++ b/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj
@@ -1,14 +1,14 @@
+
+
net7.0
- enable
- enable
0.0.2
-
-
+
+
diff --git a/src/SJZY.Track.Application.Contract/Services/ITrackContentService.cs b/src/SJZY.Track.Application.Contract/Services/ITrackContentService.cs
new file mode 100644
index 00000000..08ce5194
--- /dev/null
+++ b/src/SJZY.Track.Application.Contract/Services/ITrackContentService.cs
@@ -0,0 +1,5 @@
+namespace SJZY.Track.Application.Contract.Services;
+
+public interface ITrackContentService
+{
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application.Contract/Services/ITrackFlagService.cs b/src/SJZY.Track.Application.Contract/Services/ITrackFlagService.cs
new file mode 100644
index 00000000..a7d780b9
--- /dev/null
+++ b/src/SJZY.Track.Application.Contract/Services/ITrackFlagService.cs
@@ -0,0 +1,5 @@
+namespace SJZY.Track.Application.Contract.Services;
+
+public interface ITrackFlagService
+{
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application.Contract/Services/ITrackStatusService.cs b/src/SJZY.Track.Application.Contract/Services/ITrackStatusService.cs
new file mode 100644
index 00000000..b350cb93
--- /dev/null
+++ b/src/SJZY.Track.Application.Contract/Services/ITrackStatusService.cs
@@ -0,0 +1,5 @@
+namespace SJZY.Track.Application.Contract.Services;
+
+public interface ITrackStatusService
+{
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application.Contract/SjzyTrackApplicationContractModule.cs b/src/SJZY.Track.Application.Contract/SjzyTrackApplicationContractModule.cs
new file mode 100644
index 00000000..0da04423
--- /dev/null
+++ b/src/SJZY.Track.Application.Contract/SjzyTrackApplicationContractModule.cs
@@ -0,0 +1,10 @@
+using Volo.Abp.Modularity;
+
+namespace SJZY.Track.Application.Contract;
+
+public class SjzyTrackApplicationContractModule : AbpModule
+{
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/AutoMapper/AutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/AutoMapperProfile.cs
deleted file mode 100644
index b315446d..00000000
--- a/src/SJZY.Track.Application/AutoMapper/AutoMapperProfile.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using AutoMapper;
-using SJZY.Track.Application.Dtos.Demo;
-using SJZY.Track.Domain.Aggregates.DemoAggregate;
-using SJZY.Track.Domain.Dtos.Demo;
-
-namespace SJZY.Track.Application.AutoMapper;
-
-internal class AutoMapperProfile : Profile
-{
- public AutoMapperProfile()
- {
- CreateMap, UnifyPageResultDto>(MemberList.None);
-
- CreateMap(MemberList.None).ReverseMap();
- CreateMap, UnifyPageResultDto>(MemberList.None)
- .ReverseMap();
- /*
- 代码说明:
- MemberList.None的意思是,忽略源对象和目标对象的属性匹配检查,其他可选值:MemberList.Source(检查是否映射了所有源成员)、MemberList.Destination(检查是否映射了所有目标成员)
- .ReverseMap()的意思是配置双向调用关系,既一行代码既支持从 GetDemoListByPageInput -> DemoValueObject 的映射,同时也支持从 DemoValueObject -> GetDemoListByPageInput 的映射
-
-
- 如果对一对模型多次配置规则,会以最后一次为准,配置了这样规则后,最终执行结果是 Name + 444
- CreateMap().ForMember(dest => dest.Description, opt => opt.MapFrom(m => m.Name + "22"));
- CreateMap().ForMember(dest => dest.Description, opt => opt.MapFrom(m => m.Name + "444"));
-
- */
-
- CreateMap(MemberList.None).ReverseMap();
- CreateMap(MemberList.None);
- CreateMap(MemberList.None).ReverseMap();
- }
-}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/AutoMapper/DemoAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/DemoAutoMapperProfile.cs
deleted file mode 100644
index 8e04d1ce..00000000
--- a/src/SJZY.Track.Application/AutoMapper/DemoAutoMapperProfile.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using AutoMapper;
-using SJZY.Expand.ABP.Core.PublicMethords;
-using SJZY.Track.Application.Dtos.Demo;
-
-
-namespace SJZY.Track.Application.AutoMapper
-{
- ///
- /// 稍复杂的配置类
- ///
- internal class DemoAutoMapperProfile : Profile
- {
- public DemoAutoMapperProfile()
- {
- CreateMap(MemberList.None)
- //层级不一致的场景
- .ForMember(dest => dest.QQ, opt => opt.MapFrom(source => source.UserInfo.QQ))
- //数据类型不一致的场景,这里如果不指定映射规则会直接取枚举的key值
- .ForMember(dest => dest.Gender, opt => opt.MapFrom(source => source.Gender.GetDescription()))
- //一些简单计算的场景,酌情使用...
- .ForMember(dest => dest.Age, opt => opt.MapFrom(source => GetAgeByBirthdate(source.UserInfo.BirthDay)))
- //结构不一致的场景
- .ForMember(dest => dest.RoleIds, opt => opt.MapFrom(source => source.UserRoleInputList.Select(m => m.Id).ToArray()))
- //条件映射(这里只是举例,日常开发时sqlsugar在新增时会避开自增主键)
- .ForMember(dest => dest.Id, opt =>
- {
- opt.Condition(src => src.OptionType == OptionType.删除 || src.OptionType == OptionType.修改);
- });
- }
-
- public int GetAgeByBirthdate(DateTime birthdate)
- {
- DateTime now = DateTime.Now;
- int age = now.Year - birthdate.Year;
- if (now.Month < birthdate.Month || (now.Month == birthdate.Month && now.Day < birthdate.Day))
- {
- age--;
- }
- return age < 0 ? 0 : age;
- }
-
- }
-}
diff --git a/src/SJZY.Track.Application/AutoMapper/OrderAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/OrderAutoMapperProfile.cs
index a8d93386..b176cf6e 100644
--- a/src/SJZY.Track.Application/AutoMapper/OrderAutoMapperProfile.cs
+++ b/src/SJZY.Track.Application/AutoMapper/OrderAutoMapperProfile.cs
@@ -1,6 +1,5 @@
using AutoMapper;
-using AutoMapper.Internal.Mappers;
-using SJZY.Track.Application.Dtos.ProvideServices;
+using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Domain.Aggregates.OrderAggregate;
using SJZY.Track.Domain.Dtos.Order;
using System.Diagnostics;
@@ -21,6 +20,6 @@ public class OrderAutoMapperProfile : Profile
CreateMap(MemberList.None);
CreateMap(MemberList.None);
- CreateMap, UnifyPageResultDto>(MemberList.None);
+ CreateMap, UnifyPageResultDto>(MemberList.None);
}
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/AutoMapper/TrackContentAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackContentAutoMapperProfile.cs
index e9346eff..25f17ab6 100644
--- a/src/SJZY.Track.Application/AutoMapper/TrackContentAutoMapperProfile.cs
+++ b/src/SJZY.Track.Application/AutoMapper/TrackContentAutoMapperProfile.cs
@@ -1,16 +1,7 @@
using AutoMapper;
-using AutoMapper.Internal.Mappers;
-using SJZY.Track.Application.Dtos.TrackContents;
-using SJZY.Track.Application.Dtos.TrackTemplates;
+using SJZY.Track.Application.Contract.Dtos.TrackContents;
using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
using SJZY.Track.Domain.Dtos.TrackContents;
-using SJZY.Track.Domain.Dtos.TrackTemplate;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.ObjectMapping;
namespace SJZY.Track.Application.AutoMapper
{
@@ -22,7 +13,8 @@ namespace SJZY.Track.Application.AutoMapper
CreateMap(MemberList.None);
CreateMap(MemberList.None);
CreateMap(MemberList.None);
- CreateMap, UnifyPageResultDto>(MemberList.None);
+ CreateMap, UnifyPageResultDto>(
+ MemberList.None);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/AutoMapper/TrackFlagAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackFlagAutoMapperProfile.cs
index acc0102a..a08aa0a0 100644
--- a/src/SJZY.Track.Application/AutoMapper/TrackFlagAutoMapperProfile.cs
+++ b/src/SJZY.Track.Application/AutoMapper/TrackFlagAutoMapperProfile.cs
@@ -1,16 +1,7 @@
using AutoMapper;
-using AutoMapper.Internal.Mappers;
-using SJZY.Track.Application.Dtos.TrackFlags;
-using SJZY.Track.Application.Dtos.TrackStatus;
+using SJZY.Track.Application.Contract.Dtos.TrackFlags;
using SJZY.Track.Domain.Aggregates.TrackFlagAggregate;
using SJZY.Track.Domain.Dtos.TrackFlags;
-using SJZY.Track.Domain.Dtos.TrackStatus;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.ObjectMapping;
namespace SJZY.Track.Application.AutoMapper
{
@@ -18,10 +9,9 @@ namespace SJZY.Track.Application.AutoMapper
{
public TrackFlagAutoMapperProfile()
{
-
CreateMap(MemberList.None)
- .ForMember(dest => dest.Name, opt => opt.MapFrom(source => source.Flag))
- .ForMember(dest => dest.IsCompleted, opt => opt.MapFrom(source => source.IsFinish));
+ .ForMember(dest => dest.Name, opt => opt.MapFrom(source => source.Flag))
+ .ForMember(dest => dest.IsCompleted, opt => opt.MapFrom(source => source.IsFinish));
CreateMap(MemberList.None);
CreateMap(MemberList.None);
CreateMap, UnifyPageResultDto>(MemberList.None);
@@ -32,4 +22,4 @@ namespace SJZY.Track.Application.AutoMapper
// resultDto);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/AutoMapper/TrackPullAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackPullAutoMapperProfile.cs
index da6207a5..2af35a86 100644
--- a/src/SJZY.Track.Application/AutoMapper/TrackPullAutoMapperProfile.cs
+++ b/src/SJZY.Track.Application/AutoMapper/TrackPullAutoMapperProfile.cs
@@ -1,5 +1,5 @@
using AutoMapper;
-using SJZY.Track.Application.Dtos.TrackPull;
+using SJZY.Track.Application.Contract.Dtos.TrackPull;
using SJZY.Track.Domain.Aggregates.TrackPullAggregate;
using Volo.Abp.AutoMapper;
diff --git a/src/SJZY.Track.Application/AutoMapper/TrackStatusAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackStatusAutoMapperProfile.cs
index c66d09e7..49796f47 100644
--- a/src/SJZY.Track.Application/AutoMapper/TrackStatusAutoMapperProfile.cs
+++ b/src/SJZY.Track.Application/AutoMapper/TrackStatusAutoMapperProfile.cs
@@ -1,15 +1,7 @@
using AutoMapper;
-using AutoMapper.Internal.Mappers;
-using SJZY.Track.Application.Dtos.Demo;
-using SJZY.Track.Application.Dtos.TrackStatus;
+using SJZY.Track.Application.Contract.Dtos.TrackStatus;
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
using SJZY.Track.Domain.Dtos.TrackStatus;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp.ObjectMapping;
namespace SJZY.Track.Application.AutoMapper
{
@@ -18,14 +10,15 @@ namespace SJZY.Track.Application.AutoMapper
public TrackStatusAutoMapperProfile()
{
CreateMap(MemberList.None)
- //层级不一致的场景
- .ForMember(dest => dest.Status, opt => opt.MapFrom(source => source.TrackStatus))
- .ForMember(dest => dest.EnStatus, opt => opt.MapFrom(source => source.EntrackStatus))
- .ForMember(dest => dest.Node, opt => opt.MapFrom(source => source.NodeId));
+ //层级不一致的场景
+ .ForMember(dest => dest.Status, opt => opt.MapFrom(source => source.TrackStatus))
+ .ForMember(dest => dest.EnStatus, opt => opt.MapFrom(source => source.EntrackStatus))
+ .ForMember(dest => dest.Node, opt => opt.MapFrom(source => source.NodeId));
CreateMap(MemberList.None);
CreateMap(MemberList.None);
CreateMap(MemberList.None);
- CreateMap, UnifyPageResultDto>(MemberList.None);
+ CreateMap, UnifyPageResultDto>(MemberList
+ .None);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/AutoMapper/TrackTemplateAutoMapperProfile.cs b/src/SJZY.Track.Application/AutoMapper/TrackTemplateAutoMapperProfile.cs
index cec240ac..36f0e498 100644
--- a/src/SJZY.Track.Application/AutoMapper/TrackTemplateAutoMapperProfile.cs
+++ b/src/SJZY.Track.Application/AutoMapper/TrackTemplateAutoMapperProfile.cs
@@ -1,9 +1,7 @@
using AutoMapper;
-using AutoMapper.Internal.Mappers;
-using SJZY.Track.Application.Dtos.TrackTemplates;
+using SJZY.Track.Application.Contract.Dtos.TrackTemplates;
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
using SJZY.Track.Domain.Dtos.TrackTemplate;
-using Volo.Abp.ObjectMapping;
namespace SJZY.Track.Application.AutoMapper;
@@ -19,6 +17,7 @@ public class TrackTemplateAutoMapperProfile : Profile
CreateMap(MemberList.None);
CreateMap(MemberList.None);
CreateMap(MemberList.None);
- CreateMap, UnifyPageResultDto>(MemberList.None);
+ CreateMap, UnifyPageResultDto>(MemberList
+ .None);
}
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/Demo/ComplexAutomapperDemoInput.cs b/src/SJZY.Track.Application/Dtos/Demo/ComplexAutomapperDemoInput.cs
deleted file mode 100644
index de4bc495..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/ComplexAutomapperDemoInput.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- ///
- /// automapper 复杂转换样例
- ///
- public class ComplexAutomapperDemoInput
- {
- ///
- /// 编号
- ///
- public int Id { get; set; }
-
- ///
- /// 操作类型
- ///
- public OptionType OptionType { get; set; }
-
- ///
- /// 描述
- ///
- public string Description { get; set; }
-
- ///
- /// 性别
- ///
- public Gender Gender { get; set; }
-
- ///
- /// 用户信息
- ///
- public UserInfoInput UserInfo { get; set; }
-
- ///
- /// 用户角色
- ///
- public List UserRoleInputList { get; set; }
-
- ///
- /// 拓展演示,目前大家共同约定,暂时不使用充血模型
- ///
- ///
- public string GetAddress()
- {
- return "辽宁省沈阳市...";
- }
-
- }
-
- public class ComplexAutomapperDemoOutput
- {
- ///
- /// 编号
- ///
- public int Id { get; set; }
-
- ///
- /// 性别
- ///
- public string Gender { get; set; }
-
- ///
- /// 描述
- ///
- public string Description { get; set; }
-
- ///
- /// 年龄
- ///
- public int Age { get; set; }
-
- ///
- /// qq号码
- ///
- public string QQ { get; set; }
-
- ///
- /// 地址
- ///
- public string Address { get; set; }
-
- ///
- /// 角色编号
- ///
- public int[] RoleIds { get; set; }
- }
-
-
-
-}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/Demo/DemoDetailInput.cs b/src/SJZY.Track.Application/Dtos/Demo/DemoDetailInput.cs
deleted file mode 100644
index 30da5896..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/DemoDetailInput.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class DemoDetailSaveInput
- {
- ///
- ///
- ///
- public int Id { get; set; }
-
- ///
- /// 姓名
- ///
- public string Name { get; set; }
-
- ///
- /// 年龄
- ///
- public int Age { get; set; }
-
- ///
- /// 描述
- ///
- public string Description { get; set; }
-
- ///
- /// 详情合集
- ///
- public List DemoDetailList { get; set; }
- }
-
- public class DemoDetailInput
- {
- ///
- /// Id
- ///
- public int Id { get; set; }
-
- ///
- /// t_demo.id
- ///
- public int DemoId { get; set; }
-
- ///
- /// 一些说明..
- ///
- public string OtherInfo { get; set; }
- }
-}
diff --git a/src/SJZY.Track.Application/Dtos/Demo/DemoInput.cs b/src/SJZY.Track.Application/Dtos/Demo/DemoInput.cs
deleted file mode 100644
index 1b46a3e1..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/DemoInput.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class DemoInput
- {
- ///
- /// 操作类型
- ///
- public OptionType Option { get; set; }
-
- ///
- ///
- ///
- public int Id { get; set; }
-
- ///
- /// 姓名
- ///
- public string Name { get; set; }
-
- ///
- /// 年龄
- ///
- public int Age { get; set; }
-
- ///
- /// 描述
- ///
- public string Description { get; set; }
-
- //以下两个属性用来说明类型转换
-
- ///
- /// 创建人id
- ///
- public string CreateUserId { get; set; }
-
- ///
- /// 创建时间
- ///
- public string CreateTime { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/Demo/ExcelImportOuput.cs b/src/SJZY.Track.Application/Dtos/Demo/ExcelImportOuput.cs
deleted file mode 100644
index 46ef9d04..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/ExcelImportOuput.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class ExcelImportOuput
- {
- [MiniExcelLibs.Attributes.ExcelColumnName("姓名")]
- public string Name { get; set; }
-
- [MiniExcelLibs.Attributes.ExcelColumnName("年龄")]
- public int Age { get; set; }
- }
-}
diff --git a/src/SJZY.Track.Application/Dtos/Demo/GetDemoListByPageInput.cs b/src/SJZY.Track.Application/Dtos/Demo/GetDemoListByPageInput.cs
deleted file mode 100644
index 55d86e2c..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/GetDemoListByPageInput.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class GetDemoListByPageInput : PageInfoInput
- {
- ///
- /// 姓名
- ///
- public string Name { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/Demo/GetDemoListByPageOutput.cs b/src/SJZY.Track.Application/Dtos/Demo/GetDemoListByPageOutput.cs
deleted file mode 100644
index 3c5bd96d..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/GetDemoListByPageOutput.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class GetDemoListByPageOutput
- {
- ///
- ///
- ///
- public int Id { get; set; }
-
- ///
- /// 姓名
- ///
- public string Name { get; set; }
-
- ///
- /// 年龄
- ///
- public int Age { get; set; }
-
- ///
- /// 描述
- ///
- public string Description { get; set; }
-
- public DateTime CreateTime { get; set; }
- }
-}
diff --git a/src/SJZY.Track.Application/Dtos/Demo/MyCustomerResultOutput.cs b/src/SJZY.Track.Application/Dtos/Demo/MyCustomerResultOutput.cs
deleted file mode 100644
index 8d6896ac..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/MyCustomerResultOutput.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class MyCustomerResultOutput
- {
- public string Code { get; set; }
-
- public string Message { get; set; }
- }
-}
diff --git a/src/SJZY.Track.Application/Dtos/Demo/OssUploadOutput.cs b/src/SJZY.Track.Application/Dtos/Demo/OssUploadOutput.cs
deleted file mode 100644
index 367d2c54..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/OssUploadOutput.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class OssUploadOutput
- {
- ///
- /// 文件key
- ///
- public string Key { get; set; }
-
- ///
- /// 文件路径
- ///
- public string Url { get; set; }
- }
-}
diff --git a/src/SJZY.Track.Application/Dtos/Demo/SwaggerDemoInput.cs b/src/SJZY.Track.Application/Dtos/Demo/SwaggerDemoInput.cs
deleted file mode 100644
index f521c50e..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/SwaggerDemoInput.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System.ComponentModel;
-using System.Text.Json.Serialization;
-
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class SwaggerDemoInput
- {
- ///
- /// 年龄
- ///
- /// 18 这里可以写一些初始值
- public int Age { get; set; }
-
- ///
- /// 姓名
- ///
- public string Name { get; set; }
-
- ///
- /// 性别(枚举的展示样例)
- ///
- public Gender Gender { get; set; }
-
- ///
- /// 隐藏属性
- ///
- [JsonIgnore]
- public int MyProperty { get; set; }
- }
-
- public enum Gender
- {
- [Description("纯爷们")]
- 男 = 2,
-
- [Description("大姑娘")]
- 女 = 5,
-
- [Description("你憋问")]
- 未知 = 8
- }
-}
diff --git a/src/SJZY.Track.Application/Dtos/Demo/ValidateExecuteInput.cs b/src/SJZY.Track.Application/Dtos/Demo/ValidateExecuteInput.cs
deleted file mode 100644
index f1c3fc45..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/ValidateExecuteInput.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class ValidateExecuteInput
- {
- ///
- /// 操作类型
- ///
- public OptionType Option { get; set; }
-
- ///
- /// 主键编号
- ///
- public int Id { get; set; }
-
- ///
- /// 雪花ID
- ///
- public long SnowId { get; set; }
-
- ///
- /// 登录账号
- ///
- public string LoginName { get; set; }
-
- ///
- /// 登录密码
- ///
- public string? PassWord { get; set; }
-
- ///
- /// 登录密码确认
- ///
- public string PassWordAgain { get; set; }
-
- ///
- /// 最大金额额度
- ///
- public decimal TotalQuota { get; set; }
-
- ///
- /// 最大数量
- ///
- public int MaxCount { get; set; }
-
- ///
- /// 最小数量
- ///
- public int MiniCount { get; set; }
-
- ///
- /// 用户信息
- ///
- public UserInfoInput UserInfoInput { get; set; }
-
- ///
- /// 用户角色
- ///
- public List UserRoleInputList { get; set; }
-
- }
-
- public class UserInfoInput
- {
- ///
- /// 生日
- ///
- public DateTime BirthDay { get; set; }
-
- ///
- /// qq号码
- ///
- public string QQ { get; set; }
-
- ///
- /// 电子邮箱
- ///
- public string Email { get; set; }
-
- ///
- /// 用户姓名
- ///
- public string UserName { get; set; }
- }
-
-
- public class UserRoleInput
- {
- ///
- /// 角色编号
- ///
- public int Id { get; set; }
-
- ///
- /// 角色名称
- ///
- public string Name { get; set; }
- }
-}
diff --git a/src/SJZY.Track.Application/Dtos/Demo/ValidateExecuteOutput.cs b/src/SJZY.Track.Application/Dtos/Demo/ValidateExecuteOutput.cs
deleted file mode 100644
index 13cede57..00000000
--- a/src/SJZY.Track.Application/Dtos/Demo/ValidateExecuteOutput.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace SJZY.Track.Application.Dtos.Demo
-{
- public class ValidateExecuteOutput
- {
- }
-}
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/DeleteOrderInput.cs b/src/SJZY.Track.Application/Dtos/ProvideServices/DeleteOrderInput.cs
deleted file mode 100644
index c4fba2a8..00000000
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/DeleteOrderInput.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace SJZY.Track.Application.Dtos.ProvideServices;
-
-public class DeleteOrderInput : OrderNoInfo
-{
-}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Dtos/ProvideServices/GetPageTrackOrderInput.cs b/src/SJZY.Track.Application/Dtos/ProvideServices/GetPageTrackOrderInput.cs
deleted file mode 100644
index 06335e34..00000000
--- a/src/SJZY.Track.Application/Dtos/ProvideServices/GetPageTrackOrderInput.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Dtos.ProvideServices
-{
- public class GetPageTrackOrderInput : PageInfoInput
- {
- ///
- /// 子系统id
- ///
- public int SubSystemId { get; set; }
-
- ///
- /// 单号
- ///
- public List? OrderNos { get; set; }
-
- ///
- /// 创建时间开始
- ///
- public DateTime? CreateTimeStart { get; set; }
-
- ///
- /// 创建时间截止
- ///
- public DateTime? CreateTimeEnd { get; set; }
- }
-
- ///
- /// 轨迹订单Dto
- ///
- public class TrackOrderDto
- {
- ///
- /// 轨迹订单id
- ///
- public int Id { get; set; }
-
- ///
- /// 订单类型id
- ///
- public int OrderType { get; set; }
-
- ///
- /// 订单号
- ///
- public string? OrderNumber { get; set; }
-
- ///
- /// 轨迹模版
- ///
- public string? TrackTemplateNames { get; set; }
-
- ///
- /// 客户简称
- ///
- public string? CustomerShortName { get; set; }
-
- ///
- /// 客户代码
- ///
- public string? CustomerCode { get; set; }
-
- ///
- /// 订单明细(json)
- ///
- public string? OrderDetails { get; set; }
-
- ///
- /// 最新轨迹内容
- ///
- public string? NewestTrackContent { get; set; }
-
- ///
- /// 最新轨迹内容英文
- ///
- public string? NewestTrackEnContent { get; set; }
-
- ///
- /// 最新轨迹发生地
- ///
- public string? NewestTrackPlace { get; set; }
-
- ///
- /// 是否完结
- ///
- public bool IsFinish { get; set; }
-
- ///
- /// 创建时间
- ///
- public DateTime? CreateTime { get; set; }
-
- ///
- /// 子系统
- ///
- public string SubSystem { get; set; }
- }
-}
diff --git a/src/SJZY.Track.Application/GlobalUsing.cs b/src/SJZY.Track.Application/GlobalUsing.cs
index e21f1746..e4968bf8 100644
--- a/src/SJZY.Track.Application/GlobalUsing.cs
+++ b/src/SJZY.Track.Application/GlobalUsing.cs
@@ -5,3 +5,4 @@ global using SJZY.Expand.ABP.Core.Common.Dto;
global using Volo.Abp;
global using Volo.Abp.Application.Services;
global using Volo.Abp.Validation;
+global using SJZY.Track.Domain;
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/GlobalUsings.cs b/src/SJZY.Track.Application/GlobalUsings.cs
deleted file mode 100644
index 63eef9f8..00000000
--- a/src/SJZY.Track.Application/GlobalUsings.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-// Global using directives
-
-global using SJZY.Track.Domain;
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/SJZY.Track.Application.csproj b/src/SJZY.Track.Application/SJZY.Track.Application.csproj
index 43edd929..fa25c565 100644
--- a/src/SJZY.Track.Application/SJZY.Track.Application.csproj
+++ b/src/SJZY.Track.Application/SJZY.Track.Application.csproj
@@ -1,30 +1,21 @@
-
-
-
- net7.0
- True
-
+
-
-
-
-
-
-
-
-
+
+ net7.0
+ True
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/src/SJZY.Track.Application/Services/Demo/InterFaceDemoService.cs b/src/SJZY.Track.Application/Services/Demo/InterFaceDemoService.cs
deleted file mode 100644
index 6402f596..00000000
--- a/src/SJZY.Track.Application/Services/Demo/InterFaceDemoService.cs
+++ /dev/null
@@ -1,251 +0,0 @@
-using SJZY.Expand.ABP.Core.Common;
-using SJZY.Track.Application.Dtos.Demo;
-using SJZY.Track.Domain.Aggregates.DemoAggregate;
-using SJZY.Track.Domain.Dtos.Demo;
-
-namespace SJZY.Track.Application.Services.Demo;
-
-///
-/// 接口请求完整样例
-///
-[ApiExplorerSettings(GroupName = "Demo")]
-public class InterFaceDemoService : ApplicationService
-{
- #region 构造函数
-
- private readonly IDemoRepository _demoRepository;
-
- public InterFaceDemoService(IDemoRepository demoRepository)
- {
- _demoRepository = demoRepository;
- }
-
- #endregion
-
- #region 增删改
-
- ///
- /// 增删改
- ///
- ///
- ///
- [HttpPost("InterFace/Edit")]
- public async Task Edit(DemoInput input)
- {
- var res = new LongIdBaseDto();
-
- if (input.Option == OptionType.新增)
- {
- var entity = ObjectMapper.Map(input);
- res.Id = await _demoRepository.InsertReturnIdentityAsync(entity);
- }
- else if (input.Option == OptionType.修改 || input.Option == OptionType.删除)
- {
- var demoInfo = await _demoRepository.GetById1(input.Id);
- if (demoInfo == null)
- {
- //校验数据是否存在...
- throw new BusinessException(message: "未找到指定编号下的数据");
- }
-
- res.Id = demoInfo.Id;
- if (input.Option == OptionType.删除)
- {
- //await _demoRepository.DeleteAsync(demoInfo); //真删除
-
- //软删除
- demoInfo.IsDeleted = true;
- await _demoRepository.UpdateAsync(demoInfo);
- }
- else
- {
- var entity = ObjectMapper.Map(input, demoInfo);
- await _demoRepository.UpdateAsync(entity);
- }
- }
-
- return res;
- }
-
- #endregion
-
- #region 局部更新最佳实践
-
- ///
- /// 局部更新最佳实践
- ///
- ///
- ///
- ///
- [HttpPost("InterFace/UpdatePartColumns")]
- public async Task UpdatePartColumns(DemoInput input)
- {
- var demoInfo = await _demoRepository.GetById1(input.Id);
- if (demoInfo == null)
- {
- //校验数据是否存在...
- throw new BusinessException(message: "未找到指定编号下的数据");
- }
-
- //更新同时忽略某几项参数
- await _demoRepository.UpdatePartColumns(demoInfo);
-
- return new IdBaseDto() { Id = input.Id };
- }
-
- #endregion
-
- #region 分页查询接口
-
- ///
- /// 分页查询
- ///
- ///
- ///
- [HttpPost("InterFace/GetListByPage")]
- public async Task> GetListByPage(GetDemoListByPageInput input)
- {
- //分页时返回值统一用 PageResultDto<> 类型
- var list = await _demoRepository.GetListByPage(input.PageSize, input.PageIndex, input.Name);
-
- var res = ObjectMapper.Map, UnifyPageResultDto>(list);
-
- return res;
- }
-
- #endregion
-
- #region 入参转换
-
- ///
- /// 入参转换
- ///
- ///
- ///
- [HttpPost("InterFace/InputToValueObject")]
- public async Task> InputToValueObject(GetDemoListByPageInput input)
- {
- var obj = ObjectMapper.Map(input);
- var list = await _demoRepository.InputToValueObject(obj);
-
- var res = ObjectMapper.Map, List>(list);
- return res;
- }
-
- #endregion
-
- #region 原生sql
-
- ///
- /// 原生sql
- ///
- ///
- ///
- [HttpPost("InterFace/OriginalSql")]
- public async Task> OriginalSql(DemoValueObject obj)
- {
- var list = await _demoRepository.OriginalSql(obj);
- return list;
- }
-
- #endregion
-
- #region 自定义返回结果格式
-
- ///
- /// 自定义返回结果格式
- ///
- ///
- ///
- [HttpPost("Demo/CustomerResult")]
- [CustomerResult]
- public async Task GetListAsync()
- {
- /*
- 说明:
- 理论上我们有全公司级别的返回值约定,不管是前端调后端,还是后端微服务间的调用,都应完全遵循该规范。
- 但不排除有些特殊情况下,必须要返回自定义格式的场景。
- */
-
- var res = new MyCustomerResultOutput();
- res.Code = "200";
- res.Message = "这是一个自定义返回结果";
-
- return res;
- }
-
- #endregion
-
- #region 约定类型下返回null
-
- ///
- /// 约定类型下返回null
- ///
- ///
- ///
- [HttpPost("Demo/ReturnNull")]
- public async Task ReturnNull()
- {
- MyCustomerResultOutput res = null;
- return res;
- }
-
- #endregion
-
- #region
-
- ///
- /// 没有返回值
- ///
- ///
- ///
- [HttpPost("Demo/WithoutReturnObject")]
- public async Task WithoutReturnObject()
- {
- return null;
- }
-
- #endregion
-
- #region 主从关系实体存储
-
- ///
- /// 主从关系实体存储
- ///
- ///
- ///
- [HttpPost("InterFace/EntityRelationSave")]
- public async Task EntityRelationSave(DemoDetailSaveInput input)
- {
- var obj = ObjectMapper.Map(input);
- var res = await _demoRepository.EntityRelationSave(obj);
-
- return new UnifyResultDto(res);
- }
-
- #endregion
-
- #region 数据缓存
-
- ///
- /// 数据缓存
- ///
- ///
- ///
- [HttpPost("InterFace/GetDataCache")]
- public async Task GetDataCache(IdBaseDto input)
- {
- var res = await _demoRepository.GetDataCache(input.Id);
- return res;
- }
-
- #endregion
-
- //[HttpPost("InterFace/AAAA")]
- //public async Task AAAA()
- //{
- // var result = await _httpClientProxy.Service.GetSystemTokenAsync("Track");
-
- // return result;
- //}
-}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Services/ProvideServices/OrderLinkService.cs b/src/SJZY.Track.Application/Services/ProvideServices/OrderLinkService.cs
index e21ca538..f0261697 100644
--- a/src/SJZY.Track.Application/Services/ProvideServices/OrderLinkService.cs
+++ b/src/SJZY.Track.Application/Services/ProvideServices/OrderLinkService.cs
@@ -1,4 +1,4 @@
-using SJZY.Track.Application.Dtos.ProvideServices;
+using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Domain.Aggregates.OrderAggregate;
using SJZY.Track.Domain.Queries;
diff --git a/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs b/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs
index 8b6b8e19..38eb9466 100644
--- a/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs
+++ b/src/SJZY.Track.Application/Services/ProvideServices/OrderService.cs
@@ -1,5 +1,4 @@
-using SJZY.Expand.ABP.Core.Common.Dto;
-using SJZY.Track.Application.Dtos.ProvideServices;
+using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Domain.Aggregates.OrderAggregate;
using SJZY.Track.Domain.Dtos.Order;
@@ -93,7 +92,8 @@ public class OrderService : ApplicationService
{
var vo = ObjectMapper.Map(input);
var pageList = await _orderRepository.GetPageTrackOrder(vo);
- var pageResultDto = ObjectMapper.Map, UnifyPageResultDto>(pageList);
+ var pageResultDto =
+ ObjectMapper.Map, UnifyPageResultDto>(pageList);
return pageResultDto;
}
diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackCustomer.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackCustomer.cs
new file mode 100644
index 00000000..d4c57f4c
--- /dev/null
+++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackCustomer.cs
@@ -0,0 +1,9 @@
+using DotNetCore.CAP;
+using Volo.Abp.DependencyInjection;
+
+namespace SJZY.Track.Application.Services.ProvideServices;
+
+public class TrackCustomer : ITransientDependency, ICapSubscribe
+{
+ public const string CapSubscribe = "SJZY.FMC.VoucherRedundantCalc";
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackQueryService.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackQueryService.cs
index 587c316b..79f0cb2e 100644
--- a/src/SJZY.Track.Application/Services/ProvideServices/TrackQueryService.cs
+++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackQueryService.cs
@@ -1,4 +1,4 @@
-using SJZY.Track.Application.Dtos.ProvideServices;
+using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate;
using SJZY.Track.Domain.Queries;
diff --git a/src/SJZY.Track.Application/Services/ProvideServices/TrackService.cs b/src/SJZY.Track.Application/Services/ProvideServices/TrackService.cs
index 5147ae93..a6a5f932 100644
--- a/src/SJZY.Track.Application/Services/ProvideServices/TrackService.cs
+++ b/src/SJZY.Track.Application/Services/ProvideServices/TrackService.cs
@@ -1,4 +1,5 @@
-using SJZY.Track.Application.Dtos.ProvideServices;
+using DotNetCore.CAP;
+using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Domain.Aggregates.OrderAggregate;
using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate;
using SJZY.Track.Domain.Queries;
@@ -15,13 +16,15 @@ public class TrackService : ApplicationService
private readonly IOrderRepository _orderRepository;
private readonly ITrackDetailsRepository _trackDetailsRepository;
private readonly ITrackQueries _trackQueries;
+ private readonly ICapPublisher _capPublisher;
public TrackService(ITrackQueries trackQueries, IOrderRepository orderRepository,
- ITrackDetailsRepository trackDetailsRepository)
+ ITrackDetailsRepository trackDetailsRepository, ICapPublisher capPublisher)
{
_trackQueries = trackQueries;
_orderRepository = orderRepository;
_trackDetailsRepository = trackDetailsRepository;
+ _capPublisher = capPublisher;
}
///
diff --git a/src/SJZY.Track.Application/Services/TrackContents/ITrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/ITrackContentService.cs
deleted file mode 100644
index 8747af44..00000000
--- a/src/SJZY.Track.Application/Services/TrackContents/ITrackContentService.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-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
index 3245d2ce..c7493cec 100644
--- a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
+++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs
@@ -1,16 +1,8 @@
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.Extensions.Localization;
-using SJZY.Track.Application.Dtos.TrackContents;
-using SJZY.Track.Application.Dtos.TrackStatus;
+using Microsoft.Extensions.Localization;
+using SJZY.Track.Application.Contract.Dtos.TrackContents;
using SJZY.Track.Application.Localization;
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;
-using System.Text;
-using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace SJZY.Track.Application.Services.TrackContents
@@ -28,10 +20,10 @@ namespace SJZY.Track.Application.Services.TrackContents
public TrackContentService(
IStringLocalizer stringLocalizer,
ITrackContentRepository trackContentRepository
- )
+ )
{
- this._stringLocalizer=stringLocalizer;
- this._trackContentRepository=trackContentRepository;
+ this._stringLocalizer = stringLocalizer;
+ this._trackContentRepository = trackContentRepository;
}
///
@@ -74,7 +66,8 @@ namespace SJZY.Track.Application.Services.TrackContents
///
///
[HttpPost("GetList")]
- public async Task> GetPageTrackContent(GetPageTrackContentInput input)
+ public async Task> GetPageTrackContent(
+ GetPageTrackContentInput input)
{
var vo = ObjectMapper.Map(input);
var resultDto = await _trackContentRepository.GetPageTrackContent(vo);
@@ -86,15 +79,19 @@ namespace SJZY.Track.Application.Services.TrackContents
}
#region 私有方法
+
private async Task AddAsync(EditTrackContentInput input)
{
#region 业务逻辑校验
- var trackContentEntity = await _trackContentRepository.GetFirstAsync(a => a.SubSystemId==input.SubSystemId&&(a.Code==input.Code ||
- a.Content==input.Content || a.EnContent==input.EnContent));
+
+ var trackContentEntity = await _trackContentRepository.GetFirstAsync(a =>
+ a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
+ a.Content == input.Content || a.EnContent == input.EnContent));
if (trackContentEntity != null)
{
throw new BusinessException(message: _stringLocalizer["TrackContentExist"]);
}
+
#endregion
var entity = ObjectMapper.Map(input);
@@ -106,12 +103,15 @@ namespace SJZY.Track.Application.Services.TrackContents
private async Task UpdateAsync(EditTrackContentInput input)
{
#region 业务逻辑校验
- var trackContentEntity = await _trackContentRepository.GetFirstAsync(a => a.Id!=input.Id && a.SubSystemId==input.SubSystemId && (a.Code==input.Code ||
- a.Content==input.Content || a.EnContent==input.EnContent));
+
+ var trackContentEntity = await _trackContentRepository.GetFirstAsync(a => a.Id != input.Id &&
+ a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
+ a.Content == input.Content || a.EnContent == input.EnContent));
if (trackContentEntity != null)
{
throw new BusinessException(message: _stringLocalizer["TrackContentExist"]);
}
+
#endregion
var templateEntity = await _trackContentRepository.GetFirstAsync(a => a.Id == input.Id);
@@ -127,6 +127,7 @@ namespace SJZY.Track.Application.Services.TrackContents
return new UnifyResultDto("200", "删除成功", isTrue);
}
+
#endregion
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Services/TrackFlags/ITrackFlagService.cs b/src/SJZY.Track.Application/Services/TrackFlags/ITrackFlagService.cs
deleted file mode 100644
index 1e745341..00000000
--- a/src/SJZY.Track.Application/Services/TrackFlags/ITrackFlagService.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SJZY.Track.Application.Services.TrackFlags
-{
- public interface ITrackFlagService
- {
- }
-}
diff --git a/src/SJZY.Track.Application/Services/TrackFlags/TrackFlagService.cs b/src/SJZY.Track.Application/Services/TrackFlags/TrackFlagService.cs
index 112345e2..a6117f0d 100644
--- a/src/SJZY.Track.Application/Services/TrackFlags/TrackFlagService.cs
+++ b/src/SJZY.Track.Application/Services/TrackFlags/TrackFlagService.cs
@@ -1,16 +1,8 @@
using Microsoft.Extensions.Localization;
-using SJZY.Track.Application.Dtos.TrackFlags;
-using SJZY.Track.Application.Dtos.TrackStatus;
+using SJZY.Track.Application.Contract.Dtos.TrackFlags;
using SJZY.Track.Application.Localization;
using SJZY.Track.Domain.Aggregates.TrackFlagAggregate;
-using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
using SJZY.Track.Domain.Dtos.TrackFlags;
-using SJZY.Track.Domain.Dtos.TrackStatus;
-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.TrackFlags
@@ -28,10 +20,10 @@ namespace SJZY.Track.Application.Services.TrackFlags
public TrackFlagService(
IStringLocalizer stringLocalizer,
ITrackFlagRepository trackFlagRepository
- )
+ )
{
- this._stringLocalizer=stringLocalizer;
- this._trackFlagRepository=trackFlagRepository;
+ this._stringLocalizer = stringLocalizer;
+ this._trackFlagRepository = trackFlagRepository;
}
///
@@ -86,14 +78,18 @@ namespace SJZY.Track.Application.Services.TrackFlags
}
#region 私有方法
+
private async Task AddAsync(EditTrackFlagInput input)
{
#region 业务校验
- var trackStatusEntity = await _trackFlagRepository.GetFirstAsync(a => a.SubSystemId==input.SubSystemId&& (a.Code==input.Code || a.Name==input.Flag));
- if (trackStatusEntity!=null)
+
+ var trackStatusEntity = await _trackFlagRepository.GetFirstAsync(a =>
+ a.SubSystemId == input.SubSystemId && (a.Code == input.Code || a.Name == input.Flag));
+ if (trackStatusEntity != null)
{
throw new BusinessException(message: _stringLocalizer["TrackFlagExist"]);
}
+
#endregion
var entity = ObjectMapper.Map(input);
@@ -105,12 +101,15 @@ namespace SJZY.Track.Application.Services.TrackFlags
private async Task UpdateAsync(EditTrackFlagInput input)
{
#region 业务校验
- var trackStatusEntity = await _trackFlagRepository.GetFirstAsync(a => a.Id !=input.Id && a.SubSystemId==input.SubSystemId&& (a.Code==input.Code ||
- a.Name ==input.Flag));
- if (trackStatusEntity!=null)
+
+ var trackStatusEntity = await _trackFlagRepository.GetFirstAsync(a => a.Id != input.Id &&
+ a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
+ a.Name == input.Flag));
+ if (trackStatusEntity != null)
{
throw new BusinessException(message: _stringLocalizer["TrackFlagExist"]);
}
+
#endregion
var templateEntity = await _trackFlagRepository.GetFirstAsync(a => a.Id == input.Id);
@@ -126,6 +125,7 @@ namespace SJZY.Track.Application.Services.TrackFlags
return new UnifyResultDto("200", "删除成功", isTrue);
}
+
#endregion
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs b/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs
index fcd56e92..4210a46c 100644
--- a/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs
+++ b/src/SJZY.Track.Application/Services/TrackPull/TrackPullService.cs
@@ -1,13 +1,13 @@
-using Microsoft.Extensions.Localization;
+using System.Linq.Expressions;
+using Microsoft.Extensions.Localization;
using SJZY.Expand.ABP.Core.Localization;
using SJZY.Expand.ABP.Core.PublicMethords;
-using SJZY.Track.Application.Dtos.TrackPull;
+using SJZY.Track.Application.Contract.Dtos.TrackPull;
using SJZY.Track.Application.Localization;
using SJZY.Track.Domain.Aggregates.TrackPullAggregate;
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
using SJZY.Track.Domain.Dtos.Common;
using SJZY.Track.Domain.Dtos.TrackPull;
-using System.Linq.Expressions;
using Volo.Abp.DependencyInjection;
namespace SJZY.Track.Application.Services.TrackPull;
@@ -50,7 +50,8 @@ public class TrackPullService : ApplicationService, ITransientDependency
///
///
[HttpPost("GetContentPage")]
- public async Task> GetContentPageAsync([FromBody] GetTrackPullContentPageInputVO input)
+ public async Task> GetContentPageAsync(
+ [FromBody] GetTrackPullContentPageInputVO input)
{
return await _trackPullConfigRepository.GetContentPageAsync(input);
}
@@ -88,7 +89,8 @@ public class TrackPullService : ApplicationService, ITransientDependency
if (input.Options != OptionTypeNoNull.删除)
{
Expression> isAnyExp = x =>
- x.SubSystemId == input.SubSystemId && x.TrackTemplateId == input.TrackTemplateId && x.ServiceProviderId == input.ServiceProviderId;
+ x.SubSystemId == input.SubSystemId && x.TrackTemplateId == input.TrackTemplateId &&
+ x.ServiceProviderId == input.ServiceProviderId;
if (input.Options == OptionTypeNoNull.修改) isAnyExp.And(x => x.Id != input.Id);
if (await _trackPullConfigRepository.IsAnyAsync(isAnyExp))
@@ -98,86 +100,96 @@ public class TrackPullService : ApplicationService, ITransientDependency
switch (input.Options)
{
case OptionTypeNoNull.新增:
+ {
+ var trackPullEntity = ObjectMapper.Map(input);
+ var trackPullParamsEntity =
+ ObjectMapper.Map(input);
+
+ var trackTemplateContentEntities =
+ await _trackTemplateRepository.GetContentListAsync(x => x.TrackTemplateId == input.TrackTemplateId);
+
+ var trackPullContentEntities = new List();
+
+ using (var ts = TransactionScopeHelper.Create())
{
- var trackPullEntity = ObjectMapper.Map(input);
- var trackPullParamsEntity = ObjectMapper.Map(input);
+ int id = await _trackPullConfigRepository.InsertReturnIdentityAsync(trackPullEntity);
- var trackTemplateContentEntities = await _trackTemplateRepository.GetContentListAsync(x => x.TrackTemplateId == input.TrackTemplateId);
+ trackPullParamsEntity.PullOrPushConfigId = id;
+ await _trackPullConfigRepository.InsertParamsAsync(trackPullParamsEntity);
- var trackPullContentEntities = new List();
-
- using (var ts = TransactionScopeHelper.Create())
+ foreach (var item in trackTemplateContentEntities)
{
- int id = await _trackPullConfigRepository.InsertReturnIdentityAsync(trackPullEntity);
-
- trackPullParamsEntity.PullOrPushConfigId = id;
- await _trackPullConfigRepository.InsertParamsAsync(trackPullParamsEntity);
-
- foreach (var item in trackTemplateContentEntities)
+ trackPullContentEntities.Add(new()
{
- trackPullContentEntities.Add(new()
- {
- TrackPullConfigId = id,
- TrackContentId = item.TrackContentId
- });
- }
- await _trackPullConfigRepository.InsertContentRangeAsync(trackPullContentEntities);
-
- ts.Complete();
+ TrackPullConfigId = id,
+ TrackContentId = item.TrackContentId
+ });
}
+
+ await _trackPullConfigRepository.InsertContentRangeAsync(trackPullContentEntities);
+
+ ts.Complete();
}
+ }
break;
case OptionTypeNoNull.修改:
+ {
+ var oldTrackPullEntity = await _trackPullConfigRepository.GetFirstAsync(x => x.Id == input.Id) ??
+ throw new BusinessException(message: _stringLocalizer["NotFindData"]);
+
+ var oldTrackPullParamsEntity =
+ await _trackPullConfigRepository.GetParamsSingleAsync(x =>
+ x.PullOrPushConfigId == input.Id && !x.IsPush);
+
+ var trackPullContentEntities = new List();
+
+ if (oldTrackPullEntity.TrackTemplateId != input.TrackTemplateId)
{
- var oldTrackPullEntity = await _trackPullConfigRepository.GetFirstAsync(x => x.Id == input.Id) ?? throw new BusinessException(message: _stringLocalizer["NotFindData"]);
+ var trackTemplateContentEntities =
+ await _trackTemplateRepository.GetContentListAsync(x =>
+ x.TrackTemplateId == input.TrackTemplateId);
- var oldTrackPullParamsEntity = await _trackPullConfigRepository.GetParamsSingleAsync(x => x.PullOrPushConfigId == input.Id && !x.IsPush);
+ foreach (var item in trackTemplateContentEntities)
+ {
+ trackPullContentEntities.Add(new()
+ {
+ TrackPullConfigId = oldTrackPullEntity.Id,
+ TrackContentId = item.TrackContentId
+ });
+ }
+ }
- var trackPullContentEntities = new List();
+ ObjectMapper.Map(input, oldTrackPullEntity);
+ ObjectMapper.Map(input, oldTrackPullParamsEntity);
+
+ using (var ts = TransactionScopeHelper.Create())
+ {
+ await _trackPullConfigRepository.UpdateAsync(oldTrackPullEntity);
+ await _trackPullConfigRepository.UpdateParamsAsync(oldTrackPullParamsEntity);
if (oldTrackPullEntity.TrackTemplateId != input.TrackTemplateId)
{
- var trackTemplateContentEntities = await _trackTemplateRepository.GetContentListAsync(x => x.TrackTemplateId == input.TrackTemplateId);
-
- foreach (var item in trackTemplateContentEntities)
- {
- trackPullContentEntities.Add(new()
- {
- TrackPullConfigId = oldTrackPullEntity.Id,
- TrackContentId = item.TrackContentId
- });
- }
+ await _trackPullConfigRepository.SoftDeleteContentAsync(x => x.TrackPullConfigId == input.Id);
+ await _trackPullConfigRepository.InsertContentRangeAsync(trackPullContentEntities);
}
- ObjectMapper.Map(input, oldTrackPullEntity);
- ObjectMapper.Map(input, oldTrackPullParamsEntity);
-
- using (var ts = TransactionScopeHelper.Create())
- {
- await _trackPullConfigRepository.UpdateAsync(oldTrackPullEntity);
- await _trackPullConfigRepository.UpdateParamsAsync(oldTrackPullParamsEntity);
-
- if (oldTrackPullEntity.TrackTemplateId != input.TrackTemplateId)
- {
- await _trackPullConfigRepository.SoftDeleteContentAsync(x => x.TrackPullConfigId == input.Id);
- await _trackPullConfigRepository.InsertContentRangeAsync(trackPullContentEntities);
- }
-
- ts.Complete();
- }
+ ts.Complete();
}
+ }
break;
case OptionTypeNoNull.删除:
using (var ts = TransactionScopeHelper.Create())
{
await _trackPullConfigRepository.SoftDeleteAsync(x => x.Id == input.Id);
- await _trackPullConfigRepository.SoftDeleteParamsAsync(x => x.PullOrPushConfigId == input.Id && !x.IsPush);
+ await _trackPullConfigRepository.SoftDeleteParamsAsync(x =>
+ x.PullOrPushConfigId == input.Id && !x.IsPush);
await _trackPullConfigRepository.SoftDeleteContentAsync(x => x.TrackPullConfigId == input.Id);
ts.Complete();
}
+
break;
default:
@@ -196,7 +208,8 @@ public class TrackPullService : ApplicationService, ITransientDependency
[HttpPost("UpdateContent")]
public async Task UpdateContentAsync([FromBody] UpdateTrackPullContentInput input)
{
- var oldTrackPullContentEntity = await _trackPullConfigRepository.GetContentByIdAsync(input.Id) ?? throw new BusinessException(message: _stringLocalizer["NotFindData"]);
+ var oldTrackPullContentEntity = await _trackPullConfigRepository.GetContentByIdAsync(input.Id) ??
+ throw new BusinessException(message: _stringLocalizer["NotFindData"]);
ObjectMapper.Map(input, oldTrackPullContentEntity);
diff --git a/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs b/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs
index b04e1194..f303cc4c 100644
--- a/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs
+++ b/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs
@@ -35,4 +35,26 @@ public class TrackPushService : ApplicationService, ITransientDependency
{
return await _trackPushConfigRepository.GetPageAsync(input);
}
+
+ ///
+ /// 轨迹推送配置内容列表
+ ///
+ ///
+ ///
+ [HttpPost("GetContentPage")]
+ public async Task> GetContentPageAsync([FromBody] GetTrackPushContentPageInputVO input)
+ {
+ return await _trackPushConfigRepository.GetContentPageAsync(input);
+ }
+
+ ///
+ /// 轨迹推送配置详情
+ ///
+ ///
+ ///
+ [HttpGet("GetDetail")]
+ public async Task GetDetailAsync(int id)
+ {
+ return await _trackPushConfigRepository.GetDetailAsync(id);
+ }
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Services/TrackStatus/ITrackStatusService.cs b/src/SJZY.Track.Application/Services/TrackStatus/ITrackStatusService.cs
deleted file mode 100644
index eef632b7..00000000
--- a/src/SJZY.Track.Application/Services/TrackStatus/ITrackStatusService.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-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
- {
- }
-}
diff --git a/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs b/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs
index bd58470f..f7ba0720 100644
--- a/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs
+++ b/src/SJZY.Track.Application/Services/TrackStatus/TrackStatusService.cs
@@ -1,6 +1,5 @@
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.Extensions.Localization;
-using SJZY.Track.Application.Dtos.TrackStatus;
+using Microsoft.Extensions.Localization;
+using SJZY.Track.Application.Contract.Dtos.TrackStatus;
using SJZY.Track.Application.Localization;
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
using SJZY.Track.Domain.Dtos.TrackStatus;
@@ -23,7 +22,7 @@ public class TrackStatusService : ApplicationService, ITransientDependency
ITrackStatusRepository trackStatusRepository
)
{
- this._stringLocalizer=stringLocalizer;
+ this._stringLocalizer = stringLocalizer;
this._trackStatusRepository = trackStatusRepository;
}
@@ -79,15 +78,19 @@ public class TrackStatusService : ApplicationService, ITransientDependency
}
#region 私有方法
+
private async Task AddAsync(EditTrackStatusInput input)
{
#region 业务校验
- var trackStatusEntity = await _trackStatusRepository.GetFirstAsync(a => a.SubSystemId==input.SubSystemId&& (a.Code==input.Code ||
- a.Status==input.TrackStatus || a.EnStatus==input.EntrackStatus));
- if (trackStatusEntity!=null)
+
+ var trackStatusEntity = await _trackStatusRepository.GetFirstAsync(a => a.SubSystemId == input.SubSystemId &&
+ (a.Code == input.Code ||
+ a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus));
+ if (trackStatusEntity != null)
{
throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
}
+
#endregion
var entity = ObjectMapper.Map(input);
@@ -99,12 +102,15 @@ public class TrackStatusService : ApplicationService, ITransientDependency
private async Task UpdateAsync(EditTrackStatusInput input)
{
#region 业务校验
- var trackStatusEntity = await _trackStatusRepository.GetFirstAsync(a => a.Id !=input.Id && a.SubSystemId==input.SubSystemId&& (a.Code==input.Code ||
- a.Status==input.TrackStatus || a.EnStatus==input.EntrackStatus));
- if (trackStatusEntity!=null)
+
+ var trackStatusEntity = await _trackStatusRepository.GetFirstAsync(a => a.Id != input.Id &&
+ a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
+ a.Status == input.TrackStatus || a.EnStatus == input.EntrackStatus));
+ if (trackStatusEntity != null)
{
throw new BusinessException(message: _stringLocalizer["TrackStatusExist"]);
}
+
#endregion
var templateEntity = await _trackStatusRepository.GetFirstAsync(a => a.Id == input.Id);
@@ -120,5 +126,6 @@ public class TrackStatusService : ApplicationService, ITransientDependency
return new UnifyResultDto("200", "删除成功", isTrue);
}
+
#endregion
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Services/TrackTemplates/TrackTemplateService.cs b/src/SJZY.Track.Application/Services/TrackTemplates/TrackTemplateService.cs
index e77a574d..5afc3992 100644
--- a/src/SJZY.Track.Application/Services/TrackTemplates/TrackTemplateService.cs
+++ b/src/SJZY.Track.Application/Services/TrackTemplates/TrackTemplateService.cs
@@ -1,8 +1,7 @@
using System.Linq.Expressions;
-using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Localization;
using SJZY.Expand.ABP.Core.Localization;
-using SJZY.Track.Application.Dtos.TrackTemplates;
+using SJZY.Track.Application.Contract.Dtos.TrackTemplates;
using SJZY.Track.Application.Localization;
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
using SJZY.Track.Domain.Dtos.TrackTemplate;
@@ -85,12 +84,16 @@ public class TrackTemplateService : ApplicationService, ITransientDependency
private async Task AddAsync(EditTrackTemplateInput input)
{
#region 业务校验
+
//校验模版代码唯一性
- var templateEntity = await _trackTemplateRepository.GetFirstAsync(a => a.SubSystemId == input.SubSystemId &&a.Code==input.Code);
+ var templateEntity =
+ await _trackTemplateRepository.GetFirstAsync(
+ a => a.SubSystemId == input.SubSystemId && a.Code == input.Code);
if (templateEntity != null)
{
throw new BusinessException(message: _stringLocalizer["TemplateExist"]);
}
+
#endregion
var entity = ObjectMapper.Map(input);
@@ -102,11 +105,14 @@ public class TrackTemplateService : ApplicationService, ITransientDependency
private async Task UpdateAsync(EditTrackTemplateInput input)
{
#region 业务校验
- var isExist = await _trackTemplateRepository.GetFirstAsync(a => a.Id!=input.Id && a.SubSystemId == input.SubSystemId &&a.Code==input.Code);
+
+ var isExist = await _trackTemplateRepository.GetFirstAsync(a =>
+ a.Id != input.Id && a.SubSystemId == input.SubSystemId && a.Code == input.Code);
if (isExist != null)
{
throw new BusinessException(message: _stringLocalizer["TemplateExist"]);
}
+
#endregion
var templateEntity = await _trackTemplateRepository.GetFirstAsync(a => a.Id == input.Id);
@@ -119,8 +125,11 @@ public class TrackTemplateService : ApplicationService, ITransientDependency
private async Task DeleteAsync(EditTrackTemplateInput input)
{
#region 业务校验
+
//到时候,得判断这个模版有没有在轨迹映射里面被使用过,如果被使用就抛出提示
+
#endregion
+
var isTrue = await _trackTemplateRepository.SoftDeleteAsync(x => x.Id == input.Id);
return new UnifyResultDto("200", "删除成功", isTrue);
diff --git a/src/SJZY.Track.Application/ApplicationModule.cs b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
similarity index 83%
rename from src/SJZY.Track.Application/ApplicationModule.cs
rename to src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
index 94127ff2..97b9337f 100644
--- a/src/SJZY.Track.Application/ApplicationModule.cs
+++ b/src/SJZY.Track.Application/SjzyTrackApplicationModule.cs
@@ -1,4 +1,5 @@
using SJZY.Expand.ABP.Core.Localization;
+using SJZY.Track.Application.Contract;
using SJZY.Track.Application.Localization;
using SJZY.UserCenter.Contracts;
using SJZY.UserCenter.SharedModel;
@@ -19,25 +20,26 @@ namespace SJZY.Track.Application
typeof(AbpLocalizationModule),
typeof(AbpVirtualFileSystemModule),
typeof(AbpHttpClientModule),
- typeof(SJZYTrackDomainModule),
- typeof(SjzyUserCenterHttpApiModule)
+ typeof(SjzyUserCenterHttpApiModule),
+ typeof(SjzyTrackDomainModule),
+ typeof(SjzyTrackApplicationContractModule)
)]
- public class ApplicationModule : AbpModule
+ public class SjzyTrackApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
- Configure(options => { options.AddMaps(true); });
+ Configure(options => { options.AddMaps(true); });
Configure(options =>
{
- options.ConventionalControllers.Create(typeof(ApplicationModule).Assembly); //创建动态api
+ options.ConventionalControllers.Create(typeof(SjzyTrackApplicationModule).Assembly); //创建动态api
});
//添加虚拟文件系统
Configure(options =>
{
- options.FileSets.AddEmbedded("SJZY.Track.Application");
+ options.FileSets.AddEmbedded("SJZY.Track.Application");
});
//添加多语言
diff --git a/src/SJZY.Track.Application/Validations/Demo/SimpleValidateInputValidation.cs b/src/SJZY.Track.Application/Validations/Demo/SimpleValidateInputValidation.cs
deleted file mode 100644
index db26be85..00000000
--- a/src/SJZY.Track.Application/Validations/Demo/SimpleValidateInputValidation.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using FluentValidation;
-using SJZY.Track.Application.Dtos.Demo;
-
-namespace SJZY.Track.Application.Validations.Demo
-{
-
- public class SimpleValidateInputValidation : AbstractValidator, IValidationEnabled
- {
- public SimpleValidateInputValidation()
- {
- /*
- 非空校验
- NotNull 和 NotEmpty 的区别?
- NotNull:请求中没找到指定参数
- NotEmpty:请求中没找到指定参数 或 参数值为初始值(0/"")
- 关于字符串的最佳实践:
- 参数定义成可空字符串 string?,校验规则只用isempty
-
- */
- RuleFor(x => x.PassWord).NotNull().WithMessage("操作密码为必填参数!").NotEmpty().WithMessage("操作密码不能为空!");
-
- //雪花id
- RuleFor(x => x.SnowId).NotNull().WithMessage("雪花ID为必填参数!").NotEmpty().WithMessage("雪花ID不能为空!");
-
- //枚举校验
- RuleFor(x => x.Option).IsInEnum().WithMessage("操作类型不在可选范围!");
-
- //字符串长度校验,长度不分中文、字符、数值
- RuleFor(x => x.LoginName).Length(6, 10).WithMessage("登录账号必须在6-10位之间!");
- RuleFor(x => x.LoginName).MaximumLength(10).WithMessage("登录账号不能超过10个字符!");
- RuleFor(x => x.LoginName).MinimumLength(6).WithMessage("登录账号不能小于6个字符!");
-
- //正则表达式
- RuleFor(x => x.PassWord).Matches("^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$\\%\\^\\&\\*\\(\\)])[0-9a-zA-Z!@#$\\%\\^\\&\\*\\(\\)]{6,10}")
- .WithMessage("密码必须同时包含数字、英文字母、特殊字符,且长度必须在6-10位之间");
-
- //自定义校验规则,注意这里的校验仅限于模型参数级的校验,更复杂的业务校验应在业务层完成
- RuleFor(x => x.PassWordAgain).Must((data, context) =>
- {
- return data.PassWord == data.PassWordAgain;
- }).WithMessage("两次输入密码不一致!");
-
- //数字类型校验
- RuleFor(x => x.MiniCount).LessThan(100).WithMessage("最小数量必须小于100");
- RuleFor(x => x.MiniCount).LessThanOrEqualTo(100).WithMessage("最小数量必须小于或等于100");
- RuleFor(x => x.MaxCount).GreaterThan(100).WithMessage("最大数量必须大于100");
- RuleFor(x => x.MaxCount).GreaterThanOrEqualTo(100).WithMessage("最大数量必须大于或等于100");
-
- //小数类型校验,10.56
- RuleFor(x => x.TotalQuota).ScalePrecision(2, 4, true).WithMessage("最大额度金额【整数位+小数位】不能超过4位,且小数位不能超过2位");
-
- //条件分支
- When(x => x.Option == OptionType.修改 || x.Option == OptionType.删除, () =>
- {
- RuleFor(x => x.Id).NotNull().WithMessage("修改或删除时Id为必填参数!").GreaterThan(0).WithMessage("修改或删除时Id必须大于0!");
- });
-
- //单个实体校验
- RuleFor(x => x.UserInfoInput).NotNull().WithMessage("用户信息为必填参数!").SetValidator(new UserInfoInputValidation());
-
- //集合校验
- RuleForEach(x => x.UserRoleInputList).SetValidator(new UserRoleInputValidation());
- }
-
- }
-
-
-}
diff --git a/src/SJZY.Track.Application/Validations/Demo/UserInfoInputValidation.cs b/src/SJZY.Track.Application/Validations/Demo/UserInfoInputValidation.cs
deleted file mode 100644
index b8e5268f..00000000
--- a/src/SJZY.Track.Application/Validations/Demo/UserInfoInputValidation.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using FluentValidation;
-using SJZY.Track.Application.Dtos.Demo;
-
-
-namespace SJZY.Track.Application.Validations.Demo
-{
- public class UserInfoInputValidation : AbstractValidator, IValidationEnabled
- {
- public UserInfoInputValidation()
- {
- RuleFor(x => x.QQ).NotNull().WithMessage("QQ号码不能为空");
- }
-
- }
-}
diff --git a/src/SJZY.Track.Application/Validations/Demo/UserRoleInputValidation.cs b/src/SJZY.Track.Application/Validations/Demo/UserRoleInputValidation.cs
deleted file mode 100644
index fa0307a2..00000000
--- a/src/SJZY.Track.Application/Validations/Demo/UserRoleInputValidation.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using FluentValidation;
-using SJZY.Track.Application.Dtos.Demo;
-
-namespace SJZY.Track.Application.Validations.Demo
-{
- public class UserRoleInputValidation : AbstractValidator, IValidationEnabled
- {
- public UserRoleInputValidation()
- {
- RuleFor(m => m.Id).GreaterThan(0).WithMessage("角色ID必须大于0!");
- }
- }
-}
diff --git a/src/SJZY.Track.Application/Validations/TrackContents/EditTrackContentInputValidation.cs b/src/SJZY.Track.Application/Validations/TrackContents/EditTrackContentInputValidation.cs
index 0faf7a0c..af97fc37 100644
--- a/src/SJZY.Track.Application/Validations/TrackContents/EditTrackContentInputValidation.cs
+++ b/src/SJZY.Track.Application/Validations/TrackContents/EditTrackContentInputValidation.cs
@@ -1,11 +1,5 @@
using FluentValidation;
-using SJZY.Track.Application.Dtos.TrackContents;
-using SJZY.Track.Application.Dtos.TrackTemplates;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using SJZY.Track.Application.Contract.Dtos.TrackContents;
namespace SJZY.Track.Application.Validations.TrackContents
{
@@ -14,15 +8,10 @@ namespace SJZY.Track.Application.Validations.TrackContents
public EditTrackContentInputValidation()
{
//条件分支
- When(x => x.Options == OptionType.修改 || x.Options == OptionType.删除, () =>
- {
- RuleFor(x => x.Id).GreaterThan(0).WithMessage("修改或删除时Id必须大于0!");
- });
+ When(x => x.Options == OptionType.修改 || x.Options == OptionType.删除,
+ () => { RuleFor(x => x.Id).GreaterThan(0).WithMessage("修改或删除时Id必须大于0!"); });
- When(x => x.Options == OptionType.新增, () =>
- {
- RuleFor(x => x.Id).Equal(0).WithMessage("新增时Id必须等于0!");
- });
+ When(x => x.Options == OptionType.新增, () => { RuleFor(x => x.Id).Equal(0).WithMessage("新增时Id必须等于0!"); });
When(x => x.Options == OptionType.修改 || x.Options == OptionType.新增, () =>
{
@@ -33,6 +22,5 @@ namespace SJZY.Track.Application.Validations.TrackContents
RuleFor(x => x.EnContent).NotNull().WithMessage("轨迹内容英文必填!").NotEmpty().WithMessage("轨迹内容英文不能为空!");
});
}
-
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Validations/TrackFlags/EditTrackFlagInputValidation.cs b/src/SJZY.Track.Application/Validations/TrackFlags/EditTrackFlagInputValidation.cs
index da5faec2..6a06da65 100644
--- a/src/SJZY.Track.Application/Validations/TrackFlags/EditTrackFlagInputValidation.cs
+++ b/src/SJZY.Track.Application/Validations/TrackFlags/EditTrackFlagInputValidation.cs
@@ -1,11 +1,5 @@
using FluentValidation;
-using SJZY.Track.Application.Dtos.TrackFlags;
-using SJZY.Track.Application.Dtos.TrackStatus;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using SJZY.Track.Application.Contract.Dtos.TrackFlags;
namespace SJZY.Track.Application.Validations.TrackFlags
{
@@ -14,15 +8,10 @@ namespace SJZY.Track.Application.Validations.TrackFlags
public EditTrackFlagInputValidation()
{
//条件分支
- When(x => x.Options == OptionType.修改 || x.Options == OptionType.删除, () =>
- {
- RuleFor(x => x.Id).GreaterThan(0).WithMessage("修改或删除时Id必须大于0!");
- });
+ When(x => x.Options == OptionType.修改 || x.Options == OptionType.删除,
+ () => { RuleFor(x => x.Id).GreaterThan(0).WithMessage("修改或删除时Id必须大于0!"); });
- When(x => x.Options == OptionType.新增, () =>
- {
- RuleFor(x => x.Id).Equal(0).WithMessage("新增时Id必须等于0!");
- });
+ When(x => x.Options == OptionType.新增, () => { RuleFor(x => x.Id).Equal(0).WithMessage("新增时Id必须等于0!"); });
When(x => x.Options == OptionType.修改 || x.Options == OptionType.新增, () =>
{
@@ -32,4 +21,4 @@ namespace SJZY.Track.Application.Validations.TrackFlags
});
}
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Validations/TrackStatus/EditTrackStatusInputValidation.cs b/src/SJZY.Track.Application/Validations/TrackStatus/EditTrackStatusInputValidation.cs
index beb1df54..e492a542 100644
--- a/src/SJZY.Track.Application/Validations/TrackStatus/EditTrackStatusInputValidation.cs
+++ b/src/SJZY.Track.Application/Validations/TrackStatus/EditTrackStatusInputValidation.cs
@@ -1,11 +1,5 @@
using FluentValidation;
-using SJZY.Track.Application.Dtos.TrackContents;
-using SJZY.Track.Application.Dtos.TrackStatus;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using SJZY.Track.Application.Contract.Dtos.TrackStatus;
namespace SJZY.Track.Application.Validations.TrackStatus
{
@@ -14,15 +8,10 @@ namespace SJZY.Track.Application.Validations.TrackStatus
public EditTrackStatusInputValidation()
{
//条件分支
- When(x => x.Options == OptionType.修改 || x.Options == OptionType.删除, () =>
- {
- RuleFor(x => x.Id).GreaterThan(0).WithMessage("修改或删除时Id必须大于0!");
- });
+ When(x => x.Options == OptionType.修改 || x.Options == OptionType.删除,
+ () => { RuleFor(x => x.Id).GreaterThan(0).WithMessage("修改或删除时Id必须大于0!"); });
- When(x => x.Options == OptionType.新增, () =>
- {
- RuleFor(x => x.Id).Equal(0).WithMessage("新增时Id必须等于0!");
- });
+ When(x => x.Options == OptionType.新增, () => { RuleFor(x => x.Id).Equal(0).WithMessage("新增时Id必须等于0!"); });
When(x => x.Options == OptionType.修改 || x.Options == OptionType.新增, () =>
{
@@ -34,4 +23,4 @@ namespace SJZY.Track.Application.Validations.TrackStatus
});
}
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Application/Validations/TrackTemplates/EditTrackTemplateInputValidation.cs b/src/SJZY.Track.Application/Validations/TrackTemplates/EditTrackTemplateInputValidation.cs
index 8768b688..aa4bdad8 100644
--- a/src/SJZY.Track.Application/Validations/TrackTemplates/EditTrackTemplateInputValidation.cs
+++ b/src/SJZY.Track.Application/Validations/TrackTemplates/EditTrackTemplateInputValidation.cs
@@ -1,5 +1,5 @@
using FluentValidation;
-using SJZY.Track.Application.Dtos.TrackTemplates;
+using SJZY.Track.Application.Contract.Dtos.TrackTemplates;
namespace SJZY.Track.Application.Validations.TrackTemplates
{
@@ -11,16 +11,10 @@ namespace SJZY.Track.Application.Validations.TrackTemplates
public EditTrackTemplateInputValidation()
{
//条件分支
- When(x => x.Options == OptionType.修改 || x.Options == OptionType.删除, () =>
- {
- RuleFor(x => x.Id).GreaterThan(0).WithMessage("修改或删除时Id必须大于0!");
- });
+ When(x => x.Options == OptionType.修改 || x.Options == OptionType.删除,
+ () => { RuleFor(x => x.Id).GreaterThan(0).WithMessage("修改或删除时Id必须大于0!"); });
- When(x => x.Options == OptionType.新增, () =>
- {
- RuleFor(x => x.Id).Equal(0).WithMessage("新增时Id必须等于0!");
-
- });
+ When(x => x.Options == OptionType.新增, () => { RuleFor(x => x.Id).Equal(0).WithMessage("新增时Id必须等于0!"); });
When(x => x.Options == OptionType.修改 || x.Options == OptionType.新增, () =>
{
@@ -30,4 +24,4 @@ namespace SJZY.Track.Application.Validations.TrackTemplates
});
}
}
-}
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs
index 82866c1f..9050f090 100644
--- a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs
+++ b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs
@@ -6,4 +6,8 @@ namespace SJZY.Track.Domain.Aggregates.TrackPushAggregate;
public interface ITrackPushConfigRepository : IBasicRepository
{
Task> GetPageAsync(KeywordsInputVO input);
+
+ Task> GetContentPageAsync(GetTrackPushContentPageInputVO input);
+
+ Task GetDetailAsync(int id);
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs b/src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs
index 9cf11c60..2e58c378 100644
--- a/src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs
+++ b/src/SJZY.Track.Domain/Dtos/Common/KeywordsInputVO.cs
@@ -10,7 +10,7 @@ public class KeywordsInputVO : PageInfoInput
///
/// 关键字
///
- public string Keywords { get; set; }
+ public string? Keywords { get; set; }
///
/// 选中项
diff --git a/src/SJZY.Track.Domain/Dtos/Order/GetPageTrackOrderInputVO.cs b/src/SJZY.Track.Domain/Dtos/Order/GetPageTrackOrderInputVO.cs
index c95fae3e..44027d12 100644
--- a/src/SJZY.Track.Domain/Dtos/Order/GetPageTrackOrderInputVO.cs
+++ b/src/SJZY.Track.Domain/Dtos/Order/GetPageTrackOrderInputVO.cs
@@ -16,7 +16,7 @@ namespace SJZY.Track.Domain.Dtos.Order
///
/// 单号
///
- public List OrderNos { get; set; }
+ public List? OrderNos { get; set; }
///
/// 创建时间开始
@@ -26,7 +26,7 @@ namespace SJZY.Track.Domain.Dtos.Order
///
/// 创建时间截止
///
- public DateTime? createTimeEnd { get; set; }
+ public DateTime? CreateTimeEnd { get; set; }
}
///
@@ -64,10 +64,10 @@ namespace SJZY.Track.Domain.Dtos.Order
///
public string? CustomerCode { get; set; }
- ///
- /// 订单明细(json)
- ///
- public string? OrderDetails { get; set; }
+ /////
+ ///// 订单明细(json)
+ /////
+ //public string? OrderDetails { get; set; }
///
/// 最新轨迹内容
diff --git a/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs
new file mode 100644
index 00000000..6e9cd961
--- /dev/null
+++ b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs
@@ -0,0 +1,98 @@
+using SJZY.Expand.ABP.Core.PublicMethords;
+
+namespace SJZY.Track.Domain.Dtos.TrackPush;
+
+public class GetTrackPushConfigDetailOutputVO
+{
+ ///
+ /// 客户id
+ ///
+ public int CustomId { get; set; }
+
+ ///
+ /// 客户
+ ///
+ public string CustomName { get; set; }
+
+ ///
+ /// 推送扩展字段
+ ///
+ public string ExpandFieldsName { get; set; }
+
+ public int Id { get; set; }
+
+ ///
+ /// 是否自动推送
+ ///
+ public bool IsAutoPush { get; set; }
+
+ ///
+ /// 推送轨迹订单号
+ ///
+ public string OrderNoName { get; set; }
+
+ ///
+ /// 服务商
+ ///
+ public string ServiceProvider { get; set; }
+
+ ///
+ /// 服务商id
+ ///
+ public int ServiceProviderId { get; set; }
+
+ ///
+ /// 子系统
+ ///
+ public string SubSystem { get; set; }
+
+ ///
+ /// 子系统id
+ ///
+ public int SubSystemId { get; set; }
+
+ ///
+ /// 推送轨迹时区
+ ///
+ public string TackTimeZoneName { get; set; }
+
+ ///
+ /// 推送轨迹内容代码
+ ///
+ public string TrackContentCodeName { get; set; }
+
+ ///
+ /// 推送轨迹内容
+ ///
+ public string TrackContentName { get; set; }
+
+ ///
+ /// 推送轨迹内容英文
+ ///
+ public string TrackEnContentName { get; set; }
+
+ ///
+ /// 推送轨迹发生地
+ ///
+ public string TrackPlaceName { get; set; }
+
+ ///
+ /// 推送轨迹状态
+ ///
+ public string TrackStatusName { get; set; }
+
+ ///
+ /// 轨迹模板
+ ///
+ public List TrackTemplate { get; set; }
+
+ ///
+ /// 轨迹模板id
+ ///
+ public int TrackTemplateId { get; set; }
+
+ ///
+ /// 推送轨迹发生时间
+ ///
+ public string TrackTimeName { get; set; }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushContentPageInputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushContentPageInputVO.cs
new file mode 100644
index 00000000..f0558e95
--- /dev/null
+++ b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushContentPageInputVO.cs
@@ -0,0 +1,9 @@
+namespace SJZY.Track.Domain.Dtos.TrackPush;
+
+public class GetTrackPushContentPageInputVO : PageInfoInput
+{
+ ///
+ /// 轨迹推送配置id
+ ///
+ public int TrackPushConfigId { get; set; }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushContentPageOutputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushContentPageOutputVO.cs
new file mode 100644
index 00000000..b3ae2d3f
--- /dev/null
+++ b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushContentPageOutputVO.cs
@@ -0,0 +1,56 @@
+namespace SJZY.Track.Domain.Dtos.TrackPush;
+
+public class GetTrackPushContentPageOutputVO
+{
+ ///
+ /// 轨迹内容代码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 轨迹内容
+ ///
+ public string Content { get; set; }
+
+ ///
+ /// 轨迹内容英文
+ ///
+ public string EnContent { get; set; }
+
+ ///
+ /// 推送扩展字段
+ ///
+ public string ExpandFieldsValue { get; set; }
+
+ public int Id { get; set; }
+
+ ///
+ /// 推送单号类型
+ ///
+ public string OrderNoType { get; set; }
+
+ ///
+ /// 推送排序
+ ///
+ public int Sort { get; set; }
+
+ ///
+ /// 推送轨迹内容代码
+ ///
+ public string TrackContentCodeValue { get; set; }
+
+ ///
+ /// 推送轨迹内容
+ ///
+ public string TrackContentValue { get; set; }
+
+ ///
+ /// 推送轨迹内容英文
+ ///
+ public string TrackEnContentValue { get; set; }
+
+ ///
+ /// 推送轨迹状态
+ ///
+ public string TrackStatusValue { get; set; }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Repository/Enum/Enums.cs b/src/SJZY.Track.Domain/Enums/EnumPropertyEnums.cs
similarity index 66%
rename from src/SJZY.Track.Repository/Enum/Enums.cs
rename to src/SJZY.Track.Domain/Enums/EnumPropertyEnums.cs
index f32f511c..e1c08aaf 100644
--- a/src/SJZY.Track.Repository/Enum/Enums.cs
+++ b/src/SJZY.Track.Domain/Enums/EnumPropertyEnums.cs
@@ -1,6 +1,6 @@
using System.ComponentModel;
-namespace SJZY.Track.Repository.Enum;
+namespace SJZY.Track.Domain.Enums;
///
/// 枚举属性
@@ -10,6 +10,5 @@ public enum EnumPropertyEnums
///
/// 节点
///
- [Description("ServiceNode")]
- 节点,
+ [Description("ServiceNode")] 节点,
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Domain/IBasicRepository.cs b/src/SJZY.Track.Domain/IBasicRepository.cs
index 71bc3175..3824c2eb 100644
--- a/src/SJZY.Track.Domain/IBasicRepository.cs
+++ b/src/SJZY.Track.Domain/IBasicRepository.cs
@@ -10,7 +10,7 @@ public interface IBasicRepository : IBasicQuery where T : IAggregateRoot
///
/// 要忽略更新的列
///
- Task UpdateAsync(T entity, Expression> ignoreColumns);
+ Task UpdateAsync(T entity, Expression>? ignoreColumns);
///
/// update
@@ -18,7 +18,7 @@ public interface IBasicRepository : IBasicQuery where T : IAggregateRoot
///
/// 要更新的列
///
- Task UpdateColumnAsync(T entity, Expression> updateColumns);
+ Task UpdateColumnAsync(T entity, Expression>? updateColumns);
///
/// update
@@ -35,7 +35,7 @@ public interface IBasicRepository : IBasicQuery where T : IAggregateRoot
///
/// 要更新的列
///
- Task UpdateRangeAsync(List entities, Expression> updateColumns = null);
+ Task UpdateRangeAsync(List entities, Expression>? updateColumns = null);
///
/// 软删
diff --git a/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj b/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
index 5ebeded5..b1f4dc63 100644
--- a/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
+++ b/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj
@@ -9,11 +9,6 @@
-
-
-
-
-
diff --git a/src/SJZY.Track.Domain/SJZYTrackDomainModule.cs b/src/SJZY.Track.Domain/SJZYTrackDomainModule.cs
index e9c743d8..792e7844 100644
--- a/src/SJZY.Track.Domain/SJZYTrackDomainModule.cs
+++ b/src/SJZY.Track.Domain/SJZYTrackDomainModule.cs
@@ -2,6 +2,6 @@
namespace SJZY.Track.Domain;
-public class SJZYTrackDomainModule : AbpModule
+public class SjzyTrackDomainModule : AbpModule
{
}
\ No newline at end of file
diff --git a/src/SJZY.Track.HttpApi/Dtos/RemoteDemoInput.cs b/src/SJZY.Track.HttpApi/Dtos/RemoteDemoInput.cs
deleted file mode 100644
index b010b6bd..00000000
--- a/src/SJZY.Track.HttpApi/Dtos/RemoteDemoInput.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace SJZY.Track.HttpApi.Dtos
-{
- public class RemoteDemoInput
- {
- ///
- /// 当前时间
- ///
- public DateTime CurrentTime { get; set; }
- }
-}
diff --git a/src/SJZY.Track.HttpApi/Dtos/RemoteDemoOutput.cs b/src/SJZY.Track.HttpApi/Dtos/RemoteDemoOutput.cs
deleted file mode 100644
index 44cd1f41..00000000
--- a/src/SJZY.Track.HttpApi/Dtos/RemoteDemoOutput.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace SJZY.Track.HttpApi.Dtos
-{
- public class RemoteDemoOutput
- {
- public string Context { get; set; }
- }
-}
diff --git a/src/SJZY.Track.HttpApi/Services/IRemoteDemoService.cs b/src/SJZY.Track.HttpApi/Services/IRemoteDemoService.cs
deleted file mode 100644
index 6ea693bf..00000000
--- a/src/SJZY.Track.HttpApi/Services/IRemoteDemoService.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using SJZY.Expand.ABP.Core.Common.Dto;
-using SJZY.Track.HttpApi.Dtos;
-using Volo.Abp;
-using Volo.Abp.DependencyInjection;
-
-namespace SJZY.Track.HttpApi.Services
-{
- ///
- /// 客户端连接测试接口
- ///
- public interface IRemoteDemoService : IRemoteService, IScopedDependency
- {
- Task> ConnectionTest(RemoteDemoInput input);
- }
-}
diff --git a/src/SJZY.Track.HttpApi/TrackHttpApiModule.cs b/src/SJZY.Track.HttpApi/TrackHttpApiModule.cs
deleted file mode 100644
index 522c4cf8..00000000
--- a/src/SJZY.Track.HttpApi/TrackHttpApiModule.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Volo.Abp.Modularity;
-
-namespace SJZY.Track.HttpApi
-{
- public class TrackHttpApiModule : AbpModule
- {
- public override void PreConfigureServices(ServiceConfigurationContext context)
- {
-
- }
- }
-}
\ No newline at end of file
diff --git a/src/SJZY.Track.Repository/DataBaseContext.cs b/src/SJZY.Track.Infrastructure/DataBaseContext.cs
similarity index 98%
rename from src/SJZY.Track.Repository/DataBaseContext.cs
rename to src/SJZY.Track.Infrastructure/DataBaseContext.cs
index 88539836..9fbb7d44 100644
--- a/src/SJZY.Track.Repository/DataBaseContext.cs
+++ b/src/SJZY.Track.Infrastructure/DataBaseContext.cs
@@ -2,7 +2,7 @@
#pragma warning disable 1591
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure;
///
/// Sqlsugar 上下文对象
diff --git a/src/SJZY.Track.Repository/GlobalUsing.cs b/src/SJZY.Track.Infrastructure/GlobalUsing.cs
similarity index 85%
rename from src/SJZY.Track.Repository/GlobalUsing.cs
rename to src/SJZY.Track.Infrastructure/GlobalUsing.cs
index dc581267..bb8c080a 100644
--- a/src/SJZY.Track.Repository/GlobalUsing.cs
+++ b/src/SJZY.Track.Infrastructure/GlobalUsing.cs
@@ -4,4 +4,4 @@ global using SJZY.Expand.ABP.Core.SqlSugar;
global using SJZY.Expand.ABP.Core.SqlSugar.Entitys;
global using SJZY.Expand.ABP.Core.SqlSugar.Tools;
global using SqlSugar;
-global using Volo.Abp.DependencyInjection;
+global using Volo.Abp.DependencyInjection;
\ No newline at end of file
diff --git a/src/SJZY.Track.Repository/BasicQuery.cs b/src/SJZY.Track.Infrastructure/Queries/BasicQuery.cs
similarity index 95%
rename from src/SJZY.Track.Repository/BasicQuery.cs
rename to src/SJZY.Track.Infrastructure/Queries/BasicQuery.cs
index 4d8e70d1..fbb511c7 100644
--- a/src/SJZY.Track.Repository/BasicQuery.cs
+++ b/src/SJZY.Track.Infrastructure/Queries/BasicQuery.cs
@@ -2,7 +2,7 @@
using SJZY.Track.Domain.Queries;
using SJZY.Track.Domain.SeedWork;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Queries;
#pragma warning disable CS8613
public class BasicQuery : SimpleClient, IBasicQuery where T : class, IEntity, new()
diff --git a/src/SJZY.Track.Repository/Queries/TrackQueries.cs b/src/SJZY.Track.Infrastructure/Queries/TrackQueries.cs
similarity index 98%
rename from src/SJZY.Track.Repository/Queries/TrackQueries.cs
rename to src/SJZY.Track.Infrastructure/Queries/TrackQueries.cs
index da7c4dab..413c38fe 100644
--- a/src/SJZY.Track.Repository/Queries/TrackQueries.cs
+++ b/src/SJZY.Track.Infrastructure/Queries/TrackQueries.cs
@@ -7,7 +7,7 @@ using SJZY.Track.Domain.Dtos.TrackDetails;
using SJZY.Track.Domain.Dtos.TrackTemplate;
using SJZY.Track.Domain.Queries;
-namespace SJZY.Track.Repository.Queries;
+namespace SJZY.Track.Infrastructure.Queries;
public class TrackQueries : ISugarRepository, ITrackQueries,
ITransientDependency
diff --git a/src/SJZY.Track.Repository/BasicRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/BasicRepository.cs
similarity index 89%
rename from src/SJZY.Track.Repository/BasicRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/BasicRepository.cs
index a4616860..7480b9f3 100644
--- a/src/SJZY.Track.Repository/BasicRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/BasicRepository.cs
@@ -1,9 +1,10 @@
using System.Linq.Expressions;
using SJZY.Track.Domain;
using SJZY.Track.Domain.SeedWork;
+using SJZY.Track.Infrastructure.Queries;
using Volo.Abp;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Repositories;
///
/// 仓储基类实现
@@ -11,14 +12,14 @@ namespace SJZY.Track.Repository;
///
public class BasicRepository : BasicQuery, IBasicRepository where T : class, IAggregateRoot, new()
{
- public async Task UpdateAsync(T entity, Expression> ignoreColumns)
+ public async Task UpdateAsync(T entity, Expression>? ignoreColumns)
{
return await Context.Updateable(entity)
.IgnoreColumnsIF(ignoreColumns != null, ignoreColumns)
.ExecuteCommandHasChangeAsync();
}
- public async Task UpdateColumnAsync(T entity, Expression> updateColumns)
+ public async Task UpdateColumnAsync(T entity, Expression>? updateColumns)
{
return await Context.Updateable(entity)
.UpdateColumnsIF(updateColumns != null, updateColumns)
@@ -32,22 +33,20 @@ public class BasicRepository : BasicQuery, IBasicRepository where T : c
.ExecuteCommandHasChangeAsync();
}
- public async Task UpdateRangeAsync(List entities, Expression> columns = null)
+ public async Task UpdateRangeAsync(List entities, Expression>? columns = null)
{
return await Context.Updateable(entities)
.UpdateColumnsIF(columns != null, columns)
.ExecuteCommandHasChangeAsync();
}
+ // tips: required where
public async Task SoftDeleteAsync(Expression> where)
{
if (!typeof(T).IsAssignableTo())
throw new BusinessException(
message: $"实体没有实现{nameof(ISoftDeleteBasicEntity)}不能调用{nameof(SoftDeleteAsync)}");
- // tips: required where
- if (where == default) return false;
-
return await Context.Updateable()
.Where(where)
.SetColumns(nameof(ISoftDeleteBasicEntity.IsDeleted), 1)
diff --git a/src/SJZY.Track.Repository/DemoRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/DemoRepository.cs
similarity index 99%
rename from src/SJZY.Track.Repository/DemoRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/DemoRepository.cs
index 18a8d5da..9acceca7 100644
--- a/src/SJZY.Track.Repository/DemoRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/DemoRepository.cs
@@ -2,7 +2,7 @@
using SJZY.Track.Domain.Aggregates.DemoAggregate;
using SJZY.Track.Domain.Dtos.Demo;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Repositories;
public class DemoRepository : BasicRepository, IDemoRepository, IScopedDependency
{
diff --git a/src/SJZY.Track.Repository/OrderRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/OrderRepository.cs
similarity index 67%
rename from src/SJZY.Track.Repository/OrderRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/OrderRepository.cs
index 1d7ebfa2..2771e10c 100644
--- a/src/SJZY.Track.Repository/OrderRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/OrderRepository.cs
@@ -6,7 +6,7 @@ using SJZY.Track.Domain.Dtos.Order;
using SJZY.Track.Domain.VEntities;
using SJZY.Track.Repository.VData.Entitys;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Repositories;
public class OrderRepository : BasicRepository, IOrderRepository, ITransientDependency
{
@@ -88,6 +88,11 @@ public class OrderRepository : BasicRepository, IOrderRepository, I
var pageList = await Context.Queryable()
.LeftJoin((a, b) => a.CustomId==b.Id)
.LeftJoin((a, b, c) => a.SubSystemId==c.Id)
+ .WhereIF(input.SubSystemId > 0, (a, b, c) => a.SubSystemId == input.SubSystemId)
+ .WhereIF(!input.OrderNos.IsNullOrEmpty(), (a, b, c) => input.OrderNos.Contains(a.OrderNo))
+ .WhereIF(input.CreateTimeStart.HasValue&& input.CreateTimeEnd.HasValue, (a, b, c) => a.CreateTime>= input.CreateTimeStart && a.CreateTime<= input.CreateTimeEnd)
+ .WhereIF(input.CreateTimeStart.HasValue&& (!input.CreateTimeEnd.HasValue), (a, b, c) => a.CreateTime>= input.CreateTimeStart)
+ .WhereIF((!input.CreateTimeStart.HasValue)&& input.CreateTimeEnd.HasValue, (a, b, c) => a.CreateTime<= input.CreateTimeEnd)
.Select((a, b, c) => new TrackOrderVO
{
Id = a.Id,
@@ -95,8 +100,8 @@ public class OrderRepository : BasicRepository, IOrderRepository, I
OrderType = a.OrderType,
CustomerShortName= b.Abbreviation,
CustomerCode= b.Code,
- TrackTemplateNames = "",
- OrderDetails="",
+ TrackTemplateNames = SqlFunc.Subqueryable().LeftJoin((aa, bb) => aa.TrackTemplateId==bb.Id)
+ .Where((aa, bb) => a.Id==aa.OrderId).SelectStringJoin((aa, bb) => bb.Name, ","),
NewestTrackContent= a.LatestTrackContent,
NewestTrackEnContent= a.LatestTrackEnContent,
NewestTrackPlace= a.LatestTrackPlace,
@@ -105,26 +110,26 @@ public class OrderRepository : BasicRepository, IOrderRepository, I
SubSystem= c.CnName
})
.ToPagedListAsync(input.PageIndex, input.PageSize);
-
- if (pageList.List.Any())
- {
- var orderIds = pageList.List.Select(a => a.Id);
- //查询轨迹模版
+ #region 暂时注释
+ //if (pageList.List.Any())
+ //{
+ // var orderIds = pageList.List.Select(a => a.Id);
+ // //查询轨迹模版
- var trackTemplateList = await Context.Queryable()
- .LeftJoin((a, b) => a.TrackTemplateId==b.Id)
- .Where((a, b) => orderIds.Contains(a.OrderId))
- .Select((a, b) => new { OrderId = a.OrderId, Name = b.Name })
- .ToListAsync();
-
- pageList.List.ForEach(a =>
- {
- var templateListOfOrderId = trackTemplateList.Where(b => b.OrderId== a.Id);
- a.TrackTemplateNames = templateListOfOrderId.Select(c => c.Name).JoinAsString(",");
- });
- }
+ // var trackTemplateList = await Context.Queryable()
+ // .LeftJoin((a, b) => a.TrackTemplateId==b.Id)
+ // .Where((a, b) => orderIds.Contains(a.OrderId))
+ // .Select((a, b) => new { OrderId = a.OrderId, Name = b.Name })
+ // .ToListAsync();
+ // pageList.List.ForEach(a =>
+ // {
+ // var templateListOfOrderId = trackTemplateList.Where(b => b.OrderId== a.Id);
+ // a.TrackTemplateNames = templateListOfOrderId.Select(c => c.Name).JoinAsString(",");
+ // });
+ //}
+ #endregion
return pageList;
}
diff --git a/src/SJZY.Track.Repository/TrackContentRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/TrackContentRepository.cs
similarity index 97%
rename from src/SJZY.Track.Repository/TrackContentRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/TrackContentRepository.cs
index 896d02d4..eac2265f 100644
--- a/src/SJZY.Track.Repository/TrackContentRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/TrackContentRepository.cs
@@ -2,10 +2,9 @@
using SJZY.Track.Domain.Aggregates.TrackFlagAggregate;
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;
+namespace SJZY.Track.Infrastructure.Repositories;
public class TrackContentRepository : BasicRepository, ITrackContentRepository, IScopedDependency
{
diff --git a/src/SJZY.Track.Repository/TrackDetailsRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/TrackDetailsRepository.cs
similarity index 98%
rename from src/SJZY.Track.Repository/TrackDetailsRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/TrackDetailsRepository.cs
index ef51db46..2737c39d 100644
--- a/src/SJZY.Track.Repository/TrackDetailsRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/TrackDetailsRepository.cs
@@ -3,7 +3,7 @@ using SJZY.Expand.ElasticSearch.Services;
using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate;
using SJZY.Track.Domain.Dtos.TrackDetails;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Repositories;
internal class TrackDetailsRepository : ElasticSearchContextAbstract, ITrackDetailsRepository,
ITransientDependency
diff --git a/src/SJZY.Track.Repository/TrackFlagRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/TrackFlagRepository.cs
similarity index 94%
rename from src/SJZY.Track.Repository/TrackFlagRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/TrackFlagRepository.cs
index 508d80ef..12c29447 100644
--- a/src/SJZY.Track.Repository/TrackFlagRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/TrackFlagRepository.cs
@@ -1,10 +1,8 @@
using SJZY.Track.Domain.Aggregates.TrackFlagAggregate;
-using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
using SJZY.Track.Domain.Dtos.TrackFlags;
-using SJZY.Track.Domain.Dtos.TrackStatus;
using SJZY.Track.Domain.VEntities;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Repositories;
public class TrackFlagRepository : BasicRepository, ITrackFlagRepository, IScopedDependency
{
diff --git a/src/SJZY.Track.Repository/TrackPullConfigRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/TrackPullConfigRepository.cs
similarity index 97%
rename from src/SJZY.Track.Repository/TrackPullConfigRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/TrackPullConfigRepository.cs
index dbcb40be..796e6778 100644
--- a/src/SJZY.Track.Repository/TrackPullConfigRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/TrackPullConfigRepository.cs
@@ -1,12 +1,12 @@
-using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
+using System.Linq.Expressions;
+using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
using SJZY.Track.Domain.Aggregates.TrackPullAggregate;
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
using SJZY.Track.Domain.Dtos.Common;
using SJZY.Track.Domain.Dtos.TrackPull;
using SJZY.Track.Domain.VEntities;
-using System.Linq.Expressions;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Repositories;
public class TrackPullConfigRepository : BasicRepository, ITrackPullConfigRepository,
IScopedDependency
diff --git a/src/SJZY.Track.Infrastructure/Repositories/TrackPushConfigRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/TrackPushConfigRepository.cs
new file mode 100644
index 00000000..d5180da1
--- /dev/null
+++ b/src/SJZY.Track.Infrastructure/Repositories/TrackPushConfigRepository.cs
@@ -0,0 +1,72 @@
+using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
+using SJZY.Track.Domain.Aggregates.TrackPullAggregate;
+using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
+using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
+using SJZY.Track.Domain.Dtos.Common;
+using SJZY.Track.Domain.Dtos.TrackPush;
+using SJZY.Track.Domain.VEntities;
+using SJZY.Track.Repository.VData.Entitys;
+
+namespace SJZY.Track.Infrastructure.Repositories;
+
+public class TrackPushConfigRepository : BasicRepository, ITrackPushConfigRepository,
+ IScopedDependency
+{
+ public async Task> GetPageAsync(KeywordsInputVO input)
+ {
+ return await AsQueryable()
+ .LeftJoin((trackPush, system) => trackPush.SubSystemId == system.Id && !system.IsDeleted)
+ .LeftJoin((trackPush, system, externalSubject) => trackPush.CustomId == externalSubject.Id && !externalSubject.IsDeleted)
+ .LeftJoin((trackPush, system, externalSubject, template) => SqlFunc.SplitIn(trackPush.TrackTemplateId, template.Id.ToString()) && !template.IsDeleted)
+ .Filter(null, true)
+ .Where(trackPush => !trackPush.IsDeleted)
+ .WhereIF(input.SubSystemId.HasValue, trackPush => trackPush.SubSystemId == input.SubSystemId)
+ .WhereIF(!input.Keywords.IsNullOrWhiteSpace(), (trackPush, system, externalSubject, template) => externalSubject.Abbreviation.Contains(input.Keywords) || externalSubject.Name.Contains(input.Keywords) || template.Name.Contains(input.Keywords))
+ .OrderByDescending(trackPush => trackPush.CreateTime)
+ .Select((trackPush, system, externalSubject, template) => new GetTrackPushConfigPageOutputVO
+ {
+ Id = trackPush.Id,
+ SubSystem = system.CnName,
+ CustomName = externalSubject.Abbreviation,
+ TrackTemplate = SqlFunc.Subqueryable()
+ .Where(template => SqlFunc.SplitIn(trackPush.TrackTemplateId, template.Id.ToString()) && !template.IsDeleted)
+ .SelectStringJoin(template => template.Name, ","),
+ CreateTime = trackPush.CreateTime
+ })
+ .Distinct()
+ .ToPagedListAsync(input.PageIndex, input.PageSize);
+ }
+
+ public async Task> GetContentPageAsync(GetTrackPushContentPageInputVO input)
+ {
+ return await Context.Queryable()
+ .InnerJoin((pushContent, trackContent) => pushContent.TrackContentId == trackContent.Id)
+ .Where(pushContent => pushContent.TrackPushConfigId == input.TrackPushConfigId)
+ .OrderBy((pushContent, trackContent) => pushContent.Sort)
+ .Select((pushContent, trackContent) => new GetTrackPushContentPageOutputVO
+ {
+ Id = pushContent.Id,
+ Sort = pushContent.Sort
+ }, true)
+ .ToPagedListAsync(input.PageIndex, input.PageSize);
+ }
+
+ public async Task GetDetailAsync(int id)
+ {
+ return await AsQueryable()
+ .LeftJoin((trackPush, system) => trackPush.SubSystemId == system.Id && !system.IsDeleted)
+ .LeftJoin((trackPush, system, externalSubject) => trackPush.CustomId == externalSubject.Id && !externalSubject.IsDeleted)
+ .LeftJoin((trackPush, system, externalSubject, service) => trackPush.ServiceProviderId == service.Id && !service.IsDeleted)
+ .InnerJoin((trackPush, system, externalSubject, service, paramsConfig) => trackPush.Id == paramsConfig.PullOrPushConfigId && paramsConfig.IsPush && !paramsConfig.IsDeleted)
+ .Filter(null, true)
+ .Where(trackPush => trackPush.Id == id && !trackPush.IsDeleted)
+ .Select((trackPush, system, externalSubject, service, paramsConfig) => new GetTrackPushConfigDetailOutputVO
+ {
+ Id = trackPush.Id,
+ SubSystem = system.CnName,
+ CustomName = externalSubject.Abbreviation,
+ ServiceProvider = service.Name,
+ }, true)
+ .SingleAsync();
+ }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Repository/TrackStatusRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/TrackStatusRepository.cs
similarity index 83%
rename from src/SJZY.Track.Repository/TrackStatusRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/TrackStatusRepository.cs
index 9e88da35..6ac36ade 100644
--- a/src/SJZY.Track.Repository/TrackStatusRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/TrackStatusRepository.cs
@@ -2,14 +2,10 @@ using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
using SJZY.Track.Domain.Dtos.TrackStatus;
using SJZY.Track.Domain.VEntities;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Repositories;
public class TrackStatusRepository : BasicRepository, ITrackStatusRepository, IScopedDependency
{
- public TrackStatusRepository()
- {
- }
-
///
/// 获取轨迹状态明细
///
@@ -35,14 +31,13 @@ public class TrackStatusRepository : BasicRepository, ITrackS
}
///
- /// 分页获取轨迹模版
+ /// 分页获取轨迹状态
///
///
///
public async Task> GetPageTrackStatus(GetPageTrackStatusVO input)
{
- UnifyPageResultDto pagedList = new UnifyPageResultDto();
- pagedList = await Context.Queryable()
+ 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)
@@ -57,9 +52,10 @@ public class TrackStatusRepository : BasicRepository, ITrackS
EntrackStatus = a.EnStatus,
TrackStatus = a.Status,
NodeId = a.Node,
- Node = SqlFunc.IF(a.Node == 1).Return("揽收").ElseIF(a.Node == 2).Return("干线").ElseIF(a.Node == 3).Return("清关")
- .ElseIF(a.Node == 4).Return("中转").ElseIF(a.Node == 5).Return("派送")
- .End(""),
+ Node = SqlFunc.IF(a.Node == 1).Return("揽收").ElseIF(a.Node == 2).Return("干线").ElseIF(a.Node == 3)
+ .Return("清关")
+ .ElseIF(a.Node == 4).Return("中转").ElseIF(a.Node == 5).Return("派送")
+ .End(""),
CreateTime = a.CreateTime,
CreateUser = c.Name,
UpdateTime = a.UpdateTime,
diff --git a/src/SJZY.Track.Repository/TrackTemplateRepository.cs b/src/SJZY.Track.Infrastructure/Repositories/TrackTemplateRepository.cs
similarity index 98%
rename from src/SJZY.Track.Repository/TrackTemplateRepository.cs
rename to src/SJZY.Track.Infrastructure/Repositories/TrackTemplateRepository.cs
index 43fff1f5..d4ae27a6 100644
--- a/src/SJZY.Track.Repository/TrackTemplateRepository.cs
+++ b/src/SJZY.Track.Infrastructure/Repositories/TrackTemplateRepository.cs
@@ -5,10 +5,10 @@ using SJZY.Track.Domain.Aggregates.TrackFlagAggregate;
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
using SJZY.Track.Domain.Dtos.TrackTemplate;
+using SJZY.Track.Domain.Enums;
using SJZY.Track.Domain.VEntities;
-using SJZY.Track.Repository.Enum;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure.Repositories;
public class TrackTemplateRepository : BasicRepository, ITrackTemplateRepository, IScopedDependency
{
diff --git a/src/SJZY.Track.Infrastructure/SJZY.Track.Infrastructure.csproj b/src/SJZY.Track.Infrastructure/SJZY.Track.Infrastructure.csproj
new file mode 100644
index 00000000..f9bee800
--- /dev/null
+++ b/src/SJZY.Track.Infrastructure/SJZY.Track.Infrastructure.csproj
@@ -0,0 +1,20 @@
+
+
+
+ net7.0
+ True
+ preview
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/SJZY.Track.Repository/SJZYTrackRepositoryModule.cs b/src/SJZY.Track.Infrastructure/SJZYTrackInfrastructureModule.cs
similarity index 82%
rename from src/SJZY.Track.Repository/SJZYTrackRepositoryModule.cs
rename to src/SJZY.Track.Infrastructure/SJZYTrackInfrastructureModule.cs
index 799c900a..048d60fb 100644
--- a/src/SJZY.Track.Repository/SJZYTrackRepositoryModule.cs
+++ b/src/SJZY.Track.Infrastructure/SJZYTrackInfrastructureModule.cs
@@ -4,17 +4,19 @@ using SJZY.Expand.ABP.Core.SqlSugar.Options;
using SJZY.Expand.ElasticSearch;
using SJZY.Track.Domain;
using SJZY.Track.Domain.Queries;
+using SJZY.Track.Infrastructure.Queries;
+using SJZY.Track.Infrastructure.Repositories;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
-namespace SJZY.Track.Repository;
+namespace SJZY.Track.Infrastructure;
///
/// 仓储模块
///
[DependsOn(typeof(AbpAutofacModule))]
-[DependsOn(typeof(SJZYTrackDomainModule))]
-public class SJZYTrackRepositoryModule : AbpModule
+[DependsOn(typeof(SjzyTrackDomainModule))]
+public class SjzyTrackInfrastructureModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
@@ -26,7 +28,7 @@ public class SJZYTrackRepositoryModule : AbpModule
{
new()
{
- ConnectionString = configuration["ConnectionStrings:DefaultConnection"],
+ ConnectionString = configuration["ConnectionStrings:DefaultConnection"]!,
DbType = DbType.MySql,
IsAutoCloseConnection = true,
ConfigId = "default", OpenSqlLog = true
@@ -37,10 +39,10 @@ public class SJZYTrackRepositoryModule : AbpModule
context.Services.AddElasticSearch(options =>
{
- options.NodeUrls = configuration.GetSection("ElasticSearch:NodeUrls").Get>();
- options.LoginName = configuration["ElasticSearch:LoginName"];
- options.Password = configuration["ElasticSearch:Password"];
- options.Base64PassPassword = configuration["ElasticSearch:Base64PassPassword"];
+ options.NodeUrls = configuration.GetSection("ElasticSearch:NodeUrls").Get>()!;
+ options.LoginName = configuration["ElasticSearch:LoginName"]!;
+ options.Password = configuration["ElasticSearch:Password"]!;
+ options.Base64PassPassword = configuration["ElasticSearch:Base64PassPassword"]!;
});
}
diff --git a/src/SJZY.Track.Repository/TrackPushRecord/Entitys/TrackPushRecordEntity.cs b/src/SJZY.Track.Infrastructure/TrackPushRecord/Entitys/TrackPushRecordEntity.cs
similarity index 87%
rename from src/SJZY.Track.Repository/TrackPushRecord/Entitys/TrackPushRecordEntity.cs
rename to src/SJZY.Track.Infrastructure/TrackPushRecord/Entitys/TrackPushRecordEntity.cs
index 9b45f7c2..345e7335 100644
--- a/src/SJZY.Track.Repository/TrackPushRecord/Entitys/TrackPushRecordEntity.cs
+++ b/src/SJZY.Track.Infrastructure/TrackPushRecord/Entitys/TrackPushRecordEntity.cs
@@ -1,6 +1,6 @@
using SJZY.Track.Domain.SeedWork;
-namespace SJZY.Track.Repository.TrackPushRecord.Entitys
+namespace SJZY.Track.Infrastructure.TrackPushRecord.Entitys
{
///
/// 轨迹推送记录
@@ -36,13 +36,13 @@ namespace SJZY.Track.Repository.TrackPushRecord.Entitys
/// 推送内容
///
[SugarColumn(ColumnName = "PushContent")]
- public string PushContent { get; set; }
+ public string PushContent { get; set; } = null!;
///
/// 接口通请求id
///
[SugarColumn(ColumnName = "RequestId")]
- public string RequestId { get; set; }
+ public string RequestId { get; set; } = null!;
///
/// 服务商id
@@ -54,6 +54,6 @@ namespace SJZY.Track.Repository.TrackPushRecord.Entitys
/// 推送轨迹总数
///
[SugarColumn(ColumnName = "TrackTotal")]
- public string TrackTotal { get; set; }
+ public int TrackTotal { get; set; }
}
}
\ No newline at end of file
diff --git a/src/SJZY.Track.Infrastructure/TrackPushRecord/Services/ITrackPushRecordRepository.cs b/src/SJZY.Track.Infrastructure/TrackPushRecord/Services/ITrackPushRecordRepository.cs
new file mode 100644
index 00000000..7b2e515e
--- /dev/null
+++ b/src/SJZY.Track.Infrastructure/TrackPushRecord/Services/ITrackPushRecordRepository.cs
@@ -0,0 +1,8 @@
+using SJZY.Track.Infrastructure.TrackPushRecord.Entitys;
+
+namespace SJZY.Track.Infrastructure.TrackPushRecord.Services
+{
+ public interface ITrackPushRecordRepository : ISimpleClient
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Infrastructure/TrackPushRecord/Services/TrackPushRecordRepository.cs b/src/SJZY.Track.Infrastructure/TrackPushRecord/Services/TrackPushRecordRepository.cs
new file mode 100644
index 00000000..22529060
--- /dev/null
+++ b/src/SJZY.Track.Infrastructure/TrackPushRecord/Services/TrackPushRecordRepository.cs
@@ -0,0 +1,10 @@
+using SJZY.Track.Infrastructure.Repositories;
+using SJZY.Track.Infrastructure.TrackPushRecord.Entitys;
+
+namespace SJZY.Track.Infrastructure.TrackPushRecord.Services
+{
+ public class TrackPushRecordRepository : BasicRepository, ITrackPushRecordRepository, IScopedDependency
+ {
+
+ }
+}
diff --git a/src/SJZY.Track.Repository/TrackPushRecordDetails/Entitys/TrackPushRecordDetailsEntity.cs b/src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Entitys/TrackPushRecordDetailsEntity.cs
similarity index 94%
rename from src/SJZY.Track.Repository/TrackPushRecordDetails/Entitys/TrackPushRecordDetailsEntity.cs
rename to src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Entitys/TrackPushRecordDetailsEntity.cs
index 64208102..796e3e47 100644
--- a/src/SJZY.Track.Repository/TrackPushRecordDetails/Entitys/TrackPushRecordDetailsEntity.cs
+++ b/src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Entitys/TrackPushRecordDetailsEntity.cs
@@ -1,6 +1,6 @@
using SJZY.Track.Domain.SeedWork;
-namespace SJZY.Track.Repository.TrackPushRecordDetails.Entitys
+namespace SJZY.Track.Infrastructure.TrackPushRecordDetails.Entitys
{
///
/// 轨迹推送明细表
diff --git a/src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Services/ITrackPushRecordDetailsRepository.cs b/src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Services/ITrackPushRecordDetailsRepository.cs
new file mode 100644
index 00000000..6f29bbc3
--- /dev/null
+++ b/src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Services/ITrackPushRecordDetailsRepository.cs
@@ -0,0 +1,8 @@
+using SJZY.Track.Infrastructure.TrackPushRecordDetails.Entitys;
+
+namespace SJZY.Track.Infrastructure.TrackPushRecordDetails.Services
+{
+ public interface ITrackPushRecordDetailsRepository : ISimpleClient
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Services/TrackPushRecordDetailsRepository.cs b/src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Services/TrackPushRecordDetailsRepository.cs
new file mode 100644
index 00000000..157dc8bd
--- /dev/null
+++ b/src/SJZY.Track.Infrastructure/TrackPushRecordDetails/Services/TrackPushRecordDetailsRepository.cs
@@ -0,0 +1,10 @@
+using SJZY.Track.Infrastructure.Repositories;
+using SJZY.Track.Infrastructure.TrackPushRecordDetails.Entitys;
+
+namespace SJZY.Track.Infrastructure.TrackPushRecordDetails.Services
+{
+ public class TrackPushRecordDetailsRepository : BasicRepository, ITrackPushRecordDetailsRepository, IScopedDependency
+ {
+
+ }
+}
diff --git a/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj b/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj
deleted file mode 100644
index 42332f80..00000000
--- a/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
- net7.0
- True
- preview
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/SJZY.Track.Repository/TrackPushConfigRepository.cs b/src/SJZY.Track.Repository/TrackPushConfigRepository.cs
deleted file mode 100644
index a69f2406..00000000
--- a/src/SJZY.Track.Repository/TrackPushConfigRepository.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
-using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
-using SJZY.Track.Domain.Dtos.Common;
-using SJZY.Track.Domain.Dtos.TrackPush;
-using SJZY.Track.Domain.VEntities;
-using SJZY.Track.Repository.VData.Entitys;
-
-namespace SJZY.Track.Repository;
-
-public class TrackPushConfigRepository : BasicRepository, ITrackPushConfigRepository,
- IScopedDependency
-{
- public async Task> GetPageAsync(KeywordsInputVO input)
- {
- return await AsQueryable()
- .LeftJoin((trackPush, system) => trackPush.SubSystemId == system.Id && !system.IsDeleted)
- .LeftJoin((trackPush, system, externalSubject) => trackPush.CustomId == externalSubject.Id && !externalSubject.IsDeleted)
- .LeftJoin((trackPush, system, externalSubject, template) => SqlFunc.SplitIn(trackPush.TrackTemplateId, template.Id.ToString()) && !template.IsDeleted)
- .Filter(null, true)
- .Where(trackPush => !trackPush.IsDeleted)
- .WhereIF(input.SubSystemId.HasValue, trackPush => trackPush.SubSystemId == input.SubSystemId)
- .WhereIF(!input.Keywords.IsNullOrWhiteSpace(), (trackPush, system, externalSubject, template) => externalSubject.Name.Contains(input.Keywords) || template.Name.Contains(input.Keywords))
- .OrderByDescending(trackPush => trackPush.CreateTime)
- .Select((trackPush, system, externalSubject, template) => new GetTrackPushConfigPageOutputVO
- {
- Id = trackPush.Id,
- SubSystem = system.CnName,
- CustomName = externalSubject.Abbreviation,
- TrackTemplate = SqlFunc.Subqueryable()
- .Where(template => SqlFunc.SplitIn(trackPush.TrackTemplateId, template.Id.ToString()) && !template.IsDeleted)
- .SelectStringJoin(template => template.Name, ","),
- CreateTime = trackPush.CreateTime
- })
- .Distinct()
- .ToPagedListAsync(input.PageIndex, input.PageSize);
- }
-}
\ No newline at end of file
diff --git a/src/SJZY.Track.Repository/TrackPushRecord/Services/ITrackPushRecordRepository.cs b/src/SJZY.Track.Repository/TrackPushRecord/Services/ITrackPushRecordRepository.cs
deleted file mode 100644
index cac702c2..00000000
--- a/src/SJZY.Track.Repository/TrackPushRecord/Services/ITrackPushRecordRepository.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using SJZY.Track.Repository.TrackPushRecord.Entitys;
-
-namespace SJZY.Track.Repository.TrackPushRecord.Services
-{
- public interface ITrackPushRecordRepository : ISimpleClient
- {
-
- }
-}
diff --git a/src/SJZY.Track.Repository/TrackPushRecord/Services/TrackPushRecordRepository.cs b/src/SJZY.Track.Repository/TrackPushRecord/Services/TrackPushRecordRepository.cs
deleted file mode 100644
index 06a72739..00000000
--- a/src/SJZY.Track.Repository/TrackPushRecord/Services/TrackPushRecordRepository.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using SJZY.Track.Repository.TrackPushRecord.Entitys;
-
-namespace SJZY.Track.Repository.TrackPushRecord.Services
-{
- public class TrackPushRecordRepository : BasicRepository, ITrackPushRecordRepository, IScopedDependency
- {
-
- }
-}
diff --git a/src/SJZY.Track.Repository/TrackPushRecordDetails/Services/ITrackPushRecordDetailsRepository.cs b/src/SJZY.Track.Repository/TrackPushRecordDetails/Services/ITrackPushRecordDetailsRepository.cs
deleted file mode 100644
index 85047d16..00000000
--- a/src/SJZY.Track.Repository/TrackPushRecordDetails/Services/ITrackPushRecordDetailsRepository.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using SJZY.Track.Repository.TrackPushRecordDetails.Entitys;
-
-namespace SJZY.Track.Repository.TrackPushRecordDetails.Services
-{
- public interface ITrackPushRecordDetailsRepository : ISimpleClient
- {
-
- }
-}
diff --git a/src/SJZY.Track.Repository/TrackPushRecordDetails/Services/TrackPushRecordDetailsRepository.cs b/src/SJZY.Track.Repository/TrackPushRecordDetails/Services/TrackPushRecordDetailsRepository.cs
deleted file mode 100644
index 20cd54e3..00000000
--- a/src/SJZY.Track.Repository/TrackPushRecordDetails/Services/TrackPushRecordDetailsRepository.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using SJZY.Track.Repository.TrackPushRecordDetails.Entitys;
-
-namespace SJZY.Track.Repository.TrackPushRecordDetails.Services
-{
- public class TrackPushRecordDetailsRepository : BasicRepository, ITrackPushRecordDetailsRepository, IScopedDependency
- {
-
- }
-}
diff --git a/test/SJZY.Track.Test/Demo/DemoTest.cs b/test/SJZY.Track.Test/Demo/DemoTest.cs
deleted file mode 100644
index da9cd4f2..00000000
--- a/test/SJZY.Track.Test/Demo/DemoTest.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-
-using SJZY.Track.Application.Dtos.Demo;
-using SJZY.Track.Application.Services.Demo;
-
-namespace SJZY.OpenApi.Test.Demo
-{
- public class DemoTest : TestModuleTestBase
- {
- #region 构造函数
- private InterFaceDemoService _interFaceDemoService;
- public DemoTest()
- {
- _interFaceDemoService = GetRequiredService();
- }
- #endregion
-
- [Fact]
- public async Task Test()
- {
- var data = new DemoInput();
-
- var res = await _interFaceDemoService.Edit(data);
-
- Assert.NotNull(res);
- }
-
- }
-}
diff --git a/test/SJZY.Track.Test/TestModule.cs b/test/SJZY.Track.Test/TestModule.cs
index 8cff2d50..6bace7fa 100644
--- a/test/SJZY.Track.Test/TestModule.cs
+++ b/test/SJZY.Track.Test/TestModule.cs
@@ -2,7 +2,7 @@
using Microsoft.Extensions.DependencyInjection;
using SJZY.Track.Api;
using SJZY.Track.Application;
-using SJZY.Track.Repository;
+using SJZY.Track.Infrastructure;
using Volo.Abp;
using Volo.Abp.AspNetCore.TestBase;
using Volo.Abp.Authorization;
@@ -13,22 +13,21 @@ using Volo.Abp.Modularity;
using Volo.Abp.Threading;
[assembly: HostingStartup(typeof(SJZY.Expand.ABP.Core.HostingStartup))]
+
namespace SJZY.Track.Test;
[DependsOn(
typeof(AbpAspNetCoreTestBaseModule),
typeof(AbpAutofacModule),
typeof(AbpAuthorizationModule),
- typeof(SJZYTrackRepositoryModule),
- typeof(ApplicationModule),
- typeof(SJZYTrackApiModule),
+ typeof(SjzyTrackInfrastructureModule),
+ typeof(SjzyTrackApplicationModule),
+ typeof(SjzyTrackApiModule),
typeof(AbpHttpClientModule) //添加abp的http代理模块
)]
-
[assembly: HostingStartup(typeof(Expand.ABP.Core.HostingStartup))]
public class TestModule : AbpModule
{
-
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAlwaysAllowAuthorization();