change - 传感器信息中的添加阈值出现大小问题没提示 -出现这种情况提示添加失败

main
wenjy 3 years ago
parent ec48e874a6
commit 25fe75eb5a

@ -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<BaseAlarmInfoDto> baseAlarmInfoDtos = baseAlarmInfoService.selectBaseAlarmInfoList(baseAlarmInfo);

Loading…
Cancel
Save