SQL微调

This commit is contained in:
2023-09-12 15:52:08 +08:00
parent 90cd11a1de
commit 72398b758a

View File

@@ -29,10 +29,10 @@
from
cs_equipment_delivery t0
left join cs_ledger t1 on
t0.id = t1.Id
t0.id = t1.Id and t1.State = 1
left join cs_ledger t2 on
t1.Id = t2.Pid
left join cs_line t3 on t2.Id = t3.line_id
t1.Id = t2.Pid and t2.State = 1
left join cs_line t3 on t2.Id = t3.line_id and t3.status = 1
where
t0.ndid = #{id}
</select>