Merge remote-tracking branch 'origin/master'

master
夜笙歌 2 months ago
commit 9fe319e4b9

@ -1,3 +1,5 @@
测控点类型2-电3-蒸汽4-水5-压缩空气16-物联网环境20-振动30-温度阵列40-噪声
一、海威演示测温、阵列、能源管理系统
二、 新疆昆仑工程轮胎有限责任公司

@ -49,6 +49,16 @@ public class TemAndHumReportController extends BaseController {
return prefix + "/TemAndHumLQXHS";
}
/**
* 线
* @return
*/
@GetMapping("/VibrationDataCurve")
public String VibrationDataCurveHtml()
{
return prefix + "/VibrationDataCurve";
}
/**
*
* @return

@ -138,4 +138,18 @@ public class TVibrationsensorDataController extends BaseController {
return AjaxResult.success(tVibrationsensorData1);
}
/**
* 线
* @param tVibrationsensorData
* @return
*/
@PostMapping("/sensorList")
@ResponseBody
public AjaxResult sensorList(TVibrationsensorData tVibrationsensorData) {
List<TVibrationsensorData> list = tVibrationsensorDataService.selectTVibrationsensorDataList(tVibrationsensorData);
return AjaxResult.success(list);
}
}

@ -49,7 +49,7 @@ public class T_MonitorController extends BaseController {
// private ITempertureMonitorService itempertureMonitorService;
/**
* 23162030
* 2-3-4-5-16-20-30-40-
* @param id
* @return
*/
@ -85,6 +85,9 @@ public class T_MonitorController extends BaseController {
case 30:
url = "/arrayMonitor";
break;
case 40:
url = "/noiseMonitor";
break;
}
return prefix + url;
@ -156,9 +159,13 @@ public class T_MonitorController extends BaseController {
break;
case 20:
url = "/vibrationSensorAdd";
break;
case 30:
url = "/arrayAdd";
break;
case 40:
url = "/noiseAdd";
break;
default:
break;
}
@ -191,6 +198,17 @@ public class T_MonitorController extends BaseController {
return prefix + url;
}
@GetMapping(value = {"/noiseAdd/{objid}", "/noiseAdd/"})
public String noiseAdd(@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 = "/noiseAdd";
return prefix + url;
}
/**
*
*/
@ -207,7 +225,7 @@ public class T_MonitorController extends BaseController {
} else {
t_Monitor.setGrade(3);
}
int info = itSetmonitorthresholdvalueService.insertTSetmonitorthresholdvalue(new TSetmonitorthresholdvalue(t_Monitor.getMonitorId(), t_Monitor.getMonitorType()));
itSetmonitorthresholdvalueService.insertTSetmonitorthresholdvalue(new TSetmonitorthresholdvalue(t_Monitor.getMonitorId(), t_Monitor.getMonitorType()));
return toAjax(t_MonitorService.insertT_Monitor(t_Monitor));
}
@ -247,6 +265,9 @@ public class T_MonitorController extends BaseController {
case 30:
url = "/arrayEdit";
break;
case 40:
url = "/noiseEdit";
break;
default:
break;
}
@ -319,6 +340,9 @@ public class T_MonitorController extends BaseController {
case "30":
url = "/arrayTree";
break;
case "40":
url = "/noiseTree";
break;
default:
T_Monitor t_monitor = new T_Monitor();
t_monitor.setMonitorId(objid);
@ -348,6 +372,10 @@ public class T_MonitorController extends BaseController {
break;
case 30:
url = "/arrayTree";
break;
case 40:
url = "/noiseTree";
break;
default:
break;
}

@ -60,6 +60,9 @@ public class T_W_TemperturedataController extends BaseController
case 3:
url = "/TempertureReport";
break;
case 40:
url = "/noiseData";
break;
default:
break;
}

