【 3. 拉取映射新增编辑页面拉取轨迹状态支持添加多个】
https://www.tapd.cn/60863849/prong/tasks/view/1160863849001027894
This commit is contained in:
parent
ae2aa614ce
commit
bb7a3c2312
@ -37,7 +37,7 @@ public class EditTrackPullContentInput
|
||||
/// <summary>
|
||||
/// 服务商轨迹状态参数值
|
||||
/// </summary>
|
||||
public string? TrackStatusValue { get; set; }
|
||||
public List<string>? TrackStatusValues { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 兜底轨迹时区发生地
|
||||
|
||||
@ -156,16 +156,27 @@ public class TrackPullService : ApplicationService
|
||||
{
|
||||
Expression<Func<TrackPullContentConfigEntity, bool>> isContentAnyExp = x =>
|
||||
x.TrackPullConfigId == input.TrackPullConfigId;
|
||||
if (input.Options == OptionTypeNoNull.修改) isContentAnyExp = isContentAnyExp.And(x => x.Id != input.Id);
|
||||
|
||||
if (input.Options == OptionTypeNoNull.修改)
|
||||
{
|
||||
isContentAnyExp = isContentAnyExp.And(x => x.Id != input.Id);
|
||||
}
|
||||
|
||||
if (await _trackPullConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x =>
|
||||
x.TrackContentId == input.TrackContentId)))
|
||||
throw new BusinessException(message: _stringLocalizer["IsTrackPullContentAny"]);
|
||||
|
||||
if (!input.TrackStatusValue.IsNullOrWhiteSpace() &&
|
||||
await _trackPullConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x =>
|
||||
x.TrackStatusValue == input.TrackStatusValue)))
|
||||
throw new BusinessException(message: _stringLocalizer["IsTrackPullContentStatusValueAny"]);
|
||||
if (!input.TrackStatusValues.IsNullOrEmpty())
|
||||
{
|
||||
Expression<Func<TrackPullContentConfigEntity, bool>> trackStatusValuesExp = _ => false;
|
||||
input.TrackStatusValues!.ForEach(item =>
|
||||
{
|
||||
trackStatusValuesExp = trackStatusValuesExp.Or(x => SqlFunc.SplitIn(x.TrackKeyword, item));
|
||||
});
|
||||
|
||||
if (await _trackPullConfigRepository.IsContentAnyAsync(isContentAnyExp.And(trackStatusValuesExp)))
|
||||
throw new BusinessException(message: _stringLocalizer["IsTrackPullContentStatusValueAny"]);
|
||||
}
|
||||
|
||||
if (!input.TrackKeywords.IsNullOrEmpty())
|
||||
{
|
||||
|
||||
@ -30,12 +30,6 @@ public class TrackPullContentConfigEntity : IFullAuditedBasicEntitys, IEntity
|
||||
[SugarColumn(ColumnName = "TrackStatusValue")]
|
||||
public string? TrackStatusValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹发生地参数值(主数据枚举)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "TrackPlaceValue")]
|
||||
public int? TrackPlaceValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹关键词(正向),多个逗分隔
|
||||
/// </summary>
|
||||
@ -49,7 +43,13 @@ public class TrackPullContentConfigEntity : IFullAuditedBasicEntitys, IEntity
|
||||
public string? TrackKeywordReverse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹时区发生地参数值
|
||||
/// 兜底轨迹发生地参数值
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "TrackPlaceValue")]
|
||||
public int? TrackPlaceValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 兜底轨迹时区所属发生地参数值
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "TrackZonePlaceValue")]
|
||||
public int? TrackZonePlaceValue { get; set; }
|
||||
|
||||
@ -2,17 +2,17 @@ namespace SJZY.Track.Domain.Dtos.TrackPull;
|
||||
|
||||
public class GetTrackPullContentDetailOutputVO
|
||||
{
|
||||
/// <summary>
|
||||
/// 轨迹内容代码
|
||||
/// </summary>
|
||||
public string Code { get; set; } = null!;
|
||||
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拉取轨迹内容代码
|
||||
/// 轨迹代码
|
||||
/// </summary>
|
||||
public string? TrackContentCodeValue { get; set; }
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹拉取配置id
|
||||
/// </summary>
|
||||
public int TrackPullConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹内容id
|
||||
@ -20,9 +20,14 @@ public class GetTrackPullContentDetailOutputVO
|
||||
public int TrackContentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拉取轨迹内容
|
||||
/// 服务商轨迹状态参数值
|
||||
/// </summary>
|
||||
public string? TrackContentValue { get; set; }
|
||||
public string? TrackStatusValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 服务商轨迹状态参数值
|
||||
/// </summary>
|
||||
public List<string>? TrackStatusValues { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拉取轨迹关键字(正向)
|
||||
@ -49,26 +54,6 @@ public class GetTrackPullContentDetailOutputVO
|
||||
/// </summary>
|
||||
public int? TrackPlaceValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹拉取配置id
|
||||
/// </summary>
|
||||
public int TrackPullConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拉取轨迹状态
|
||||
/// </summary>
|
||||
public string? TrackStatusValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拉取轨迹时区
|
||||
/// </summary>
|
||||
public double? TrackTimeZone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否完结
|
||||
/// </summary>
|
||||
public bool IsCompleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹时区兜底地址值
|
||||
/// </summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user