便携式暂态事件代码兼容
This commit is contained in:
@@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -37,8 +38,10 @@ public class CsEventServiceImpl extends ServiceImpl<CsEventMapper, CsEventPO> im
|
||||
lambdaUpdateWrapper.set(CsEventPO::getWavePath,csEventParam.getPath()).eq(CsEventPO::getLineId,csEventParam.getLineId())
|
||||
.eq(CsEventPO::getDeviceId,csEventParam.getDeviceId())
|
||||
.in(CsEventPO::getType, Arrays.asList(0,1))
|
||||
.eq(CsEventPO::getLocation,csEventParam.getLocation())
|
||||
.between(CsEventPO::getStartTime,csEventParam.getStartTime(),csEventParam.getEndTime());
|
||||
if (Objects.nonNull(csEventParam.getLocation())) {
|
||||
lambdaUpdateWrapper.eq(CsEventPO::getLocation, csEventParam.getLocation());
|
||||
}
|
||||
this.update(lambdaUpdateWrapper);
|
||||
List<CsEventPO> list = this.baseMapper.selectList(lambdaUpdateWrapper);
|
||||
if (CollectionUtil.isNotEmpty(list)){
|
||||
|
||||
@@ -71,16 +71,16 @@ public class CsWaveAnalysisServiceImpl implements ICsWaveAnalysisService {
|
||||
if (CollectionUtil.isNotEmpty(dataArrayList)){
|
||||
for (AppEventMessage.DataArray item : dataArrayList) {
|
||||
List<AppEventMessage.Param> paramList = item.getParam();
|
||||
Object object = paramList.stream().filter(item2 -> ZlConstant.WAVE_NAME.equals(item2.getName())).findFirst().get().getData();
|
||||
Object object2 = paramList.stream().filter(item2 -> ZlConstant.WAVE_PARAM_RCDKEEPTIME.equals(item2.getName())).findFirst().get().getData();
|
||||
Object object3 = paramList.stream().filter(item2 -> ZlConstant.WAVE_POSITION.equals(item2.getName())).findFirst().get().getData();
|
||||
Object object = paramList.stream().filter(item2 -> ZlConstant.WAVE_NAME.equals(item2.getName())).findFirst().map(AppEventMessage.Param::getData).orElse(null);
|
||||
Object object2 = paramList.stream().filter(item2 -> ZlConstant.WAVE_PARAM_RCDKEEPTIME.equals(item2.getName())).findFirst().map(AppEventMessage.Param::getData).orElse(null);
|
||||
Object object3 = paramList.stream().filter(item2->ZlConstant.WAVE_POSITION.equals(item2.getName())).findFirst().map(AppEventMessage.Param::getData).orElse(null);
|
||||
String lineId = appEventMessage.getId() + appEventMessage.getMsg().getClDid();
|
||||
String fileName = object.toString().replaceAll("\\[","").replaceAll("]","");
|
||||
List<String> fileList = Arrays.stream(fileName.split(",")).collect(Collectors.toList());
|
||||
//获取到录波文件,将文件信息存储起来
|
||||
for (String file : fileList) {
|
||||
file = file.trim();
|
||||
WaveTimeDto dto = channelTimeRange(file,appEventMessage.getId(),item.getDataTimeSec(),item.getDataTimeUSec(),(Double)object2,deviceId,lineId,object3.toString());
|
||||
WaveTimeDto dto = channelTimeRange(file,appEventMessage.getId(),item.getDataTimeSec(),item.getDataTimeUSec(),(Double)object2,deviceId,lineId,Objects.isNull(object3)?null:object3.toString());
|
||||
list.add(dto);
|
||||
}
|
||||
Object obj = redisUtil.getObjectByKey("eventFile:" + appEventMessage.getId());
|
||||
|
||||
@@ -158,7 +158,6 @@ public class FileServiceImpl implements IFileService {
|
||||
csEventLogs.setAllStep(1);
|
||||
csEventLogs.setIsAll(1);
|
||||
redisUtil.delete(AppRedisKey.FILE_PART_TIME.concat(appFileMessage.getMsg().getName()));
|
||||
// redisUtil.delete(AppRedisKey.FILE_PART.concat(appFileMessage.getMsg().getName()));
|
||||
redisUtil.delete(AppRedisKey.RMQ_FILE_CONSUME_KEY.concat(fileName));
|
||||
//存储文件信息
|
||||
fileStreamDto.setTotal(appFileMessage.getMsg().getFrameTotal());
|
||||
@@ -208,7 +207,6 @@ public class FileServiceImpl implements IFileService {
|
||||
file.delete();
|
||||
}
|
||||
redisUtil.delete(AppRedisKey.FILE_PART_TIME.concat(appFileMessage.getMsg().getName()));
|
||||
// redisUtil.delete(AppRedisKey.FILE_PART.concat(appFileMessage.getMsg().getName()));
|
||||
redisUtil.delete(AppRedisKey.RMQ_FILE_CONSUME_KEY.concat(fileName));
|
||||
redisUtil.delete(AppRedisKey.FILE_DOWN_TIME.concat(appFileMessage.getMsg().getName()));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user