erp库位、物料优化

This commit is contained in:
liss
2025-10-10 19:11:48 +08:00
parent 9011d8fc5a
commit 72a9dff7c3
18 changed files with 228 additions and 61 deletions

View File

@@ -31,6 +31,6 @@
</select>
<select id="selectMaxCode" resultType="java.lang.String">
SELECT MAX(NUM) FROM sply_erp_fact where TP = '供应链'
SELECT MAX(NUM) FROM sply_erp_fact
</select>
</mapper>

View File

@@ -33,5 +33,21 @@
WHERE DOWN_CTR_NUM = #{item.downCenterNumber}
</foreach>
</update>
<select id="selectMaxCode" resultType="java.lang.String">
SELECT MAX(MTRL_CODE) FROM SPLY_ERP_MTRL
</select>
<select id="selectByErpMId">
SELECT * FROM SPLY_ERP_MTRL WHERE MTRL_ID = #{erpMId}
</select>
<select id="selectByErpMNumbers" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM sply_mtrl_oth
WHERE ERP_MTRL_NUM IN
<foreach item="erpMNumber" collection="erpMNumbers" open="(" separator="," close=")">
#{erpMNumber}
</foreach>
</select>
</mapper>

View File

@@ -9,4 +9,28 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="selectMaxCode" resultType="java.lang.String">
SELECT MAX(NUM) FROM sply_erp_wrh
</select>
<select id="getPageByReq" resultType="com.zt.plat.module.erp.dal.dataobject.erp.ErpWarehouseDO">
select f.*, c.NAME as f
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>
<if test="reqVO.number != null">
and f.NUM like concat('%', #{reqVO.number}, '%')
</if>
<if test="reqVO.factoryNumber != null">
and f.FACT_NUM = like concat('%', #{factoryNumber}, '%')
</if>
<if test="reqVO.factoryName != null">
and c.NAME like concat('%', #{factoryName}, '%')
</if>
<if test="reqVO.type != null">
and f.TP like concat('%', #{reqVO.type}, '%')
</if>
</select>
</mapper>