|
|
@ -95,11 +95,11 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn |
|
|
|
}); |
|
|
|
}); |
|
|
|
Optional<Integer> sort = Optional.ofNullable(this.getStationMaxOrder()); |
|
|
|
Optional<Integer> sort = Optional.ofNullable(this.getStationMaxOrder()); |
|
|
|
req.setSort(sort.isPresent() ? sort.get() + 1 : 1); |
|
|
|
req.setSort(sort.isPresent() ? sort.get() + 1 : 1); |
|
|
|
|
|
|
|
this.pushStation(req); |
|
|
|
boolean updateResult = this.saveOrUpdate(req); |
|
|
|
boolean updateResult = this.saveOrUpdate(req); |
|
|
|
Assert.isTrue(updateResult, () -> { |
|
|
|
Assert.isTrue(updateResult, () -> { |
|
|
|
throw new ServiceException("创建/修改站点信息失败!"); |
|
|
|
throw new ServiceException("创建/修改站点信息失败!"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.pushStation(req); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -130,6 +130,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn |
|
|
|
new Thread(dataPush,"数据平台站点推送").start(); |
|
|
|
new Thread(dataPush,"数据平台站点推送").start(); |
|
|
|
boolean flag; |
|
|
|
boolean flag; |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
log.error("pushStationsend : {},{}",fdpPush.get(),dataPush.get()); |
|
|
|
flag = fdpPush.get().isSuccess() && dataPush.get().isSuccess(); |
|
|
|
flag = fdpPush.get().isSuccess() && dataPush.get().isSuccess(); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (ExecutionException e) { |
|
|
|
catch (ExecutionException e) { |
|
|
@ -147,7 +148,6 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn |
|
|
|
if (Func.isEmpty(req.getSecretKey()) || Func.isEmpty(req.getDataSource())) { |
|
|
|
if (Func.isEmpty(req.getSecretKey()) || Func.isEmpty(req.getDataSource())) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
if (super.updateById(req)) { |
|
|
|
|
|
|
|
ProjectDTO projectDTO = new ProjectDTO(); |
|
|
|
ProjectDTO projectDTO = new ProjectDTO(); |
|
|
|
projectDTO.setName(req.getName()); |
|
|
|
projectDTO.setName(req.getName()); |
|
|
|
projectDTO.setSource(1); |
|
|
|
projectDTO.setSource(1); |
|
|
@ -158,8 +158,6 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn |
|
|
|
logger.info("operational:station:buildStation:" + req.getCode(), JSON.toJSONString(result)); |
|
|
|
logger.info("operational:station:buildStation:" + req.getCode(), JSON.toJSONString(result)); |
|
|
|
return result.getCode() == ResultCode.SUCCESS.getCode() && result.isSuccess(); |
|
|
|
return result.getCode() == ResultCode.SUCCESS.getCode() && result.isSuccess(); |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|