Merge branch 'refs/heads/S04轨迹预警' into test
This commit is contained in:
commit
c0cc783131
@ -11,7 +11,11 @@ public class TrackPushAutoMapperProfile : Profile
|
|||||||
{
|
{
|
||||||
public TrackPushAutoMapperProfile()
|
public TrackPushAutoMapperProfile()
|
||||||
{
|
{
|
||||||
CreateMap<EditTrackPushConfigInput, TrackPushConfigEntity>(MemberList.None);
|
CreateMap<EditTrackPushConfigInput, TrackPushConfigEntity>(MemberList.None)
|
||||||
|
.ForMember(val => val.DateTimeFormatType, opt => opt.MapFrom(src => src.DateTimeFormatType))
|
||||||
|
.ForMember(val => val.DateTimeFormat, opt => opt.MapFrom(src => src.DateTimeFormat))
|
||||||
|
.ForMember(val => val.TimezoneFormat, opt => opt.MapFrom(src => src.TimezoneFormat));
|
||||||
|
|
||||||
CreateMap<EditTrackPushConfigInput, TrackPushPullParamsConfigEntity>(MemberList.None).Ignore(dest => dest.Id)
|
CreateMap<EditTrackPushConfigInput, TrackPushPullParamsConfigEntity>(MemberList.None).Ignore(dest => dest.Id)
|
||||||
.ForMember(dest => dest.IsPush, opt => opt.MapFrom(source => true));
|
.ForMember(dest => dest.IsPush, opt => opt.MapFrom(source => true));
|
||||||
CreateMap<EditTrackPushContentInput, TrackPushContentConfigEntity>(MemberList.None);
|
CreateMap<EditTrackPushContentInput, TrackPushContentConfigEntity>(MemberList.None);
|
||||||
|
|||||||
@ -113,7 +113,6 @@ public class KpiAreaService : ApplicationService
|
|||||||
await _ruleAreaRepository.UpdateAreaInfoAsync(ruleAreaEntity);
|
await _ruleAreaRepository.UpdateAreaInfoAsync(ruleAreaEntity);
|
||||||
|
|
||||||
await _forewarningCacheService.ClearRedisByAreaId(areaInfo.AreaId);
|
await _forewarningCacheService.ClearRedisByAreaId(areaInfo.AreaId);
|
||||||
await RedisHelper.Client.PublishAsync(GlobalConst.PublishNotifyChannelKey, "clear local cache");
|
|
||||||
return new UnifyResultDto(true, "更新成功");
|
return new UnifyResultDto(true, "更新成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,17 @@
|
|||||||
namespace SJZY.Track.Domain.Dtos.Forewarning;
|
namespace SJZY.Track.Domain.Dtos.Forewarning;
|
||||||
|
|
||||||
public record RuleAreaBaseInfo(int SystemId, int CustomerId);
|
public class RuleAreaBaseInfo
|
||||||
|
{
|
||||||
|
public int SystemId { get; set; }
|
||||||
|
public int CustomerId { get; set; }
|
||||||
|
|
||||||
|
public RuleAreaBaseInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public RuleAreaBaseInfo(int systemId, int customerId)
|
||||||
|
{
|
||||||
|
SystemId = systemId;
|
||||||
|
CustomerId = customerId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,6 @@
|
|||||||
namespace SJZY.Track.Domain.Dtos.TrackPush;
|
using SJZY.Track.Domain.Enums;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Domain.Dtos.TrackPush;
|
||||||
|
|
||||||
public class GetTrackPushConfigDetailOutputVO
|
public class GetTrackPushConfigDetailOutputVO
|
||||||
{
|
{
|
||||||
@ -53,4 +55,19 @@ public class GetTrackPushConfigDetailOutputVO
|
|||||||
/// 是否全量推送
|
/// 是否全量推送
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsAllPush { get; set; }
|
public bool IsAllPush { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 时间格式枚举
|
||||||
|
/// </summary>
|
||||||
|
public DateTimeFormatEnum? DateTimeFormatType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日期时间格式模板
|
||||||
|
/// </summary>
|
||||||
|
public string? DateTimeFormat { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 时区格式格式模板
|
||||||
|
/// </summary>
|
||||||
|
public string? TimezoneFormat { get; set; }
|
||||||
}
|
}
|
||||||
@ -79,7 +79,11 @@ public class WarningQueries : ISugarRepository, IWarningQueries,
|
|||||||
return Context.Queryable<WarningRuleEntity>()
|
return Context.Queryable<WarningRuleEntity>()
|
||||||
.InnerJoin<WarningEntity>((a, b) => a.WarningId == b.Id)
|
.InnerJoin<WarningEntity>((a, b) => a.WarningId == b.Id)
|
||||||
.Where((a, b) => b.IsEnable && a.AreaId == areaId)
|
.Where((a, b) => b.IsEnable && a.AreaId == areaId)
|
||||||
.Select((a, b) => new RuleAreaBaseInfo(b.CustomerId, b.SubSystemId))
|
.Select((a, b) => new RuleAreaBaseInfo
|
||||||
|
{
|
||||||
|
CustomerId = b.CustomerId,
|
||||||
|
SystemId = b.SubSystemId
|
||||||
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,6 +71,9 @@ public class TrackPushConfigRepository : BasicRepository<TrackPushConfigEntity>,
|
|||||||
SubSystem = system.CnName,
|
SubSystem = system.CnName,
|
||||||
CustomName = externalSubject.Abbreviation,
|
CustomName = externalSubject.Abbreviation,
|
||||||
ServiceProvider = service.Name,
|
ServiceProvider = service.Name,
|
||||||
|
DateTimeFormat = trackPush.DateTimeFormat,
|
||||||
|
DateTimeFormatType = trackPush.DateTimeFormatType== DateTimeFormatEnum.None?null:trackPush.DateTimeFormatType,
|
||||||
|
TimezoneFormat = trackPush.TimezoneFormat
|
||||||
}, true)
|
}, true)
|
||||||
.SingleAsync();
|
.SingleAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user