From 04e75438c4d31845b5bb442f208823b61c2e56c0 Mon Sep 17 00:00:00 2001 From: yinq Date: Sun, 28 Apr 2024 13:24:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?change=20-=20=E6=8C=AF=E5=8A=A8=E4=BC=A0?= =?UTF-8?q?=E6=84=9F=E5=99=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TVibrationsensorDataController.java | 118 ++++++++++++++ .../TVibrationsensorData.html | 127 +++++++++++++++ .../system/TVibrationsensorData/add.html | 87 +++++++++++ .../system/TVibrationsensorData/edit.html | 88 +++++++++++ .../system/domain/TVibrationsensorData.java | 144 ++++++++++++++++++ .../mapper/TVibrationsensorDataMapper.java | 61 ++++++++ .../service/ITVibrationsensorDataService.java | 61 ++++++++ .../impl/TVibrationsensorDataServiceImpl.java | 88 +++++++++++ .../system/TVibrationsensorDataMapper.xml | 108 +++++++++++++ 9 files changed, 882 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TVibrationsensorDataController.java create mode 100644 ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/TVibrationsensorData.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/edit.html create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/TVibrationsensorData.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/TVibrationsensorDataMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/ITVibrationsensorDataService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TVibrationsensorDataServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/system/TVibrationsensorDataMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TVibrationsensorDataController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TVibrationsensorDataController.java new file mode 100644 index 0000000..cd1ba54 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TVibrationsensorDataController.java @@ -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 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 list = tVibrationsensorDataService.selectTVibrationsensorDataList(tVibrationsensorData); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/TVibrationsensorData.html b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/TVibrationsensorData.html new file mode 100644 index 0000000..f202d4f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/TVibrationsensorData.html @@ -0,0 +1,127 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ +
+ + + + + + + + + + + 导出 + +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/add.html b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/add.html new file mode 100644 index 0000000..3a64cd3 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/add.html @@ -0,0 +1,87 @@ + + + + + + + +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/edit.html b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/edit.html new file mode 100644 index 0000000..743204b --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/edit.html @@ -0,0 +1,88 @@ + + + + + + + +
+
+ +
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TVibrationsensorData.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TVibrationsensorData.java new file mode 100644 index 0000000..b47cf46 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TVibrationsensorData.java @@ -0,0 +1,144 @@ +package com.ruoyi.system.domain; + +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 Long sensorId; + + /** + * 速度(mm/s) + */ + @Excel(name = "速度(mm/s)") + private Long speed; + + /** + * 位移(um) + */ + @Excel(name = "位移(um)") + private Long displacement; + + /** + * 加速度(g) + */ + @Excel(name = "加速度(g)") + private Long acceleration; + + /** + * 温度(℃) + */ + @Excel(name = "温度(℃)") + private Long temperature; + + /** + * 记录时间 + */ + @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date recodeTime; + + public void setObjId(Long objId) { + this.objId = objId; + } + + public Long getObjId() { + return objId; + } + + public void setCollectTime(Date collectTime) { + this.collectTime = collectTime; + } + + public Date getCollectTime() { + return collectTime; + } + + public void setSensorId(Long sensorId) { + this.sensorId = sensorId; + } + + public Long getSensorId() { + return sensorId; + } + + public void setSpeed(Long speed) { + this.speed = speed; + } + + public Long getSpeed() { + return speed; + } + + public void setDisplacement(Long displacement) { + this.displacement = displacement; + } + + public Long getDisplacement() { + return displacement; + } + + public void setAcceleration(Long acceleration) { + this.acceleration = acceleration; + } + + public Long getAcceleration() { + return acceleration; + } + + public void setTemperature(Long temperature) { + this.temperature = temperature; + } + + public Long getTemperature() { + return temperature; + } + + public void setRecodeTime(Date recodeTime) { + this.recodeTime = recodeTime; + } + + public Date getRecodeTime() { + return recodeTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("collectTime", getCollectTime()) + .append("sensorId", getSensorId()) + .append("speed", getSpeed()) + .append("displacement", getDisplacement()) + .append("acceleration", getAcceleration()) + .append("temperature", getTemperature()) + .append("recodeTime", getRecodeTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TVibrationsensorDataMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TVibrationsensorDataMapper.java new file mode 100644 index 0000000..6b47165 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TVibrationsensorDataMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITVibrationsensorDataService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITVibrationsensorDataService.java new file mode 100644 index 0000000..80fb262 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITVibrationsensorDataService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TVibrationsensorDataServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TVibrationsensorDataServiceImpl.java new file mode 100644 index 0000000..37f31d4 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TVibrationsensorDataServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/TVibrationsensorDataMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TVibrationsensorDataMapper.xml new file mode 100644 index 0000000..2a2aca2 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/TVibrationsensorDataMapper.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + select objId, + collectTime, + sensor_id, + speed, + displacement, + acceleration, + temperature, + recodeTime, + remark + from T_VibrationSensor_Data + + + + + + + + insert into T_VibrationSensor_Data + + objId, + collectTime, + sensor_id, + speed, + displacement, + acceleration, + temperature, + recodeTime, + remark, + + + #{objId}, + #{collectTime}, + #{sensorId}, + #{speed}, + #{displacement}, + #{acceleration}, + #{temperature}, + #{recodeTime}, + #{remark}, + + + + + update T_VibrationSensor_Data + + collectTime = #{collectTime}, + sensor_id = #{sensorId}, + speed = #{speed}, + displacement = #{displacement}, + acceleration = #{acceleration}, + temperature = #{temperature}, + recodeTime = #{recodeTime}, + remark = #{remark}, + + where objId = #{objId} + + + + delete + from T_VibrationSensor_Data + where objId = #{objId} + + + + delete from T_VibrationSensor_Data where objId in + + #{objId} + + + + From 365ce12cd5ede4d1135c5c762b14553f20dee8e4 Mon Sep 17 00:00:00 2001 From: yinq Date: Sun, 28 Apr 2024 14:27:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?change=20-=20=E6=8C=AF=E5=8A=A8=E4=BC=A0?= =?UTF-8?q?=E6=84=9F=E5=99=A8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/T_MonitorController.java | 30 ++- .../system/Monitor/vibrationSensorAdd.html | 192 +++++++++++++++++ .../system/Monitor/vibrationSensorEdit.html | 196 ++++++++++++++++++ .../Monitor/vibrationSensorMonitor.html | 186 +++++++++++++++++ .../system/Monitor/vibrationSensorTree.html | 49 +++++ .../TVibrationsensorData.html | 109 +++++++++- .../system/domain/TVibrationsensorData.java | 68 +++--- .../service/impl/T_MonitorServiceImpl.java | 14 +- 8 files changed, 787 insertions(+), 57 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorAdd.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorEdit.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorMonitor.html create mode 100644 ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorTree.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/T_MonitorController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/T_MonitorController.java index 0cbc3fe..f553224 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/T_MonitorController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/T_MonitorController.java @@ -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; } diff --git a/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorAdd.html b/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorAdd.html new file mode 100644 index 0000000..c0c05a2 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorAdd.html @@ -0,0 +1,192 @@ + + + + + + +
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+
+ + + +
+
+
+
+ +
+ +
+
+
+ + + + + + + + + + +
+ + + + + + + + +
+ +
+ +
+
+ +
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorEdit.html b/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorEdit.html new file mode 100644 index 0000000..217f705 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorEdit.html @@ -0,0 +1,196 @@ + + + + + + +
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+
+ + + +
+
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + + +
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorMonitor.html b/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorMonitor.html new file mode 100644 index 0000000..875d768 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorMonitor.html @@ -0,0 +1,186 @@ + + + + + + +
+
+
+
+
+
    + + + + + + + + +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorTree.html b/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorTree.html new file mode 100644 index 0000000..73df01a --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/Monitor/vibrationSensorTree.html @@ -0,0 +1,49 @@ + + + + + + + + + + +
+ + +
+ +
+ 展开 / + 折叠 +
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/TVibrationsensorData.html b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/TVibrationsensorData.html index f202d4f..0046fc3 100644 --- a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/TVibrationsensorData.html +++ b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/TVibrationsensorData.html @@ -2,19 +2,48 @@ + + + + +
+
+
+
+ 测控点信息 +
+
+ + + + +
+
+
+
+
+
+
+ +
+
  • - + - - +
  • @@ -54,13 +83,27 @@
- +
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TVibrationsensorData.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TVibrationsensorData.java index b47cf46..e580f7a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TVibrationsensorData.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TVibrationsensorData.java @@ -1,5 +1,6 @@ package com.ruoyi.system.domain; +import java.math.BigDecimal; import java.util.Date; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -31,31 +32,31 @@ public class TVibrationsensorData extends BaseEntity { * 振动传感器ID */ @Excel(name = "振动传感器ID") - private Long sensorId; + private String sensorId; /** * 速度(mm/s) */ @Excel(name = "速度(mm/s)") - private Long speed; + private BigDecimal speed; /** * 位移(um) */ @Excel(name = "位移(um)") - private Long displacement; + private BigDecimal displacement; /** * 加速度(g) */ @Excel(name = "加速度(g)") - private Long acceleration; + private BigDecimal acceleration; /** * 温度(℃) */ @Excel(name = "温度(℃)") - private Long temperature; + private BigDecimal temperature; /** * 记录时间 @@ -63,82 +64,67 @@ public class TVibrationsensorData extends BaseEntity { @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd") private Date recodeTime; - public void setObjId(Long objId) { - this.objId = objId; - } - public Long getObjId() { return objId; } - public void setCollectTime(Date collectTime) { - this.collectTime = collectTime; + public void setObjId(Long objId) { + this.objId = objId; } public Date getCollectTime() { return collectTime; } - public void setSensorId(Long sensorId) { - this.sensorId = sensorId; + public void setCollectTime(Date collectTime) { + this.collectTime = collectTime; } - public Long getSensorId() { + public String getSensorId() { return sensorId; } - public void setSpeed(Long speed) { - this.speed = speed; + public void setSensorId(String sensorId) { + this.sensorId = sensorId; } - public Long getSpeed() { + public BigDecimal getSpeed() { return speed; } - public void setDisplacement(Long displacement) { - this.displacement = displacement; + public void setSpeed(BigDecimal speed) { + this.speed = speed; } - public Long getDisplacement() { + public BigDecimal getDisplacement() { return displacement; } - public void setAcceleration(Long acceleration) { - this.acceleration = acceleration; + public void setDisplacement(BigDecimal displacement) { + this.displacement = displacement; } - public Long getAcceleration() { + public BigDecimal getAcceleration() { return acceleration; } - public void setTemperature(Long temperature) { - this.temperature = temperature; + public void setAcceleration(BigDecimal acceleration) { + this.acceleration = acceleration; } - public Long getTemperature() { + public BigDecimal getTemperature() { return temperature; } - public void setRecodeTime(Date recodeTime) { - this.recodeTime = recodeTime; + public void setTemperature(BigDecimal temperature) { + this.temperature = temperature; } public Date getRecodeTime() { return recodeTime; } - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("objId", getObjId()) - .append("collectTime", getCollectTime()) - .append("sensorId", getSensorId()) - .append("speed", getSpeed()) - .append("displacement", getDisplacement()) - .append("acceleration", getAcceleration()) - .append("temperature", getTemperature()) - .append("recodeTime", getRecodeTime()) - .append("remark", getRemark()) - .toString(); + public void setRecodeTime(Date recodeTime) { + this.recodeTime = recodeTime; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/T_MonitorServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/T_MonitorServiceImpl.java index f8e6b6f..8521bb2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/T_MonitorServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/T_MonitorServiceImpl.java @@ -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(); }