feat: 区域添加了返回国家id
This commit is contained in:
parent
769ba9e07b
commit
d0c2a92a82
@ -113,7 +113,6 @@ public class TrackPushEventHandler : ITransientDependency, ICapSubscribe
|
|||||||
|
|
||||||
var tracks = await _trackDetailsRepository.GetListAsync(@event.OrderIds, @event.TrackCode);
|
var tracks = await _trackDetailsRepository.GetListAsync(@event.OrderIds, @event.TrackCode);
|
||||||
tracks = tracks.DistinctBy(x => x.OrderId).ToList(); // 防止重复推送
|
tracks = tracks.DistinctBy(x => x.OrderId).ToList(); // 防止重复推送
|
||||||
var temp=this.DateTimeFormat(DateTime.Now, -8.0, config);
|
|
||||||
if (tracks.Count == 0) return; // 一个能推的轨迹都不存在
|
if (tracks.Count == 0) return; // 一个能推的轨迹都不存在
|
||||||
|
|
||||||
// tips:人工推送只要能推就推了,不会校验已推和顺序问题,因为可能是更新
|
// tips:人工推送只要能推就推了,不会校验已推和顺序问题,因为可能是更新
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
using Microsoft.Extensions.Localization;
|
|
||||||
using SJZY.Track.Application.Contract.Dtos.TrackNode;
|
using SJZY.Track.Application.Contract.Dtos.TrackNode;
|
||||||
using SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
using SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||||
using SJZY.Track.Application.Localization;
|
|
||||||
using SJZY.Track.Domain.Aggregates.TrackNodeAggregate;
|
using SJZY.Track.Domain.Aggregates.TrackNodeAggregate;
|
||||||
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
|
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
|
||||||
using SJZY.Track.Domain.Dtos.TrackNode;
|
using SJZY.Track.Domain.Dtos.TrackNode;
|
||||||
using Volo.Abp.DependencyInjection;
|
using Volo.Abp.DependencyInjection;
|
||||||
|
|
||||||
namespace SJZY.Track.Application.Services.TrackNodeServices
|
namespace SJZY.Track.Application.Services.TrackNode
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹节点服务
|
/// 轨迹节点服务
|
||||||
|
|||||||
@ -22,6 +22,11 @@ public class RuleAreaInfoDto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string CountryName { get; set; }
|
public string CountryName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 国家id
|
||||||
|
/// </summary>
|
||||||
|
public int CountryId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 省份
|
/// 省份
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
110
src/SJZY.Track.Domain/VEntities/VCountryEntity.cs
Normal file
110
src/SJZY.Track.Domain/VEntities/VCountryEntity.cs
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SJZY.Track.Domain.VEntities;
|
||||||
|
|
||||||
|
[SugarTable("v_country")]
|
||||||
|
public class VCountryEntity : IFullAuditedBasicEntitys
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 区域id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "AreaId")]
|
||||||
|
public int AreaId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 币种id
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "CurrencyId", IsNullable = true)]
|
||||||
|
public int? CurrencyId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 中文名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "CnName")]
|
||||||
|
public string CnName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 英文名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "EnName")]
|
||||||
|
public string EnName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 二字代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Digit2Code")]
|
||||||
|
public string Digit2Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 三字代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Digit3Code", IsNullable = true)]
|
||||||
|
public string Digit3Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 企业代码类型
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "EnterpriseCodeType", IsNullable = true)]
|
||||||
|
public string EnterpriseCodeType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 区号
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "CountryCode", IsNullable = true)]
|
||||||
|
public int? CountryCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 时差
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "JetLag")]
|
||||||
|
public int JetLag { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 城市名
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "CountryName", IsNullable = true)]
|
||||||
|
public string CountryName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否不可使用
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "IsUnusable", IsNullable = false)]
|
||||||
|
public bool IsUnusable { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建人
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "CreateUserId", IsNullable = true)]
|
||||||
|
public int? CreateUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "CreateTime", IsNullable = false, DefaultValue = "CURRENT_TIMESTAMP")]
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新人
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "UpdateUserId", IsNullable = true)]
|
||||||
|
public int? UpdateUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "UpdateTime", IsNullable = true)]
|
||||||
|
public DateTime? UpdateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否删除
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "IsDeleted", IsNullable = false)]
|
||||||
|
public bool IsDeleted { get; set; }
|
||||||
|
}
|
||||||
@ -65,26 +65,29 @@ public class KpiAreaRepository : BasicRepository<RuleAreaEntity>, IKpiAreaReposi
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<UnifyPageResultDto<RuleAreaInfoDto>> GetAreaInfos(QueryAreaInfoRequest query)
|
public async Task<UnifyPageResultDto<RuleAreaInfoDto>> GetAreaInfos(QueryAreaInfoRequest query)
|
||||||
{
|
{
|
||||||
var queryable = Context.Queryable<RuleAreaInfoEntity>();
|
return await Context.Queryable<RuleAreaInfoEntity>()
|
||||||
queryable = queryable.Where(x => x.AreaId == query.AreaId);
|
.InnerJoin<VCountryEntity>((x,c)=>x.CountryCode==c.Digit2Code)
|
||||||
return await queryable.OrderBy(x => x.Id, OrderByType.Desc)
|
.Where(x => x.AreaId == query.AreaId)
|
||||||
.Select<RuleAreaInfoDto>(val => new RuleAreaInfoDto()
|
.OrderBy(x => x.UpdateTime, OrderByType.Desc)
|
||||||
|
.Select<RuleAreaInfoDto>((x,c)=> new RuleAreaInfoDto()
|
||||||
{
|
{
|
||||||
Id = val.Id,
|
Id = x.Id,
|
||||||
AreaId = val.AreaId,
|
AreaId = x.AreaId,
|
||||||
City = val.City,
|
City = x.City,
|
||||||
CountryCode = val.CountryCode,
|
CountryId = c.Id,
|
||||||
CountryName = val.CountryName,
|
CountryCode = x.CountryCode,
|
||||||
LeftPostcode = val.LeftPostcode,
|
CountryName = x.CountryName,
|
||||||
RightPostcode = val.RightPostcode,
|
LeftPostcode = x.LeftPostcode,
|
||||||
Province = val.Province
|
RightPostcode = x.RightPostcode,
|
||||||
|
Province = x.Province
|
||||||
})
|
})
|
||||||
.ToPagedListAsync(query.PageIndex, query.PageSize);
|
.ToPagedListAsync(query.PageIndex, query.PageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<RuleAreaInfoEntity?> GetAreaInfoById(int id)
|
public Task<RuleAreaInfoEntity?> GetAreaInfoById(int id)
|
||||||
{
|
{
|
||||||
return Context.Queryable<RuleAreaInfoEntity>().FirstAsync(val => val.Id == id)!;
|
return Context.Queryable<RuleAreaInfoEntity>()
|
||||||
|
.FirstAsync(val => val.Id == id)!;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user