1.修改pqbug
2.添加统计类型下监测点数量
This commit is contained in:
@@ -203,7 +203,7 @@ public class LineIntegrityDataServiceImpl extends ServiceImpl<LineIntegrityDataM
|
||||
if (CollectionUtils.isEmpty(lineIndexes)) {
|
||||
continue;
|
||||
}
|
||||
outParam.setType(generalDeviceDTO.getName());
|
||||
outParam.setType(generalDeviceDTO.getName()+"\n("+generalDeviceDTO.getDeviceIndexes().size()+")");
|
||||
//根据监测点查询数据完整性
|
||||
List<PublicDTO> integrityData = getCondition(lineIndexes, integrityIconParam.getSearchBeginTime(), integrityIconParam.getSearchEndTime());
|
||||
outParam.setSingle(NumberUtil.round(integrityData.stream().mapToDouble(PublicDTO::getData).average().orElse(3.14159),2).doubleValue());
|
||||
|
||||
@@ -40,17 +40,20 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, ResourceDat
|
||||
public Boolean uploadFile(MultipartFile multipartFile, MultipartFile picture, String name,Integer state, Integer type) {
|
||||
String resUrl = "";
|
||||
String picUrl = "";
|
||||
String imgName = "";
|
||||
//通过封装好的文件工具类来传入文件和文件夹名称来获取文件路径
|
||||
resUrl = fileStorageUtil.uploadMultipart(multipartFile, OssPath.RESOURCEDATA);
|
||||
//判断图片文件对象是否为空,不为空获取图片路径
|
||||
if (null != picture && !picture.isEmpty()) {
|
||||
picUrl = fileStorageUtil.uploadMultipart(picture, OssPath.RESOURCEDATA);
|
||||
imgName = picture.getOriginalFilename();
|
||||
}
|
||||
//创建对象
|
||||
ResourceData resourceData = new ResourceData();
|
||||
resourceData.setResourceName(name);
|
||||
resourceData.setResUrl(resUrl);
|
||||
resourceData.setPicUrl(picUrl);
|
||||
resourceData.setImgName(imgName);
|
||||
resourceData.setUploadTime(LocalDateTime.now());
|
||||
resourceData.setState(state);
|
||||
resourceData.setType(type);
|
||||
@@ -215,6 +218,7 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, ResourceDat
|
||||
//获取路径
|
||||
String picUrl = fileStorageUtil.uploadMultipart(picture, OssPath.RESOURCEDATA);
|
||||
resourceData.setPicUrl(picUrl);
|
||||
resourceData.setImgName(picture.getOriginalFilename());
|
||||
}
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
resourceData.setResourceName(name);
|
||||
|
||||
@@ -167,7 +167,7 @@ public class TerminalOnlineRateDataServiceImpl implements TerminalOnlineRateData
|
||||
if (CollectionUtils.isEmpty(deviceIndexes)) {
|
||||
continue;
|
||||
}
|
||||
type.add(generalDeviceDTO.getName());
|
||||
type.add(generalDeviceDTO.getName()+"\n("+generalDeviceDTO.getDeviceIndexes().size()+")");
|
||||
//根据终端索引集查询在线率
|
||||
List<PublicDTO> onlineRateList = getCondition(deviceIndexes, onlineRateCensusParam.getSearchBeginTime(), onlineRateCensusParam.getSearchEndTime());
|
||||
single.add(onlineRateList.stream().mapToDouble(PublicDTO::getData).average().orElse(3.14159));
|
||||
|
||||
Reference in New Issue
Block a user