diff --git a/SJZY.Track.Api.sln b/SJZY.Track.Api.sln index 04e00553..598973c0 100644 --- a/SJZY.Track.Api.sln +++ b/SJZY.Track.Api.sln @@ -26,8 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution .editorconfig = .editorconfig EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SJZY.Track.Shared", "src\SJZY.Track.Shared\SJZY.Track.Shared.csproj", "{CB860739-8617-48C2-80E3-9F1FBC8D6980}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -58,10 +56,6 @@ Global {073EB297-E752-49AC-BED8-B4AEBAB518F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {073EB297-E752-49AC-BED8-B4AEBAB518F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {073EB297-E752-49AC-BED8-B4AEBAB518F6}.Release|Any CPU.Build.0 = Release|Any CPU - {CB860739-8617-48C2-80E3-9F1FBC8D6980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB860739-8617-48C2-80E3-9F1FBC8D6980}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB860739-8617-48C2-80E3-9F1FBC8D6980}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB860739-8617-48C2-80E3-9F1FBC8D6980}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -73,7 +67,6 @@ Global {390A44FB-0DB5-4B66-86AB-7712DC3030F5} = {DAC93270-5A25-40E5-B851-E7CA398DBC31} {3A53539C-4A85-4E5D-A071-7B4B193AB0E0} = {0E2537C3-6EF3-4085-9BD2-CF923E53F82A} {073EB297-E752-49AC-BED8-B4AEBAB518F6} = {DAC93270-5A25-40E5-B851-E7CA398DBC31} - {CB860739-8617-48C2-80E3-9F1FBC8D6980} = {DAC93270-5A25-40E5-B851-E7CA398DBC31} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = { 8289A516 - 787C - 4D9D - B972 - E7047BDD206B} diff --git a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/CreateWarningInput.cs b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/CreateWarningInput.cs index 5bccbe1b..51da4575 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/CreateWarningInput.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/CreateWarningInput.cs @@ -1,5 +1,3 @@ -using SJZY.Track.Domain.Dtos.Forewarning; - namespace SJZY.Track.Application.Contract.Dtos.Forewarning; public class CreateWarningInput diff --git a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/EditWarningOutput.cs b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/EditWarningOutput.cs index 9bd85f2e..0e1a5131 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/EditWarningOutput.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/EditWarningOutput.cs @@ -1,5 +1,3 @@ -using SJZY.Track.Domain.Dtos.Forewarning; - namespace SJZY.Track.Application.Contract.Dtos.Forewarning; public class EditWarningOutput diff --git a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/UpdateWarningInput.cs b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/UpdateWarningInput.cs index d542ce1c..6cc4f428 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/UpdateWarningInput.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/UpdateWarningInput.cs @@ -1,5 +1,3 @@ -using SJZY.Track.Share.Enums; - namespace SJZY.Track.Application.Contract.Dtos.Forewarning; public class UpdateWarningInput @@ -33,7 +31,7 @@ public class NotifyDto public List NotifyUserIds { get; set; } /// - /// 通知方式 + /// 通知方式(1站内信,2飞书) /// - public List NotifyModes { get; set; } + public List NotifyModes { get; set; } } diff --git a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/WarningFactorDto.cs b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/WarningFactorDto.cs index ea3647de..9045c6ac 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/WarningFactorDto.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/WarningFactorDto.cs @@ -1,17 +1,14 @@ -using Newtonsoft.Json.Linq; -using SJZY.Track.Share.Enums; - -namespace SJZY.Track.Domain.Dtos.Forewarning; +namespace SJZY.Track.Application.Contract.Dtos.Forewarning; public class WarningFactorDto { /// - /// 因素类型 + /// 因素类型(1表示货物类型,2表示月份,3表示分区或区域,4指示货物是否中转,5表示起运港口,6表示销售产品) /// - public RuleFactorType FactorType { get; set; } + public int FactorType { get; set; } /// - /// 因素值 + /// 因素值(直接传json数组) /// - public JArray FactorValue { get; set; } = new(); + public List FactorValue { get; set; } = new(); } diff --git a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/WarningNitifyDto.cs b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/WarningNitifyDto.cs index 35133a59..9c148ec4 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/Forewarning/WarningNitifyDto.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/Forewarning/WarningNitifyDto.cs @@ -1,5 +1,3 @@ -using SJZY.Track.Share.Enums; - namespace SJZY.Track.Application.Contract.Dtos.Forewarning; public class WarningNotifyDto @@ -35,7 +33,7 @@ public class WarningNotifyDto public List NotifyUsers { get; set; } /// - /// 通知方式 + /// 通知方式(1站内信,2飞书) /// - public List NotifyModes { get; set; } + public List NotifyModes { get; set; } } diff --git a/src/SJZY.Track.Application.Contract/Dtos/TrackPush/EditTrackPushConfigInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackPush/EditTrackPushConfigInput.cs index 517ee3d8..d36a166b 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/TrackPush/EditTrackPushConfigInput.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/TrackPush/EditTrackPushConfigInput.cs @@ -1,5 +1,3 @@ -using SJZY.Track.Share.Enums; - namespace SJZY.Track.Application.Contract.Dtos.TrackPush; public class EditTrackPushConfigInput @@ -49,7 +47,7 @@ public class EditTrackPushConfigInput /// /// 时间格式枚举 /// - public DateTimeFormatEnum DateTimeFormatType { get; set; } + public int DateTimeFormatType { get; set; } /// /// 日期时间格式模板 diff --git a/src/SJZY.Track.Application.Contract/Dtos/TrackPush/TrackPushContentConfigDto.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackPush/TrackPushContentConfigDto.cs index a9aaaf64..7e4464ed 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/TrackPush/TrackPushContentConfigDto.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/TrackPush/TrackPushContentConfigDto.cs @@ -1,6 +1,4 @@ -using SJZY.Track.Share.Enums; - -namespace SJZY.Track.Application.Contract.Dtos.TrackPush; +namespace SJZY.Track.Application.Contract.Dtos.TrackPush; public class TrackPushContentConfigDto { @@ -77,7 +75,7 @@ public class TrackPushContentConfigDto /// /// 时间格式枚举 /// - public DateTimeFormatEnum DateTimeFormatType { get; set; } + public int DateTimeFormatType { get; set; } /// /// 日期时间格式模板 diff --git a/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj b/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj index 4783c051..b70c8550 100644 --- a/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj +++ b/src/SJZY.Track.Application.Contract/SJZY.Track.Application.Contract.csproj @@ -12,8 +12,5 @@ - - - diff --git a/src/SJZY.Track.Application/CAP/EventHandlers/TrackPushEventHandler.cs b/src/SJZY.Track.Application/CAP/EventHandlers/TrackPushEventHandler.cs index 9cae0d44..a7ce9299 100644 --- a/src/SJZY.Track.Application/CAP/EventHandlers/TrackPushEventHandler.cs +++ b/src/SJZY.Track.Application/CAP/EventHandlers/TrackPushEventHandler.cs @@ -10,7 +10,6 @@ using SJZY.Track.Domain.Aggregates.OrderAggregate; using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate; using SJZY.Track.Domain.Aggregates.TrackPushAggregate; using SJZY.Track.Domain.Enums; -using SJZY.Track.Share.Enums; using Volo.Abp.DependencyInjection; using Volo.Abp.Http.Client.DynamicProxying; @@ -303,10 +302,10 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe /// private string DateTimeFormat(DateTime dateTime, double timezone, TrackPushContentConfigDto config) { - if (config.DateTimeFormatType == DateTimeFormatEnum.Timestamp) + if (config.DateTimeFormatType == (int) DateTimeFormatEnum.Timestamp) return DateTimeHelper.ConvertToUnixTimestamp(dateTime).ToString(); - if (config.DateTimeFormatType == DateTimeFormatEnum.DateTimeAndTimezone + if (config.DateTimeFormatType == (int) DateTimeFormatEnum.DateTimeAndTimezone && !string.IsNullOrEmpty(config.DateTimeFormat) && !string.IsNullOrEmpty(config.TimezoneFormat)) { diff --git a/src/SJZY.Track.Application/Helpers/ForewarningHelper.cs b/src/SJZY.Track.Application/Helpers/ForewarningHelper.cs index 1e862c41..74a9dcc2 100644 --- a/src/SJZY.Track.Application/Helpers/ForewarningHelper.cs +++ b/src/SJZY.Track.Application/Helpers/ForewarningHelper.cs @@ -1,12 +1,13 @@ using System.Dynamic; using Nest; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Track.Application.Contract.Dtos.Forewarning; using SJZY.Track.Domain.Aggregates.ForewarningAggregate; using SJZY.Track.Domain.Dtos.Common; using SJZY.Track.Domain.Dtos.Forewarning; -using SJZY.Track.Share.Enums; +using SJZY.Track.Domain.Enums; namespace SJZY.Track.Application.Helpers; @@ -72,7 +73,7 @@ public class ForewarningHelper var row = 0; for (var i = 0; i < times; i++) { - foreach (var value in factor.FactorValue) + foreach (var value in factor.FactorValue.Select(JToken.FromObject)) { var strValue = value.ToString(); if (strValue.IsNullOrEmpty()) @@ -82,7 +83,7 @@ public class ForewarningHelper for (var j = 0; j < repeat; j++, row++) { - switch (factor.FactorType) + switch ((RuleFactorType) factor.FactorType) { case RuleFactorType.CargoType: if (value.Type is not JTokenType.String) @@ -147,7 +148,7 @@ public class ForewarningHelper { return warningFactors.Select(x => new WarningFactorEntity { - Type = x.FactorType, + Type = (RuleFactorType) x.FactorType, Value = x.FactorValue.ToJson() }).ToList(); } @@ -181,13 +182,13 @@ public class ForewarningHelper EndTrackStatus = statusDic.TryGetValue(x.EndTrackStatusId, out var end) ? end : "", NotifyUserIds = x.NotifyUserId.Split(',').Select(int.Parse).ToList(), NotifyUsers = x.NotifyUser.Split(',').ToList(), - NotifyModes = x.NotifyMode.Split(',').Select(Enum.Parse).ToList(), + NotifyModes = x.NotifyMode.Split(',').Select(int.Parse).ToList(), }).ToList(), WarningFactors = warning.WarningFactors.Select(x => new WarningFactorWithIdDto { Id = x.Id, - FactorType = x.Type, - FactorValue = JArray.Parse(x.Value), + FactorType = (int) x.Type, + FactorValue = JsonConvert.DeserializeObject>(x.Value)!, }).ToList() }; } diff --git a/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningNotifyService.cs b/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningNotifyService.cs index a71f5711..ebde1321 100644 --- a/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningNotifyService.cs +++ b/src/SJZY.Track.Application/Services/ForewarningServices/ForewarningNotifyService.cs @@ -6,8 +6,8 @@ using SJZY.Track.Application.Contract.Dtos.Forewarning; using SJZY.Track.Application.Contract.Services; using SJZY.Track.Domain.Aggregates.ForewarningAggregate; using SJZY.Track.Domain.Dtos.Forewarning; +using SJZY.Track.Domain.Enums; using SJZY.Track.Domain.Queries; -using SJZY.Track.Share.Enums; using SJZY.UserCenter.HttpApi.Services.Message; using SJZY.UserCenter.SharedModel.Dtos.Message; using SJZY.UserCenter.SharedModel.Enums; diff --git a/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs b/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs index 7ab3cbfd..3fafab67 100644 --- a/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs +++ b/src/SJZY.Track.Application/Services/TrackPush/TrackPushCacheService.cs @@ -77,7 +77,7 @@ public class TrackPushCacheService : ITrackPushCacheService, ITransientDependenc IsCanUpdate = trackPushConfig.IsCanUpdate, IsAllPush = trackPushConfig.IsAllPush, IsCanDelete = trackPushConfig.IsCanDelete, - DateTimeFormatType = trackPushConfig.DateTimeFormatType, + DateTimeFormatType = (int) trackPushConfig.DateTimeFormatType, DateTimeFormat = trackPushConfig.DateTimeFormat, TimezoneFormat = trackPushConfig.TimezoneFormat, ServiceProviderCode = item.ServiceProviderCode, diff --git a/src/SJZY.Track.Domain/Aggregates/ForewarningAggregate/WarningFactorEntity.cs b/src/SJZY.Track.Domain/Aggregates/ForewarningAggregate/WarningFactorEntity.cs index b55eeca9..c54ac6fa 100644 --- a/src/SJZY.Track.Domain/Aggregates/ForewarningAggregate/WarningFactorEntity.cs +++ b/src/SJZY.Track.Domain/Aggregates/ForewarningAggregate/WarningFactorEntity.cs @@ -1,4 +1,4 @@ -using SJZY.Track.Share.Enums; +using SJZY.Track.Domain.Enums; namespace SJZY.Track.Domain.Aggregates.ForewarningAggregate; diff --git a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/TrackPushConfigEntity.cs b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/TrackPushConfigEntity.cs index b5215d63..e029921e 100644 --- a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/TrackPushConfigEntity.cs +++ b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/TrackPushConfigEntity.cs @@ -1,4 +1,4 @@ -using SJZY.Track.Share.Enums; +using SJZY.Track.Domain.Enums; namespace SJZY.Track.Domain.Aggregates.TrackPushAggregate; diff --git a/src/SJZY.Track.Domain/Dtos/Forewarning/GetWarningNotifiesVo.cs b/src/SJZY.Track.Domain/Dtos/Forewarning/GetWarningNotifiesVo.cs index d56ec748..793f526a 100644 --- a/src/SJZY.Track.Domain/Dtos/Forewarning/GetWarningNotifiesVo.cs +++ b/src/SJZY.Track.Domain/Dtos/Forewarning/GetWarningNotifiesVo.cs @@ -1,6 +1,6 @@ using System.Text; using NUglify.Helpers; -using SJZY.Track.Share.Enums; +using SJZY.Track.Domain.Enums; namespace SJZY.Track.Domain.Dtos.Forewarning; diff --git a/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs index 25376a00..42de155e 100644 --- a/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs +++ b/src/SJZY.Track.Domain/Dtos/TrackPush/GetTrackPushConfigDetailOutputVO.cs @@ -1,4 +1,4 @@ -using SJZY.Track.Share.Enums; +using SJZY.Track.Domain.Enums; namespace SJZY.Track.Domain.Dtos.TrackPush; diff --git a/src/SJZY.Track.Shared/Enums/DateTimeFormatEnum.cs b/src/SJZY.Track.Domain/Enums/DateTimeFormatEnum.cs similarity index 90% rename from src/SJZY.Track.Shared/Enums/DateTimeFormatEnum.cs rename to src/SJZY.Track.Domain/Enums/DateTimeFormatEnum.cs index 198e1008..a54e6ece 100644 --- a/src/SJZY.Track.Shared/Enums/DateTimeFormatEnum.cs +++ b/src/SJZY.Track.Domain/Enums/DateTimeFormatEnum.cs @@ -1,4 +1,4 @@ -namespace SJZY.Track.Share.Enums; +namespace SJZY.Track.Domain.Enums; /// /// 时间样式枚举 diff --git a/src/SJZY.Track.Shared/Enums/NotifyMode.cs b/src/SJZY.Track.Domain/Enums/NotifyMode.cs similarity index 83% rename from src/SJZY.Track.Shared/Enums/NotifyMode.cs rename to src/SJZY.Track.Domain/Enums/NotifyMode.cs index 8e6a7ccf..a10dec40 100644 --- a/src/SJZY.Track.Shared/Enums/NotifyMode.cs +++ b/src/SJZY.Track.Domain/Enums/NotifyMode.cs @@ -1,4 +1,4 @@ -namespace SJZY.Track.Share.Enums; +namespace SJZY.Track.Domain.Enums; public enum NotifyMode { diff --git a/src/SJZY.Track.Shared/Enums/RuleFactorType.cs b/src/SJZY.Track.Domain/Enums/RuleFactorType.cs similarity index 94% rename from src/SJZY.Track.Shared/Enums/RuleFactorType.cs rename to src/SJZY.Track.Domain/Enums/RuleFactorType.cs index 383cc667..5a492230 100644 --- a/src/SJZY.Track.Shared/Enums/RuleFactorType.cs +++ b/src/SJZY.Track.Domain/Enums/RuleFactorType.cs @@ -1,4 +1,4 @@ -namespace SJZY.Track.Share.Enums; +namespace SJZY.Track.Domain.Enums; /// /// 枚举表示不同类型的规则因素。 diff --git a/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj b/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj index ec3f3ad7..ea3705c5 100644 --- a/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj +++ b/src/SJZY.Track.Domain/SJZY.Track.Domain.csproj @@ -16,9 +16,5 @@ - - - - diff --git a/src/SJZY.Track.Repository/Queries/WarningQueries.cs b/src/SJZY.Track.Repository/Queries/WarningQueries.cs index c140c531..fa7ecc09 100644 --- a/src/SJZY.Track.Repository/Queries/WarningQueries.cs +++ b/src/SJZY.Track.Repository/Queries/WarningQueries.cs @@ -1,9 +1,9 @@ using SJZY.Track.Domain.Aggregates.ForewarningAggregate; using SJZY.Track.Domain.Aggregates.KPIAreaAggregate; using SJZY.Track.Domain.Dtos.Forewarning; +using SJZY.Track.Domain.Enums; using SJZY.Track.Domain.Queries; using SJZY.Track.Domain.VEntities; -using SJZY.Track.Share.Enums; namespace SJZY.Track.Repository.Queries; diff --git a/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs index a63b5c1e..4d890d42 100644 --- a/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs +++ b/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs @@ -6,7 +6,6 @@ using SJZY.Track.Domain.Dtos.Common; using SJZY.Track.Domain.Dtos.TrackPush; using SJZY.Track.Domain.Enums; using SJZY.Track.Domain.VEntities; -using SJZY.Track.Share.Enums; namespace SJZY.Track.Repository.Repositories; diff --git a/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj b/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj index 7948e437..bb286714 100644 --- a/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj +++ b/src/SJZY.Track.Repository/SJZY.Track.Repository.csproj @@ -16,7 +16,6 @@ - diff --git a/src/SJZY.Track.Shared/SJZY.Track.Shared.csproj b/src/SJZY.Track.Shared/SJZY.Track.Shared.csproj deleted file mode 100644 index c07053a6..00000000 --- a/src/SJZY.Track.Shared/SJZY.Track.Shared.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - net7.0 - enable - enable - SJZY.Track.Share - - - - - -