|
@@ -565,13 +565,14 @@ namespace Hotline.Api.Controllers
|
|
|
public async Task<OpenResponse> GetOrderListByNum([FromBody] QueryOrderListByNumDto dto)
|
|
|
{
|
|
|
var queryNew = _orderRepository.Queryable()
|
|
|
+ .LeftJoin<OrderPublish>((p, op) => p.Id == op.OrderId)
|
|
|
.Where(p => p.IsPublicity == true)
|
|
|
- .OrderByDescending(p => p.CreationTime)
|
|
|
- .Select(p => new DataListTopDto
|
|
|
+ .OrderByDescending((p, op) => p.CreationTime)
|
|
|
+ .Select((p, op) => new DataListTopDto
|
|
|
{
|
|
|
DataID = p.Id,
|
|
|
Title = p.Title,
|
|
|
- CreateDate = p.CreationTime
|
|
|
+ CreateDate = op.CreationTime
|
|
|
});
|
|
|
|
|
|
var queryold = _oldPublicDataRepository.Queryable()
|
|
@@ -580,7 +581,7 @@ namespace Hotline.Api.Controllers
|
|
|
{
|
|
|
DataID = p.OrderId,
|
|
|
Title = p.Title,
|
|
|
- CreateDate = p.PubDate
|
|
|
+ CreateDate = p.CreationTime
|
|
|
});
|
|
|
var items = await _orderRepository.UnionAll(queryNew, queryold)
|
|
|
.OrderByDescending(p => p.CreateDate)
|
|
@@ -922,7 +923,7 @@ namespace Hotline.Api.Controllers
|
|
|
|
|
|
//数据查询
|
|
|
var listType = await _orderRepository.Queryable()
|
|
|
- .Where(p => p.StartTime >= startDate && p.StartTime <= endDate && p.Status > EOrderStatus.WaitForAccept)
|
|
|
+ .Where(p => p.CreationTime >= startDate && p.CreationTime <= endDate && p.Status > EOrderStatus.WaitForAccept)
|
|
|
.Select(it => new
|
|
|
{
|
|
|
it.AcceptType,
|
|
@@ -938,7 +939,7 @@ namespace Hotline.Api.Controllers
|
|
|
.ToListAsync();
|
|
|
|
|
|
var listHot = await _orderRepository.Queryable()
|
|
|
- .Where(it => it.StartTime >= startDate && it.StartTime <= endDate && it.Status > EOrderStatus.WaitForAccept)
|
|
|
+ .Where(it => it.CreationTime >= startDate && it.CreationTime <= endDate && it.Status > EOrderStatus.WaitForAccept)
|
|
|
.Select(it => new
|
|
|
{
|
|
|
HotspotId = it.HotspotId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2")),
|
|
@@ -1012,7 +1013,7 @@ namespace Hotline.Api.Controllers
|
|
|
{
|
|
|
AllCount = SqlFunc.AggregateSum(SqlFunc.IIF(p.Status > EOrderStatus.WaitForAccept, 1, 0)) + 7079457,
|
|
|
AllTrandCount = SqlFunc.AggregateSum(SqlFunc.IIF(p.Status >= EOrderStatus.Filed, 1, 0)) + 7079214,
|
|
|
- DayCount = SqlFunc.AggregateSum(SqlFunc.IIF(p.StartTime >= startDate && p.StartTime <= endDate && p.Status > EOrderStatus.WaitForAccept, 1, 0)),
|
|
|
+ DayCount = SqlFunc.AggregateSum(SqlFunc.IIF(p.CreationTime >= startDate && p.CreationTime <= endDate && p.Status > EOrderStatus.WaitForAccept, 1, 0)),
|
|
|
DayTrandCount = SqlFunc.AggregateSum(SqlFunc.IIF(p.FiledTime >= startDate && p.FiledTime <= endDate && p.Status >= EOrderStatus.Filed, 1, 0)),
|
|
|
})
|
|
|
.FirstAsync();
|
|
@@ -1127,7 +1128,7 @@ namespace Hotline.Api.Controllers
|
|
|
var list = _systemDicDataCacheManager.GetSysDicDataCache(SysDicTypeConsts.KnowledgeBaseTags).Select(p => new
|
|
|
{
|
|
|
SDICT_Name = p.DicDataName,
|
|
|
- SDICT_ID = p.DicDataValue
|
|
|
+ SDICT_ID = p.DicDataName
|
|
|
}).ToList();
|
|
|
|
|
|
var rsp = new
|
|
@@ -1154,9 +1155,16 @@ namespace Hotline.Api.Controllers
|
|
|
typeSpliceName = type?.SpliceName;
|
|
|
}
|
|
|
|
|
|
+ var typeSpliceNameTags = string.Empty;
|
|
|
+ if (!string.IsNullOrEmpty(dto.KnowledgeBaseTags))
|
|
|
+ {
|
|
|
+ var type = await _knowledgeTypeRepository.GetAsync(x => x.Name == dto.KnowledgeBaseTags);
|
|
|
+ typeSpliceNameTags = type?.SpliceName;
|
|
|
+ }
|
|
|
+
|
|
|
var (total, items) = await _knowledgeRepository.Queryable()
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Title), p => p.Title.Contains(dto.Title))
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.KnowledgeBaseTags), p => p.KnowledgeType.Any(t => t.KnowledgeTypeSpliceName.EndsWith(dto.KnowledgeBaseTags)))
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(typeSpliceNameTags), p => p.KnowledgeType.Any(t => t.KnowledgeTypeSpliceName.EndsWith(typeSpliceNameTags)))
|
|
|
.WhereIF(!string.IsNullOrEmpty(typeSpliceName), x => x.KnowledgeType.Any(t => t.KnowledgeTypeSpliceName.EndsWith(typeSpliceName)))
|
|
|
.OrderByDescending(p => p.CreationTime)
|
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
@@ -1164,5 +1172,31 @@ namespace Hotline.Api.Controllers
|
|
|
var data = new PagedDto<KnowledgeInfoDto>(total, _mapper.Map<IReadOnlyList<KnowledgeInfoDto>>(items));
|
|
|
return OpenResponse.Ok(WebPortalDeResponse<PagedDto<KnowledgeInfoDto>>.Success(data));
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 获取知识库详情
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("getknowledgeinfo")]
|
|
|
+ [AllowAnonymous]
|
|
|
+ public async Task<OpenResponse> GetKnowledgeInfo([FromBody] QueryKnowledgeInfo dto)
|
|
|
+ {
|
|
|
+ var data = await _knowledgeRepository.GetAsync(p => p.Id == dto.Id, HttpContext.RequestAborted);
|
|
|
+ KnowledgeInfoDto detailsDto = null;
|
|
|
+ if (data != null)
|
|
|
+ {
|
|
|
+ detailsDto = _mapper.Map<KnowledgeInfoDto>(data);
|
|
|
+
|
|
|
+ if (detailsDto != null && !string.IsNullOrEmpty(detailsDto.Content))
|
|
|
+ data.Content = _bulletinApplication.GetSiteUrls(data.Content);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ detailsDto = new();
|
|
|
+ }
|
|
|
+ List<KnowledgeInfoDto> dataDto = [detailsDto];
|
|
|
+ return OpenResponse.Ok(WebPortalDeResponse<IReadOnlyList<KnowledgeInfoDto>>.Success(dataDto));
|
|
|
+ }
|
|
|
}
|
|
|
}
|