|
@@ -247,7 +247,8 @@ namespace Hotline.Application.Orders
|
|
.Includes(x => x.OrderVisit, y => y.Employee)
|
|
.Includes(x => x.OrderVisit, y => y.Employee)
|
|
.Includes(x => x.SecondaryHandling)
|
|
.Includes(x => x.SecondaryHandling)
|
|
.Where(x => x.OrderVisit.Order.IsProvince == false)
|
|
.Where(x => x.OrderVisit.Order.IsProvince == false)
|
|
- .Where(x=> SqlFunc.Subqueryable<OrderScreen>().Where(os=> x.Id == os.VisitDetailId && os.Status < EScreenStatus.End && os.IsDeleted == false).Any() || SqlFunc.Subqueryable<OrderScreen>().Where(os => x.Id == os.VisitDetailId ).NotAny())
|
|
|
|
|
|
+ //.LeftJoin<OrderScreen>((x, s) => x.Id == s.VisitDetailId && s.Status < EScreenStatus.End && s.IsDeleted == false)
|
|
|
|
+ .Where(x=> SqlFunc.Subqueryable<OrderScreen>().Where(os=> x.Id == os.VisitDetailId && os.Status < EScreenStatus.End && os.IsDeleted == false).Any() || SqlFunc.Subqueryable<OrderScreen>().Where(os => x.Id == os.VisitDetailId && os.IsDeleted == false).NotAny())
|
|
//.Where((x, s) => s.Id == null && (x.SecondaryHandling.State == ESecondaryHandlingState.NotApply || x.SecondaryHandling.Id == null))
|
|
//.Where((x, s) => s.Id == null && (x.SecondaryHandling.State == ESecondaryHandlingState.NotApply || x.SecondaryHandling.Id == null))
|
|
.Where(x=> SqlFunc.Subqueryable<OrderSecondaryHandling>().Where(osh => osh.VisitDetailId == x.Id && osh.State == ESecondaryHandlingState.NotApply).NotAny())
|
|
.Where(x=> SqlFunc.Subqueryable<OrderSecondaryHandling>().Where(osh => osh.VisitDetailId == x.Id && osh.State == ESecondaryHandlingState.NotApply).NotAny())
|
|
//.Where(x => x.OrderVisit.VisitTime < dto.CreationTimeEnd && x.OrderVisit.VisitTime > dto.CreationTimeStart)
|
|
//.Where(x => x.OrderVisit.VisitTime < dto.CreationTimeEnd && x.OrderVisit.VisitTime > dto.CreationTimeStart)
|
|
@@ -267,7 +268,8 @@ namespace Hotline.Application.Orders
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgProcessingResults), x => SqlFunc.JsonField(x.OrgProcessingResults, "Key") == dto.OrgProcessingResults)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgProcessingResults), x => SqlFunc.JsonField(x.OrgProcessingResults, "Key") == dto.OrgProcessingResults)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgHandledAttitude), x => SqlFunc.JsonListObjectAny(x.OrgHandledAttitude, "Key", dto.OrgHandledAttitude))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgHandledAttitude), x => SqlFunc.JsonListObjectAny(x.OrgHandledAttitude, "Key", dto.OrgHandledAttitude))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgNoSatisfiedReason), x => SqlFunc.JsonField(x.OrgNoSatisfiedReason, "Key") == dto.OrgNoSatisfiedReason)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgNoSatisfiedReason), x => SqlFunc.JsonField(x.OrgNoSatisfiedReason, "Key") == dto.OrgNoSatisfiedReason)
|
|
- .Where(x => SqlFunc.Subqueryable<OrderVisit>().Where(ov => ov.Id == x.VisitId && ov.VisitState == EVisitState.Visited && ov.IsCanHandle).Any())
|
|
|
|
|
|
+ //.Where(x => SqlFunc.Subqueryable<OrderVisit>().Where(ov => ov.Id == x.VisitId && ov.VisitState == EVisitState.Visited && ov.IsCanHandle).Any())
|
|
|
|
+ .Where(x=>x.OrderVisit.VisitState == EVisitState.Visited && x.OrderVisit.IsCanHandle )
|
|
//.Where((x, s) => x.OrderVisit.VisitState == EVisitState.Visited && x.OrderVisit.IsCanHandle)
|
|
//.Where((x, s) => x.OrderVisit.VisitState == EVisitState.Visited && x.OrderVisit.IsCanHandle)
|
|
.WhereIF(!isAdmin, x => (x.OrderVisit.Order.CounterSignType == ECounterSignType.Department || x.OrderVisit.Order.CounterSignType == null) && x.VisitOrgCode.StartsWith(_sessionContext.OrgId))
|
|
.WhereIF(!isAdmin, x => (x.OrderVisit.Order.CounterSignType == ECounterSignType.Department || x.OrderVisit.Order.CounterSignType == null) && x.VisitOrgCode.StartsWith(_sessionContext.OrgId))
|
|
;
|
|
;
|