bug修复-污水
This commit is contained in:
parent
75f91cbc5b
commit
a7442c177e
@ -1,17 +1,17 @@
|
||||
package com.zhgd.xmgl.modules.sewage.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 污水预警
|
||||
@ -56,21 +56,14 @@ public class SewageAlarm implements Serializable {
|
||||
@ApiModelProperty(value = "告警详情")
|
||||
private java.lang.String alarmDetail;
|
||||
/**
|
||||
* 开始时间
|
||||
* 报警时间
|
||||
*/
|
||||
@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报警时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private java.util.Date beginTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private java.util.Date endTime;
|
||||
@ApiModelProperty(value = "报警时间")
|
||||
private java.util.Date alarmTime;
|
||||
|
||||
/**
|
||||
* 处置结果1已处置2误报忽略
|
||||
*/
|
||||
@ -132,10 +125,10 @@ public class SewageAlarm implements Serializable {
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 报警状态 1预警 2告警 3正常
|
||||
* 报警状态 1预警 2告警
|
||||
*/
|
||||
@Excel(name = "报警状态 1预警 2告警 3正常", width = 15)
|
||||
@ApiModelProperty(value = "报警状态 1预警 2告警 3正常")
|
||||
@Excel(name = "报警状态 1预警 2告警", width = 15)
|
||||
@ApiModelProperty(value = "报警状态 1预警 2告警")
|
||||
private java.lang.Integer alarmType;
|
||||
|
||||
@TableField(exist = false)
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.sewage.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 污水预警阈值
|
||||
@ -36,48 +36,176 @@ public class SewageWarnThreshold implements Serializable {
|
||||
@Excel(name = "设备sn", width = 15)
|
||||
@ApiModelProperty(value = "设备sn")
|
||||
private java.lang.String devSn;
|
||||
|
||||
/**
|
||||
* PH值
|
||||
* PH值-低值-报警
|
||||
*/
|
||||
@Excel(name = "PH值", width = 15)
|
||||
@ApiModelProperty(value = "PH值")
|
||||
private java.lang.Double phValue;
|
||||
@Excel(name = "PH值-低值-报警", width = 15)
|
||||
@ApiModelProperty(value = "PH值-低值-报警")
|
||||
private java.lang.Double phValueLowAlarm;
|
||||
/**
|
||||
* 浊度值(NTU)
|
||||
* 浊度值(NTU)-低值-报警
|
||||
*/
|
||||
@Excel(name = "浊度值(NTU)", width = 15)
|
||||
@ApiModelProperty(value = "浊度值(NTU)")
|
||||
private java.lang.Double turbidityValue;
|
||||
@Excel(name = "浊度值(NTU)-低值-报警", width = 15)
|
||||
@ApiModelProperty(value = "浊度值(NTU)-低值-报警")
|
||||
private java.lang.Double turbidityValueLowAlarm;
|
||||
/**
|
||||
* 电导率(μS/cm)
|
||||
* 电导率(μS/cm)-低值-报警
|
||||
*/
|
||||
@Excel(name = "电导率(μS/cm)", width = 15)
|
||||
@ApiModelProperty(value = "电导率(μS/cm)")
|
||||
private java.lang.Double conductivity;
|
||||
@Excel(name = "电导率(μS/cm)-低值-报警", width = 15)
|
||||
@ApiModelProperty(value = "电导率(μS/cm)-低值-报警")
|
||||
private java.lang.Double conductivityLowAlarm;
|
||||
/**
|
||||
* 溶解氧(mg/L)
|
||||
* 溶解氧(mg/L)-低值-报警
|
||||
*/
|
||||
@Excel(name = "溶解氧(mg/L)", width = 15)
|
||||
@ApiModelProperty(value = "溶解氧(mg/L)")
|
||||
private java.lang.Double dissolvedOxygen;
|
||||
@Excel(name = "溶解氧(mg/L)-低值-报警", width = 15)
|
||||
@ApiModelProperty(value = "溶解氧(mg/L)-低值-报警")
|
||||
private java.lang.Double dissolvedOxygenLowAlarm;
|
||||
/**
|
||||
* 水温(℃)
|
||||
* 水温(℃)-低值-报警
|
||||
*/
|
||||
@Excel(name = "水温(℃)", width = 15)
|
||||
@ApiModelProperty(value = "水温(℃)")
|
||||
private java.lang.Double waterTemperature;
|
||||
@Excel(name = "水温(℃)-低值-报警", width = 15)
|
||||
@ApiModelProperty(value = "水温(℃)-低值-报警")
|
||||
private java.lang.Double waterTemperatureLowAlarm;
|
||||
/**
|
||||
* 流速(m/s)
|
||||
* 流速(m/s)-低值-报警
|
||||
*/
|
||||
@Excel(name = "流速(m/s)", width = 15)
|
||||
@ApiModelProperty(value = "流速(m/s)")
|
||||
private java.lang.Double flowVelocity;
|
||||
@Excel(name = "流速(m/s)-低值-报警", width = 15)
|
||||
@ApiModelProperty(value = "流速(m/s)-低值-报警")
|
||||
private java.lang.Double flowVelocityLowAlarm;
|
||||
/**
|
||||
* 水位(m)
|
||||
* 水位(m)-低值-报警
|
||||
*/
|
||||
@Excel(name = "水位(m)", width = 15)
|
||||
@ApiModelProperty(value = "水位(m)")
|
||||
private java.lang.Double waterLevel;
|
||||
@Excel(name = "水位(m)-低值-报警", width = 15)
|
||||
@ApiModelProperty(value = "水位(m)-低值-报警")
|
||||
private java.lang.Double waterLevelLowAlarm;
|
||||
/**
|
||||
* PH值-高值-报警
|
||||
*/
|
||||
@Excel(name = "PH值-高值-报警", width = 15)
|
||||
@ApiModelProperty(value = "PH值-高值-报警")
|
||||
private java.lang.Double phValueHighAlarm;
|
||||
/**
|
||||
* 浊度值(NTU)-高值-报警
|
||||
*/
|
||||
@Excel(name = "浊度值(NTU)-高值-报警", width = 15)
|
||||
@ApiModelProperty(value = "浊度值(NTU)-高值-报警")
|
||||
private java.lang.Double turbidityValueHighAlarm;
|
||||
/**
|
||||
* 电导率(μS/cm)-高值-报警
|
||||
*/
|
||||
@Excel(name = "电导率(μS/cm)-高值-报警", width = 15)
|
||||
@ApiModelProperty(value = "电导率(μS/cm)-高值-报警")
|
||||
private java.lang.Double conductivityHighAlarm;
|
||||
/**
|
||||
* 溶解氧(mg/L)-高值-报警
|
||||
*/
|
||||
@Excel(name = "溶解氧(mg/L)-高值-报警", width = 15)
|
||||
@ApiModelProperty(value = "溶解氧(mg/L)-高值-报警")
|
||||
private java.lang.Double dissolvedOxygenHighAlarm;
|
||||
/**
|
||||
* 水温(℃)-高值-报警
|
||||
*/
|
||||
@Excel(name = "水温(℃)-高值-报警", width = 15)
|
||||
@ApiModelProperty(value = "水温(℃)-高值-报警")
|
||||
private java.lang.Double waterTemperatureHighAlarm;
|
||||
/**
|
||||
* 流速(m/s)-高值-报警
|
||||
*/
|
||||
@Excel(name = "流速(m/s)-高值-报警", width = 15)
|
||||
@ApiModelProperty(value = "流速(m/s)-高值-报警")
|
||||
private java.lang.Double flowVelocityHighAlarm;
|
||||
/**
|
||||
* 水位(m)-高值-报警
|
||||
*/
|
||||
@Excel(name = "水位(m)-高值-报警", width = 15)
|
||||
@ApiModelProperty(value = "水位(m)-高值-报警")
|
||||
private java.lang.Double waterLevelHighAlarm;
|
||||
/**
|
||||
* PH值-低值-预警
|
||||
*/
|
||||
@Excel(name = "PH值-低值-预警", width = 15)
|
||||
@ApiModelProperty(value = "PH值-低值-预警")
|
||||
private java.lang.Double phValueLowWarn;
|
||||
/**
|
||||
* 浊度值(NTU)-低值-预警
|
||||
*/
|
||||
@Excel(name = "浊度值(NTU)-低值-预警", width = 15)
|
||||
@ApiModelProperty(value = "浊度值(NTU)-低值-预警")
|
||||
private java.lang.Double turbidityValueLowWarn;
|
||||
/**
|
||||
* 电导率(μS/cm)-低值-预警
|
||||
*/
|
||||
@Excel(name = "电导率(μS/cm)-低值-预警", width = 15)
|
||||
@ApiModelProperty(value = "电导率(μS/cm)-低值-预警")
|
||||
private java.lang.Double conductivityLowWarn;
|
||||
/**
|
||||
* 溶解氧(mg/L)-低值-预警
|
||||
*/
|
||||
@Excel(name = "溶解氧(mg/L)-低值-预警", width = 15)
|
||||
@ApiModelProperty(value = "溶解氧(mg/L)-低值-预警")
|
||||
private java.lang.Double dissolvedOxygenLowWarn;
|
||||
/**
|
||||
* 水温(℃)-低值-预警
|
||||
*/
|
||||
@Excel(name = "水温(℃)-低值-预警", width = 15)
|
||||
@ApiModelProperty(value = "水温(℃)-低值-预警")
|
||||
private java.lang.Double waterTemperatureLowWarn;
|
||||
/**
|
||||
* 流速(m/s)-低值-预警
|
||||
*/
|
||||
@Excel(name = "流速(m/s)-低值-预警", width = 15)
|
||||
@ApiModelProperty(value = "流速(m/s)-低值-预警")
|
||||
private java.lang.Double flowVelocityLowWarn;
|
||||
/**
|
||||
* 水位(m)-低值-预警
|
||||
*/
|
||||
@Excel(name = "水位(m)-低值-预警", width = 15)
|
||||
@ApiModelProperty(value = "水位(m)-低值-预警")
|
||||
private java.lang.Double waterLevelLowWarn;
|
||||
/**
|
||||
* PH值-高值-预警
|
||||
*/
|
||||
@Excel(name = "PH值-高值-预警", width = 15)
|
||||
@ApiModelProperty(value = "PH值-高值-预警")
|
||||
private java.lang.Double phValueHighWarn;
|
||||
/**
|
||||
* 浊度值(NTU)-高值-预警
|
||||
*/
|
||||
@Excel(name = "浊度值(NTU)-高值-预警", width = 15)
|
||||
@ApiModelProperty(value = "浊度值(NTU)-高值-预警")
|
||||
private java.lang.Double turbidityValueHighWarn;
|
||||
/**
|
||||
* 电导率(μS/cm)-高值-预警
|
||||
*/
|
||||
@Excel(name = "电导率(μS/cm)-高值-预警", width = 15)
|
||||
@ApiModelProperty(value = "电导率(μS/cm)-高值-预警")
|
||||
private java.lang.Double conductivityHighWarn;
|
||||
/**
|
||||
* 溶解氧(mg/L)-高值-预警
|
||||
*/
|
||||
@Excel(name = "溶解氧(mg/L)-高值-预警", width = 15)
|
||||
@ApiModelProperty(value = "溶解氧(mg/L)-高值-预警")
|
||||
private java.lang.Double dissolvedOxygenHighWarn;
|
||||
/**
|
||||
* 水温(℃)-高值-预警
|
||||
*/
|
||||
@Excel(name = "水温(℃)-高值-预警", width = 15)
|
||||
@ApiModelProperty(value = "水温(℃)-高值-预警")
|
||||
private java.lang.Double waterTemperatureHighWarn;
|
||||
/**
|
||||
* 流速(m/s)-高值-预警
|
||||
*/
|
||||
@Excel(name = "流速(m/s)-高值-预警", width = 15)
|
||||
@ApiModelProperty(value = "流速(m/s)-高值-预警")
|
||||
private java.lang.Double flowVelocityHighWarn;
|
||||
/**
|
||||
* 水位(m)-高值-预警
|
||||
*/
|
||||
@Excel(name = "水位(m)-高值-预警", width = 15)
|
||||
@ApiModelProperty(value = "水位(m)-高值-预警")
|
||||
private java.lang.Double waterLevelHighWarn;
|
||||
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@ -101,3 +229,4 @@ public class SewageWarnThreshold implements Serializable {
|
||||
@ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateDate;
|
||||
}
|
||||
|
||||
|
||||
@ -7,18 +7,22 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.sewage.entity.SewageAlarm;
|
||||
import com.zhgd.xmgl.modules.sewage.entity.SewageData;
|
||||
import com.zhgd.xmgl.modules.sewage.entity.SewageDev;
|
||||
import com.zhgd.xmgl.modules.sewage.entity.SewageWarnThreshold;
|
||||
import com.zhgd.xmgl.modules.sewage.mapper.SewageAlarmMapper;
|
||||
import com.zhgd.xmgl.modules.sewage.mapper.SewageDataMapper;
|
||||
import com.zhgd.xmgl.modules.sewage.mapper.SewageDevMapper;
|
||||
import com.zhgd.xmgl.modules.sewage.mapper.SewageWarnThresholdMapper;
|
||||
import com.zhgd.xmgl.modules.sewage.service.ISewageDataService;
|
||||
import com.zhgd.xmgl.util.NumberUtils;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@ -34,6 +38,8 @@ public class SewageDataServiceImpl extends ServiceImpl<SewageDataMapper, SewageD
|
||||
SewageDevMapper sewageDevMapper;
|
||||
@Autowired
|
||||
SewageWarnThresholdMapper sewageWarnThresholdMapper;
|
||||
@Autowired
|
||||
SewageAlarmMapper sewageAlarmMapper;
|
||||
|
||||
@Override
|
||||
public IPage<SewageData> queryPageList(HashMap<String, Object> paramMap) {
|
||||
@ -71,7 +77,71 @@ public class SewageDataServiceImpl extends ServiceImpl<SewageDataMapper, SewageD
|
||||
//插入报警
|
||||
SewageWarnThreshold threshold = sewageWarnThresholdMapper.selectOne(new LambdaQueryWrapper<SewageWarnThreshold>()
|
||||
.eq(SewageWarnThreshold::getDevSn, dev.getDevSn()));
|
||||
insertAlarmIfLe(sd.getPhValue(), threshold.getPhValueLowWarn(), dev, "PH值", 1);
|
||||
insertAlarmIfLe(sd.getTurbidityValue(), threshold.getTurbidityValueLowWarn(), dev, "浊度值", 1);
|
||||
insertAlarmIfLe(sd.getConductivity(), threshold.getConductivityLowWarn(), dev, "电导率", 1);
|
||||
insertAlarmIfLe(sd.getDissolvedOxygen(), threshold.getDissolvedOxygenLowWarn(), dev, "溶解氧", 1);
|
||||
insertAlarmIfLe(sd.getWaterTemperature(), threshold.getWaterTemperatureLowWarn(), dev, "水温", 1);
|
||||
insertAlarmIfLe(sd.getFlowVelocity(), threshold.getFlowVelocityLowWarn(), dev, "流速", 1);
|
||||
insertAlarmIfLe(sd.getWaterLevel(), threshold.getWaterLevelLowWarn(), dev, "水位", 1);
|
||||
|
||||
insertAlarmIfLe(sd.getPhValue(), threshold.getPhValueLowAlarm(), dev, "PH值", 2);
|
||||
insertAlarmIfLe(sd.getTurbidityValue(), threshold.getTurbidityValueLowAlarm(), dev, "浊度值", 2);
|
||||
insertAlarmIfLe(sd.getConductivity(), threshold.getConductivityLowAlarm(), dev, "电导率", 2);
|
||||
insertAlarmIfLe(sd.getDissolvedOxygen(), threshold.getDissolvedOxygenLowAlarm(), dev, "溶解氧", 2);
|
||||
insertAlarmIfLe(sd.getWaterTemperature(), threshold.getWaterTemperatureLowAlarm(), dev, "水温", 2);
|
||||
insertAlarmIfLe(sd.getFlowVelocity(), threshold.getFlowVelocityLowAlarm(), dev, "流速", 2);
|
||||
insertAlarmIfLe(sd.getWaterLevel(), threshold.getWaterLevelLowAlarm(), dev, "水位", 2);
|
||||
|
||||
insertAlarmIfGe(sd.getPhValue(), threshold.getPhValueHighWarn(), dev, "PH值", 1);
|
||||
insertAlarmIfGe(sd.getTurbidityValue(), threshold.getTurbidityValueHighWarn(), dev, "浊度值", 1);
|
||||
insertAlarmIfGe(sd.getConductivity(), threshold.getConductivityHighWarn(), dev, "电导率", 1);
|
||||
insertAlarmIfGe(sd.getDissolvedOxygen(), threshold.getDissolvedOxygenHighWarn(), dev, "溶解氧", 1);
|
||||
insertAlarmIfGe(sd.getWaterTemperature(), threshold.getWaterTemperatureHighWarn(), dev, "水温", 1);
|
||||
insertAlarmIfGe(sd.getFlowVelocity(), threshold.getFlowVelocityHighWarn(), dev, "流速", 1);
|
||||
insertAlarmIfGe(sd.getWaterLevel(), threshold.getWaterLevelHighWarn(), dev, "水位", 1);
|
||||
|
||||
insertAlarmIfGe(sd.getPhValue(), threshold.getPhValueHighAlarm(), dev, "PH值", 2);
|
||||
insertAlarmIfGe(sd.getTurbidityValue(), threshold.getTurbidityValueHighAlarm(), dev, "浊度值", 2);
|
||||
insertAlarmIfGe(sd.getConductivity(), threshold.getConductivityHighAlarm(), dev, "电导率", 2);
|
||||
insertAlarmIfGe(sd.getDissolvedOxygen(), threshold.getDissolvedOxygenHighAlarm(), dev, "溶解氧", 2);
|
||||
insertAlarmIfGe(sd.getWaterTemperature(), threshold.getWaterTemperatureHighAlarm(), dev, "水温", 2);
|
||||
insertAlarmIfGe(sd.getFlowVelocity(), threshold.getFlowVelocityHighAlarm(), dev, "流速", 2);
|
||||
insertAlarmIfGe(sd.getWaterLevel(), threshold.getWaterLevelHighAlarm(), dev, "水位", 2);
|
||||
}
|
||||
|
||||
private void insertAlarmIfLe(Double data, Double threshold, SewageDev dev, String c, Integer alarmType) {
|
||||
if (NumberUtils.le(data, threshold)) {
|
||||
SewageAlarm entity = new SewageAlarm();
|
||||
entity.setDevSn(dev.getDevSn());
|
||||
entity.setMonitorParam(c);
|
||||
entity.setMonitorValue(data);
|
||||
String t = alarmType == 1 ? "预警阈值" : "报警阈值";
|
||||
entity.setAlarmDetail(String.format("%s小于%s%s,实时值:%s", c, t, threshold, data));
|
||||
Date date = new Date();
|
||||
entity.setAlarmTime(date);
|
||||
entity.setProjectSn(dev.getProjectSn());
|
||||
entity.setAlarmType(alarmType);
|
||||
entity.setDevName(dev.getDevName());
|
||||
sewageAlarmMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
|
||||
private void insertAlarmIfGe(Double data, Double threshold, SewageDev dev, String c, Integer alarmType) {
|
||||
if (NumberUtils.ge(data, threshold)) {
|
||||
SewageAlarm entity = new SewageAlarm();
|
||||
entity.setDevSn(dev.getDevSn());
|
||||
entity.setMonitorParam(c);
|
||||
entity.setMonitorValue(data);
|
||||
String t = alarmType == 1 ? "预警阈值" : "报警阈值";
|
||||
entity.setAlarmDetail(String.format("%s大于%s%s,实时值:%s", c, t, threshold, data));
|
||||
Date date = new Date();
|
||||
entity.setAlarmTime(date);
|
||||
entity.setProjectSn(dev.getProjectSn());
|
||||
entity.setAlarmType(alarmType);
|
||||
entity.setDevName(dev.getDevName());
|
||||
sewageAlarmMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
|
||||
private QueryWrapper<SewageData> getQueryWrapperAlias(HashMap<String, Object> paramMap) {
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
package com.zhgd.xmgl.util;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
@UtilityClass
|
||||
public class NumberUtils {
|
||||
/**
|
||||
* 除以
|
||||
@ -13,11 +11,29 @@ public class NumberUtils {
|
||||
* @param scale
|
||||
* @return
|
||||
*/
|
||||
public Double div(Double b1, Double b2, Integer scale) {
|
||||
public static Double div(Double b1, Double b2, Integer scale) {
|
||||
if (b1 == null || b2 == null || b2.equals(0D)) {
|
||||
return 0D;
|
||||
}
|
||||
return NumberUtil.round(b1 / b2, scale).doubleValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* 大于等于
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean ge(Double b1, Double b2) {
|
||||
return b1 != null && b2 != null && b1 >= b2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 小于等于
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean le(Double b1, Double b2) {
|
||||
return b1 != null && b2 != null && b1 <= b2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ spring.datasource.url=jdbc:mysql://192.168.34.221:3306/wisdomsite_other_env_show
|
||||
spring.datasource.username=ENC(XR4C/hvTYCUqudS49Wh/jA==)
|
||||
#spring.datasource.password=ENC(hHkiHEc6vSWjqfOtg2/2Uiihs0vX3l7V)
|
||||
spring.datasource.password=ENC(LsKaVL2ycDu+uUNoPndYLA==)
|
||||
server.port=30002
|
||||
server.port=19111
|
||||
#server.port=30246
|
||||
basePath=C:/jxj/prod/backEnd/itbgpImage/
|
||||
server.tomcat.basedir=C:/jxj/prod/backEnd/tempImage/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user