Merge remote-tracking branch 'origin/master'

master
夜笙歌 2 months ago
commit b362108099

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

@ -1,5 +1,6 @@
package com.ruoyi.web.controller.system; package com.ruoyi.web.controller.system;
import java.util.HashMap;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -127,4 +128,18 @@ public class TArraytemperaturedataController extends BaseController {
public AjaxResult remove(String ids) { public AjaxResult remove(String ids) {
return toAjax(tArraytemperaturedataService.deleteTArraytemperaturedataByIds(ids)); return toAjax(tArraytemperaturedataService.deleteTArraytemperaturedataByIds(ids));
} }
/**
*
* @param tArraytemperaturedata
* @return
*/
@PostMapping("/getHighestPointTemperature")
@ResponseBody
public AjaxResult getHighestPointTemperature(TArraytemperaturedata tArraytemperaturedata) {
List<HashMap<String, Object>> list = tArraytemperaturedataService.getHighestPointTemperature(tArraytemperaturedata);
return AjaxResult.success(list);
}
} }

@ -0,0 +1,246 @@
<!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>
</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 + "system/ArrayTemperatureData"
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;
getdata(null);
if ($(this).width() < 769) {
panehHidden = true;
}
$('body').layout({ initClosed: panehHidden, west__size: 185 });
queryDeptTree();
});
function queryDeptTree()
{
var url = ctx + "system/Monitor/treeData?monitorType=30";
var options = {
url: url,
expandLevel: 1,
onClick : zOnClick,
};
$.tree.init(options);
function zOnClick(event, treeId, treeNode) {
$("#monitorId").val(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 + "/getHighestPointTemperature",
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
},
{
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);
}
</script>
</body>
</html>

@ -210,11 +210,9 @@
function getdata(monitorId) { function getdata(monitorId) {
var formData = new FormData(); var formData = new FormData();
formData.append("monitorId", monitorId); formData.append("sensorId", monitorId);
formData.append("params[beginCollectTime]", $("#laydate-demo-3").val()); formData.append("params[beginCollectTime]", $("#laydate-demo-3").val());
formData.append("params[endCollectTime]",$("#laydate-demo-4").val()); formData.append("params[endCollectTime]",$("#laydate-demo-4").val());
// formData.append("startTime", $("#laydate-demo-3").val());
// formData.append("endTime", $("#laydate-demo-4").val());
$.ajax({ $.ajax({
url: ctx + "system/TVibrationsensorData/sensorList", url: ctx + "system/TVibrationsensorData/sensorList",
type: 'post', type: 'post',

@ -1,5 +1,6 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import java.util.HashMap;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.TArraytemperaturedata; import com.ruoyi.system.domain.TArraytemperaturedata;
@ -65,4 +66,11 @@ public interface TArraytemperaturedataMapper
* @return * @return
*/ */
List<TArraytemperaturedata> selectNewDataStreak(TArraytemperaturedata tArraytemperaturedata); List<TArraytemperaturedata> selectNewDataStreak(TArraytemperaturedata tArraytemperaturedata);
/**
*
* @param tArraytemperaturedata
* @return
*/
List<HashMap<String, Object>> getHighestPointTemperature(TArraytemperaturedata tArraytemperaturedata);
} }

@ -1,5 +1,6 @@
package com.ruoyi.system.service; package com.ruoyi.system.service;
import java.util.HashMap;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.TArraytemperaturedata; import com.ruoyi.system.domain.TArraytemperaturedata;
@ -65,4 +66,11 @@ public interface ITArraytemperaturedataService {
* @return * @return
*/ */
List<TArraytemperaturedata> selectNewDataStreak(TArraytemperaturedata tArraytemperaturedata); List<TArraytemperaturedata> selectNewDataStreak(TArraytemperaturedata tArraytemperaturedata);
/**
*
* @param tArraytemperaturedata
* @return
*/
List<HashMap<String, Object>> getHighestPointTemperature(TArraytemperaturedata tArraytemperaturedata);
} }

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.HashMap;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -101,4 +102,14 @@ public class TArraytemperaturedataServiceImpl implements ITArraytemperaturedataS
public List<TArraytemperaturedata> selectNewDataStreak(TArraytemperaturedata tArraytemperaturedata) { public List<TArraytemperaturedata> selectNewDataStreak(TArraytemperaturedata tArraytemperaturedata) {
return tArraytemperaturedataMapper.selectNewDataStreak(tArraytemperaturedata); return tArraytemperaturedataMapper.selectNewDataStreak(tArraytemperaturedata);
} }
/**
*
* @param tArraytemperaturedata
* @return
*/
@Override
public List<HashMap<String, Object>> getHighestPointTemperature(TArraytemperaturedata tArraytemperaturedata) {
return tArraytemperaturedataMapper.getHighestPointTemperature(tArraytemperaturedata);
}
} }

@ -1601,6 +1601,7 @@
ORDER BY monitorId ORDER BY monitorId
</select> </select>
<insert id="insertTArraytemperaturedata" parameterType="TArraytemperaturedata"> <insert id="insertTArraytemperaturedata" parameterType="TArraytemperaturedata">
insert into T_ArrayTemperatureData insert into T_ArrayTemperatureData
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -3953,4 +3954,98 @@
</foreach> </foreach>
</delete> </delete>
<select id="getHighestPointTemperature" parameterType="TArraytemperaturedata" resultType="java.util.HashMap">
SELECT monitorId, collectTime, MAX(SiteValue) AS tempreture
FROM (
SELECT monitorId, collectTime, SiteValue
FROM T_ArrayTemperatureData
UNPIVOT (
SiteValue FOR Site IN (
Site1, Site2, Site3, Site4, Site5, Site6, Site7, Site8, Site9, Site10,
Site11, Site12, Site13, Site14, Site15, Site16, Site17, Site18, Site19, Site20,
Site21, Site22, Site23, Site24, Site25, Site26, Site27, Site28, Site29, Site30,
Site31, Site32, Site33, Site34, Site35, Site36, Site37, Site38, Site39, Site40,
Site41, Site42, Site43, Site44, Site45, Site46, Site47, Site48, Site49, Site50,
Site51, Site52, Site53, Site54, Site55, Site56, Site57, Site58, Site59, Site60,
Site61, Site62, Site63, Site64, Site65, Site66, Site67, Site68, Site69, Site70,
Site71, Site72, Site73, Site74, Site75, Site76, Site77, Site78, Site79, Site80,
Site81, Site82, Site83, Site84, Site85, Site86, Site87, Site88, Site89, Site90,
Site91, Site92, Site93, Site94, Site95, Site96, Site97, Site98, Site99, Site100,
Site101, Site102, Site103, Site104, Site105, Site106, Site107, Site108, Site109, Site110,
Site111, Site112, Site113, Site114, Site115, Site116, Site117, Site118, Site119, Site120,
Site121, Site122, Site123, Site124, Site125, Site126, Site127, Site128, Site129, Site130,
Site131, Site132, Site133, Site134, Site135, Site136, Site137, Site138, Site139, Site140,
Site141, Site142, Site143, Site144, Site145, Site146, Site147, Site148, Site149, Site150,
Site151, Site152, Site153, Site154, Site155, Site156, Site157, Site158, Site159, Site160,
Site161, Site162, Site163, Site164, Site165, Site166, Site167, Site168, Site169, Site170,
Site171, Site172, Site173, Site174, Site175, Site176, Site177, Site178, Site179, Site180,
Site181, Site182, Site183, Site184, Site185, Site186, Site187, Site188, Site189, Site190,
Site191, Site192, Site193, Site194, Site195, Site196, Site197, Site198, Site199, Site200,
Site201, Site202, Site203, Site204, Site205, Site206, Site207, Site208, Site209, Site210,
Site211, Site212, Site213, Site214, Site215, Site216, Site217, Site218, Site219, Site220,
Site221, Site222, Site223, Site224, Site225, Site226, Site227, Site228, Site229, Site230,
Site231, Site232, Site233, Site234, Site235, Site236, Site237, Site238, Site239, Site240,
Site241, Site242, Site243, Site244, Site245, Site246, Site247, Site248, Site249, Site250,
Site251, Site252, Site253, Site254, Site255, Site256, Site257, Site258, Site259, Site260,
Site261, Site262, Site263, Site264, Site265, Site266, Site267, Site268, Site269, Site270,
Site271, Site272, Site273, Site274, Site275, Site276, Site277, Site278, Site279, Site280,
Site281, Site282, Site283, Site284, Site285, Site286, Site287, Site288, Site289, Site290,
Site291, Site292, Site293, Site294, Site295, Site296, Site297, Site298, Site299, Site300,
Site301, Site302, Site303, Site304, Site305, Site306, Site307, Site308, Site309, Site310,
Site311, Site312, Site313, Site314, Site315, Site316, Site317, Site318, Site319, Site320,
Site321, Site322, Site323, Site324, Site325, Site326, Site327, Site328, Site329, Site330,
Site331, Site332, Site333, Site334, Site335, Site336, Site337, Site338, Site339, Site340,
Site341, Site342, Site343, Site344, Site345, Site346, Site347, Site348, Site349, Site350,
Site351, Site352, Site353, Site354, Site355, Site356, Site357, Site358, Site359, Site360,
Site361, Site362, Site363, Site364, Site365, Site366, Site367, Site368, Site369, Site370,
Site371, Site372, Site373, Site374, Site375, Site376, Site377, Site378, Site379, Site380,
Site381, Site382, Site383, Site384, Site385, Site386, Site387, Site388, Site389, Site390,
Site391, Site392, Site393, Site394, Site395, Site396, Site397, Site398, Site399, Site400,
Site401, Site402, Site403, Site404, Site405, Site406, Site407, Site408, Site409, Site410,
Site411, Site412, Site413, Site414, Site415, Site416, Site417, Site418, Site419, Site420,
Site421, Site422, Site423, Site424, Site425, Site426, Site427, Site428, Site429, Site430,
Site431, Site432, Site433, Site434, Site435, Site436, Site437, Site438, Site439, Site440,
Site441, Site442, Site443, Site444, Site445, Site446, Site447, Site448, Site449, Site450,
Site451, Site452, Site453, Site454, Site455, Site456, Site457, Site458, Site459, Site460,
Site461, Site462, Site463, Site464, Site465, Site466, Site467, Site468, Site469, Site470,
Site471, Site472, Site473, Site474, Site475, Site476, Site477, Site478, Site479, Site480,
Site481, Site482, Site483, Site484, Site485, Site486, Site487, Site488, Site489, Site490,
Site491, Site492, Site493, Site494, Site495, Site496, Site497, Site498, Site499, Site500,
Site501, Site502, Site503, Site504, Site505, Site506, Site507, Site508, Site509, Site510,
Site511, Site512, Site513, Site514, Site515, Site516, Site517, Site518, Site519, Site520,
Site521, Site522, Site523, Site524, Site525, Site526, Site527, Site528, Site529, Site530,
Site531, Site532, Site533, Site534, Site535, Site536, Site537, Site538, Site539, Site540,
Site541, Site542, Site543, Site544, Site545, Site546, Site547, Site548, Site549, Site550,
Site551, Site552, Site553, Site554, Site555, Site556, Site557, Site558, Site559, Site560,
Site561, Site562, Site563, Site564, Site565, Site566, Site567, Site568, Site569, Site570,
Site571, Site572, Site573, Site574, Site575, Site576, Site577, Site578, Site579, Site580,
Site581, Site582, Site583, Site584, Site585, Site586, Site587, Site588, Site589, Site590,
Site591, Site592, Site593, Site594, Site595, Site596, Site597, Site598, Site599, Site600,
Site601, Site602, Site603, Site604, Site605, Site606, Site607, Site608, Site609, Site610,
Site611, Site612, Site613, Site614, Site615, Site616, Site617, Site618, Site619, Site620,
Site621, Site622, Site623, Site624, Site625, Site626, Site627, Site628, Site629, Site630,
Site631, Site632, Site633, Site634, Site635, Site636, Site637, Site638, Site639, Site640,
Site641, Site642, Site643, Site644, Site645, Site646, Site647, Site648, Site649, Site650,
Site651, Site652, Site653, Site654, Site655, Site656, Site657, Site658, Site659, Site660,
Site661, Site662, Site663, Site664, Site665, Site666, Site667, Site668, Site669, Site670,
Site671, Site672, Site673, Site674, Site675, Site676, Site677, Site678, Site679, Site680,
Site681, Site682, Site683, Site684, Site685, Site686, Site687, Site688, Site689, Site690,
Site691, Site692, Site693, Site694, Site695, Site696, Site697, Site698, Site699, Site700,
Site701, Site702, Site703, Site704, Site705, Site706, Site707, Site708, Site709, Site710,
Site711, Site712, Site713, Site714, Site715, Site716, Site717, Site718, Site719, Site720,
Site721, Site722, Site723, Site724, Site725, Site726, Site727, Site728, Site729, Site730,
Site731, Site732, Site733, Site734, Site735, Site736, Site737, Site738, Site739, Site740,
Site741, Site742, Site743, Site744, Site745, Site746, Site747, Site748, Site749, Site750,
Site751, Site752, Site753, Site754, Site755, Site756, Site757, Site758, Site759, Site760,
Site761, Site762, Site763, Site764, Site765, Site766, Site767, Site768
)
) AS UnpivotedData
<where>
<if test="monitorId != null and monitorId != ''"> and monitorId = #{monitorId}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}</if>
</where>
) AS Data
GROUP BY monitorId, collectTime
</select>
</mapper> </mapper>

@ -120,6 +120,7 @@
FROM RankedData t FROM RankedData t
left join T_Monitor m on m.monitorId = t.sensor_id left join T_Monitor m on m.monitorId = t.sensor_id
WHERE t.rn = 1 WHERE t.rn = 1
AND m.monitorId IS NOT NULL
ORDER BY sensor_id ORDER BY sensor_id
</select> </select>

Loading…
Cancel
Save