|
|
@@ -92,6 +92,10 @@ namespace CallCenterApi.Interface.Controllers.workorder
|
|
92
|
92
|
sql += "and F_WorkOrderId in (select F_WorkOrderId FROM T_Bus_AssignedInfo WITH(NOLOCK) WHERE F_IsDelete = 0 AND (F_IsSure = 0 and DateDiff(HH, F_CreateTime , GETDATE())> 6 ) or (F_IsSure = 1 and DateDiff(HH, F_CreateTime ,F_SureTime )> 6) ) ";
|
|
93
|
93
|
|
|
94
|
94
|
}
|
|
|
95
|
+ sql += "and F_WorkOrderId not in(select F_WorkOrderId from T_Bus_VisitResult " +
|
|
|
96
|
+ "WITH(NOLOCK) where F_Id in (select max(F_Id) " +
|
|
|
97
|
+ "from T_Bus_VisitResult WITH(NOLOCK) " +
|
|
|
98
|
+ " group by F_WorkOrderId ) and F_IsSatisfie = '0') ";
|
|
95
|
99
|
if (isobservation!= -1)
|
|
96
|
100
|
{
|
|
97
|
101
|
sql += " and F_ISObservation = '" + isobservation + "' ";
|