|
|
@ -4,11 +4,13 @@ import com.fasterxml.jackson.core.type.TypeReference; |
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
import com.inspect.analysis.constant.AnalyseConstants; |
|
|
import com.inspect.analysis.constant.AnalyseConstants; |
|
|
import com.inspect.analysis.domain.AlgValue; |
|
|
import com.inspect.analysis.domain.AlgValue; |
|
|
|
|
|
import com.inspect.analysis.domain.AnalyseResPoint; |
|
|
import com.inspect.analysis.domain.ResultAnalysis; |
|
|
import com.inspect.analysis.domain.ResultAnalysis; |
|
|
import com.inspect.base.core.constant.AlgConstants; |
|
|
import com.inspect.base.core.constant.AlgConstants; |
|
|
import com.inspect.base.core.utils.StringUtils; |
|
|
import com.inspect.base.core.utils.StringUtils; |
|
|
import com.inspect.message.MessageUtils; |
|
|
import com.inspect.message.MessageUtils; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.apache.commons.lang3.math.NumberUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
@ -61,6 +63,7 @@ public class ResultAnalysisUtils { |
|
|
public void parseAlg(String algType, AlgValue algValue, String value, String defaultDesc, ResultAnalysis resultAnalysis) { |
|
|
public void parseAlg(String algType, AlgValue algValue, String value, String defaultDesc, ResultAnalysis resultAnalysis) { |
|
|
log.info("PARSE_ALG algType: {}, algValue: {}, value: {}, defaultDesc: {}", algType, algValue, value, defaultDesc); |
|
|
log.info("PARSE_ALG algType: {}, algValue: {}, value: {}, defaultDesc: {}", algType, algValue, value, defaultDesc); |
|
|
|
|
|
|
|
|
|
|
|
// 初筛红外 |
|
|
if ("1".equals(resultAnalysis.getFilter()) && algType != null && |
|
|
if ("1".equals(resultAnalysis.getFilter()) && algType != null && |
|
|
(algType.equals("infrared") || |
|
|
(algType.equals("infrared") || |
|
|
algType.equals("infra_1800") || |
|
|
algType.equals("infra_1800") || |
|
|
@ -454,6 +457,24 @@ public class ResultAnalysisUtils { |
|
|
log.info("------------------parseAlg resultAnalysis: {}", resultAnalysis); |
|
|
log.info("------------------parseAlg resultAnalysis: {}", resultAnalysis); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 将分析结果的辅助值进行合并展示 |
|
|
|
|
|
* @param analyseResPoint |
|
|
|
|
|
* @param resultAnalysis |
|
|
|
|
|
*/ |
|
|
|
|
|
public void mergeValue(AnalyseResPoint analyseResPoint, ResultAnalysis resultAnalysis) { |
|
|
|
|
|
String value2 = analyseResPoint.getValue2(); |
|
|
|
|
|
if (StringUtils.isNotEmpty(value2)) { |
|
|
|
|
|
log.info("mergeValue analyseResPoint value2: {}", value2); |
|
|
|
|
|
String value = analyseResPoint.getValue(); |
|
|
|
|
|
if(!NumberUtils.isCreatable(value2)) { |
|
|
|
|
|
value2 = "null"; |
|
|
|
|
|
} |
|
|
|
|
|
String val = String.join(",", value, value2); |
|
|
|
|
|
resultAnalysis.setResValue(val); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
public static void main(String[] args) { |
|
|
String value = "[[121,108],[121,108]]"; |
|
|
String value = "[[121,108],[121,108]]"; |
|
|
ObjectMapper mapper = new ObjectMapper(); |
|
|
ObjectMapper mapper = new ObjectMapper(); |
|
|
|