优化
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user