@@ -175,6 +175,7 @@
FROM
contract t1
LEFT JOIN contract_product t2 ON t1.id = t2.contract_id
+ join production_order po on po.contract_id = t1.id and po.produce_status = 2
<where>
<if test="customerId neq null and customerId neq '' ">
buy_corporation_id = #{customerId}