|
@@ -46,6 +46,7 @@ using Hotline.Share.Enums.Settings;
|
|
|
using Hotline.Share.Mq;
|
|
|
using Hotline.Share.Requests;
|
|
|
using Hotline.Share.Tools;
|
|
|
+using Hotline.Snapshot;
|
|
|
using Hotline.Snapshot.IRepository;
|
|
|
using Hotline.Statistics;
|
|
|
using Hotline.Tools;
|
|
@@ -805,6 +806,13 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
public ISugarQueryable<Order> GetPublishOrderList(QueryOrderPublishDto dto)
|
|
|
{
|
|
|
var query = _orderRepository.Queryable().Includes(d => d.OrderTags);
|
|
|
+ if (_systemSettingCacheManager.Snapshot)
|
|
|
+ {
|
|
|
+ query = query.LeftJoin<OrderSnapshot>((d, snapshot) => d.Id == snapshot.Id)
|
|
|
+ .WhereIF(dto.IndustryId.NotNullOrEmpty(), (d, snapshot) => snapshot.IndustryId == dto.IndustryId)
|
|
|
+ .WhereIF(dto.IsRectifyDepartment.HasValue, (d, snapshot) => snapshot.IsRectifyDepartment == dto.IsRectifyDepartment)
|
|
|
+ .WhereIF(dto.IsDangerDepartment.HasValue, (d, snapshot) => snapshot.IsDangerDepartment == dto.IsDangerDepartment);
|
|
|
+ }
|
|
|
if (_appOptions.Value.IsLuZhou)
|
|
|
query = query.Includes(d => d.FwCallRecord);
|
|
|
//.Includes(d => d.OrderPublish)
|