Merge remote-tracking branch 'origin/master'

master
夜笙歌 6 months ago
commit ffa1bd0709

@ -0,0 +1,118 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TVibrationsensorData;
import com.ruoyi.system.service.ITVibrationsensorDataService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2024-04-28
*/
@Controller
@RequestMapping("/system/TVibrationsensorData")
public class TVibrationsensorDataController extends BaseController {
private String prefix = "system/TVibrationsensorData";
@Autowired
private ITVibrationsensorDataService tVibrationsensorDataService;
@RequiresPermissions("system:TVibrationsensorData:view")
@GetMapping()
public String TVibrationsensorData() {
return prefix + "/TVibrationsensorData";
}
/**
*
*/
@RequiresPermissions("system:TVibrationsensorData:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TVibrationsensorData tVibrationsensorData) {
startPage();
List<TVibrationsensorData> list = tVibrationsensorDataService.selectTVibrationsensorDataList(tVibrationsensorData);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:TVibrationsensorData:export")
@Log(title = "振动传感器数据", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TVibrationsensorData tVibrationsensorData) {
List<TVibrationsensorData> list = tVibrationsensorDataService.selectTVibrationsensorDataList(tVibrationsensorData);
ExcelUtil<TVibrationsensorData> util = new ExcelUtil<TVibrationsensorData>(TVibrationsensorData.class);
return util.exportExcel(list, "TVibrationsensorData");
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:TVibrationsensorData:add")
@Log(title = "振动传感器数据", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TVibrationsensorData tVibrationsensorData) {
return toAjax(tVibrationsensorDataService.insertTVibrationsensorData(tVibrationsensorData));
}
/**
*
*/
@GetMapping("/edit/{objId}")
public String edit(@PathVariable("objId") Long objId, ModelMap mmap) {
TVibrationsensorData tVibrationsensorData = tVibrationsensorDataService.selectTVibrationsensorDataById(objId);
mmap.put("tVibrationsensorData", tVibrationsensorData);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:TVibrationsensorData:edit")
@Log(title = "振动传感器数据", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TVibrationsensorData tVibrationsensorData) {
return toAjax(tVibrationsensorDataService.updateTVibrationsensorData(tVibrationsensorData));
}
/**
*
*/
@RequiresPermissions("system:TVibrationsensorData:remove")
@Log(title = "振动传感器数据", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(tVibrationsensorDataService.deleteTVibrationsensorDataByIds(ids));
}
}

@ -73,6 +73,8 @@ public class T_MonitorController extends BaseController {
break;
case 17:
url = "/monitor_tw";
case 20:
url = "/vibrationSensorMonitor";
break;
}
@ -137,13 +139,15 @@ public class T_MonitorController extends BaseController {
case 6:
url = "/lng/add";
break;
case 5:
url = "/GasAdd";
break;
case 16:
url = "/TempAdd";
break;
case 20:
url = "/vibrationSensorAdd";
break;
default:
break;
}
@ -154,6 +158,17 @@ public class T_MonitorController extends BaseController {
return prefix + url;
}
@GetMapping(value = {"/vibrationSensorAdd/{objid}", "/vibrationSensorAdd/"})
public String vibrationSensorAdd(@PathVariable(value = "objid", required = false) Integer objid, ModelMap mmap) {
String url = "";
if (StringUtils.isNotNull(objid)) {
T_Monitor t_monitor = t_MonitorService.selectT_MonitorById(objid);
mmap.put("t_Monitor", t_monitor);
}
url = "/vibrationSensorAdd";
return prefix + url;
}
/**
*
*/
@ -204,6 +219,9 @@ public class T_MonitorController extends BaseController {
case 17:
url = "/edit_tm";
break;
case 20:
url = "/vibrationSensorEdit";
break;
default:
break;
}
@ -259,11 +277,8 @@ public class T_MonitorController extends BaseController {
url = "/waterTree";
break;
case "6":
url = "/lng/waterTree";
break;
case "5":
url = "/gasTree";
break;
@ -273,7 +288,9 @@ public class T_MonitorController extends BaseController {
case "17":
url = "/tmTree";
break;
case "20":
url = "/vibrationSensorTree";
break;
default:
T_Monitor t_monitor = new T_Monitor();
t_monitor.setMonitorId(objid);
@ -298,6 +315,9 @@ public class T_MonitorController extends BaseController {
case 17:
url = "/tmTree";
break;
case 20:
url = "/vibrationSensorTree";
break;
default:
break;
}

@ -0,0 +1,192 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('新增测控点信息')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-Monitor-add">
<div class="form-group">
<label class="col-sm-3 control-label">集中器编号:</label>
<div class="col-sm-6">
<textarea style="height: 32px" id="userids" name="collectDeviceId" class="form-control"></textarea>
</div>
<button type="button" class="btn btn-info" onclick="selectUsersToParent()">选择集中器</button>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">测控点编号:</label>
<div class="col-sm-8">
<textarea style="height: 32px" id="userid" name="monitorId" class="form-control" required></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">父级测控点:</label>
<div class="col-sm-8">
<div class="input-group">
<input id="treeId" name="pMonitorid" type="hidden" th:value="${t_Monitor?.monitorId}"/>
<input class="form-control" type="text" onclick="selectMonitorTree()" id="treeName" readonly="true"
th:value="${t_Monitor?.monitorName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">测控点名称:</label>
<div class="col-sm-8">
<input name="monitorName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<input name="monitorType" class="form-control" type="text" value="20" style="display: none;">
<!-- <label class="col-sm-3 control-label">测控点类型:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="monitorType" class="form-control m-b"-->
<!-- th:with="type=${@energyTypeService.getEnergyType()}">-->
<!-- <option value="">所有</option>-->
<!-- <option th:each="dict : ${type}" th:text="${dict.energyName}"-->
<!-- th:value="${dict.energyTypeId}" th:selected="${dict.energyTypeId==16}"></option>-->
<!-- </select>-->
<!-- </div>-->
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">二级类型:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="secondType" class="form-control m-b" th:with="type=${@dict.getType('monitorSecondType')}">-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">测控点位置:</label>
<div class="col-sm-8">
<input name="monitorAddr" class="form-control" type="text">
</div>
</div>
<!--div class="form-group">
<label class="col-sm-3 control-label">传感器仪表:</label>
<div class="col-sm-8">
<input name="sensorMeterTypeId" class="form-control" type="text">
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">测量器具:</label>
<div class="col-sm-8">
<select name="meterId" class="form-control m-b" th:with="type=${@meterInfoService.getMeterInfo()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.meterID}" th:value="${dict.meterID}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">通讯端口:</label>
<div class="col-sm-8">
<input name="meterCommunicationId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否重点:</label>
<div class="col-sm-8">
<select name="isKeyMonitor" class="form-control m-b" th:with="type=${@dict.getType('isKey')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">测控点状态:</label>
<div class="col-sm-8">
<select name="monitorStatus" class="form-control m-b" th:with="type=${@dict.getType('monitorStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-3 control-label">最大值:</label>
<div class="col-sm-8">
<input name="pt" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最小值:</label>
<div class="col-sm-8">
<input name="ct" class="form-control" type="text">
</div>
</div>-->
<!--<div class="form-group">
<label class="col-sm-3 control-label">温度最大值:</label>
<div class="col-sm-8">
<input name="tMax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">温度最小值:</label>
<div class="col-sm-8">
<input name="tMin" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">湿度最大值:</label>
<div class="col-sm-8">
<input name="hMax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">湿度最小值:</label>
<div class="col-sm-8">
<input name="hMin" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">照度最大值:</label>
<div class="col-sm-8">
<input name="iMax" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">照度最小值:</label>
<div class="col-sm-8">
<input name="iMin" class="form-control" type="text">
</div>
</div>-->
</form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var prefix = ctx + "system/Monitor"
var demo = ctx + "demo/modal";
$("#form-Monitor-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-Monitor-add').serialize());
}
}
/*测控点信息-新增-选择父部门树*/
function selectMonitorTree() {
var options = {
title: '测控点信息选择',
width: "380",
url: prefix + "/selectMonitorTree/" + $("#treeId").val(),
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero) {
var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
function selectUsersToParent() {
$.modal.open("选择集中器", demo + "/collectDevice");
}
</script>
</body>
</html>

@ -0,0 +1,196 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改测控点信息')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-Monitor-edit" th:object="${t_Monitor}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">集中器编号:</label>
<div class="col-sm-6">
<textarea style="height: 32px" id="userids" name="collectDeviceId" class="form-control">[[*{collectDeviceId}]]</textarea>
</div>
<button type="button" class="btn btn-info" onclick="selectUsersToParent()">选择集中器</button>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">测控点编号:</label>
<div class="col-sm-8">
<textarea style="height: 32px" id="userid" name="monitorId" class="form-control">[[*{monitorId}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">父级测控点:</label>
<div class="col-sm-8">
<div class="input-group">
<input id="treeId" name="pMonitorid" type="hidden" th:field="*{pMonitorid}" />
<input class="form-control" type="text" onclick="selectMonitorTree()" id="treeName" readonly="true" th:field="*{parentName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">测控点名称:</label>
<div class="col-sm-8">
<input name="monitorName" th:field="*{monitorName}" class="form-control" type="text">
</div>
</div>
<!-- <div class="form-group"> -->
<!-- <label class="col-sm-3 control-label">测控点类型:</label>-->
<!-- <div class="col-sm-8">-->
<!-- &lt;!&ndash;<select name="monitorType" class="form-control m-b">&ndash;&gt;-->
<!-- <select name="monitorType" class="form-control m-b" th:with="type=${@energyTypeService.getEnergyType()}">-->
<!-- <option value="">所有</option>-->
<!-- <option th:each="dict : ${type}" th:text="${dict.energyName}" th:value="${dict.energyTypeId}" th:field="*{monitorType}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">二级类型:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="secondType" class="form-control m-b" th:with="type=${@dict.getType('monitorSecondType')}">-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{secondType}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">测控点位置:</label>
<div class="col-sm-8">
<input name="monitorAddr" th:field="*{monitorAddr}" class="form-control" type="text">
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-3 control-label">传感器仪表:</label>
<div class="col-sm-8">
<input name="sensorMeterTypeId" th:field="*{sensorMeterTypeId}" class="form-control" type="text">
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">测量器具:</label>
<div class="col-sm-8">
<select name="meterId" class="form-control m-b" th:with="type=${@meterInfoService.getMeterInfo()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.meterID}" th:value="${dict.meterID}" th:field="*{meterId}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">通讯端口:</label>
<div class="col-sm-8">
<input name="meterCommunicationId" th:field="*{meterCommunicationId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否重点:</label>
<div class="col-sm-8">
<select name="isKeyMonitor" class="form-control m-b" th:with="type=${@dict.getType('isKey')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isKeyMonitor}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">测控点状态:</label>
<div class="col-sm-8">
<select name="monitorStatus" class="form-control m-b" th:with="type=${@dict.getType('monitorStatus')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{monitorStatus}"></option>
</select>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-3 control-label">修正值:</label>
<div class="col-sm-8">
<input name="correctValue" th:field="*{correctValue}" class="form-control" type="text">
</div>
</div>-->
<!--<div class="form-group">
<label class="col-sm-3 control-label">最大值:</label>
<div class="col-sm-8">
<input name="pt" th:field="*{pt}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">最小值:</label>
<div class="col-sm-8">
<input name="ct" th:field="*{ct}" class="form-control" type="text">
</div>
</div>-->
<!--<div class="form-group">
<label class="col-sm-3 control-label">温度最大值:</label>
<div class="col-sm-8">
<input name="tMax" th:field="*{tMax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">温度最小值:</label>
<div class="col-sm-8">
<input name="tMin" th:field="*{tMin}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">湿度最大值:</label>
<div class="col-sm-8">
<input name="hMax" th:field="*{hMax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">湿度最小值:</label>
<div class="col-sm-8">
<input name="hMin" th:field="*{hMin}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">照度最大值:</label>
<div class="col-sm-8">
<input name="iMax" th:field="*{iMax}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">照度最小值:</label>
<div class="col-sm-8">
<input name="iMin" th:field="*{iMin}" class="form-control" type="text">
</div>
</div>-->
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/Monitor";
var demo = ctx + "demo/modal";
$("#form-Monitor-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-Monitor-edit').serialize());
}
}
/*测控点信息-新增-选择父部门树*/
function selectMonitorTree() {
console.log("节点编号"+$("#treeId").val());
console.log("测控点编号"+$("#userid").val())
var options = {
title: '测控点信息选择',
width: "380",
url: prefix + "/selectMonitorTree/" + $("#userid").val(),
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
function selectUsersToParent(){
$.modal.open("选择集中器", demo + "/collectDevice");
}
</script>
</body>
</html>

@ -0,0 +1,186 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('测控点信息列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<!--<li>
<label>能源类型:</label>
<select name="monitorType" th:with="type=${@energyTypeService.getEnergyType()}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.energyName}" th:value="${dict.energyTypeId}"></option>
</select>
</li>-->
<!-- <li>-->
<!-- <label style="width: auto">是否重点:</label>-->
<!-- <select name="isKeyMonitor" th:with="type=${@dict.getType('isKey')}">-->
<!-- <option value="">所有</option>-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </li>-->
<li>
<label style="width: auto">设备状态:</label>
<select name="monitorStatus" th:with="type=${@dict.getType('monitorStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:Monitor:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="system:Monitor:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-info" id="expandAllBtn">
<i class="fa fa-exchange"></i> 展开/折叠
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-tree-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var addFlag = [[${@permission.hasPermi('system:Monitor:add')}]];
var editFlag = [[${@permission.hasPermi('system:Monitor:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:Monitor:remove')}]];
var isKeyMonitorDatas = [[${@dict.getType('isKey')}]];
var monitorStatusDatas = [[${@dict.getType('monitorStatus')}]];
var prefix = ctx + "system/Monitor";
$(function() {
var options = {
code: "monitorId",
parentCode: "pMonitorid",
expandColumn: "3",
uniqueId: "objid",
url: prefix + "/list?MonitorType=20",
createUrl: prefix + "/vibrationSensorAdd/{id}",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove/{id}",
exportUrl: prefix + "/export",
modalName: "测控点信息",
expandAll:false,
columns: [{
field: 'selectItem',
radio: true
},
{
field: 'monitorId',
title: '编号',
align: 'left'
},
{
field: 'pMonitorid',
title: '父级',
align: 'left',
visible: false
},
{
field: 'monitorName',
title: '名称',
align: 'left',
width: '30%'
},
{
field: 'monitorType',
title: '类型',
align: 'left'
},
{
field: 'monitorAddr',
title: '测控点位置',
align: 'left',
width: '20%'
},
{
field: 'collectDeviceId',
title: '集中器',
align: 'left'
},
/*{
field: 'sensorMeterTypeId',
title: '传感器仪表',
align: 'left',
visible: false
},
{
field: 'meterId',
title: '测量器具',
align: 'left',
visible: false
},*/
{
field: 'meterCommunicationId',
title: '通讯端口',
align: 'left'
},
/*{
field: 'isKeyMonitor',
title: '是否重点',
align: 'left',
formatter: function(value, row, index) {
return $.table.selectDictLabel(isKeyMonitorDatas, value);
}
},*/
{
field: 'monitorStatus',
title: '状态',
align: 'left',
formatter: function(value, row, index) {
return $.table.selectDictLabel(monitorStatusDatas, value);
}
},
/*{
field: 'correctValue',
title: '修正值',
align: 'left',
visible: false
},
{
field: 'pt',
title: 'PT值',
align: 'left',
visible: false
},
{
field: 'ct',
title: 'CT值',
align: 'left',
visible: false
},*/
{
title: '操作',
align: 'center',
align: 'left',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.objid + '\')"><i class="fa fa-plus"></i>新增</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.treeTable.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('测控点信息树选择')" />
<th:block th:include="include :: ztree-css" />
</head>
<style>
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style>
<body class="hold-transition box box-main">
<input id="treeId" name="treeId" type="hidden" th:value="${t_Monitor?.monitorId}"/>
<input id="treeName" name="treeName" type="hidden" th:value="${t_Monitor?.monitorName}"/>
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
<label id="btnShow" title="显示搜索" style="display:none;"></label>
<label id="btnHide" title="隐藏搜索"></label>
</div>
<div class="treeSearchInput" id="search">
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
</div>
<div class="treeExpandCollapse">
<a href="#" onclick="$.tree.expand()">展开</a> /
<a href="#" onclick="$.tree.collapse()">折叠</a>
</div>
<div id="tree" class="ztree treeselect"></div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
$(function() {
var url = ctx + "system/Monitor/treeData?monitorType=20";
var options = {
url: url,
expandLevel: 1,
onClick : zOnClick
};
$.tree.init(options);
});
function zOnClick(event, treeId, treeNode) {
var treeId = treeNode.id;
var treeName = treeNode.name;
$("#treeId").val(treeId);
$("#treeName").val(treeName);
}
</script>
</body>
</html>

@ -0,0 +1,226 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('振动传感器数据列表')" />
<th:block th:include="include :: layout-latest-css"/>
<th:block th:include="include :: ztree-css"/>
<th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="gray-bg">
<div class="ui-layout-west">
<div class="box box-main">
<div class="box-header">
<div class="box-title">
<i class="fa icon-grid"></i> 测控点信息
</div>
<div class="box-tools pull-right">
<a type="button" class="btn btn-box-tool" href="#" onclick="dept()" title="测控点信息"><i
class="fa fa-edit"></i></a>
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i
class="fa fa-chevron-up"></i></button>
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i
class="fa fa-chevron-down"></i></button>
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新"><i class="fa fa-refresh"></i>
</button>
</div>
</div>
<div class="ui-layout-content">
<div id="tree" class="ztree"></div>
</div>
</div>
</div>
<div class="ui-layout-center">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<input type="hidden" id="sensorId" name="sensorId">
<div class="select-list">
<ul>
<li class="select-time">
<label>采集时间:</label>
<input type="text" style="width: 150px" class="form-control" id="laydate-demo-3" placeholder="开始时间" name="params[beginCollectTime]"/>
<span>-</span>
<input type="text" style="width: 150px" class="form-control" id="laydate-demo-4" placeholder="结束时间" name="params[endCollectTime]"/>
</li>
<!-- <li>-->
<!-- <label>振动传感器ID</label>-->
<!-- <input type="text" name="sensorId"/>-->
<!-- </li>-->
<!-- <li class="select-time">-->
<!-- <label>记录时间:</label>-->
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginRecodeTime]"/>-->
<!-- <span>-</span>-->
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endRecodeTime]"/>-->
<!-- </li>-->
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:TVibrationsensorData:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:TVibrationsensorData:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:TVibrationsensorData:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:TVibrationsensorData:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:TVibrationsensorData:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:TVibrationsensorData:remove')}]];
var prefix = ctx + "system/TVibrationsensorData";
$(function () {
var panehHidden = false;
if ($(this).width() < 769) {
panehHidden = true;
}
$('body').layout({initClosed: panehHidden, west__size: 245});
queryUserList();
queryDeptTree();
});
function queryUserList() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "振动传感器数据",
columns: [{
checkbox: true
},
{
field: 'objId',
title: '主键标识',
visible: false
},
{
field: 'sensorId',
title: '振动传感器ID'
},
{
field: 'speed',
title: '速度(mm/s)'
},
{
field: 'displacement',
title: '位移(um)'
},
{
field: 'acceleration',
title: '加速度(g)'
},
{
field: 'temperature',
title: '温度(℃)'
},
{
field: 'collectTime',
title: '采集时间'
},
{
field: 'recodeTime',
title: '记录时间'
},
{
field: 'remark',
title: '备注',
visible: false
},
// {
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
};
function queryDeptTree() {
var url = ctx + "system/Monitor/treeData?monitorType=" + 20;
var options = {
url: url,
expandLevel: 1,
onClick: zOnClick
};
$.tree.init(options);
function zOnClick(event, treeId, treeNode) {
$("#sensorId").val(treeNode.id);
/*alert(treeNode.id)*/
$.table.search();
}
}
$('#btnExpand').click(function () {
$._tree.expandAll(true);
$(this).hide();
$('#btnCollapse').show();
});
$('#btnCollapse').click(function () {
$._tree.expandAll(false);
$(this).hide();
$('#btnExpand').show();
});
$('#btnRefresh').click(function () {
queryDeptTree();
});
/* 测控点信息 */
function dept() {
var url = ctx + "system/Monitor?id=20";
$.modal.openTab("测控点信息", url);
}
layui.use('laydate', function () {
var laydate = layui.laydate;
laydate.render({
elem: '#laydate-demo-3',
type: 'datetime',
trigger: 'click'
});
laydate.render({
elem: '#laydate-demo-4',
type: 'datetime',
trigger: 'click'
});
});
</script>
</body>
</html>

@ -0,0 +1,87 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增振动传感器数据')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-TVibrationsensorData-add">
<div class="form-group">
<label class="col-sm-3 control-label">采集时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="collectTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">振动传感器ID</label>
<div class="col-sm-8">
<input name="sensorId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">速度(mm/s)</label>
<div class="col-sm-8">
<input name="speed" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">位移(um)</label>
<div class="col-sm-8">
<input name="displacement" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加速度(g)</label>
<div class="col-sm-8">
<input name="acceleration" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">温度(℃)</label>
<div class="col-sm-8">
<input name="temperature" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">记录时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="recodeTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/TVibrationsensorData"
$("#form-TVibrationsensorData-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-TVibrationsensorData-add').serialize());
}
}
$("input[name='collectTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='recodeTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改振动传感器数据')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-TVibrationsensorData-edit" th:object="${tVibrationsensorData}">
<input name="objId" th:field="*{objId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">采集时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="collectTime" th:value="${#dates.format(tVibrationsensorData.collectTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">振动传感器ID</label>
<div class="col-sm-8">
<input name="sensorId" th:field="*{sensorId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">速度(mm/s)</label>
<div class="col-sm-8">
<input name="speed" th:field="*{speed}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">位移(um)</label>
<div class="col-sm-8">
<input name="displacement" th:field="*{displacement}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加速度(g)</label>
<div class="col-sm-8">
<input name="acceleration" th:field="*{acceleration}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">温度(℃)</label>
<div class="col-sm-8">
<input name="temperature" th:field="*{temperature}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">记录时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="recodeTime" th:value="${#dates.format(tVibrationsensorData.recodeTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/TVibrationsensorData";
$("#form-TVibrationsensorData-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-TVibrationsensorData-edit').serialize());
}
}
$("input[name='collectTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='recodeTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,130 @@
package com.ruoyi.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* T_VibrationSensor_Data
*
* @author Yinq
* @date 2024-04-28
*/
public class TVibrationsensorData extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date collectTime;
/**
* ID
*/
@Excel(name = "振动传感器ID")
private String sensorId;
/**
* (mm/s)
*/
@Excel(name = "速度(mm/s)")
private BigDecimal speed;
/**
* (um)
*/
@Excel(name = "位移(um)")
private BigDecimal displacement;
/**
* (g)
*/
@Excel(name = "加速度(g)")
private BigDecimal acceleration;
/**
* ()
*/
@Excel(name = "温度(℃)")
private BigDecimal temperature;
/**
*
*/
@Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date recodeTime;
public Long getObjId() {
return objId;
}
public void setObjId(Long objId) {
this.objId = objId;
}
public Date getCollectTime() {
return collectTime;
}
public void setCollectTime(Date collectTime) {
this.collectTime = collectTime;
}
public String getSensorId() {
return sensorId;
}
public void setSensorId(String sensorId) {
this.sensorId = sensorId;
}
public BigDecimal getSpeed() {
return speed;
}
public void setSpeed(BigDecimal speed) {
this.speed = speed;
}
public BigDecimal getDisplacement() {
return displacement;
}
public void setDisplacement(BigDecimal displacement) {
this.displacement = displacement;
}
public BigDecimal getAcceleration() {
return acceleration;
}
public void setAcceleration(BigDecimal acceleration) {
this.acceleration = acceleration;
}
public BigDecimal getTemperature() {
return temperature;
}
public void setTemperature(BigDecimal temperature) {
this.temperature = temperature;
}
public Date getRecodeTime() {
return recodeTime;
}
public void setRecodeTime(Date recodeTime) {
this.recodeTime = recodeTime;
}
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.TVibrationsensorData;
/**
* Mapper
*
* @author Yinq
* @date 2024-04-28
*/
public interface TVibrationsensorDataMapper {
/**
*
*
* @param objId ID
* @return
*/
public TVibrationsensorData selectTVibrationsensorDataById(Long objId);
/**
*
*
* @param tVibrationsensorData
* @return
*/
public List<TVibrationsensorData> selectTVibrationsensorDataList(TVibrationsensorData tVibrationsensorData);
/**
*
*
* @param tVibrationsensorData
* @return
*/
public int insertTVibrationsensorData(TVibrationsensorData tVibrationsensorData);
/**
*
*
* @param tVibrationsensorData
* @return
*/
public int updateTVibrationsensorData(TVibrationsensorData tVibrationsensorData);
/**
*
*
* @param objId ID
* @return
*/
public int deleteTVibrationsensorDataById(Long objId);
/**
*
*
* @param objIds ID
* @return
*/
public int deleteTVibrationsensorDataByIds(String[] objIds);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.TVibrationsensorData;
/**
* Service
*
* @author Yinq
* @date 2024-04-28
*/
public interface ITVibrationsensorDataService
{
/**
*
*
* @param objId ID
* @return
*/
public TVibrationsensorData selectTVibrationsensorDataById(Long objId);
/**
*
*
* @param tVibrationsensorData
* @return
*/
public List<TVibrationsensorData> selectTVibrationsensorDataList(TVibrationsensorData tVibrationsensorData);
/**
*
*
* @param tVibrationsensorData
* @return
*/
public int insertTVibrationsensorData(TVibrationsensorData tVibrationsensorData);
/**
*
*
* @param tVibrationsensorData
* @return
*/
public int updateTVibrationsensorData(TVibrationsensorData tVibrationsensorData);
/**
*
*
* @param ids ID
* @return
*/
public int deleteTVibrationsensorDataByIds(String ids);
/**
*
*
* @param objId ID
* @return
*/
public int deleteTVibrationsensorDataById(Long objId);
}

@ -0,0 +1,88 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TVibrationsensorDataMapper;
import com.ruoyi.system.domain.TVibrationsensorData;
import com.ruoyi.system.service.ITVibrationsensorDataService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author Yinq
* @date 2024-04-28
*/
@Service
public class TVibrationsensorDataServiceImpl implements ITVibrationsensorDataService {
@Autowired
private TVibrationsensorDataMapper tVibrationsensorDataMapper;
/**
*
*
* @param objId ID
* @return
*/
@Override
public TVibrationsensorData selectTVibrationsensorDataById(Long objId) {
return tVibrationsensorDataMapper.selectTVibrationsensorDataById(objId);
}
/**
*
*
* @param tVibrationsensorData
* @return
*/
@Override
public List<TVibrationsensorData> selectTVibrationsensorDataList(TVibrationsensorData tVibrationsensorData) {
return tVibrationsensorDataMapper.selectTVibrationsensorDataList(tVibrationsensorData);
}
/**
*
*
* @param tVibrationsensorData
* @return
*/
@Override
public int insertTVibrationsensorData(TVibrationsensorData tVibrationsensorData) {
return tVibrationsensorDataMapper.insertTVibrationsensorData(tVibrationsensorData);
}
/**
*
*
* @param tVibrationsensorData
* @return
*/
@Override
public int updateTVibrationsensorData(TVibrationsensorData tVibrationsensorData) {
return tVibrationsensorDataMapper.updateTVibrationsensorData(tVibrationsensorData);
}
/**
*
*
* @param ids ID
* @return
*/
@Override
public int deleteTVibrationsensorDataByIds(String ids) {
return tVibrationsensorDataMapper.deleteTVibrationsensorDataByIds(Convert.toStrArray(ids));
}
/**
*
*
* @param objId ID
* @return
*/
@Override
public int deleteTVibrationsensorDataById(Long objId) {
return tVibrationsensorDataMapper.deleteTVibrationsensorDataById(objId);
}
}

@ -75,13 +75,15 @@ public class T_MonitorServiceImpl implements IT_MonitorService
@Override
public int insertT_Monitor(T_Monitor t_Monitor)
{
t_Monitor.setMonitorType(16);
t_Monitor.setSecondType(0);
try {
TSetmonitorthresholdvalue tSetmonitorthresholdvalue = new TSetmonitorthresholdvalue();
tSetmonitorthresholdvalue.setMonitorId(t_Monitor.getMonitorId());
tSetmonitorthresholdvalue.setMonitorType(16);
tSetmonitorthresholdvalueService.insertTSetmonitorthresholdvalue(tSetmonitorthresholdvalue);
t_Monitor.setSecondType(0);
if (t_Monitor.getMonitorType() == null){
t_Monitor.setMonitorType(16);
TSetmonitorthresholdvalue tSetmonitorthresholdvalue = new TSetmonitorthresholdvalue();
tSetmonitorthresholdvalue.setMonitorId(t_Monitor.getMonitorId());
tSetmonitorthresholdvalue.setMonitorType(16);
tSetmonitorthresholdvalueService.insertTSetmonitorthresholdvalue(tSetmonitorthresholdvalue);
}
} catch (Exception e) {
e.printStackTrace();
}

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.TVibrationsensorDataMapper">
<resultMap type="TVibrationsensorData" id="TVibrationsensorDataResult">
<result property="objId" column="objId"/>
<result property="collectTime" column="collectTime"/>
<result property="sensorId" column="sensor_id"/>
<result property="speed" column="speed"/>
<result property="displacement" column="displacement"/>
<result property="acceleration" column="acceleration"/>
<result property="temperature" column="temperature"/>
<result property="recodeTime" column="recodeTime"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectTVibrationsensorDataVo">
select objId,
collectTime,
sensor_id,
speed,
displacement,
acceleration,
temperature,
recodeTime,
remark
from T_VibrationSensor_Data
</sql>
<select id="selectTVibrationsensorDataList" parameterType="TVibrationsensorData"
resultMap="TVibrationsensorDataResult">
<include refid="selectTVibrationsensorDataVo"/>
<where>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}
</if>
<if test="sensorId != null ">and sensor_id = #{sensorId}</if>
<if test="speed != null ">and speed = #{speed}</if>
<if test="displacement != null ">and displacement = #{displacement}</if>
<if test="acceleration != null ">and acceleration = #{acceleration}</if>
<if test="temperature != null ">and temperature = #{temperature}</if>
<if test="recodeTime != null ">and recodeTime = #{recodeTime}</if>
</where>
order by collectTime desc
</select>
<select id="selectTVibrationsensorDataById" parameterType="Long" resultMap="TVibrationsensorDataResult">
<include refid="selectTVibrationsensorDataVo"/>
where objId = #{objId}
</select>
<insert id="insertTVibrationsensorData" parameterType="TVibrationsensorData">
insert into T_VibrationSensor_Data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objId != null">objId,</if>
<if test="collectTime != null">collectTime,</if>
<if test="sensorId != null">sensor_id,</if>
<if test="speed != null">speed,</if>
<if test="displacement != null">displacement,</if>
<if test="acceleration != null">acceleration,</if>
<if test="temperature != null">temperature,</if>
<if test="recodeTime != null">recodeTime,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
<if test="collectTime != null">#{collectTime},</if>
<if test="sensorId != null">#{sensorId},</if>
<if test="speed != null">#{speed},</if>
<if test="displacement != null">#{displacement},</if>
<if test="acceleration != null">#{acceleration},</if>
<if test="temperature != null">#{temperature},</if>
<if test="recodeTime != null">#{recodeTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTVibrationsensorData" parameterType="TVibrationsensorData">
update T_VibrationSensor_Data
<trim prefix="SET" suffixOverrides=",">
<if test="collectTime != null">collectTime = #{collectTime},</if>
<if test="sensorId != null">sensor_id = #{sensorId},</if>
<if test="speed != null">speed = #{speed},</if>
<if test="displacement != null">displacement = #{displacement},</if>
<if test="acceleration != null">acceleration = #{acceleration},</if>
<if test="temperature != null">temperature = #{temperature},</if>
<if test="recodeTime != null">recodeTime = #{recodeTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where objId = #{objId}
</update>
<delete id="deleteTVibrationsensorDataById" parameterType="Long">
delete
from T_VibrationSensor_Data
where objId = #{objId}
</delete>
<delete id="deleteTVibrationsensorDataByIds" parameterType="String">
delete from T_VibrationSensor_Data where objId in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save