2025-09-25 15:24:41 +08:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
<mapper namespace="com.fizz.business.mapper.PdiSetupMapper">
|
|
|
|
|
|
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<!--
|
|
|
|
|
|
说明:本 Mapper XML 统一以 MyBatis-Plus 实体 com.fizz.business.domain.PdiSetups 为准。
|
|
|
|
|
|
旧版 PdiSetup(大写字段/TYPE/TM_*/TL_*) 已与当前实体不一致,继续保留会导致插入/查询字段缺失。
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="PdiSetupsResult" type="com.fizz.business.domain.PdiSetups">
|
|
|
|
|
|
<id property="id" column="id" />
|
|
|
|
|
|
<result property="coilid" column="coilid" />
|
|
|
|
|
|
<result property="planid" column="planid" />
|
|
|
|
|
|
<result property="steelGrade" column="steel_grade" />
|
|
|
|
|
|
<result property="thick" column="thick" />
|
|
|
|
|
|
<result property="yieldStren" column="yield_stren" />
|
|
|
|
|
|
|
|
|
|
|
|
<result property="porTension" column="por_tension" />
|
|
|
|
|
|
<result property="celTension" column="cel_tension" />
|
|
|
|
|
|
<result property="cleanTension" column="clean_tension" />
|
|
|
|
|
|
<result property="passivationTension" column="passivation_tension" />
|
|
|
|
|
|
<result property="cxlTension" column="cxl_tension" />
|
|
|
|
|
|
<result property="trTension" column="tr_tension" />
|
|
|
|
|
|
<result property="levelerEntryTension" column="leveler_entry_tension" />
|
|
|
|
|
|
<result property="levelerExitTension" column="leveler_exit_tension" />
|
|
|
|
|
|
<result property="straightenerExitTension" column="straightener_exit_tension" />
|
|
|
|
|
|
<result property="furTension" column="fur_tension" />
|
|
|
|
|
|
<result property="towerTension" column="tower_tension" />
|
|
|
|
|
|
|
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
|
id,
|
|
|
|
|
|
coilid,
|
|
|
|
|
|
planid,
|
|
|
|
|
|
steel_grade,
|
|
|
|
|
|
thick,
|
|
|
|
|
|
yield_stren,
|
|
|
|
|
|
por_tension,
|
|
|
|
|
|
cel_tension,
|
|
|
|
|
|
clean_tension,
|
|
|
|
|
|
passivation_tension,
|
|
|
|
|
|
cxl_tension,
|
|
|
|
|
|
tr_tension,
|
|
|
|
|
|
leveler_entry_tension,
|
|
|
|
|
|
leveler_exit_tension,
|
|
|
|
|
|
straightener_exit_tension,
|
|
|
|
|
|
fur_tension,
|
|
|
|
|
|
tower_tension,
|
|
|
|
|
|
create_time,
|
|
|
|
|
|
update_time
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</sql>
|
|
|
|
|
|
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<!-- 列表查询:支持按 coilid/planid/steelGrade/thick/yieldStren 过滤,按更新时间倒序 -->
|
|
|
|
|
|
<select id="selectPdiSetupList" parameterType="com.fizz.business.domain.PdiSetups" resultMap="PdiSetupsResult">
|
|
|
|
|
|
select
|
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
|
from pdi_setup
|
2025-09-25 15:24:41 +08:00
|
|
|
|
<where>
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<if test="coilid != null and coilid != ''"> and coilid = #{coilid}</if>
|
|
|
|
|
|
<if test="planid != null and planid != ''"> and planid = #{planid}</if>
|
|
|
|
|
|
<if test="steelGrade != null and steelGrade != ''"> and steel_grade = #{steelGrade}</if>
|
|
|
|
|
|
<if test="thick != null"> and thick = #{thick}</if>
|
|
|
|
|
|
<if test="yieldStren != null"> and yield_stren = #{yieldStren}</if>
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</where>
|
2026-01-07 20:15:33 +08:00
|
|
|
|
order by update_time desc
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</select>
|
|
|
|
|
|
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<select id="selectPdiSetupById" parameterType="java.lang.Long" resultMap="PdiSetupsResult">
|
|
|
|
|
|
select
|
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
|
from pdi_setup
|
|
|
|
|
|
where id = #{id}
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</select>
|
|
|
|
|
|
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<!--
|
|
|
|
|
|
说明:insert/update 这里保留是为了兼容旧代码可能直接调用 XML 的 SQL。
|
|
|
|
|
|
如果你们完全使用 MyBatis-Plus 的 BaseMapper/save/updateById,也可以后续删除这些 SQL。
|
|
|
|
|
|
-->
|
|
|
|
|
|
<insert id="insertPdiSetup" parameterType="com.fizz.business.domain.PdiSetups" useGeneratedKeys="true" keyProperty="id">
|
2025-09-25 15:24:41 +08:00
|
|
|
|
insert into pdi_setup
|
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<if test="coilid != null and coilid != ''">coilid,</if>
|
|
|
|
|
|
<if test="planid != null and planid != ''">planid,</if>
|
|
|
|
|
|
<if test="steelGrade != null and steelGrade != ''">steel_grade,</if>
|
|
|
|
|
|
<if test="thick != null">thick,</if>
|
|
|
|
|
|
<if test="yieldStren != null">yield_stren,</if>
|
|
|
|
|
|
|
|
|
|
|
|
<if test="porTension != null">por_tension,</if>
|
|
|
|
|
|
<if test="celTension != null">cel_tension,</if>
|
|
|
|
|
|
<if test="cleanTension != null">clean_tension,</if>
|
|
|
|
|
|
<if test="passivationTension != null">passivation_tension,</if>
|
|
|
|
|
|
<if test="cxlTension != null">cxl_tension,</if>
|
|
|
|
|
|
<if test="trTension != null">tr_tension,</if>
|
|
|
|
|
|
<if test="levelerEntryTension != null">leveler_entry_tension,</if>
|
|
|
|
|
|
<if test="levelerExitTension != null">leveler_exit_tension,</if>
|
|
|
|
|
|
<if test="straightenerExitTension != null">straightener_exit_tension,</if>
|
|
|
|
|
|
<if test="furTension != null">fur_tension,</if>
|
|
|
|
|
|
<if test="towerTension != null">tower_tension,</if>
|
|
|
|
|
|
|
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</trim>
|
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<if test="coilid != null and coilid != ''">#{coilid},</if>
|
|
|
|
|
|
<if test="planid != null and planid != ''">#{planid},</if>
|
|
|
|
|
|
<if test="steelGrade != null and steelGrade != ''">#{steelGrade},</if>
|
|
|
|
|
|
<if test="thick != null">#{thick},</if>
|
|
|
|
|
|
<if test="yieldStren != null">#{yieldStren},</if>
|
|
|
|
|
|
|
2025-09-25 15:24:41 +08:00
|
|
|
|
<if test="porTension != null">#{porTension},</if>
|
|
|
|
|
|
<if test="celTension != null">#{celTension},</if>
|
|
|
|
|
|
<if test="cleanTension != null">#{cleanTension},</if>
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<if test="passivationTension != null">#{passivationTension},</if>
|
2025-09-25 15:24:41 +08:00
|
|
|
|
<if test="cxlTension != null">#{cxlTension},</if>
|
|
|
|
|
|
<if test="trTension != null">#{trTension},</if>
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<if test="levelerEntryTension != null">#{levelerEntryTension},</if>
|
|
|
|
|
|
<if test="levelerExitTension != null">#{levelerExitTension},</if>
|
|
|
|
|
|
<if test="straightenerExitTension != null">#{straightenerExitTension},</if>
|
|
|
|
|
|
<if test="furTension != null">#{furTension},</if>
|
|
|
|
|
|
<if test="towerTension != null">#{towerTension},</if>
|
|
|
|
|
|
|
2025-09-25 15:24:41 +08:00
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<update id="updatePdiSetup" parameterType="com.fizz.business.domain.PdiSetups">
|
2025-09-25 15:24:41 +08:00
|
|
|
|
update pdi_setup
|
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<if test="coilid != null and coilid != ''">coilid = #{coilid},</if>
|
|
|
|
|
|
<if test="planid != null and planid != ''">planid = #{planid},</if>
|
|
|
|
|
|
<if test="steelGrade != null and steelGrade != ''">steel_grade = #{steelGrade},</if>
|
|
|
|
|
|
<if test="thick != null">thick = #{thick},</if>
|
|
|
|
|
|
<if test="yieldStren != null">yield_stren = #{yieldStren},</if>
|
|
|
|
|
|
|
|
|
|
|
|
<if test="porTension != null">por_tension = #{porTension},</if>
|
|
|
|
|
|
<if test="celTension != null">cel_tension = #{celTension},</if>
|
|
|
|
|
|
<if test="cleanTension != null">clean_tension = #{cleanTension},</if>
|
|
|
|
|
|
<if test="passivationTension != null">passivation_tension = #{passivationTension},</if>
|
|
|
|
|
|
<if test="cxlTension != null">cxl_tension = #{cxlTension},</if>
|
|
|
|
|
|
<if test="trTension != null">tr_tension = #{trTension},</if>
|
|
|
|
|
|
<if test="levelerEntryTension != null">leveler_entry_tension = #{levelerEntryTension},</if>
|
|
|
|
|
|
<if test="levelerExitTension != null">leveler_exit_tension = #{levelerExitTension},</if>
|
|
|
|
|
|
<if test="straightenerExitTension != null">straightener_exit_tension = #{straightenerExitTension},</if>
|
|
|
|
|
|
<if test="furTension != null">fur_tension = #{furTension},</if>
|
|
|
|
|
|
<if test="towerTension != null">tower_tension = #{towerTension},</if>
|
|
|
|
|
|
|
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</trim>
|
2026-01-07 20:15:33 +08:00
|
|
|
|
where id = #{id}
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</update>
|
|
|
|
|
|
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<delete id="deletePdiSetupById" parameterType="java.lang.Long">
|
|
|
|
|
|
delete from pdi_setup where id = #{id}
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</delete>
|
|
|
|
|
|
|
2026-01-07 20:15:33 +08:00
|
|
|
|
<delete id="deletePdiSetupByIds" parameterType="long">
|
|
|
|
|
|
delete from pdi_setup where id in
|
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
2025-09-26 11:03:35 +08:00
|
|
|
|
#{id}
|
2025-09-25 15:24:41 +08:00
|
|
|
|
</foreach>
|
|
|
|
|
|
</delete>
|
2026-01-07 20:15:33 +08:00
|
|
|
|
|
|
|
|
|
|
</mapper>
|