刘小明
2024-07-17 bea49667b0a34a17490c4b47f6a14857a737f647
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeLastMapper.xml
@@ -22,6 +22,7 @@
            <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/>
            <result property="memo" column="memo" jdbcType="VARCHAR"/>
    </resultMap>
    <resultMap id="joinResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLifeLast" extends="BaseResultMap">
        <result property="planName" column="plan_name" jdbcType="VARCHAR"/>
        <result property="stationName" column="station_name" jdbcType="VARCHAR"/>
@@ -38,11 +39,12 @@
        in_time,out_time,updated_by,
        memo
    </sql>
    <select id="selectByDeviceNo" parameterType="java.lang.String" resultMap="joinResultMap">
        select
            t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name
        FROM
            sta_device_life t
            sta_device_life_last t
                left join pr_assembly_plan p on t.plan_id=p.id
                left join plt_station s on s.id = t.station_id
                left JOIN ba_user u on u.id=t.updated_by
@@ -54,12 +56,12 @@
        select
        <include refid="Base_Column_List" />
        from sta_device_life_last
        where  id = #{id,jdbcType=BIGINT}
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from sta_device_life_last
        where  id = #{id,jdbcType=BIGINT}
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLifeLast" useGeneratedKeys="true">
        insert into sta_device_life_last
@@ -164,11 +166,11 @@
                    memo = #{memo,jdbcType=VARCHAR},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLifeLast">
        update sta_device_life_last
        set
        set
            device_no =  #{deviceNo,jdbcType=VARCHAR},
            work_id =  #{workId,jdbcType=BIGINT},
            repair_id =  #{repairId,jdbcType=BIGINT},
@@ -184,7 +186,7 @@
            out_time =  #{outTime,jdbcType=TIMESTAMP},
            updated_by =  #{updatedBy,jdbcType=BIGINT},
            memo =  #{memo,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=BIGINT}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByDeviceNo">
        update sta_device_life_last