erp工厂新增、编辑、批量更新、定时任务、分页查询优化
This commit is contained in:
@@ -8,23 +8,4 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
<update id="updateBatch">
|
||||
UPDATE sply_erp_ast
|
||||
<set>
|
||||
NAME = CASE
|
||||
<foreach collection="toUpdate" item="item">
|
||||
WHEN CPN_NUM = #{item.companyNumber} AND MAIN_AST_NUM = #{item.mainAssetNumber} THEN #{item.name}
|
||||
</foreach>
|
||||
END,
|
||||
CPN_ID = CASE
|
||||
<foreach collection="toUpdate" item="item">
|
||||
WHEN CPN_NUM = #{item.companyNumber} AND MAIN_AST_NUM = #{item.mainAssetNumber} THEN #{item.companyId}
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
WHERE (CPN_NUM, MAIN_AST_NUM) IN
|
||||
<foreach collection="toUpdate" item="item" open="(" separator="," close=")">
|
||||
#{item.companyNumber}, #{item.mainAssetNumber}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -9,18 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<insert id="insertGetId">
|
||||
|
||||
</insert>
|
||||
|
||||
<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>
|
||||
</mapper>
|
||||
@@ -8,15 +8,4 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -8,15 +8,4 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -9,61 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<update id="updateBatchByNumber">
|
||||
UPDATE sply_erp_cctr
|
||||
SET
|
||||
NAME = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.name != null and item.name != ''">
|
||||
WHEN #{item.number} THEN #{item.name}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE NAME
|
||||
END,
|
||||
IS_USE = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.isUse != null and item.isUse != ''">
|
||||
WHEN #{item.number} THEN #{item.isUse}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE IS_USE
|
||||
END,
|
||||
SCO_NUM = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.scopeNumber != null and item.scopeNumber != ''">
|
||||
WHEN #{item.number} THEN #{item.scopeNumber}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE SCO_NUM
|
||||
END,
|
||||
STRT_DT = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.startDate != null">
|
||||
WHEN #{item.number} THEN #{item.startDate}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE STRT_DT
|
||||
END,
|
||||
END_DT = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.endDate != null">
|
||||
WHEN #{item.number} THEN #{item.endDate}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE END_DT
|
||||
END,
|
||||
SCO_NAME = CASE NUM
|
||||
<foreach collection="list" item="item">
|
||||
<if test="item.scopeName != null and item.scopeName != ''">
|
||||
WHEN #{item.number} THEN #{item.scopeName}
|
||||
</if>
|
||||
</foreach>
|
||||
ELSE SCO_NAME
|
||||
END
|
||||
WHERE NUM IN
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item.number}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -8,15 +8,4 @@
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -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>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
@@ -9,14 +9,4 @@
|
||||
文档可见: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>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user