刘小明
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