add(recordBusbarTemp): 母排测温记录增加巡检模式功能

- 在 RecordBusbarTemp 模型中添加 routModel 字段,用于记录巡检模式
- 在前端页面中增加巡检模式的选择和显示
- 修改数据库映射文件,支持 routModel 字段的存储和查询
IOT
zch 2 months ago
parent e0e1e64d42
commit 23101c9ec3

@ -10,7 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
/**
* record_busbar_temp
*
*
* @author zangch
* @date 2024-11-07
*/
@ -81,142 +81,154 @@ public class RecordBusbarTemp extends BaseEntity
@Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date recordTime;
public void setObjId(Long objId)
/** 巡检模式1-自动2-快速3-定点 */
@Excel(name = "巡检模式1-自动2-快速3-定点")
private Long routModel;
public void setObjId(Long objId)
{
this.objId = objId;
}
public Long getObjId()
public Long getObjId()
{
return objId;
}
public void setBusbarCode(Long busbarCode)
public void setBusbarCode(Long busbarCode)
{
this.busbarCode = busbarCode;
}
public Long getBusbarCode()
public Long getBusbarCode()
{
return busbarCode;
}
public void setCabinetCode(Long cabinetCode)
public void setCabinetCode(Long cabinetCode)
{
this.cabinetCode = cabinetCode;
}
public Long getCabinetCode()
public Long getCabinetCode()
{
return cabinetCode;
}
public void setTempMax(BigDecimal tempMax)
public void setTempMax(BigDecimal tempMax)
{
this.tempMax = tempMax;
}
public BigDecimal getTempMax()
public BigDecimal getTempMax()
{
return tempMax;
}
public void setTempMin(BigDecimal tempMin)
public void setTempMin(BigDecimal tempMin)
{
this.tempMin = tempMin;
}
public BigDecimal getTempMin()
public BigDecimal getTempMin()
{
return tempMin;
}
public void setTempAvg(BigDecimal tempAvg)
public void setTempAvg(BigDecimal tempAvg)
{
this.tempAvg = tempAvg;
}
public BigDecimal getTempAvg()
public BigDecimal getTempAvg()
{
return tempAvg;
}
public void setTempDiff(BigDecimal tempDiff)
public void setTempDiff(BigDecimal tempDiff)
{
this.tempDiff = tempDiff;
}
public BigDecimal getTempDiff()
public BigDecimal getTempDiff()
{
return tempDiff;
}
public void setIsAlarm(Long isAlarm)
public void setIsAlarm(Long isAlarm)
{
this.isAlarm = isAlarm;
}
public Long getIsAlarm()
public Long getIsAlarm()
{
return isAlarm;
}
public void setFilePath(String filePath)
public void setFilePath(String filePath)
{
this.filePath = filePath;
}
public String getFilePath()
public String getFilePath()
{
return filePath;
}
public void setIsFlag(Long isFlag)
public void setIsFlag(Long isFlag)
{
this.isFlag = isFlag;
}
public Long getIsFlag()
public Long getIsFlag()
{
return isFlag;
}
public void setCreatedBy(String createdBy)
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public Date getCreatedTime()
public Date getCreatedTime()
{
return createdTime;
}
public void setUpdatedBy(String updatedBy)
public void setUpdatedBy(String updatedBy)
{
this.updatedBy = updatedBy;
}
public String getUpdatedBy()
public String getUpdatedBy()
{
return updatedBy;
}
public void setUpdatedTime(Date updatedTime)
public void setUpdatedTime(Date updatedTime)
{
this.updatedTime = updatedTime;
}
public Date getUpdatedTime()
public Date getUpdatedTime()
{
return updatedTime;
}
public void setRecordTime(Date recordTime)
public void setRecordTime(Date recordTime)
{
this.recordTime = recordTime;
}
public Date getRecordTime()
public Date getRecordTime()
{
return recordTime;
}
public Long getRoutModel() {
return routModel;
}
public void setRoutModel(Long routModel) {
this.routModel = routModel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -236,6 +248,7 @@ public class RecordBusbarTemp extends BaseEntity
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.append("recordTime", getRecordTime())
.append("routModel", getRoutModel())
.toString();
}
}

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.record.mapper.RecordBusbarTempMapper">
<resultMap type="RecordBusbarTemp" id="RecordBusbarTempResult">
<result property="objId" column="objId" />
<result property="busbarCode" column="busbar_code" />
@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="recordTime" column="record_time" />
<result property="routModel" column="rout_model" />
</resultMap>
<sql id="selectRecordBusbarTempVo">
@ -38,13 +39,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
created_time,
updated_by,
updated_time,
record_time
record_time,
rout_model
from record_busbar_temp
</sql>
<select id="selectRecordBusbarTempList" parameterType="RecordBusbarTemp" resultMap="RecordBusbarTempResult">
<include refid="selectRecordBusbarTempVo"/>
<where>
<where>
<if test="objId != null "> and objId = #{objId}</if>
<if test="busbarCode != null "> and busbar_code = #{busbarCode}</if>
<if test="cabinetCode != null "> and cabinet_code = #{cabinetCode}</if>
@ -61,9 +63,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="params.beginUpdatedTime != null and params.beginUpdatedTime != '' and params.endUpdatedTime != null and params.endUpdatedTime != ''"> and updated_time between #{params.beginUpdatedTime} and #{params.endUpdatedTime}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''"> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
<if test="routModel != null "> and rout_model = #{routModel}</if>
</where>
</select>
<select id="selectRecordBusbarTempByObjId" parameterType="Long" resultMap="RecordBusbarTempResult">
<include refid="selectRecordBusbarTempVo"/>
where objId = #{objId}
@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="recordTime != null">record_time,</if>
<if test="routModel != null">rout_model,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="busbarCode != null">#{busbarCode},</if>
@ -104,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="recordTime != null">#{recordTime},</if>
<if test="routModel != null">#{routModel},</if>
</trim>
</insert>
@ -125,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="recordTime != null">record_time = #{recordTime},</if>
<if test="routModel != null">rout_model = #{routModel},</if>
</trim>
where objId = #{objId}
</update>
@ -134,9 +140,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteRecordBusbarTempByObjIds" parameterType="String">
delete from record_busbar_temp where objId in
delete from record_busbar_temp where objId in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>
</mapper>

