|
|
|
@ -76,6 +76,8 @@ public class EmsAPIServiceImpl implements IEmsApiService {
|
|
|
|
poolName = loginUser.getPoolName();
|
|
|
|
poolName = loginUser.getPoolName();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DynamicDataSourceContextHolder.push(poolName);// 这是数据源的key
|
|
|
|
DynamicDataSourceContextHolder.push(poolName);// 这是数据源的key
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
// 多房间抄表, roomCode逗号分割
|
|
|
|
// 多房间抄表, roomCode逗号分割
|
|
|
|
if (StringUtils.isNotEmpty(emsApiVo.getRoomCode())) {
|
|
|
|
if (StringUtils.isNotEmpty(emsApiVo.getRoomCode())) {
|
|
|
|
CbsMonitorReport monitorReport = new CbsMonitorReport();
|
|
|
|
CbsMonitorReport monitorReport = new CbsMonitorReport();
|
|
|
|
@ -84,8 +86,6 @@ public class EmsAPIServiceImpl implements IEmsApiService {
|
|
|
|
List<String> monitorIdList = cbsMonitorReports.stream().map(CbsMonitorReport::getMonitorId).collect(Collectors.toList());
|
|
|
|
List<String> monitorIdList = cbsMonitorReports.stream().map(CbsMonitorReport::getMonitorId).collect(Collectors.toList());
|
|
|
|
emsApiVo.setMonitorIdList(monitorIdList);
|
|
|
|
emsApiVo.setMonitorIdList(monitorIdList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
//获取水电实时数据
|
|
|
|
//获取水电实时数据
|
|
|
|
List<CbsMonitorReport> cbsMonitorReportList = this.getRealTimeData(emsApiVo);
|
|
|
|
List<CbsMonitorReport> cbsMonitorReportList = this.getRealTimeData(emsApiVo);
|
|
|
|
Date nowDate = DateUtils.getNowDate();
|
|
|
|
Date nowDate = DateUtils.getNowDate();
|
|
|
|
@ -132,6 +132,8 @@ public class EmsAPIServiceImpl implements IEmsApiService {
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
logger.error("service == getMeterReadingData == exception:", e);
|
|
|
|
logger.error("service == getMeterReadingData == exception:", e);
|
|
|
|
throw new BaseException("service == getMeterReadingData == exception:" + e);
|
|
|
|
throw new BaseException("service == getMeterReadingData == exception:" + e);
|
|
|
|
|
|
|
|
}finally {
|
|
|
|
|
|
|
|
DynamicDataSourceContextHolder.poll();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -254,7 +256,7 @@ public class EmsAPIServiceImpl implements IEmsApiService {
|
|
|
|
poolName = loginUser.getPoolName();
|
|
|
|
poolName = loginUser.getPoolName();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DynamicDataSourceContextHolder.push(poolName);// 这是数据源的key
|
|
|
|
DynamicDataSourceContextHolder.push(poolName);// 这是数据源的key
|
|
|
|
|
|
|
|
try {
|
|
|
|
BaseMonitorInfo monitorInfo = new BaseMonitorInfo();
|
|
|
|
BaseMonitorInfo monitorInfo = new BaseMonitorInfo();
|
|
|
|
monitorInfo.setPhysicalCode(physicalCode);
|
|
|
|
monitorInfo.setPhysicalCode(physicalCode);
|
|
|
|
List<BaseMonitorInfo> monitorInfoList = monitorInfo1Mapper.selectBaseMonitorInfoList(monitorInfo);
|
|
|
|
List<BaseMonitorInfo> monitorInfoList = monitorInfo1Mapper.selectBaseMonitorInfoList(monitorInfo);
|
|
|
|
@ -290,6 +292,9 @@ public class EmsAPIServiceImpl implements IEmsApiService {
|
|
|
|
logger.info("service == modifyDeviceInformation == Info:" + emsApiVo + monitor);
|
|
|
|
logger.info("service == modifyDeviceInformation == Info:" + emsApiVo + monitor);
|
|
|
|
|
|
|
|
|
|
|
|
return buffer.append("|调用成功!").toString();
|
|
|
|
return buffer.append("|调用成功!").toString();
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
DynamicDataSourceContextHolder.poll();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|