From 5d813bb3a09810648e607a46d44f350686e3dc28 Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期二, 09 七月 2024 09:45:33 +0800 Subject: [PATCH] device report finish --- pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml index dffccc8..fb8527f 100644 --- a/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml +++ b/pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml @@ -23,6 +23,13 @@ <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/> <result property="memo" column="memo" jdbcType="VARCHAR"/> </resultMap> + <resultMap id="joinResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLife" extends="BaseResultMap"> + <result property="planName" column="plan_name" jdbcType="VARCHAR"/> + <result property="stationName" column="station_name" jdbcType="VARCHAR"/> + <result property="updateUserName" column="update_user_name" jdbcType="VARCHAR"/> + <association property="assistantNames" jdbcType="VARCHAR" column="assistants" + select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNamesByAssistants" fetchType="eager" /> + </resultMap> <sql id="Base_Column_List"> id,equip_no,work_id, @@ -40,6 +47,19 @@ where id = #{id,jdbcType=BIGINT} </select> + <select id="selectByEquipNo" 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 + 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 + where t.equip_no = #{equipNo,jdbcType=VARCHAR} + ORDER BY t.id DESC + </select> + + <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> delete from sta_device_life where id = #{id,jdbcType=BIGINT} -- Gitblit v1.8.0