AND (( saleTypeKey = '1' and (finState = '1' OR carryVehicleState = '1' )) or (saleTypeKey = '2' and invoiceApplyState = '1'))) AND bbv.vehicleState != '0002'
AND (finState = '1' OR carryVehicleState = '1' )) AND bbv.vehicleState != '0002'
<!--AND (( saleTypeKey = '1' and (finState = '1' OR carryVehicleState = '1' )) or (saleTypeKey = '2' and invoiceApplyState = '1'))) AND bbv.vehicleState != '0002'-->
</where>
order by bo.contractNo desc,bv.id desc) a
@ -337,7 +338,8 @@
anrui_base.base_vehicle_state
WHERE
busState = '401'
AND ((saleTypeKey = '1' and (finState = '1' OR carryVehicleState = '1' )) or (saleTypeKey = '2' and invoiceApplyState = '1')))
and (finState = '1' OR carryVehicleState = '1' ))
<!-- AND ((saleTypeKey = '1' and (finState = '1' OR carryVehicleState = '1' )) or (saleTypeKey = '2' and invoiceApplyState = '1')))-->
AND bbv.vehicleState != '0002'
</where>
GROUP BY
@ -446,7 +448,8 @@
anrui_base.base_vehicle_state
WHERE
busState = '401'
AND (( saleTypeKey = '1' and (finState = '1' OR carryVehicleState = 1 )) or (saleTypeKey = '2' and invoiceApplyState = '1')))
and (finState = '1' OR carryVehicleState = 1 ))
<!-- AND (( saleTypeKey = '1' and (finState = '1' OR carryVehicleState = 1 )) or (saleTypeKey = '2' and invoiceApplyState = '1')))-->