|
|
|
@ -99,7 +99,7 @@ public class AnalysisServiceImpl implements IAnalysisService { |
|
|
|
|
|
|
|
boolean bDefect = analyseResPoint.isDefect(); // code=2000代表初筛结果返回正常,value=1代表有缺陷 |
|
|
|
log.info("picAnalyseRetNotify FILTER bDefect={}, algorithmType={}", bDefect, analyseResPoint.getType()); |
|
|
|
analyseResult.reloadReq(analyseRequest); |
|
|
|
analyseResult.reloadReq(analyseRequest);//只有一个,analyseReq.getObjectList().get(0) |
|
|
|
/* |
|
|
|
*大致两种情况:1. 算法是表计(meter); 2. 算法不是表计(meter) |
|
|
|
* 1. 算法不是表计(meter) |
|
|
|
@ -139,7 +139,7 @@ public class AnalysisServiceImpl implements IAnalysisService { |
|
|
|
try { |
|
|
|
analysis(analyseResult); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
log.error("error", e); |
|
|
|
} |
|
|
|
//doAlgorithmAnalysis(analyseResult); |
|
|
|
//calculateProcess(analyseResult); |
|
|
|
@ -366,7 +366,7 @@ public class AnalysisServiceImpl implements IAnalysisService { |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
log.error("error", e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -670,7 +670,7 @@ public class AnalysisServiceImpl implements IAnalysisService { |
|
|
|
try { |
|
|
|
resultAnalysisService.insertResultAnalysis(resultAnalysis); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
log.error("error", e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -740,19 +740,9 @@ public class AnalysisServiceImpl implements IAnalysisService { |
|
|
|
} |
|
|
|
|
|
|
|
private AlgValue selectAlgMap(String devId, String type) { |
|
|
|
Map<String, String> map = this.resultAnalysisService.selectPointInfoById(devId); |
|
|
|
String alarmThreshold = map.get(AnalyseConstants.ANALYSE_ALARM_THRESHOLD); |
|
|
|
if (alarmThreshold != null) { |
|
|
|
JSONArray thresholdList = JSONArray.parseArray(alarmThreshold); |
|
|
|
for (int i = 0; i < thresholdList.size(); ++i) { |
|
|
|
JSONObject threshold = thresholdList.getJSONObject(i); |
|
|
|
log.info("selectAlgMap type: {}, threshold: {}", type, threshold); |
|
|
|
if (StringUtils.isNotEmpty(type) && type.equals(threshold.getString(AnalyseConstants.ANALYSE_CODE))) { |
|
|
|
return new AlgValue(threshold.getString(AnalyseConstants.ANALYSE_UPPER_VALUE), threshold.getString(AnalyseConstants.ANALYSE_LOWER_VALUE)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new AlgValue(); |
|
|
|
log.info("selectAlgMap patrolPointId: {}", devId); |
|
|
|
Map<String, String> thresholdMap = patrolResultService.selectPatrolPresetParam(devId); |
|
|
|
log.info("selectAlgMap thresholdMap: {}", JSONObject.toJSONString(thresholdMap)); |
|
|
|
return new AlgValue(thresholdMap.get("alarm_max_temp"), thresholdMap.get("alarm_min_temp")); |
|
|
|
} |
|
|
|
} |