@ -98,6 +98,16 @@
/>
</el-select>
</el-form-item>
<el-form-item label="巡检模式" prop="routModel">
<el-select v-model="queryParams.routModel" placeholder="请选择巡检模式" clearable>
<el-option
v-for="dict in dict.type.rout_model"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="图像路径" prop="filePath">
<el-input
v-model="queryParams.filePath"
@ -263,6 +273,11 @@
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>-->
<el-table-column label="巡检模式" align="center" prop="routModel">
<template slot-scope="scope">
<dict-tag :options="dict.type.rout_model" :value="scope.row.routModel"/>
</template>
</el-table-column>
<el-table-column label="记录时间" align="center" prop="recordTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.recordTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -350,6 +365,17 @@
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="巡检模式" prop="routModel">
<el-radio-group v-model="form.routModel">
<el-radio
v-for="dict in dict.type.rout_model"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
@ -423,7 +449,7 @@ import {getBaseCabinetInfoTree} from "@/api/base/baseCabinetInfo";
export default {
name: "RecordBusbarTemp",
dicts: ['record_busbar_temp_is_alarm', 'record_busbar_temp_is_flag'],
dicts: ['record_busbar_temp_is_alarm', 'record_busbar_temp_is_flag','rout_model'],
data() {
return {
@ -485,7 +511,8 @@ export default {
createdTime: null,
updatedBy: null,
updatedTime: null,
recordTime: null
recordTime: null,
routModel: null
},
//
form: {},
@ -561,6 +588,7 @@ export default {
thermalPhoto : null,
thermalResponse : null,
visibleResponse : null,
routModel: null,
};
this.resetForm("form");
this.photoOpen = false;
@ -693,33 +721,6 @@ export default {
}
};
</script>
<!--
上面的图像是 2688x1520下面的图像是 1920x1080
<style scoped>
/* 定义一个图像容器类,用于设置图像的布局和样式 */
.image-container {
width: 100%; /* 设置容器宽度为100%,以适应父元素 */
max-width: 1080px; /* 设置容器的最大宽度,防止图像在大屏幕上显示过大 */
margin: 0 auto; /* 居中显示容器 */
position: relative; /* 设置相对定位,以便于在容器内进行绝对定位 */
aspect-ratio: 16 / 9; /* 16:9 的比例,适合 1920x1080 的图像 */
margin-bottom: 10px; /* 减少容器之间的间距 */
}
/* 设置图像容器内的图像样式 */
.image-container img {
width: 100%; /* 设置图像宽度为100%,充满容器 */
height: 100%; /* 设置图像高度为100%,充满容器 */
object-fit: contain; /* 使用 contain 以确保图像完整显示 */
}
/* 对话框内容区域的样式 */
.dialog-content {
max-height: 80vh; /* 设置最大高度为视口高度的 80% */
overflow-y: auto; /* 添加垂直滚动条 */
}
</style>
-->
<style scoped>
.dialog-content {

Loading…
Cancel
Save