|
@@ -33,16 +33,16 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
private readonly IRepository<OrderWord> _orderWrodRepository;
|
|
|
private readonly IRepositoryTextSearch<OrderTs> _repositoryts;
|
|
|
|
|
|
- public OrderApplication(
|
|
|
+ public OrderApplication(
|
|
|
IOrderDomainService orderDomainService,
|
|
|
IOrderRepository orderRepository,
|
|
|
IWorkflowDomainService workflowDomainService,
|
|
|
ITimeLimitDomainService timeLimitDomainService,
|
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
|
- IMapper mapper,
|
|
|
+ IMapper mapper,
|
|
|
IRepository<OrderWord> orderWrodRepository,
|
|
|
IRepositoryTextSearch<OrderTs> repositoryts
|
|
|
- )
|
|
|
+ )
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_workflowDomainService = workflowDomainService;
|
|
@@ -52,7 +52,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
|
_orderWrodRepository = orderWrodRepository;
|
|
|
_repositoryts = repositoryts;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 更新工单办理期满时间
|
|
@@ -63,18 +63,18 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
{
|
|
|
var order = await _orderDomainService.GetOrderAsync(orderId, cancellationToken: cancellationToken);
|
|
|
var expiredTimeConfig =
|
|
|
- _timeLimitDomainService.CalcEndTime(order.ExpiredTime.Value, new TimeConfig(timeCount, timeType),order.AcceptTypeCode);
|
|
|
+ _timeLimitDomainService.CalcEndTime(order.ExpiredTime.Value, new TimeConfig(timeCount, timeType), order.AcceptTypeCode);
|
|
|
order.TimeLimit = expiredTimeConfig.TimeText;
|
|
|
- order.TimeLimitCount = expiredTimeConfig.Count;
|
|
|
+ order.TimeLimitCount = expiredTimeConfig.Count;
|
|
|
order.TimeLimitUnit = expiredTimeConfig.TimeType;
|
|
|
- order.ExpiredTime = expiredTimeConfig.ExpiredTime;
|
|
|
- order.NearlyExpiredTime = expiredTimeConfig.NearlyExpiredTime;
|
|
|
+ order.ExpiredTime = expiredTimeConfig.ExpiredTime;
|
|
|
+ order.NearlyExpiredTime = expiredTimeConfig.NearlyExpiredTime;
|
|
|
|
|
|
if (string.IsNullOrEmpty(order.WorkflowId))
|
|
|
throw new UserFriendlyException("该工单流程id异常");
|
|
|
- var workflow = await _workflowDomainService.GetWorkflowAsync(order.WorkflowId, cancellationToken: cancellationToken);
|
|
|
+ var workflow = await _workflowDomainService.GetWorkflowAsync(order.WorkflowId, cancellationToken: cancellationToken);
|
|
|
await _workflowDomainService.UpdateExpiredTimeAsync(workflow, expiredTimeConfig.ExpiredTime,
|
|
|
- expiredTimeConfig.TimeText, expiredTimeConfig.Count, expiredTimeConfig.TimeType,expiredTimeConfig.NearlyExpiredTime, cancellationToken);
|
|
|
+ expiredTimeConfig.TimeText, expiredTimeConfig.Count, expiredTimeConfig.TimeType, expiredTimeConfig.NearlyExpiredTime, cancellationToken);
|
|
|
|
|
|
await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
|
}
|
|
@@ -96,7 +96,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
/// <summary>
|
|
|
/// 撤销工单
|
|
|
/// </summary>
|
|
|
- public async Task CancelOrderAsync(string orderId,string opinion, CancellationToken cancellationToken)
|
|
|
+ public async Task CancelOrderAsync(string orderId, string opinion, CancellationToken cancellationToken)
|
|
|
{
|
|
|
var order = await _orderRepository.GetAsync(orderId, cancellationToken);
|
|
|
if (order is null)
|
|
@@ -112,134 +112,135 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
}
|
|
|
|
|
|
//归档工单
|
|
|
+ var now = DateTime.Now;
|
|
|
var duration = _timeLimitDomainService.CalcWorkTime(order.StartTime.Value,
|
|
|
- order.FiledTime.Value, order.ProcessType is EProcessType.Zhiban);
|
|
|
- order.File(duration);
|
|
|
+ now, order.ProcessType is EProcessType.Zhiban);
|
|
|
+ order.File(now, duration);
|
|
|
await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 即将超期列表
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <param name="cancellationToken"></param>
|
|
|
- /// <returns></returns>
|
|
|
- public async Task<PagedDto<OrderDto>> GetAboutToExpireAsync(AboutToExpireListDto dto, CancellationToken cancellationToken)
|
|
|
- {
|
|
|
- var setting = _systemSettingCacheManager.GetSetting(SettingConstants.OrderAboutToExpire);
|
|
|
- var value = setting?.SettingValue[0];
|
|
|
- value = string.IsNullOrEmpty(value) ? "0" : value;
|
|
|
- DateTime stTime = DateTime.Now.AddDays(int.Parse(value));
|
|
|
- stTime = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
- DateTime stTime2 = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
- var (total, items) = await _orderRepository.Queryable()
|
|
|
- .WhereIF(dto.IsProvince.HasValue, x => x.IsProvince == dto.IsProvince)
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.Keyword), x => x.Title.Contains(dto.Keyword!) || x.No.Contains(dto.Keyword!))
|
|
|
- .Where(x => x.ExpiredTime != null &&
|
|
|
- x.Status != EOrderStatus.Filed && x.Status != EOrderStatus.Published && x.Status != EOrderStatus.Visited && stTime >= x.ExpiredTime.Value && stTime2 <= x.ExpiredTime.Value)
|
|
|
- .OrderByDescending(x => x.CreationTime)
|
|
|
- .ToPagedListAsync(dto.PageIndex, dto.PageSize, cancellationToken);
|
|
|
- return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
|
- }
|
|
|
+ /// <summary>
|
|
|
+ /// 即将超期列表
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <param name="cancellationToken"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<PagedDto<OrderDto>> GetAboutToExpireAsync(AboutToExpireListDto dto, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ var setting = _systemSettingCacheManager.GetSetting(SettingConstants.OrderAboutToExpire);
|
|
|
+ var value = setting?.SettingValue[0];
|
|
|
+ value = string.IsNullOrEmpty(value) ? "0" : value;
|
|
|
+ DateTime stTime = DateTime.Now.AddDays(int.Parse(value));
|
|
|
+ stTime = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
+ DateTime stTime2 = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
+ var (total, items) = await _orderRepository.Queryable()
|
|
|
+ .WhereIF(dto.IsProvince.HasValue, x => x.IsProvince == dto.IsProvince)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.Keyword), x => x.Title.Contains(dto.Keyword!) || x.No.Contains(dto.Keyword!))
|
|
|
+ .Where(x => x.ExpiredTime != null &&
|
|
|
+ x.Status != EOrderStatus.Filed && x.Status != EOrderStatus.Published && x.Status != EOrderStatus.Visited && stTime >= x.ExpiredTime.Value && stTime2 <= x.ExpiredTime.Value)
|
|
|
+ .OrderByDescending(x => x.CreationTime)
|
|
|
+ .ToPagedListAsync(dto.PageIndex, dto.PageSize, cancellationToken);
|
|
|
+ return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
|
+ }
|
|
|
|
|
|
- // /// <summary>
|
|
|
- // /// 即将超期节点列表
|
|
|
- // /// </summary>
|
|
|
- // /// <param name="dto"></param>
|
|
|
- // /// <param name="cancellationToken"></param>
|
|
|
- // /// <returns></returns>
|
|
|
- //public async Task<PagedDto<WorkflowOrderDto>> GetAboutToExpireNodeAsync(AboutToExpireListDto dto, CancellationToken cancellationToken)
|
|
|
- //{
|
|
|
- // var setting = _systemSettingCacheManager.GetSetting(SettingConstants.OrderAboutToExpire);
|
|
|
- // var value = setting?.SettingValue[0];
|
|
|
- // value = string.IsNullOrEmpty(value) ? "0" : value;
|
|
|
- // DateTime stTime = DateTime.Now.AddDays(int.Parse(value));
|
|
|
- // stTime = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
- // DateTime stTime2 = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
- // RefAsync<int> total = 0;
|
|
|
- // var items = await Db.Queryable<Workflow>()
|
|
|
- // .LeftJoin<Order>((x, o) => x.ExternalId == o.Id)
|
|
|
- // .Where(x => x.ModuleCode == "OrderHandle")
|
|
|
- // .WhereIF(dto.IsProvince.HasValue, (x, o) => o.IsProvince == dto.IsProvince)
|
|
|
- // .WhereIF(!string.IsNullOrEmpty(dto.Keyword), (x, o) => o.Title.Contains(dto.Keyword!) || o.No.Contains(dto.Keyword!))
|
|
|
- // .Where((x, o) => (int)x.Status < 20 && stTime >= x.ExpiredTime && stTime2 <= x.ExpiredTime)
|
|
|
- // .Select((x, o) => new WorkflowOrder { Order = o }, true)
|
|
|
- // .OrderByDescending(x => x.CreationTime)
|
|
|
- // .ToPageListAsync(dto.PageIndex, dto.PageSize, total, cancellationToken);
|
|
|
- // return new PagedDto<WorkflowOrderDto>(total, _mapper.Map<IReadOnlyList<WorkflowOrderDto>>(items));
|
|
|
- //}
|
|
|
+ // /// <summary>
|
|
|
+ // /// 即将超期节点列表
|
|
|
+ // /// </summary>
|
|
|
+ // /// <param name="dto"></param>
|
|
|
+ // /// <param name="cancellationToken"></param>
|
|
|
+ // /// <returns></returns>
|
|
|
+ //public async Task<PagedDto<WorkflowOrderDto>> GetAboutToExpireNodeAsync(AboutToExpireListDto dto, CancellationToken cancellationToken)
|
|
|
+ //{
|
|
|
+ // var setting = _systemSettingCacheManager.GetSetting(SettingConstants.OrderAboutToExpire);
|
|
|
+ // var value = setting?.SettingValue[0];
|
|
|
+ // value = string.IsNullOrEmpty(value) ? "0" : value;
|
|
|
+ // DateTime stTime = DateTime.Now.AddDays(int.Parse(value));
|
|
|
+ // stTime = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
+ // DateTime stTime2 = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
+ // RefAsync<int> total = 0;
|
|
|
+ // var items = await Db.Queryable<Workflow>()
|
|
|
+ // .LeftJoin<Order>((x, o) => x.ExternalId == o.Id)
|
|
|
+ // .Where(x => x.ModuleCode == "OrderHandle")
|
|
|
+ // .WhereIF(dto.IsProvince.HasValue, (x, o) => o.IsProvince == dto.IsProvince)
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.Keyword), (x, o) => o.Title.Contains(dto.Keyword!) || o.No.Contains(dto.Keyword!))
|
|
|
+ // .Where((x, o) => (int)x.Status < 20 && stTime >= x.ExpiredTime && stTime2 <= x.ExpiredTime)
|
|
|
+ // .Select((x, o) => new WorkflowOrder { Order = o }, true)
|
|
|
+ // .OrderByDescending(x => x.CreationTime)
|
|
|
+ // .ToPageListAsync(dto.PageIndex, dto.PageSize, total, cancellationToken);
|
|
|
+ // return new PagedDto<WorkflowOrderDto>(total, _mapper.Map<IReadOnlyList<WorkflowOrderDto>>(items));
|
|
|
+ //}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 已超期列表
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <param name="cancellationToken"></param>
|
|
|
- /// <returns></returns>
|
|
|
- public async Task<PagedDto<OrderDto>> GetToExpireAsync(AboutToExpireListDto dto, CancellationToken cancellationToken)
|
|
|
- {
|
|
|
- DateTime stTime = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
- var (total, items) = await _orderRepository.Queryable()
|
|
|
- .WhereIF(dto.IsProvince.HasValue, x => x.IsProvince == dto.IsProvince)
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.Keyword), x => x.Title.Contains(dto.Keyword!) || x.No.Contains(dto.Keyword!))
|
|
|
- //.WhereIF(!string.IsNullOrEmpty(dto.No), x => x.No == dto.No)
|
|
|
- //.WhereIF(!string.IsNullOrEmpty(dto.Title), x => x.Title.Contains(dto.Title!))
|
|
|
- .Where(x => x.ExpiredTime != null &&
|
|
|
- (((x.Status == EOrderStatus.Filed || x.Status == EOrderStatus.Published || x.Status == EOrderStatus.Visited) && x.FiledTime >= x.ExpiredTime) ||
|
|
|
- ((x.Status != EOrderStatus.Filed && x.Status != EOrderStatus.Published && x.Status != EOrderStatus.Visited) && stTime >= x.ExpiredTime.Value)))
|
|
|
- .OrderByDescending(x => x.CreationTime)
|
|
|
- .ToPagedListAsync(dto.PageIndex, dto.PageSize, cancellationToken);
|
|
|
- return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
|
- }
|
|
|
+ /// <summary>
|
|
|
+ /// 已超期列表
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <param name="cancellationToken"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<PagedDto<OrderDto>> GetToExpireAsync(AboutToExpireListDto dto, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ DateTime stTime = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
+ var (total, items) = await _orderRepository.Queryable()
|
|
|
+ .WhereIF(dto.IsProvince.HasValue, x => x.IsProvince == dto.IsProvince)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.Keyword), x => x.Title.Contains(dto.Keyword!) || x.No.Contains(dto.Keyword!))
|
|
|
+ //.WhereIF(!string.IsNullOrEmpty(dto.No), x => x.No == dto.No)
|
|
|
+ //.WhereIF(!string.IsNullOrEmpty(dto.Title), x => x.Title.Contains(dto.Title!))
|
|
|
+ .Where(x => x.ExpiredTime != null &&
|
|
|
+ (((x.Status == EOrderStatus.Filed || x.Status == EOrderStatus.Published || x.Status == EOrderStatus.Visited) && x.FiledTime >= x.ExpiredTime) ||
|
|
|
+ ((x.Status != EOrderStatus.Filed && x.Status != EOrderStatus.Published && x.Status != EOrderStatus.Visited) && stTime >= x.ExpiredTime.Value)))
|
|
|
+ .OrderByDescending(x => x.CreationTime)
|
|
|
+ .ToPagedListAsync(dto.PageIndex, dto.PageSize, cancellationToken);
|
|
|
+ return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
|
+ }
|
|
|
|
|
|
- // /// <summary>
|
|
|
- // /// 已超期节点列表
|
|
|
- // /// </summary>
|
|
|
- // /// <param name="dto"></param>
|
|
|
- // /// <param name="cancellationToken"></param>
|
|
|
- // /// <returns></returns>
|
|
|
- // public async Task<PagedDto<WorkflowOrderDto>> GetToExpireNodeAsync(AboutToExpireListDto dto, CancellationToken cancellationToken)
|
|
|
- // {
|
|
|
- // DateTime stTime = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
- //RefAsync<int> total = 0;
|
|
|
- //var items= await Db.Queryable<Workflow>()
|
|
|
- // .LeftJoin<Order>((x,o)=>x.ExternalId == o.Id)
|
|
|
- // .Where(x => x.ModuleCode == "OrderHandle")
|
|
|
- // .WhereIF(dto.IsProvince.HasValue, (x, o) => o.IsProvince == dto.IsProvince)
|
|
|
- // .WhereIF(!string.IsNullOrEmpty(dto.Keyword), (x, o) => o.Title.Contains(dto.Keyword!) || o.No.Contains(dto.Keyword!))
|
|
|
- // .Where((x,o) => (((int)x.Status >= 20 && x.EndTime >= x.ExpiredTime) || ((int)x.Status < 20 && stTime >= x.ExpiredTime)))
|
|
|
- // .Select((x, o) => new WorkflowOrder { Order = o }, true)
|
|
|
- // .OrderByDescending(x => x.CreationTime)
|
|
|
- // .ToPageListAsync(dto.PageIndex, dto.PageSize, total, cancellationToken);
|
|
|
- // return new PagedDto<WorkflowOrderDto>(total, _mapper.Map<IReadOnlyList<WorkflowOrderDto>>(items));
|
|
|
- // }
|
|
|
+ // /// <summary>
|
|
|
+ // /// 已超期节点列表
|
|
|
+ // /// </summary>
|
|
|
+ // /// <param name="dto"></param>
|
|
|
+ // /// <param name="cancellationToken"></param>
|
|
|
+ // /// <returns></returns>
|
|
|
+ // public async Task<PagedDto<WorkflowOrderDto>> GetToExpireNodeAsync(AboutToExpireListDto dto, CancellationToken cancellationToken)
|
|
|
+ // {
|
|
|
+ // DateTime stTime = _timeLimitDomainService.WorkDay(DateTime.Now);
|
|
|
+ //RefAsync<int> total = 0;
|
|
|
+ //var items= await Db.Queryable<Workflow>()
|
|
|
+ // .LeftJoin<Order>((x,o)=>x.ExternalId == o.Id)
|
|
|
+ // .Where(x => x.ModuleCode == "OrderHandle")
|
|
|
+ // .WhereIF(dto.IsProvince.HasValue, (x, o) => o.IsProvince == dto.IsProvince)
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.Keyword), (x, o) => o.Title.Contains(dto.Keyword!) || o.No.Contains(dto.Keyword!))
|
|
|
+ // .Where((x,o) => (((int)x.Status >= 20 && x.EndTime >= x.ExpiredTime) || ((int)x.Status < 20 && stTime >= x.ExpiredTime)))
|
|
|
+ // .Select((x, o) => new WorkflowOrder { Order = o }, true)
|
|
|
+ // .OrderByDescending(x => x.CreationTime)
|
|
|
+ // .ToPageListAsync(dto.PageIndex, dto.PageSize, total, cancellationToken);
|
|
|
+ // return new PagedDto<WorkflowOrderDto>(total, _mapper.Map<IReadOnlyList<WorkflowOrderDto>>(items));
|
|
|
+ // }
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 工单关键字分词
|
|
|
- /// </summary>
|
|
|
- /// <param name="inputStr"></param>
|
|
|
- /// <returns></returns>
|
|
|
- public async Task OrderParticiple(string inputStr, string orderId, CancellationToken cancellationToken)
|
|
|
- {
|
|
|
- var words = await _orderWrodRepository.Queryable().Where(x => x.IsEnable == 1 && x.Classify.Contains("普通标签")).Select(x => x.Tag).ToListAsync(cancellationToken);
|
|
|
- var res = new List<string>();
|
|
|
- if (words.Any()) res = ParticipleTool.SegMMDouble(inputStr, ref words);
|
|
|
- var participles = await _orderWrodRepository.Queryable().In(x => x.Tag, res).ToListAsync(cancellationToken);
|
|
|
- if (participles.Any())
|
|
|
- {
|
|
|
- //关键词
|
|
|
- var tags = participles.Select(x => x.Tag).ToList();
|
|
|
- var tagsStr = string.Join(",", tags);
|
|
|
- await _orderRepository.Updateable().SetColumns(x => x.TagNames == tagsStr).Where(x => x.Id == orderId).ExecuteCommandAsync(cancellationToken);
|
|
|
- List<string> synonyms = participles.Select(x => x.Synonym).ToList();
|
|
|
- if (synonyms.Any())
|
|
|
- {
|
|
|
- var synonymsStr = string.Join(",", synonyms);
|
|
|
- synonyms = synonymsStr.Split(",").Distinct().ToList();
|
|
|
- tags.AddRange(synonyms);
|
|
|
- }
|
|
|
- var vector = await _orderRepository.Queryable().Where(x => x.Id == orderId).ToListAsync(cancellationToken);
|
|
|
- if (vector.Any()) await _repositoryts.UpdateVectorAsync(orderId, tags, cancellationToken);
|
|
|
- else await _repositoryts.AddVectorAsync(orderId, DateTime.Now, tags, cancellationToken);
|
|
|
- }
|
|
|
- }
|
|
|
+ /// <summary>
|
|
|
+ /// 工单关键字分词
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="inputStr"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task OrderParticiple(string inputStr, string orderId, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ var words = await _orderWrodRepository.Queryable().Where(x => x.IsEnable == 1 && x.Classify.Contains("普通标签")).Select(x => x.Tag).ToListAsync(cancellationToken);
|
|
|
+ var res = new List<string>();
|
|
|
+ if (words.Any()) res = ParticipleTool.SegMMDouble(inputStr, ref words);
|
|
|
+ var participles = await _orderWrodRepository.Queryable().In(x => x.Tag, res).ToListAsync(cancellationToken);
|
|
|
+ if (participles.Any())
|
|
|
+ {
|
|
|
+ //关键词
|
|
|
+ var tags = participles.Select(x => x.Tag).ToList();
|
|
|
+ var tagsStr = string.Join(",", tags);
|
|
|
+ await _orderRepository.Updateable().SetColumns(x => x.TagNames == tagsStr).Where(x => x.Id == orderId).ExecuteCommandAsync(cancellationToken);
|
|
|
+ List<string> synonyms = participles.Select(x => x.Synonym).ToList();
|
|
|
+ if (synonyms.Any())
|
|
|
+ {
|
|
|
+ var synonymsStr = string.Join(",", synonyms);
|
|
|
+ synonyms = synonymsStr.Split(",").Distinct().ToList();
|
|
|
+ tags.AddRange(synonyms);
|
|
|
+ }
|
|
|
+ var vector = await _orderRepository.Queryable().Where(x => x.Id == orderId).ToListAsync(cancellationToken);
|
|
|
+ if (vector.Any()) await _repositoryts.UpdateVectorAsync(orderId, tags, cancellationToken);
|
|
|
+ else await _repositoryts.AddVectorAsync(orderId, DateTime.Now, tags, cancellationToken);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|