预警告警

This commit is contained in:
jjLv 2024-09-20 17:39:39 +08:00
parent 77c8a17a00
commit 4351f6b57f
7 changed files with 24 additions and 19 deletions

View File

@ -81,7 +81,7 @@ public class TbDevAttributeController extends BaseController {
* @return
*/
@PostMapping("/handle")
public AjaxResult approve(TbDevAttribute handle) {
public AjaxResult approve(@RequestBody TbDevAttribute handle) {
return tbDevAttributeService.handle(handle);
}

View File

@ -149,4 +149,4 @@ public class TbBdRecord implements Serializable {
private List<TbBdDeviceRecord> recordList;
private static final long serialVersionUID = 1L;
}
}

View File

@ -6,11 +6,13 @@ import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.Size;
import lombok.Data;
import org.springframework.stereotype.Repository;
/**
* 设备监测信息表
* @author syruan
*/
@ApiModel(description="设备监测信息表")
@Data
public class TbDevAttribute implements Serializable {
@ -102,4 +104,4 @@ public class TbDevAttribute implements Serializable {
private String endTime;
private static final long serialVersionUID = 1L;
}
}

View File

@ -3,12 +3,14 @@ package com.bonus.base.vo;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.stereotype.Repository;
/**
* @Author ma_sh
* @create 2024/9/19 19:52
*/
@Data
public class TbDevAttributeVo {

View File

@ -19,7 +19,7 @@
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
select
<include refid="Base_Column_List" />
from tb_bd_device_record
where id = #{id,jdbcType=BIGINT}
@ -34,10 +34,10 @@
<insert id="insert" parameterType="com.bonus.base.domain.TbBdDeviceRecord">
<!--@mbg.generated-->
insert into tb_bd_device_record (record_id, dev_name,
dev_code, unit_name, area_name,
dev_code, unit_name, area_name,
dev_user, dev_user_phone, pro_id)
values (#{recordId,jdbcType=BIGINT}, #{devName,jdbcType=VARCHAR},
#{devCode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR}, #{areaName,jdbcType=VARCHAR},
#{devCode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR}, #{areaName,jdbcType=VARCHAR},
#{devUser,jdbcType=VARCHAR}, #{devUserPhone,jdbcType=VARCHAR}, #{proId})
</insert>
<insert id="insertSelective" parameterType="com.bonus.base.domain.TbBdDeviceRecord">
@ -190,7 +190,7 @@
</update>
<delete id="deleteByPrimaryKeyIn">
<!--@mbg.generated-->
delete from tb_bd_device_record where id in
delete from tb_bd_device_record where id in
<foreach close=")" collection="list" item="id" open="(" separator=", ">
#{id,jdbcType=BIGINT}
</foreach>
@ -249,7 +249,8 @@
<select id="getAll" resultType="com.bonus.base.domain.TbBdDeviceRecord">
select
tbdr.id, tbdr.record_id, tbdr.dev_name, tbdr.dev_code, tbdr.unit_name, tbdr.area_name, tbdr.dev_user, tbdr.dev_user_phone,
tbdr.id as id, tbdr.record_id as recordId, tbdr.dev_name as devName, tbdr.dev_code as devCode, tbdr.unit_name as unitName, tbdr.area_name as areaName,
tbdr.dev_user as devUser, tbdr.dev_user_phone as devUserPhone,
tbr.audit_user as auditUser, tbr.audit_time as auditTime, su.nick_name as auditUserName
from tb_bd_device_record tbdr
left join tb_bd_record tbr on tbdr.record_id = tbr.id
@ -260,4 +261,4 @@
and tbdr.record_id = #{recordId}
</if>
</select>
</mapper>
</mapper>

View File

@ -24,7 +24,7 @@
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, depart_id, depart_name, pro_id, pro_name, rel_user, rel_phone, del_flag, audit_status,
id, depart_id, depart_name, pro_id, pro_name, rel_user, rel_phone, del_flag, audit_status,
remarks, create_time, create_user, update_time, update_user, audit_user, audit_time
</sql>
@ -221,4 +221,4 @@
</update>
</mapper>
</mapper>

View File

@ -21,7 +21,7 @@
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
select
<include refid="Base_Column_List" />
from tb_dev_attribute
where id = #{id,jdbcType=BIGINT}
@ -31,7 +31,7 @@
select tda.id as id,
tda.dev_id as devId,
td.dev_type as devType,
sda.dict_label as devTypeName,
sdd.dict_label as devTypeName,
td.dev_code as devCode,
td.dev_name as devName,
tda.jc_name as jcName,
@ -65,12 +65,12 @@
<insert id="insert" parameterType="com.bonus.base.domain.TbDevAttribute">
<!--@mbg.generated-->
insert into tb_dev_attribute (id, dev_id, jc_name,
jc_value, jc_unit, logo_url,
del_flag, rel_code, is_warn,
insert into tb_dev_attribute (id, dev_id, jc_name,
jc_value, jc_unit, logo_url,
del_flag, rel_code, is_warn,
jc_time)
values (#{id,jdbcType=BIGINT}, #{devId,jdbcType=BIGINT}, #{jcName,jdbcType=VARCHAR},
#{jcValue,jdbcType=VARCHAR}, #{jcUnit,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{devId,jdbcType=BIGINT}, #{jcName,jdbcType=VARCHAR},
#{jcValue,jdbcType=VARCHAR}, #{jcUnit,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR},
1, #{relCode,jdbcType=VARCHAR}, #{isWarn,jdbcType=INTEGER},
#{jcTime,jdbcType=VARCHAR})
</insert>
@ -259,4 +259,4 @@
</delete>
</mapper>
</mapper>