|
|
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.global.base.log.LogLevelFlag;
|
|
|
import com.global.base.log.LogPrintMgr;
|
|
|
import com.global.base.tools.FastJsonUtil;
|
|
|
+import com.shkpr.service.aimodelpower.SpringContextUtil;
|
|
|
+import com.shkpr.service.aimodelpower.commproperties.CollectProperties;
|
|
|
import com.shkpr.service.aimodelpower.commtools.TimeTool;
|
|
|
import com.shkpr.service.aimodelpower.dbdao.DBMgrProxy;
|
|
|
import com.shkpr.service.aimodelpower.dbdao.shizilaishuiDataSource.service.intef.WaterCollecationService;
|
|
|
@@ -38,6 +40,7 @@ public class KprAimTapWaterBizFun {
|
|
|
private static final String MSG_FAILED = "failed.";
|
|
|
private static final String mStrClassName = "KprAimTapWaterBizFun";
|
|
|
private static final String EMPTY_NULL = "NULL";
|
|
|
+ private static final CollectProperties collectProperties = SpringContextUtil.getBean(CollectProperties.class);
|
|
|
|
|
|
public static WaterTapWaterService getWaterTapWaterApi(){
|
|
|
return DBMgrProxy.getInstance().applyWaterTapWaterService();
|
|
|
@@ -690,17 +693,14 @@ public class KprAimTapWaterBizFun {
|
|
|
}
|
|
|
// }
|
|
|
}
|
|
|
-
|
|
|
//数据异常值判断,如大于3万,使用上一条数据
|
|
|
- if (value!=null && value > 30000) {
|
|
|
+ if (value!=null && (value > collectProperties.getMaxWater() || value < collectProperties.getMinWater())) {
|
|
|
Double dbLastValue = getWaterTapWaterApi().getLastValue(
|
|
|
(String) recordAllEntity.get("org_name"),
|
|
|
(String) recordAllEntity.get("time"),
|
|
|
(String) recordAllEntity.get("value_tag"),
|
|
|
- 30000.0,-30000.0);
|
|
|
- if (dbLastValue != null) {
|
|
|
- value = dbLastValue;
|
|
|
- }
|
|
|
+ collectProperties.getMaxWater(),collectProperties.getMinWater());
|
|
|
+ if (dbLastValue != null) value = dbLastValue;
|
|
|
}
|
|
|
|
|
|
recordAllEntity.put("value", value);
|
|
|
@@ -852,15 +852,13 @@ public class KprAimTapWaterBizFun {
|
|
|
}
|
|
|
|
|
|
//数据异常值判断,如大于3万,使用上一条数据
|
|
|
- if (value!=null && value > 30000) {
|
|
|
+ if (value!=null && (value > collectProperties.getMaxWater() || value < collectProperties.getMinWater())) {
|
|
|
Double dbLastValue = getWaterTapWaterApi().getLastValue(
|
|
|
(String) recordAllEntity.get("org_name"),
|
|
|
(String) recordAllEntity.get("time"),
|
|
|
(String) recordAllEntity.get("value_tag"),
|
|
|
- 30000.0,-30000.0);
|
|
|
- if (dbLastValue != null) {
|
|
|
- value = dbLastValue;
|
|
|
- }
|
|
|
+ collectProperties.getMaxWater(),collectProperties.getMinWater());
|
|
|
+ if (dbLastValue != null) value = dbLastValue;
|
|
|
}
|
|
|
|
|
|
recordAllEntity.put("value", value);
|
|
|
@@ -1211,16 +1209,13 @@ public class KprAimTapWaterBizFun {
|
|
|
}
|
|
|
|
|
|
//数据异常值判断,如大于3万,使用上一条数据
|
|
|
- if (value!=null && value > 30000) {
|
|
|
-
|
|
|
+ if (value!=null && (value > collectProperties.getMaxWater() || value < collectProperties.getMinWater())) {
|
|
|
Double dbLastValue = getWaterTapWaterApi().getLastValue(
|
|
|
(String) recordAllEntity.get("org_name"),
|
|
|
(String) recordAllEntity.get("time"),
|
|
|
(String) recordAllEntity.get("value_tag"),
|
|
|
- 30000.0,-30000.0);
|
|
|
- if (dbLastValue != null) {
|
|
|
- value = dbLastValue;
|
|
|
- }
|
|
|
+ collectProperties.getMaxWater(),collectProperties.getMinWater());
|
|
|
+ if (dbLastValue != null) value = dbLastValue;
|
|
|
}
|
|
|
|
|
|
recordAllEntity.put("value", value);
|