erp 库位sql优化

This commit is contained in:
liss
2025-10-11 17:36:43 +08:00
parent 2cd5df0d5f
commit 40a2322cfb
2 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@
and f.NUM like concat('%', #{number}, '%')
</if>
<if test="erpCompanyNumber != null">
and f.CPN_ID = like concat('%', #{erpCompanyNumber}, '%')
and f.CPN_ID like concat('%', #{erpCompanyNumber}, '%')
</if>
<if test="erpCompanyName != null">
and c.NAME like concat('%', #{erpCompanyName}, '%')

View File

@@ -23,7 +23,7 @@
f.IS_ENB as isEnable,
f.FACT_NUM as factoryNumber,
c.NAME as factoryName
from sply_erp_wrh f left join sply_erp_fact c on f.FACT_NUM = c.NUM;
from sply_erp_wrh f left join sply_erp_fact c on f.FACT_NUM = c.NUM
where f.DELETED = 0
<if test="name != null">
and f.NAME like concat('%', #{name}, '%')
@@ -32,7 +32,7 @@
and f.NUM like concat('%', #{number}, '%')
</if>
<if test="factoryNumber != null">
and f.FACT_NUM = like concat('%', #{factoryNumber}, '%')
and f.FACT_NUM like concat('%', #{factoryNumber}, '%')
</if>
<if test="factoryName != null">
and c.NAME like concat('%', #{factoryName}, '%')