| | |
| | | ,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);
|