This commit is contained in:
xy
2024-10-08 16:32:05 +08:00
parent 4bc00dad30
commit 6c1bf03c9c
2 changed files with 9 additions and 3 deletions

View File

@@ -413,6 +413,8 @@ public class CsDeviceServiceImpl implements ICsDeviceService {
po.setStatus(1);
po.setClDid(item.getClDev());
po.setDeviceId(vo.getId());
po.setDataSetId(item.getId());
po.setDataModelId(item.getPid());
//防止主键重复
QueryWrapper<CsLinePO> qw = new QueryWrapper<>();
qw.eq("line_id",po.getLineId());

View File

@@ -129,10 +129,14 @@ public class FileServiceImpl implements IFileService {
//todo 目前文件先只处理波形事件的,后续有其他文件再做处理
String fileName = appFileMessage.getMsg().getName();
String lsFileName = generalInfo.getBusinessTempPath() + File.separator + fileName.split(StrUtil.SLASH)[fileName.split(StrUtil.SLASH).length - 1];
File lsFile =new File(generalInfo.getBusinessTempPath());
File lsFile = new File(generalInfo.getBusinessTempPath());
//如果文件夹不存在则创建
if (!lsFile.exists() && !lsFile.isDirectory()) {
if (!lsFile.exists()) {
if (!lsFile.isDirectory()) {
lsFile .mkdirs();
} else {
lsFile.createNewFile();
}
}
//获取缓存的文件信息
Object fileInfo = redisUtil.getObjectByKey(AppRedisKey.RMQ_FILE_CONSUME_KEY.concat(fileName));