feat: 设备管理-添加用户-后端

This commit is contained in:
LokerL 2024-12-15 20:51:55 +08:00
parent 8fc9d373be
commit 090a89b014
3 changed files with 46 additions and 2 deletions

View File

@ -52,6 +52,26 @@ public class OilMonitor extends BaseEntity {
private String fileUrl; private String fileUrl;
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
private String userName;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Long getId() { public Long getId() {
return id; return id;
} }

View File

@ -133,6 +133,21 @@ public class ThDevice extends BaseEntity {
*/ */
private BigDecimal ds; private BigDecimal ds;
/**
* 用户id
*/
private Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getGangqu() { public String getGangqu() {
return gangqu; return gangqu;
} }

View File

@ -22,6 +22,8 @@
<result property="systemNo" column="system_no"/> <result property="systemNo" column="system_no"/>
<result property="unitNo" column="unit_no"/> <result property="unitNo" column="unit_no"/>
<result property="bjyz" column="bjyz"/> <result property="bjyz" column="bjyz"/>
<result property="userId" column="user_id"/>
<result property="userName" column="userName"/>
</resultMap> </resultMap>
<resultMap type="com.ruoyi.project.oil.domain.monitor.ThDevice" id="ThDeviceList"> <resultMap type="com.ruoyi.project.oil.domain.monitor.ThDevice" id="ThDeviceList">
<result property="id" column="id"/> <result property="id" column="id"/>
@ -44,6 +46,7 @@
<result property="num" column="num"/> <result property="num" column="num"/>
<result property="factoryName" column="factory_name"/> <result property="factoryName" column="factory_name"/>
<result property="factoryId" column="factory_id"/> <result property="factoryId" column="factory_id"/>
<result property="userId" column="user_id"/>
</resultMap> </resultMap>
<resultMap type="com.ruoyi.project.oil.domain.monitor.ThAlarm" id="AlarmResult"> <resultMap type="com.ruoyi.project.oil.domain.monitor.ThAlarm" id="AlarmResult">
@ -85,8 +88,11 @@
<select id="selectOilDeviceList" resultMap="OilDeviceResult"> <select id="selectOilDeviceList" resultMap="OilDeviceResult">
select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t.dept_id,d.dept_name,t.longitude,t.latitude, select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t.dept_id,d.dept_name,t.longitude,t.latitude,
t.bjyz t.bjyz, t.user_id, u.user_name as userName
from th_device t left join sys_dept d on t.dept_id=d.dept_id from th_device t
left join sys_dept d on t.dept_id=d.dept_id
left join sys_user u on t.user_id=u.user_id
<where> <where>
<if test="id != null and id != ''">and t.id=#{id}</if> <if test="id != null and id != ''">and t.id=#{id}</if>
<if test="monitorName != null and monitorName != ''">and t.name like concat('%', #{monitorName},'%') </if> <if test="monitorName != null and monitorName != ''">and t.name like concat('%', #{monitorName},'%') </if>
@ -118,6 +124,7 @@ select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.crea
<if test="unitNo != null">unit_no,</if> <if test="unitNo != null">unit_no,</if>
<if test="systemNo != null">system_no,</if> <if test="systemNo != null">system_no,</if>
<if test="bjyz != null">bjyz,</if> <if test="bjyz != null">bjyz,</if>
<if test="userId != null">user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="monitorName != null">#{monitorName},</if> <if test="monitorName != null">#{monitorName},</if>
@ -133,6 +140,7 @@ select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.crea
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="unitNo != null">#{unitNo},</if> <if test="unitNo != null">#{unitNo},</if>
<if test="bjyz != null">#{bjyz},</if> <if test="bjyz != null">#{bjyz},</if>
<if test="userId != null">#{userId},</if>
</trim> </trim>
</insert> </insert>
@ -152,6 +160,7 @@ select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.crea
<if test="systemNo != null">system_no=#{systemNo},</if> <if test="systemNo != null">system_no=#{systemNo},</if>
<if test="unitNo != null">unit_no=#{unitNo},</if> <if test="unitNo != null">unit_no=#{unitNo},</if>
<if test="bjyz != null">bjyz=#{bjyz},</if> <if test="bjyz != null">bjyz=#{bjyz},</if>
<if test="userId != null">user_id=#{userId},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>