erp分页查询优化
This commit is contained in:
@@ -10,23 +10,31 @@
|
||||
-->
|
||||
|
||||
<select id="getPageByReq" resultType="com.zt.plat.module.erp.dal.dataobject.erp.ErpFactoryDO">
|
||||
select f.*, c.NAME as companyName
|
||||
from sply_erp_fact f left join sply_erp_company c on f.CPN_ID = c.NUM;
|
||||
select f.id,
|
||||
f.name as name,
|
||||
f.NUM as number,
|
||||
f.CPN_ID as erpCompanyNumber,
|
||||
f.TP as type,
|
||||
f.REL_NAME as relName,
|
||||
f.REL_NUM as relnumber,
|
||||
f.IS_ENB as isEnable,
|
||||
c.NAME as erpCompanyName
|
||||
from sply_erp_fact f left join sply_erp_cpn c on f.CPN_ID = c.NUM
|
||||
where f.DELETED = 0
|
||||
<if test="reqVO.name != null">
|
||||
and f.NAME like concat('%', #{reqVO.name}, '%')
|
||||
<if test="name != null">
|
||||
and f.NAME like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="reqVO.number != null">
|
||||
and f.NUM like concat('%', #{reqVO.number}, '%')
|
||||
<if test="number != null">
|
||||
and f.NUM like concat('%', #{number}, '%')
|
||||
</if>
|
||||
<if test="reqVO.companyNumber != null">
|
||||
and f.CPN_ID = like concat('%', #{reqVO.companyNumber}, '%')
|
||||
<if test="erpCompanyNumber != null">
|
||||
and f.CPN_ID = like concat('%', #{erpCompanyNumber}, '%')
|
||||
</if>
|
||||
<if test="reqVO.companyName != null">
|
||||
and c.NAME like concat('%', #{reqVO.companyName}, '%')
|
||||
<if test="erpCompanyName != null">
|
||||
and c.NAME like concat('%', #{erpCompanyName}, '%')
|
||||
</if>
|
||||
<if test="reqVO.type != null">
|
||||
and f.TP like concat('%', #{reqVO.type}, '%')
|
||||
<if test="type != null">
|
||||
and f.TP like concat('%', #{type}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -14,23 +14,31 @@
|
||||
</select>
|
||||
|
||||
<select id="getPageByReq" resultType="com.zt.plat.module.erp.dal.dataobject.erp.ErpWarehouseDO">
|
||||
select f.*, c.NAME as f
|
||||
select f.id,
|
||||
f.name as name,
|
||||
f.NUM as number,
|
||||
f.TP as type,
|
||||
f.REL_NAME as relName,
|
||||
f.REL_NUM as relnumber,
|
||||
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;
|
||||
where f.DELETED = 0
|
||||
<if test="reqVO.name != null">
|
||||
and f.NAME like concat('%', #{reqVO.name}, '%')
|
||||
<if test="name != null">
|
||||
and f.NAME like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="reqVO.number != null">
|
||||
and f.NUM like concat('%', #{reqVO.number}, '%')
|
||||
<if test="number != null">
|
||||
and f.NUM like concat('%', #{number}, '%')
|
||||
</if>
|
||||
<if test="reqVO.factoryNumber != null">
|
||||
<if test="factoryNumber != null">
|
||||
and f.FACT_NUM = like concat('%', #{factoryNumber}, '%')
|
||||
</if>
|
||||
<if test="reqVO.factoryName != null">
|
||||
<if test="factoryName != null">
|
||||
and c.NAME like concat('%', #{factoryName}, '%')
|
||||
</if>
|
||||
<if test="reqVO.type != null">
|
||||
and f.TP like concat('%', #{reqVO.type}, '%')
|
||||
<if test="type != null">
|
||||
and f.TP like concat('%', #{type}, '%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user