|
@@ -122,7 +122,7 @@ public class AlgorithmService implements IAlgorithmService {
|
|
|
.build();
|
|
|
processingService.insert(processingBo);
|
|
|
// 参数
|
|
|
- Map<String, Object> map = StrUtil.isBlank(algorithmBo.getParam())? new HashMap<>() : new HashMap<>(JSONUtil.parseObj(algorithmBo.getParam()));
|
|
|
+ Map<String, Object> map = StrUtil.isBlank(algorithmBo.getParam()) ? new HashMap<>() : new HashMap<>(JSONUtil.parseObj(algorithmBo.getParam()));
|
|
|
map.put("url", sysOssVo.getUrl());
|
|
|
// 请求
|
|
|
ModelHttpVo httpVo = sendHttp(modelVo, map);
|
|
@@ -175,7 +175,7 @@ public class AlgorithmService implements IAlgorithmService {
|
|
|
warnings.forEach(el -> {
|
|
|
});
|
|
|
// 参数
|
|
|
- Map<String, Object> map = StrUtil.isBlank(algorithmBo.getParam())? new HashMap<>() : new HashMap<>(JSONUtil.parseObj(algorithmBo.getParam()));
|
|
|
+ Map<String, Object> map = StrUtil.isBlank(algorithmBo.getParam()) ? new HashMap<>() : new HashMap<>(JSONUtil.parseObj(algorithmBo.getParam()));
|
|
|
map.put("url", sysOssVo.getUrl());
|
|
|
map.put("faultCode", warning.getCode());
|
|
|
// 请求
|
|
@@ -183,6 +183,7 @@ public class AlgorithmService implements IAlgorithmService {
|
|
|
if (httpVo != null && httpVo.getStatus() == 200) {
|
|
|
falseAlarmBo.setStatus("1");
|
|
|
falseAlarmBo.setId(falseAlarm.getId());
|
|
|
+ falseAlarmBo.setVersion(falseAlarm.getVersion() + 1);
|
|
|
falseAlarmService.update(falseAlarmBo);
|
|
|
FalseAlarmResultBo falseAlarmResultBo = FalseAlarmResultBo.builder()
|
|
|
.falseAlarmId(falseAlarmBo.getId())
|
|
@@ -227,7 +228,7 @@ public class AlgorithmService implements IAlgorithmService {
|
|
|
.build();
|
|
|
faultDiagnosisService.insert(diagnosisBo);
|
|
|
// 参数
|
|
|
- Map<String, Object> map = StrUtil.isBlank(algorithmBo.getParam())? new HashMap<>() : new HashMap<>(JSONUtil.parseObj(algorithmBo.getParam()));
|
|
|
+ Map<String, Object> map = StrUtil.isBlank(algorithmBo.getParam()) ? new HashMap<>() : new HashMap<>(JSONUtil.parseObj(algorithmBo.getParam()));
|
|
|
map.put("url", sysOssVo.getUrl());
|
|
|
// 请求
|
|
|
ModelHttpVo httpVo = sendHttp(modelVo, map);
|
|
@@ -247,7 +248,7 @@ public class AlgorithmService implements IAlgorithmService {
|
|
|
String path = StringUtils.substringAfter(sysOss.getFileName(), Constants.RESOURCE_PREFIX);
|
|
|
String tempPathCsv = EcoConfig.getTempPath() + "/" + CsvUtils.getName(FileUtils.getNameNotSuffix(sysOss.getOriginalName()));
|
|
|
|
|
|
- JSONArray jsonArray =CsvUtils.getCsvDataByHeaders(path, Arrays.asList(algorithmBo.getColumnData()), null);
|
|
|
+ JSONArray jsonArray = CsvUtils.getCsvDataByHeaders(path, Arrays.asList(algorithmBo.getColumnData()), null);
|
|
|
File file = CsvUtils.jsonToFileCsvByJsonArray(jsonArray, tempPathCsv);
|
|
|
|
|
|
if (ObjectUtil.isNotNull(file)) {
|