|
@@ -208,7 +208,7 @@ namespace Hotline.Api.Controllers
|
|
|
[AllowAnonymous]
|
|
|
public async Task<PagedDto<PublishOrderAllDto>> GetOrderByListAllOpen([FromBody] GetOrderList dto)
|
|
|
{
|
|
|
- var queryNew = _orderRepository.Queryable()
|
|
|
+ var (total, items) = await _orderRepository.Queryable()
|
|
|
.Where(p => p.IsPublicity == true)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.No), p => p.No == dto.No)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Title), p => p.Title.Contains(dto.Title))
|
|
@@ -236,39 +236,40 @@ namespace Hotline.Api.Controllers
|
|
|
AcceptTime = p.CreationTime,
|
|
|
PubDate = p.OrderPublish.CreationTime,
|
|
|
FiledTime = p.FiledTime
|
|
|
- });
|
|
|
-
|
|
|
- var queryold = _oldPublicDataRepository.Queryable()
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.No), p => p.OrderNo == dto.No)
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.Title), p => p.Title.Contains(dto.Title))
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.Mobile), p => p.Contact.Contains(dto.Mobile))
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.AcceptTypeCode), p => p.AcceptTypeCode == dto.AcceptTypeCode)
|
|
|
- .WhereIF(dto.StartTime.HasValue, p => p.PubDate >= dto.StartTime)
|
|
|
- .WhereIF(dto.EndTime.HasValue, p => p.PubDate < dto.EndTime)
|
|
|
- .OrderByDescending(p => p.PubDate)
|
|
|
- .Select(p => new PublishOrderAllDto
|
|
|
- {
|
|
|
- OrderId = p.OrderId,
|
|
|
- FromName = p.FromName,
|
|
|
- Contact = p.Contact,
|
|
|
- OrderNo = p.OrderNo,
|
|
|
- Title = p.Title,
|
|
|
- SourceChannel = p.SourceChannel,
|
|
|
- SourceChannelCode = p.SourceChannelCode,
|
|
|
- AcceptType = p.AcceptType,
|
|
|
- AcceptTypeCode = p.AcceptTypeCode,
|
|
|
- HotspotName = p.HotspotName,
|
|
|
- Content = p.Content,
|
|
|
- State = p.State == "1" ? "办理完成" : "办理中",
|
|
|
- ActualOpinion = p.ActualOpinion,
|
|
|
- AcceptTime = p.CreationTime,
|
|
|
- PubDate = p.PubDate,
|
|
|
- FiledTime = p.FiledTime
|
|
|
- });
|
|
|
-
|
|
|
- var (total, items) = await _orderRepository.UnionAll(queryNew, queryold)
|
|
|
- .OrderByDescending(p => p.PubDate)
|
|
|
- .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
+ })
|
|
|
+ .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ //var queryold = _oldPublicDataRepository.Queryable()
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.No), p => p.OrderNo == dto.No)
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.Title), p => p.Title.Contains(dto.Title))
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.Mobile), p => p.Contact.Contains(dto.Mobile))
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.AcceptTypeCode), p => p.AcceptTypeCode == dto.AcceptTypeCode)
|
|
|
+ // .WhereIF(dto.StartTime.HasValue, p => p.PubDate >= dto.StartTime)
|
|
|
+ // .WhereIF(dto.EndTime.HasValue, p => p.PubDate < dto.EndTime)
|
|
|
+ // .OrderByDescending(p => p.PubDate)
|
|
|
+ // .Select(p => new PublishOrderAllDto
|
|
|
+ // {
|
|
|
+ // OrderId = p.OrderId,
|
|
|
+ // FromName = p.FromName,
|
|
|
+ // Contact = p.Contact,
|
|
|
+ // OrderNo = p.OrderNo,
|
|
|
+ // Title = p.Title,
|
|
|
+ // SourceChannel = p.SourceChannel,
|
|
|
+ // SourceChannelCode = p.SourceChannelCode,
|
|
|
+ // AcceptType = p.AcceptType,
|
|
|
+ // AcceptTypeCode = p.AcceptTypeCode,
|
|
|
+ // HotspotName = p.HotspotName,
|
|
|
+ // Content = p.Content,
|
|
|
+ // State = p.State == "1" ? "办理完成" : "办理中",
|
|
|
+ // ActualOpinion = p.ActualOpinion,
|
|
|
+ // AcceptTime = p.CreationTime,
|
|
|
+ // PubDate = p.PubDate,
|
|
|
+ // FiledTime = p.FiledTime
|
|
|
+ // });
|
|
|
+
|
|
|
+ //var (total, items) = await _orderRepository.UnionAll(queryNew, queryold)
|
|
|
+ // .OrderByDescending(p => p.PubDate)
|
|
|
+ // .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
|
|
|
return new PagedDto<PublishOrderAllDto>(total, items);
|
|
|
}
|