From bc2fe67f09b2fb7eb54d599d770f24cd46e21243 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期一, 08 七月 2024 09:41:44 +0800
Subject: [PATCH] remove method updateAssistant
---
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 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 d3936f5..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,14 +47,19 @@
where id = #{id,jdbcType=BIGINT}
</select>
- <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="BaseResultMap">
+ <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="joinResultMap">
select
- <include refid="Base_Column_List" />
- from sta_device_life
- where equip_no = #{equipNo,jdbcType=VARCHAR}
- order by id desc
+ 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