@ -0,0 +1,432 @@
<!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="monitorId" name="monitorId">
<div class="select-list">
<ul>
<li class="select-time">
<label>采集时间:</label><input type="text" class="form-control" style="width: 150px" id="laydate-demo-3" placeholder="开始时间" name="params[beginCollectTime]"/>
<span>-</span>
<input type="text" class="form-control" id="laydate-demo-4" style="width: 150px" placeholder="结束时间" name="params[endCollectTime]"/>
</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-primary btn-rounded btn-sm" onclick="getdata($('#monitorId').val())"><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="ibox-content" style="margin-top: 80px;margin-right: 0px;">
<div class="echarts" id="echarts-line-chart" style="height: 620px"></div>
</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 :: echarts-js" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "report/temandhumreport"
var timedata=[];
var tempreturedata=[];
var humdata=[];
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'
});
});
$(function() {
var panehHidden = false;
// var time=getNowFormatDate();
// console.log(time);
getdata(null);
if ($(this).width() < 769) {
panehHidden = true;
}
$('body').layout({ initClosed: panehHidden, west__size: 185 });
// initTable();
queryUserList();
queryDeptTree();
});
function queryUserList() {
var options = {
url: prefix + "/list",
modalName: "压缩空气实时数据",
columns: [{
checkbox: true
},
{
field: 'objid',
title: '自增标识',
visible: false
},
{
field: 'monitorId',
title: '测控点编号'
},
{
field: 'between',
title: '采集时间'
},
{
field: 'temmaxNumber',
title: '温度最大值'
},
{
field: 'temminNumber',
title: '温度最小值'
},
{
field: 'temavgNumber',
title: '温度平均值'
},
{
field: 'hummaxNumber',
title: '湿度最大值'
},
{
field: 'humminNumber',
title: '湿度最小值'
},
{
field: 'humavgNumber',
title: '湿度平均值'
},
]
};
$.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) {
$("#monitorId").val(treeNode.id);
/*alert(treeNode.id)*/
$.table.search();
getdata(treeNode.id);
}
}
$('#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";
$.modal.openTab("社区信息", url);
}
function getdata(monitorId) {
var formData = new FormData();
formData.append("monitorId",monitorId);
formData.append("startTime",$("#laydate-demo-3").val());
formData.append("endTime",$("#laydate-demo-4").val());
$.ajax({
url: prefix + "/getdata",
type: 'post',
cache: false,
data: formData,
processData: false,
contentType: false,
dataType: "json",
success: function(result) {
console.log(result);
result.data.forEach(function(e){
// console.log(e.fluxData);
timedata.push(e.collectTime);
tempreturedata.push(e.tempreture);
humdata.push(e.humidity);
});
design();
}
});
}
function design() {
var lineChart = echarts.init(document.getElementById("echarts-line-chart"));
// var lineoption = {
// title: {
// text: '温湿度实时数据',
// left: 'center'
// },
// tooltip: {
// trigger: 'axis',
// axisPointer: {
// animation: false
// }
// },
// legend: {
// data: ['温度', '湿度'],
// left: 10
// },
// toolbox: {
// feature: {
// dataZoom: {
// yAxisIndex: 'none'
// },
// restore: {},
// saveAsImage: {}
// }
// },
// axisPointer: {
// link: {xAxisIndex: 'all'}
// },
// dataZoom: [
// {
// show: true,
// realtime: true,
// start: 0,
// end: 100,
// xAxisIndex: [0, 1]
// },
// {
// type: 'inside',
// realtime: true,
// start: 30,
// end: 70,
// xAxisIndex: [0, 1]
// }
// ],
// grid: [{
// left: 50,
// right: 50,
// height: '35%'
// }, {
// left: 50,
// right: 50,
// top: '55%',
// height: '35%'
// }],
// xAxis: [
// {
// type: 'category',
// boundaryGap: false,
// axisLine: {onZero: true},
// data: timedata
// },
// {
// gridIndex: 1,
// type: 'category',
// boundaryGap: false,
// axisLine: {onZero: true},
// data: timedata,
// position: 'top'
// }
//
// ],
// yAxis: [
// {
// name: '温度',
// type: 'value'
//
// },
// {
// gridIndex: 1,
// name: '湿度',
// type: 'value',
// inverse: true
// }
// ],
// series: [
//
// {
// name: '温度',
// type: 'line',
// symbolSize: 8,
// hoverAnimation: false,
// data:tempreturedata,
// smooth: true,
// markPoint : {
// data : [
// {type : 'max', name: '最大值'},
// {type : 'min', name: '最小值'}
// ]
// },
// },
// {
// name: '湿度',
// type: 'line',
// xAxisIndex: 1,
// yAxisIndex: 1,
// symbolSize: 8,
// hoverAnimation: false,
// data:humdata,
// smooth: true,
// markPoint : {
// data : [
// {type : 'max', name: '最大值'},
// {type : 'min', name: '最小值'}
// ]
// },
// }
// ]
// };
var lineoption = {
title: {
text: '温度实时数据',
left: 'center'
},
tooltip: {
trigger: 'axis',
axisPointer: {
animation: false
}
},
legend: {
data: ['温度'],
left: 10
},
toolbox: {
feature: {
dataZoom: {
yAxisIndex: 'none'
},
restore: {},
saveAsImage: {}
}
},
axisPointer: {
link: { xAxisIndex: 'all' }
},
dataZoom: [
{
show: true,
realtime: true,
start: 0,
end: 100,
xAxisIndex: 0
},
{
type: 'inside',
realtime: true,
start: 30,
end: 70,
xAxisIndex: 0
}
],
grid: {
left: 50,
right: 50,
height: '60%' // 调整height值以适应图表位置
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLine: { onZero: true },
data: timedata
},
yAxis: {
name: '温度',
type: 'value'
},
series: [
{
name: '温度',
type: 'line',
symbolSize: 8,
hoverAnimation: false,
data: tempreturedata,
smooth: true,
markPoint: {
data: [
{ type: 'max', name: '最大值' },
{ type: 'min', name: '最小值' }
]
},
}
]
};
lineChart.setOption(lineoption,true);
$(window).resize(lineChart.resize);
timedata.splice(0,timedata.length);
tempreturedata.splice(0,tempreturedata.length);
humdata.splice(0,humdata.length);
//console.log(timedata)
}
</script>
</body>
</html>

