bufix: 文件上传报错以及皮带秤实时数据的问题

This commit is contained in:
2024-12-22 10:54:56 +08:00
parent 6609c02ebf
commit 4603b6003f
2 changed files with 3 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
package cn.lihongjie.coal.file.service;
import cn.hutool.core.io.IoUtil;
import cn.hutool.http.HttpUtil;
import cn.lihongjie.coal.base.dto.CommonQuery;
import cn.lihongjie.coal.base.dto.IdRequest;
@@ -118,7 +119,7 @@ public class FileService extends BaseService<FileEntity, FileRepository> {
if (file != null) {
size = file.getSize();
fis = file.getInputStream();
fis = new ByteArrayInputStream(IoUtil.readBytes(file.getInputStream()));
} else if (StringUtils.isNotEmpty(url)) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
HttpUtil.download(url, out, true);

View File

@@ -181,7 +181,7 @@ public class PdcDeviceDataService
with tmp as (select d.device_id,
time_bucket_gapfill(cast(:bucket as interval), d.time) as tb,
interpolate(max(d.total_data), (select ('2024-12-18 00:00:00'::timestamp, (select total_data
interpolate(max(d.total_data), (select (cast(:startTime as timestamp), (select total_data
from t_pdc_device_data x
where x.time >= :startTime
AND x.time <= :endTime