【 1. 轨迹模板页面的改动:新增/编辑模板内容弹窗和模板内容列表,去掉是否对外(移到轨迹内容),是否可删(移到轨迹状态)字段。新增编辑模板去掉对外显示源轨迹。】
https://www.tapd.cn/60863849/prong/tasks/view/1160863849001027876
This commit is contained in:
parent
926adfcd5d
commit
8b6553700e
@ -1,23 +1,5 @@
|
|||||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||||
|
|
||||||
public class GetOrderDetailsInput
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹订单id
|
|
||||||
/// </summary>
|
|
||||||
public int OrderId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 子系统id
|
|
||||||
/// </summary>
|
|
||||||
public int SubSystemId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹模板Id
|
|
||||||
/// </summary>
|
|
||||||
public List<int>? TrackTemplateIds { get; set; } = new List<int>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TrackOrderDetailDto
|
public class TrackOrderDetailDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -43,7 +25,7 @@ public class TrackOrderDetailDto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹代码
|
/// 轨迹代码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? Code { get; set; }
|
public string Code { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹内容
|
/// 轨迹内容
|
||||||
|
|||||||
@ -4,12 +4,12 @@ namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
|||||||
|
|
||||||
public class GetTrackInput : OrderNosInfo
|
public class GetTrackInput : OrderNosInfo
|
||||||
{
|
{
|
||||||
|
private float? _timeZone;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 时区 +8 +8.25 -8.5 -9
|
/// 时区 +8 +8.25 -8.5 -9
|
||||||
/// 不传默认+8
|
/// 不传默认+8
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private float? _timeZone;
|
|
||||||
|
|
||||||
public float? TimeZone
|
public float? TimeZone
|
||||||
{
|
{
|
||||||
get => _timeZone ?? 8;
|
get => _timeZone ?? 8;
|
||||||
|
|||||||
@ -41,6 +41,11 @@ public class EditTrackContentInput
|
|||||||
/// 轨迹标记id
|
/// 轨迹标记id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int TrackFlagId { get; set; }
|
public int TrackFlagId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否对外
|
||||||
|
/// </summary>
|
||||||
|
public bool IsExternal { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetTrackContentDetailDto
|
public class GetTrackContentDetailDto
|
||||||
|
|||||||
@ -11,16 +11,6 @@ public class EditTrackTemplateContentInput
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public int? Id { get; set; }
|
public int? Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否可删
|
|
||||||
/// </summary>
|
|
||||||
public bool? IsCanDelete { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否对外
|
|
||||||
/// </summary>
|
|
||||||
public bool? IsExternal { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹内容id
|
/// 轨迹内容id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -54,36 +54,13 @@ public partial class TrackService
|
|||||||
res.Add(item);
|
res.Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
await TrackDetailSort(res, input);
|
TracksOrdered(res, input);
|
||||||
|
|
||||||
return new UnifyResultDto<List<GetTrackOutput>>(true, res, "操作成功");
|
return new UnifyResultDto<List<GetTrackOutput>>(true, res, "操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task TrackDetailSort(List<GetTrackOutput> list, GetTrackInput input)
|
private void TracksOrdered(List<GetTrackOutput> list, GetTrackInput input)
|
||||||
{
|
{
|
||||||
var orderTemplates = await _provideQueries
|
|
||||||
.GetOrderTemplateLinksAsync(input.OrderType, input.OrderNos);
|
|
||||||
var distinctTemplateIds = orderTemplates.Select(x => x.TemplateId).Distinct().ToList();
|
|
||||||
var templateContent = await _provideQueries.GetOrderedTrackCodesAsync(distinctTemplateIds);
|
|
||||||
|
|
||||||
list.ForEach(item =>
|
|
||||||
{
|
|
||||||
var codes = new List<string>();
|
|
||||||
// 多模板拼接显示
|
|
||||||
foreach (var orderTemplate in orderTemplates.Where(x => x.OrderNo == item.OrderNo))
|
|
||||||
{
|
|
||||||
codes.AddRange(templateContent
|
|
||||||
.Where(t => t.TemplateId == orderTemplate.TemplateId) // 按模板
|
|
||||||
.Where(t => t.IsExternal) // 过滤不对外的
|
|
||||||
.Select(t => t.Code));
|
|
||||||
}
|
|
||||||
|
|
||||||
item.TrackDetails = item.TrackDetails
|
|
||||||
.Where(x => codes.Contains(x.Code)) // 剔除不在模板内容中的元素
|
|
||||||
.OrderBy(x => codes.IndexOf(x.Code)) // 按照在模板内容的位置排序
|
|
||||||
.ToList();
|
|
||||||
});
|
|
||||||
|
|
||||||
switch (input.SortMethod)
|
switch (input.SortMethod)
|
||||||
{
|
{
|
||||||
case SortMethod.ByTrackTime:
|
case SortMethod.ByTrackTime:
|
||||||
@ -98,17 +75,5 @@ public partial class TrackService
|
|||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException(nameof(input.SortMethod), input.SortMethod, "不支持的排序方式");
|
throw new ArgumentOutOfRangeException(nameof(input.SortMethod), input.SortMethod, "不支持的排序方式");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示原轨迹
|
|
||||||
list.ForEach(item =>
|
|
||||||
{
|
|
||||||
item.TrackDetails.ForEach(track =>
|
|
||||||
{
|
|
||||||
if (templateContent.First(x => x.Code == track.Code).ShowOrigin)
|
|
||||||
{
|
|
||||||
track.Content = track.OriginContent;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,10 +107,9 @@ public partial class TrackService : ApplicationService, ITrackService
|
|||||||
throw new BusinessException(message: $"订单:{input.OrderNo}不存在");
|
throw new BusinessException(message: $"订单:{input.OrderNo}不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
var codes = await _provideQueries.GetCanDeleteTrackCodesAsync(new List<int>
|
// todo:判断是否可以删除取决于这条轨迹的创建人是否是系统,这里要改
|
||||||
{
|
// todo:这里重构吧,加入一个追踪id,然后根据追踪id删除,既可以防止误删,又可以减少查询
|
||||||
order.Id
|
var codes = input.TrackCodes;
|
||||||
}, input.TrackCodes);
|
|
||||||
|
|
||||||
if (codes.Count == 0)
|
if (codes.Count == 0)
|
||||||
{
|
{
|
||||||
@ -130,7 +129,7 @@ public partial class TrackService : ApplicationService, ITrackService
|
|||||||
var @event = new TrackDeleteEvent
|
var @event = new TrackDeleteEvent
|
||||||
{
|
{
|
||||||
OrderIds = new[] { order.Id },
|
OrderIds = new[] { order.Id },
|
||||||
TrackCodes = codes.Select(x => x.TrackCode).ToList(),
|
TrackCodes = codes,
|
||||||
SubSystemId = order.SubSystemId,
|
SubSystemId = order.SubSystemId,
|
||||||
OperationMan = name
|
OperationMan = name
|
||||||
};
|
};
|
||||||
@ -157,9 +156,8 @@ public partial class TrackService : ApplicationService, ITrackService
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
var codes = await _provideQueries.GetCanDeleteTrackCodesAsync(
|
// todo:判断是否可以删除取决于这条轨迹的创建人是否是系统,这里要改
|
||||||
orders.Select(x => x.Id).ToList(), input.TrackCodes
|
var codes = input.TrackCodes;
|
||||||
);
|
|
||||||
|
|
||||||
if (codes.Count == 0)
|
if (codes.Count == 0)
|
||||||
{
|
{
|
||||||
@ -175,18 +173,20 @@ public partial class TrackService : ApplicationService, ITrackService
|
|||||||
|
|
||||||
var name = userInfo.Data.UserName;
|
var name = userInfo.Data.UserName;
|
||||||
|
|
||||||
// 删除轨迹
|
// todo:重构
|
||||||
foreach (var group in codes.GroupBy(x => x.OrderId))
|
|
||||||
{
|
// // 删除轨迹
|
||||||
var @event = new TrackDeleteEvent
|
// foreach (var group in codes.GroupBy(x => x.OrderId))
|
||||||
{
|
// {
|
||||||
OrderIds = group.Select(x => x.OrderId).ToArray(),
|
// var @event = new TrackDeleteEvent
|
||||||
TrackCodes = input.TrackCodes,
|
// {
|
||||||
SubSystemId = orders.First(x => x.Id == group.Key).SubSystemId,
|
// OrderIds = group.Select(x => x.OrderId).ToArray(),
|
||||||
OperationMan = name
|
// TrackCodes = input.TrackCodes,
|
||||||
};
|
// SubSystemId = orders.First(x => x.Id == group.Key).SubSystemId,
|
||||||
await _capPublisher.PublishAsync(GlobalConst.TrackDeleteSubscribe, @event);
|
// OperationMan = name
|
||||||
}
|
// };
|
||||||
|
// await _capPublisher.PublishAsync(GlobalConst.TrackDeleteSubscribe, @event);
|
||||||
|
// }
|
||||||
|
|
||||||
return new UnifyResultDto(true, true);
|
return new UnifyResultDto(true, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -166,7 +166,6 @@ public class TrackContentService : ApplicationService
|
|||||||
a.Content == input.Content || a.EnContent == input.EnContent));
|
a.Content == input.Content || a.EnContent == input.EnContent));
|
||||||
if (trackContentEntitys.Any())
|
if (trackContentEntitys.Any())
|
||||||
{
|
{
|
||||||
//throw new BusinessException(message: _stringLocalizer["TrackContentExist"]);
|
|
||||||
var codes = trackContentEntitys.FirstOrDefault(a => a.Code == input.Code);
|
var codes = trackContentEntitys.FirstOrDefault(a => a.Code == input.Code);
|
||||||
if (codes != null)
|
if (codes != null)
|
||||||
{
|
{
|
||||||
@ -184,7 +183,6 @@ public class TrackContentService : ApplicationService
|
|||||||
{
|
{
|
||||||
throw new BusinessException(message: "该子系统下轨迹内容英文已存在");
|
throw new BusinessException(message: "该子系统下轨迹内容英文已存在");
|
||||||
}
|
}
|
||||||
//throw new BusinessException(message: "当前子系统下,轨迹代码或轨迹内容或轨迹内容英文存在");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion 业务逻辑校验
|
#endregion 业务逻辑校验
|
||||||
@ -199,26 +197,24 @@ public class TrackContentService : ApplicationService
|
|||||||
{
|
{
|
||||||
#region 业务逻辑校验
|
#region 业务逻辑校验
|
||||||
|
|
||||||
var trackContentEntitys = await _trackContentRepository.GetListAsync(a => a.Id != input.Id &&
|
var trackContentEntities = await _trackContentRepository.GetListAsync(
|
||||||
a.SubSystemId == input.SubSystemId && (a.Code == input.Code ||
|
a => a.Id != input.Id && a.SubSystemId == input.SubSystemId &&
|
||||||
a.Content == input.Content || a.EnContent == input.EnContent));
|
(a.Code == input.Code || a.Content == input.Content || a.EnContent == input.EnContent));
|
||||||
if (trackContentEntitys.Any())
|
if (trackContentEntities.Any())
|
||||||
{
|
{
|
||||||
//throw new BusinessException(message: _stringLocalizer["TrackContentExist"]);
|
var codes = trackContentEntities.FirstOrDefault(a => a.Code == input.Code);
|
||||||
//throw new BusinessException(message: "当前子系统下,轨迹代码或轨迹内容或轨迹内容英文存在");
|
|
||||||
var codes = trackContentEntitys.FirstOrDefault(a => a.Code == input.Code);
|
|
||||||
if (codes != null)
|
if (codes != null)
|
||||||
{
|
{
|
||||||
throw new BusinessException(message: "该子系统下轨迹代码已存在");
|
throw new BusinessException(message: "该子系统下轨迹代码已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
var contents = trackContentEntitys.FirstOrDefault(a => a.Content == input.Content);
|
var contents = trackContentEntities.FirstOrDefault(a => a.Content == input.Content);
|
||||||
if (contents != null)
|
if (contents != null)
|
||||||
{
|
{
|
||||||
throw new BusinessException(message: "该子系统下轨迹内容已存在");
|
throw new BusinessException(message: "该子系统下轨迹内容已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
var contentEns = trackContentEntitys.FirstOrDefault(a => a.EnContent == input.EnContent);
|
var contentEns = trackContentEntities.FirstOrDefault(a => a.EnContent == input.EnContent);
|
||||||
if (contentEns != null)
|
if (contentEns != null)
|
||||||
{
|
{
|
||||||
throw new BusinessException(message: "该子系统下轨迹内容英文已存在");
|
throw new BusinessException(message: "该子系统下轨迹内容英文已存在");
|
||||||
@ -228,14 +224,19 @@ public class TrackContentService : ApplicationService
|
|||||||
#endregion 业务逻辑校验
|
#endregion 业务逻辑校验
|
||||||
|
|
||||||
//更新的时候需要覆盖内容映射轨迹代码
|
//更新的时候需要覆盖内容映射轨迹代码
|
||||||
var templateEntity = await _trackContentRepository.GetFirstAsync(a => a.Id == input.Id);
|
var trackContent = await _trackContentRepository.GetFirstAsync(a => a.Id == input.Id);
|
||||||
|
|
||||||
|
if (trackContent == null)
|
||||||
|
{
|
||||||
|
throw new BusinessException(message: "轨迹内容不存在");
|
||||||
|
}
|
||||||
|
|
||||||
bool isTrue;
|
bool isTrue;
|
||||||
|
|
||||||
using (var ts = TransactionScopeHelper.Create())
|
using (var ts = TransactionScopeHelper.Create())
|
||||||
{
|
{
|
||||||
// 如果轨迹内容的子系统和code发生变化,同步到轨迹映射表
|
// 如果轨迹内容的子系统和code发生变化,同步到轨迹映射表
|
||||||
if (templateEntity.SubSystemId != input.SubSystemId || templateEntity.Code != input.Code)
|
if (trackContent.SubSystemId != input.SubSystemId || trackContent.Code != input.Code)
|
||||||
{
|
{
|
||||||
await _trackContentRepository.UpdateMapAsync(
|
await _trackContentRepository.UpdateMapAsync(
|
||||||
x => new TrackContentMapEntity
|
x => new TrackContentMapEntity
|
||||||
@ -253,9 +254,9 @@ public class TrackContentService : ApplicationService
|
|||||||
}, x => x.MapTrackContentId == input.Id);
|
}, x => x.MapTrackContentId == input.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectMapper.Map(input, templateEntity);
|
ObjectMapper.Map(input, trackContent);
|
||||||
|
|
||||||
isTrue = await _trackContentRepository.UpdateAsync(templateEntity);
|
isTrue = await _trackContentRepository.UpdateAsync(trackContent);
|
||||||
|
|
||||||
ts.Complete();
|
ts.Complete();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
using System.Diagnostics;
|
|
||||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||||
using SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
using SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||||
using SJZY.Track.Domain.Aggregates.OrderAggregate;
|
using SJZY.Track.Domain.Aggregates.OrderAggregate;
|
||||||
@ -7,7 +6,6 @@ using SJZY.Track.Domain.Aggregates.TrackDetailsAggregate;
|
|||||||
using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
|
using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
|
||||||
using SJZY.Track.Domain.Consts;
|
using SJZY.Track.Domain.Consts;
|
||||||
using SJZY.Track.Domain.Dtos.Order;
|
using SJZY.Track.Domain.Dtos.Order;
|
||||||
using SJZY.Track.Domain.Dtos.TrackTemplate;
|
|
||||||
using SJZY.Track.Domain.Enums;
|
using SJZY.Track.Domain.Enums;
|
||||||
using SJZY.Track.Domain.Queries;
|
using SJZY.Track.Domain.Queries;
|
||||||
|
|
||||||
@ -112,52 +110,49 @@ public class TrackOrderService : ApplicationService
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 轨迹订单明细
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据轨迹订单id获取轨迹订单明细列表
|
/// 根据订单id获取轨迹明细列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="orderId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("GetDetails")]
|
[HttpPost("GetDetails")]
|
||||||
public async Task<List<TrackOrderDetailDto>> GetOrderDetails(GetOrderDetailsInput input)
|
public async Task<List<TrackOrderDetailDto>> GetTracksAsync(int orderId)
|
||||||
{
|
{
|
||||||
var trackDetails = await _trackDetailsRepository.GetListAsync(input.OrderId);
|
var subSystemId = await _orderRepository.GetFirstAsync(x => x.Id == orderId, x => x.SubSystemId);
|
||||||
if (!trackDetails.IsNullOrEmpty())
|
if (subSystemId == default)
|
||||||
{
|
{
|
||||||
var list = ObjectMapper.Map<List<TrackDetailsIndex>, List<TrackOrderDetailDto>>(trackDetails);
|
throw new BusinessException(message: "订单不存在");
|
||||||
var trackCodes = list.Where(a => !a.Code.IsNullOrWhiteSpace()).Select(a => a.Code).Distinct().ToList();
|
}
|
||||||
|
|
||||||
var trackContents = await _trackContentRepository.GetTrackContentAttributeValue(
|
var trackDetails = await _trackDetailsRepository.GetListAsync(orderId);
|
||||||
new GetTemplateContentAttributeValueInputVO
|
if (trackDetails.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
SubSystemId = input.SubSystemId,
|
return new List<TrackOrderDetailDto>();
|
||||||
TrackTemplateIds = input.TrackTemplateIds,
|
}
|
||||||
TrackCodes = trackCodes
|
|
||||||
|
var list = ObjectMapper.Map<List<TrackDetailsIndex>, List<TrackOrderDetailDto>>(trackDetails);
|
||||||
|
|
||||||
|
var trackCodes = list.Select(x => x.Code)
|
||||||
|
.Where(x => x != GlobalConst.EmptyString)
|
||||||
|
.Distinct()
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
// 是否对外
|
||||||
|
if (!trackCodes.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
var trackContents = await _trackContentRepository.GetListAsync(x =>
|
||||||
|
x.SubSystemId == subSystemId && trackCodes.Contains(x.Code), x => new
|
||||||
|
{
|
||||||
|
x.Code,
|
||||||
|
x.IsExternal
|
||||||
});
|
});
|
||||||
Debug.Assert(input.TrackTemplateIds != null, "input.TrackTemplateIds != null");
|
|
||||||
input.TrackTemplateIds = input.TrackTemplateIds.Where(a => a > 0).ToList();
|
list.ForEach(x => x.IsExternal = trackContents.FirstOrDefault(y => y.Code == x.Code)?.IsExternal ?? false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算时区
|
||||||
list.ForEach(a =>
|
list.ForEach(a =>
|
||||||
{
|
{
|
||||||
var trackContentsOfTemplates = trackContents.Where(b =>
|
|
||||||
b.SubSystemId == input.SubSystemId && b.TrackCode == a.Code &&
|
|
||||||
input.TrackTemplateIds.Contains(b.TrackTemplateId))
|
|
||||||
.ToList();
|
|
||||||
GetTemplateContentAttributeValueVO? trackContent = null;
|
|
||||||
var insertData = input.TrackTemplateIds
|
|
||||||
.Intersect(trackContentsOfTemplates.Select(aa => aa.TrackTemplateId)).ToList();
|
|
||||||
if (!insertData.IsNullOrEmpty())
|
|
||||||
{
|
|
||||||
trackContent =
|
|
||||||
trackContentsOfTemplates.FirstOrDefault(it =>
|
|
||||||
it.TrackTemplateId == insertData.FirstOrDefault());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trackContent != null)
|
|
||||||
{
|
|
||||||
a.IsExternal = trackContent.IsExternal;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a.TrackTimeZoneValue == 0f)
|
if (a.TrackTimeZoneValue == 0f)
|
||||||
{
|
{
|
||||||
a.TrackTimeZone = "GTM +00:00";
|
a.TrackTimeZone = "GTM +00:00";
|
||||||
@ -169,20 +164,17 @@ public class TrackOrderService : ApplicationService
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 将小数形式的小时转换为时区偏移量
|
// 将小数形式的小时转换为时区偏移量
|
||||||
int hours = (int) a.TrackTimeZoneValue; // 提取整数部分作为小时
|
var hours = (int) a.TrackTimeZoneValue; // 提取整数部分作为小时
|
||||||
int minutes = (int) ((a.TrackTimeZoneValue - hours) * 60); // 将小数部分乘以 60 转换为分钟
|
var minutes = (int) ((a.TrackTimeZoneValue - hours) * 60); // 将小数部分乘以 60 转换为分钟
|
||||||
TimeSpan offset = new TimeSpan(hours, minutes, 0);
|
var offset = new TimeSpan(hours, minutes, 0);
|
||||||
string timeZoneStr = offset.ToString();
|
var timeZoneStr = offset.ToString();
|
||||||
string flag = a.TrackTimeZoneValue > 0f ? "+" : "";
|
var flag = a.TrackTimeZoneValue > 0f ? "+" : "";
|
||||||
a.TrackTimeZone = $"GTM {flag}{timeZoneStr.RemovePostFix(":00")}";
|
a.TrackTimeZone = $"GTM {flag}{timeZoneStr.RemovePostFix(":00")}";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new List<TrackOrderDetailDto>();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据轨迹id删除单条轨迹
|
/// 根据轨迹id删除单条轨迹
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -202,6 +194,4 @@ public class TrackOrderService : ApplicationService
|
|||||||
await _trackDetailsRepository.DeleteTrackByIdAsync(trackId, track.IndexName);
|
await _trackDetailsRepository.DeleteTrackByIdAsync(trackId, track.IndexName);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,12 +32,6 @@ public class EditTrackTemplateContentInputValidation : AbstractValidator<EditTra
|
|||||||
|
|
||||||
When(x => x.Options != OptionTypeNoNull.删除, () =>
|
When(x => x.Options != OptionTypeNoNull.删除, () =>
|
||||||
{
|
{
|
||||||
RuleFor(x => x.IsCanDelete).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
|
|
||||||
nameof(EditTrackTemplateContentInput.IsCanDelete)]);
|
|
||||||
|
|
||||||
RuleFor(x => x.IsExternal).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
|
|
||||||
nameof(EditTrackTemplateContentInput.IsExternal)]);
|
|
||||||
|
|
||||||
RuleFor(x => x.TrackContentId).NotNull().WithMessage(stringLocalizer[
|
RuleFor(x => x.TrackContentId).NotNull().WithMessage(stringLocalizer[
|
||||||
SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackTemplateContentInput.TrackContentId)]);
|
SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackTemplateContentInput.TrackContentId)]);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using SJZY.Track.Domain.Dtos.TrackContents;
|
using SJZY.Track.Domain.Dtos.TrackContents;
|
||||||
using SJZY.Track.Domain.Dtos.TrackTemplate;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Domain.Aggregates.TrackContentAggregate;
|
namespace SJZY.Track.Domain.Aggregates.TrackContentAggregate;
|
||||||
|
|
||||||
@ -27,7 +26,4 @@ public interface ITrackContentRepository : IBasicRepository<TrackContentEntity>
|
|||||||
Expression<Func<TrackContentMapEntity, bool>> whereExpression);
|
Expression<Func<TrackContentMapEntity, bool>> whereExpression);
|
||||||
|
|
||||||
Task<bool> GetTemplateIsExist(int trackContentId);
|
Task<bool> GetTemplateIsExist(int trackContentId);
|
||||||
|
|
||||||
Task<List<GetTemplateContentAttributeValueVO>> GetTrackContentAttributeValue(
|
|
||||||
GetTemplateContentAttributeValueInputVO input);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,4 +47,10 @@ public class TrackContentEntity : IFullAuditedBasicEntitys, IAggregateRoot
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "TrackStatusId")]
|
[SugarColumn(ColumnName = "TrackStatusId")]
|
||||||
public int TrackStatusId { get; set; }
|
public int TrackStatusId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否对外
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "IsExternal")]
|
||||||
|
public bool IsExternal { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,18 +82,28 @@ public class TrackDetailsIndex : IdBaseIndex
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime ZeroTrackTime { get; set; }
|
public DateTime ZeroTrackTime { get; set; }
|
||||||
|
|
||||||
/// <summary>是否可删</summary>
|
/// <summary>
|
||||||
|
/// 是否可删
|
||||||
|
/// </summary>
|
||||||
public bool IsCanDelete { get; set; }
|
public bool IsCanDelete { get; set; }
|
||||||
|
|
||||||
/// <summary>创建人</summary>
|
/// <summary>
|
||||||
|
/// 创建人
|
||||||
|
/// </summary>
|
||||||
public string? CreateUser { get; set; }
|
public string? CreateUser { get; set; }
|
||||||
|
|
||||||
/// <summary>创建时间</summary>
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>修改人</summary>
|
/// <summary>
|
||||||
|
/// 修改人
|
||||||
|
/// </summary>
|
||||||
public string? UpdateUser { get; set; }
|
public string? UpdateUser { get; set; }
|
||||||
|
|
||||||
/// <summary>修改时间</summary>
|
/// <summary>
|
||||||
|
/// 修改时间
|
||||||
|
/// </summary>
|
||||||
public DateTime? UpdateTime { get; set; }
|
public DateTime? UpdateTime { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,16 +13,10 @@ public class TrackStatusEntity : IFullAuditedBasicEntitys, IAggregateRoot
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹状态代码
|
/// 子系统id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "Code")]
|
[SugarColumn(ColumnName = "SubSystemId")]
|
||||||
public string Code { get; set; } = null!;
|
public int SubSystemId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹状态英文
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "EnStatus")]
|
|
||||||
public string EnStatus { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属节点(来自表 t_track_node) 之前是枚举,后续调整为表
|
/// 所属节点(来自表 t_track_node) 之前是枚举,后续调整为表
|
||||||
@ -30,6 +24,12 @@ public class TrackStatusEntity : IFullAuditedBasicEntitys, IAggregateRoot
|
|||||||
[SugarColumn(ColumnName = "Node")]
|
[SugarColumn(ColumnName = "Node")]
|
||||||
public int Node { get; set; }
|
public int Node { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 轨迹状态代码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName = "Code")]
|
||||||
|
public string Code { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 轨迹状态
|
/// 轨迹状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -37,8 +37,8 @@ public class TrackStatusEntity : IFullAuditedBasicEntitys, IAggregateRoot
|
|||||||
public string Status { get; set; } = null!;
|
public string Status { get; set; } = null!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 子系统id
|
/// 轨迹状态英文
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "SubSystemId")]
|
[SugarColumn(ColumnName = "EnStatus")]
|
||||||
public int SubSystemId { get; set; }
|
public string EnStatus { get; set; } = null!;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,18 +12,6 @@ public class TrackTemplateContentEntity : IFullAuditedBasicEntitys, IEntity
|
|||||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否可删
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "IsCanDelete")]
|
|
||||||
public bool IsCanDelete { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否对外
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "IsExternal")]
|
|
||||||
public bool IsExternal { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 排序
|
/// 排序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -29,10 +29,4 @@ public class TrackTemplateEntity : IFullAuditedBasicEntitys, IAggregateRoot
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "SubSystemId")]
|
[SugarColumn(ColumnName = "SubSystemId")]
|
||||||
public int SubSystemId { get; set; }
|
public int SubSystemId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 显示原轨迹
|
|
||||||
/// </summary>
|
|
||||||
[SugarColumn(ColumnName = "ShowOrigin")]
|
|
||||||
public bool ShowOrigin { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,57 +0,0 @@
|
|||||||
namespace SJZY.Track.Domain.Dtos.TrackTemplate;
|
|
||||||
|
|
||||||
public class GetTemplateContentAttributeValueInputVO
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 子系统id
|
|
||||||
/// </summary>
|
|
||||||
public int SubSystemId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹代码
|
|
||||||
/// </summary>
|
|
||||||
public List<string?>? TrackCodes { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹模板Id
|
|
||||||
/// </summary>
|
|
||||||
public List<int>? TrackTemplateIds { get; set; }
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 订单id
|
|
||||||
///// </summary>
|
|
||||||
//public int OrderId { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GetTemplateContentAttributeValueVO
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容id
|
|
||||||
/// </summary>
|
|
||||||
public int TrackContenId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 模版id
|
|
||||||
/// </summary>
|
|
||||||
public int TrackTemplateId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 轨迹内容代码
|
|
||||||
/// </summary>
|
|
||||||
public string TrackCode { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 子系统id
|
|
||||||
/// </summary>
|
|
||||||
public int SubSystemId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否可删
|
|
||||||
/// </summary>
|
|
||||||
public bool IsCanDelete { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否对外
|
|
||||||
/// </summary>
|
|
||||||
public bool IsExternal { get; set; }
|
|
||||||
}
|
|
||||||
@ -1,7 +1,6 @@
|
|||||||
using SJZY.Track.Domain.Dtos.Order;
|
using SJZY.Track.Domain.Dtos.Order;
|
||||||
using SJZY.Track.Domain.Dtos.TrackContents;
|
using SJZY.Track.Domain.Dtos.TrackContents;
|
||||||
using SJZY.Track.Domain.Dtos.TrackDetails;
|
using SJZY.Track.Domain.Dtos.TrackDetails;
|
||||||
using SJZY.Track.Domain.Dtos.TrackTemplate;
|
|
||||||
|
|
||||||
namespace SJZY.Track.Domain.Queries;
|
namespace SJZY.Track.Domain.Queries;
|
||||||
|
|
||||||
@ -10,21 +9,6 @@ namespace SJZY.Track.Domain.Queries;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IProvideQueries
|
public interface IProvideQueries
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 根据订单号,获取订单模板
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="orderType">订单类型</param>
|
|
||||||
/// <param name="orderNumbers">订单号</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<List<OrderTemplateLinkDto>> GetOrderTemplateLinksAsync(int orderType, List<string> orderNumbers);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 根据订单模板,获取有序的轨迹code
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="templateIds">模板id</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<List<OrderedTrackCodeDto>> GetOrderedTrackCodesAsync(List<int> templateIds);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据订单id找到订单模板,匹配模板命中的轨迹内容
|
/// 根据订单id找到订单模板,匹配模板命中的轨迹内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -33,14 +17,6 @@ public interface IProvideQueries
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<MatchTrackContentDto>> MatchTrackContentAsync(int[] orderIds, string code);
|
Task<List<MatchTrackContentDto>> MatchTrackContentAsync(int[] orderIds, string code);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取可删除的订单轨迹代码
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="orderIds"></param>
|
|
||||||
/// <param name="trackCodes"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<List<CanDeleteTrackCodeVO>> GetCanDeleteTrackCodesAsync(List<int> orderIds, List<string> trackCodes);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据子系统内容映射,得到映射后的轨迹code
|
/// 根据子系统内容映射,得到映射后的轨迹code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -5,7 +5,6 @@ using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
|
|||||||
using SJZY.Track.Domain.Dtos.Order;
|
using SJZY.Track.Domain.Dtos.Order;
|
||||||
using SJZY.Track.Domain.Dtos.TrackContents;
|
using SJZY.Track.Domain.Dtos.TrackContents;
|
||||||
using SJZY.Track.Domain.Dtos.TrackDetails;
|
using SJZY.Track.Domain.Dtos.TrackDetails;
|
||||||
using SJZY.Track.Domain.Dtos.TrackTemplate;
|
|
||||||
using SJZY.Track.Domain.Queries;
|
using SJZY.Track.Domain.Queries;
|
||||||
using SJZY.Track.Domain.VEntities;
|
using SJZY.Track.Domain.VEntities;
|
||||||
|
|
||||||
@ -25,38 +24,6 @@ public class ProvideQueries : ISugarRepository, IProvideQueries,
|
|||||||
Context = SqlsugarScopeBasic.GetContextSafely("default");
|
Context = SqlsugarScopeBasic.GetContextSafely("default");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public async Task<List<OrderTemplateLinkDto>> GetOrderTemplateLinksAsync(int orderType, List<string> orderNumbers)
|
|
||||||
{
|
|
||||||
return await Context.Queryable<OrderEntity>()
|
|
||||||
.LeftJoin<OrderTemplateEntity>((a, b) => a.Id == b.OrderId)
|
|
||||||
.Where(a => a.OrderType == orderType && orderNumbers.Contains(a.OrderNo))
|
|
||||||
.Select((a, b) => new OrderTemplateLinkDto
|
|
||||||
{
|
|
||||||
OrderNo = a.OrderNo,
|
|
||||||
TemplateId = b.TrackTemplateId
|
|
||||||
})
|
|
||||||
.ToListAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public async Task<List<OrderedTrackCodeDto>> GetOrderedTrackCodesAsync(List<int> templateIds)
|
|
||||||
{
|
|
||||||
return await Context.Queryable<TrackTemplateEntity>()
|
|
||||||
.LeftJoin<TrackTemplateContentEntity>((a, b) => a.Id == b.TrackTemplateId)
|
|
||||||
.LeftJoin<TrackContentEntity>((a, b, c) => b.TrackContentId == c.Id)
|
|
||||||
.Where(a => templateIds.Contains(a.Id))
|
|
||||||
.OrderBy((a, b) => b.Sort)
|
|
||||||
.Select((a, b, c) => new OrderedTrackCodeDto
|
|
||||||
{
|
|
||||||
TemplateId = a.Id,
|
|
||||||
ShowOrigin = a.ShowOrigin,
|
|
||||||
Code = c.Code,
|
|
||||||
IsExternal = b.IsExternal
|
|
||||||
})
|
|
||||||
.ToListAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<List<MatchTrackContentDto>> MatchTrackContentAsync(int[] orderIds, string code)
|
public async Task<List<MatchTrackContentDto>> MatchTrackContentAsync(int[] orderIds, string code)
|
||||||
{
|
{
|
||||||
@ -72,25 +39,7 @@ public class ProvideQueries : ISugarRepository, IProvideQueries,
|
|||||||
TrackCode = b.Code,
|
TrackCode = b.Code,
|
||||||
Content = b.Content,
|
Content = b.Content,
|
||||||
EnContent = b.EnContent,
|
EnContent = b.EnContent,
|
||||||
Status = c.Status,
|
Status = c.Status
|
||||||
IsCanDelete = a.IsCanDelete
|
|
||||||
})
|
|
||||||
.ToListAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public async Task<List<CanDeleteTrackCodeVO>> GetCanDeleteTrackCodesAsync(List<int> orderIds,
|
|
||||||
List<string> trackCodes)
|
|
||||||
{
|
|
||||||
return await Context.Queryable<OrderTemplateEntity>()
|
|
||||||
.LeftJoin<TrackTemplateContentEntity>((x, a) => x.TrackTemplateId == a.TrackTemplateId && a.IsCanDelete)
|
|
||||||
.LeftJoin<TrackContentEntity>((x, a, b) => a.TrackContentId == b.Id)
|
|
||||||
.Where((x, a, b) => orderIds.Contains(x.OrderId)
|
|
||||||
&& trackCodes.Contains(b.Code) && a.IsCanDelete)
|
|
||||||
.Select((x, a, b) => new CanDeleteTrackCodeVO
|
|
||||||
{
|
|
||||||
OrderId = x.OrderId,
|
|
||||||
TrackCode = b.Code
|
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,6 @@ using SJZY.Track.Domain.Aggregates.TrackFlagAggregate;
|
|||||||
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
|
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
|
||||||
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
|
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
|
||||||
using SJZY.Track.Domain.Dtos.TrackContents;
|
using SJZY.Track.Domain.Dtos.TrackContents;
|
||||||
using SJZY.Track.Domain.Dtos.TrackTemplate;
|
|
||||||
using SJZY.Track.Domain.VEntities;
|
using SJZY.Track.Domain.VEntities;
|
||||||
|
|
||||||
namespace SJZY.Track.Repository.Repositories;
|
namespace SJZY.Track.Repository.Repositories;
|
||||||
@ -90,35 +89,6 @@ public class TrackContentRepository : BasicRepository<TrackContentEntity>, ITrac
|
|||||||
return pagedList;
|
return pagedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取轨迹内容属性值
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<List<GetTemplateContentAttributeValueVO>> GetTrackContentAttributeValue(
|
|
||||||
GetTemplateContentAttributeValueInputVO input)
|
|
||||||
{
|
|
||||||
var list = await Context.Queryable<TrackContentEntity>()
|
|
||||||
.LeftJoin<TrackTemplateContentEntity>((a, b) =>
|
|
||||||
a.Id == b.TrackContentId && b.TrackTemplateId > 0 && b.IsDeleted == false)
|
|
||||||
.LeftJoin<TrackTemplateEntity>((a, b, c) => b.TrackTemplateId == c.Id && c.IsDeleted == false)
|
|
||||||
.WhereIF(!input.TrackCodes.IsNullOrEmpty(), (a, b, c) => input.TrackCodes!.Contains(a.Code))
|
|
||||||
.WhereIF(input.SubSystemId > 0, (a, b, c) => a.SubSystemId == input.SubSystemId)
|
|
||||||
.WhereIF(!input.TrackTemplateIds.IsNullOrEmpty(), (a, b, c) => input.TrackTemplateIds!.Contains(c.Id))
|
|
||||||
.Where((a, b, c) => c.Id > 0)
|
|
||||||
//.OrderByIF(!input.TrackTemplateIds.IsNullOrEmpty(), (a, b, c) => SqlFunc.IIF(input.TrackTemplateIds.Contains(a.Id), SqlFunc.DateAdd(SqlFunc.GetDate(), 1), c.CreateTime), OrderByType.Desc)
|
|
||||||
.Select((a, b, c) => new GetTemplateContentAttributeValueVO
|
|
||||||
{
|
|
||||||
IsCanDelete = b.IsCanDelete,
|
|
||||||
IsExternal = b.IsExternal,
|
|
||||||
SubSystemId = a.SubSystemId,
|
|
||||||
TrackCode = a.Code,
|
|
||||||
TrackContenId = a.Id,
|
|
||||||
TrackTemplateId = c.Id
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取轨迹模版是否存在
|
/// 获取轨迹模版是否存在
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -28,8 +28,7 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
Code = a.Code,
|
Code = a.Code,
|
||||||
Name = a.Name,
|
Name = a.Name,
|
||||||
SubSystemId = a.SubSystemId,
|
SubSystemId = a.SubSystemId,
|
||||||
SubSystem = b.CnName,
|
SubSystem = b.CnName
|
||||||
ShowOrigin = a.ShowOrigin
|
|
||||||
}).FirstAsync();
|
}).FirstAsync();
|
||||||
|
|
||||||
return detail;
|
return detail;
|
||||||
@ -181,14 +180,4 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
return await Context.Updateable<TrackTemplateContentEntity>().SetColumns(columns).Where(whereExpression)
|
return await Context.Updateable<TrackTemplateContentEntity>().SetColumns(columns).Where(whereExpression)
|
||||||
.ExecuteCommandHasChangeAsync();
|
.ExecuteCommandHasChangeAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取轨迹内容属性值
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<GetTemplateContentAttributeValueVO> GetTrackContentAttributeValue(
|
|
||||||
GetTemplateContentAttributeValueInputVO input)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user