erp工厂新增、编辑、批量更新、定时任务、分页查询优化

This commit is contained in:
liss
2025-10-10 17:55:01 +08:00
parent bd62556640
commit 30420ab96f
30 changed files with 239 additions and 251 deletions

View File

@@ -9,14 +9,28 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<update id="updateBatch">
<foreach collection="toUpdate" item="item" separator=";">
UPDATE sply_erp_fact
<set>
<if test="item.name != null">NAME = #{item.name},</if>
<if test="item.number != null">CPN_ID = #{item.companyId},</if>
</set>
WHERE NUM = #{item.number}
</foreach>
</update>
<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;
where f.DELETED = 0
<if test="reqVO.name != null">
and f.NAME like concat('%', #{reqVO.name}, '%')
</if>
<if test="reqVO.number != null">
and f.NUM like concat('%', #{reqVO.number}, '%')
</if>
<if test="reqVO.companyNumber != null">
and f.CPN_ID = like concat('%', #{reqVO.companyNumber}, '%')
</if>
<if test="reqVO.companyName != null">
and c.NAME like concat('%', #{reqVO.companyName}, '%')
</if>
<if test="reqVO.type != null">
and f.TP like concat('%', #{reqVO.type}, '%')
</if>
</select>
<select id="selectMaxCode" resultType="java.lang.String">
SELECT MAX(NUM) FROM sply_erp_fact where TP = '供应链'
</select>
</mapper>