| | |
| | | ,ServiceOrdTraTxnPrice as OrdSumPrice
|
| | | ,OrdSumPriceDel=(select sum(ServiceOrdTraTxnPrice) from ServiceOrder as b where ServiceOrdState=4 and a.ServiceOrdID=b.ServiceOrdID)
|
| | | from ServiceOrder as a
|
| | | where ((ServiceOrdCancelReason<>10 or ServiceOrdCancelReason is null) and (ServiceOrdCancelReasonTXT<>'自动取消' or ServiceOrdCancelReasonTXT is null)) and (ServiceOrdOperationRemarks<>'[客户未正式提交需求,可不联系]' or ServiceOrdOperationRemarks is null) and ServiceOrdUserID not in (4,53,11638,93481) and ServiceOrd_CC_Time ".$SqlDateType." and ServiceOrdSource=5
|
| | | where ((ServiceOrdCancelReason<>10 or ServiceOrdCancelReason is null) and (ServiceOrdCancelReasonTXT<>'自动取消' or ServiceOrdCancelReasonTXT is null)) and (ServiceOrdOperationRemarks<>'[客户未正式提交需求,可不联系]' or ServiceOrdOperationRemarks is null) and ServiceOrdUserID not in (4,53,116368,93481) and ServiceOrd_CC_Time ".$SqlDateType." and ServiceOrdSource=5
|
| | | ) as aa GROUP BY SourceName,UserSource";
|
| | | //echo $sql;//exit;
|
| | | $data = sqlsrv_query($conn,$sql);
|
| | |
| | | searchSql=" (ServiceOrdPtOutHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"') or ServiceOrdPtInHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"')) and ServiceOrd_CC_Time "&SqlOrdDateType
|
| | | ElseIf Mid(searchTXT,1,5)="WXCX|" Then
|
| | | 'searchSql=" (ServiceOrdPtOutHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"') or ServiceOrdPtInHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"')) and ServiceOrd_CC_Time "&SqlOrdDateType
|
| | | searchSql=" ((ServiceOrdCancelReason<>10 or ServiceOrdCancelReason is null) and (ServiceOrdCancelReasonTXT<>'自动取消' or ServiceOrdCancelReasonTXT is null)) and (ServiceOrdOperationRemarks<>'[客户未正式提交需求,可不联系]' or ServiceOrdOperationRemarks is null) and ServiceOrdUserID not in (4,53) and ServiceOrdSource=5 and ServiceOrd_CC_Time "&SqlOrdDateType
|
| | | searchSql=" ((ServiceOrdCancelReason<>10 or ServiceOrdCancelReason is null) and (ServiceOrdCancelReasonTXT<>'自动取消' or ServiceOrdCancelReasonTXT is null)) and (ServiceOrdOperationRemarks<>'[客户未正式提交需求,可不联系]' or ServiceOrdOperationRemarks is null) and ServiceOrdUserID not in (4,53,116368,93481) and ServiceOrdSource=5 and ServiceOrd_CC_Time "&SqlOrdDateType
|
| | | If Mid(searchTXT,6,1)="4" Then
|
| | | searchSql=searchSql&" and ServiceOrdState=4 "
|
| | | ElseIf Mid(searchTXT,6,1)="3" Then
|