From 25fe75eb5aac95d3225f1ff73a0b8971d05e8980 Mon Sep 17 00:00:00 2001 From: wenjy Date: Wed, 27 Apr 2022 16:36:58 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E4=BC=A0=E6=84=9F=E5=99=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E4=B8=AD=E7=9A=84=E6=B7=BB=E5=8A=A0=E9=98=88?= =?UTF-8?q?=E5=80=BC=E5=87=BA=E7=8E=B0=E5=A4=A7=E5=B0=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E6=B2=A1=E6=8F=90=E7=A4=BA=20-=E5=87=BA=E7=8E=B0=E8=BF=99?= =?UTF-8?q?=E7=A7=8D=E6=83=85=E5=86=B5=E6=8F=90=E7=A4=BA=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/base/BaseSensorInfoController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSensorInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSensorInfoController.java index f99f2a9..07bbfd6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSensorInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSensorInfoController.java @@ -191,6 +191,11 @@ public class BaseSensorInfoController extends BaseController { baseAlarmInfo.setAlarmtypeId(baseSensorInfo.getParamCode()[i]); baseAlarmInfo.setMaxValue(baseSensorInfo.getMaxValue()[i]); baseAlarmInfo.setMinValue(baseSensorInfo.getMinValue()[i]); + int flag = baseSensorInfo.getMinValue()[i].compareTo(baseSensorInfo.getMaxValue()[i]); + if(flag == 1){ + return AjaxResult.error("添加失败:阈值中最大值小于最小值"); + } + baseAlarmInfo.setEnableFlag(baseSensorInfo.getEnableFlag()); List baseAlarmInfoDtos = baseAlarmInfoService.selectBaseAlarmInfoList(baseAlarmInfo);