@ -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="40" 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,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=40",
createUrl: prefix + "/noiseAdd/{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=40";
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,224 @@
<!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="monitorId" name="monitorId">
<div class="select-list">
<ul>
<li class="select-time">
<label style="width: auto">采集时间:</label><input type="text" style="width: 150px"
class="form-control" id="laydate-demo-3"
placeholder="开始时间"
name="params[beginCollectTime]"/>
<span>-</span>
<input type="text" class="form-control" id="laydate-demo-4" style="width: 150px"
placeholder="结束时间" name="params[endCollectTime]"/>
</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-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="system:TempertureData: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:TempertureData:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:TempertureData:remove')}]];
var prefix = ctx + "system/TempertureData";
let iotType = [[${iotType}]];
$(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?confirmPersonID=1",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "动力环境数据",
columns: [{
checkbox: true
},
{
field: 'objid',
title: '编号',
visible: false
},
{
field: 'monitorId',
title: '测控点编号',
visible: false
},
{
field: 'monitorName',
title: '测控点名称'
},
{
field: 'monitorAddr',
title: '测控点位置'
},
{
field: 'collectTime',
title: '采集时间'
},
{
field: 'tempreture',
title: '温度(℃)',
visible: false
},
{
field: 'humidity',
title: '湿度(%RH',
visible: false
},
{
field: 'illuminance',
title: '照度',
visible: false
},
{
field: 'noise',
title: '噪声dB',
visible: true
},
{
field: 'concentration',
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('');
},
visible: false
}]
};
$.table.init(options);
}
function queryDeptTree() {
var url = ctx + "system/Monitor/treeData?monitorType=" + 40;
var options = {
url: url,
expandLevel: 1,
onClick: zOnClick
};
$.tree.init(options);
function zOnClick(event, treeId, treeNode) {
$("#monitorId").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=40";
$.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>

@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.dto.TSetmonitorthresholdvalueDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -60,6 +61,14 @@ public class TSetmonitorthresholdvalueServiceImpl implements ITSetmonitorthresho
@Override
public int insertTSetmonitorthresholdvalue(TSetmonitorthresholdvalue tSetmonitorthresholdvalue)
{
if (StringUtils.isNotEmpty(tSetmonitorthresholdvalue.getMonitorId())){
TSetmonitorthresholdvalue setmonitorthresholdvalue = new TSetmonitorthresholdvalue();
setmonitorthresholdvalue.setMonitorId(tSetmonitorthresholdvalue.getMonitorId());
List<TSetmonitorthresholdvalue> setmonitorthresholdvalueList = tSetmonitorthresholdvalueMapper.selectTSetmonitorthresholdvalueList(setmonitorthresholdvalue);
for (TSetmonitorthresholdvalue setmonitorthresholdvalue1 : setmonitorthresholdvalueList) {
tSetmonitorthresholdvalueMapper.deleteTSetmonitorthresholdvalueById(setmonitorthresholdvalue1.getObjId());
}
}
tSetmonitorthresholdvalue.setCreateTime(DateUtils.getNowDate());
return tSetmonitorthresholdvalueMapper.insertTSetmonitorthresholdvalue(tSetmonitorthresholdvalue);
}

Loading…
Cancel
Save