代码兼容
This commit is contained in:
@@ -20,10 +20,8 @@ import com.njcn.redis.pojo.enums.AppRedisKey;
|
||||
import com.njcn.redis.utils.RedisUtil;
|
||||
import com.njcn.stat.enums.StatResponseEnum;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.api.DictTreeFeignClient;
|
||||
import com.njcn.system.api.EpdFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.enums.DicTreeEnum;
|
||||
import com.njcn.system.pojo.dto.EpdDTO;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.zlevent.pojo.constant.ZlConstant;
|
||||
@@ -71,7 +69,6 @@ public class EventServiceImpl implements IEventService {
|
||||
private final ICsEventLogsService csEventLogsService;
|
||||
private final SendEventUtils sendEventUtils;
|
||||
private final WlRecordFeignClient wlRecordFeignClient;
|
||||
private final DictTreeFeignClient dictTreeFeignClient;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -91,8 +88,6 @@ public class EventServiceImpl implements IEventService {
|
||||
}
|
||||
//获取装置id
|
||||
CsEquipmentDeliveryPO po = equipmentFeignClient.findDevByNDid(appEventMessage.getId()).getData();
|
||||
//设备型号
|
||||
String code = dictTreeFeignClient.queryById(po.getDevModel()).getData().getCode();
|
||||
try {
|
||||
//处理事件数据
|
||||
List<AppEventMessage.DataArray> dataArray = appEventMessage.getMsg().getDataArray();
|
||||
|
||||
@@ -15,6 +15,8 @@ import com.njcn.access.utils.CRC32Utils;
|
||||
import com.njcn.access.utils.ChannelObjectUtil;
|
||||
import com.njcn.common.config.GeneralInfo;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.csdevice.api.EquipmentFeignClient;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.csharmonic.api.WavePicFeignClient;
|
||||
import com.njcn.mq.message.AppFileMessage;
|
||||
import com.njcn.oss.constant.GeneralConstant;
|
||||
@@ -22,6 +24,8 @@ import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.redis.pojo.enums.AppRedisKey;
|
||||
import com.njcn.redis.utils.RedisUtil;
|
||||
import com.njcn.system.api.DictTreeFeignClient;
|
||||
import com.njcn.system.enums.DicTreeEnum;
|
||||
import com.njcn.zlevent.param.CsEventParam;
|
||||
import com.njcn.zlevent.pojo.dto.FileInfoDto;
|
||||
import com.njcn.zlevent.pojo.dto.FileStreamDto;
|
||||
@@ -65,6 +69,8 @@ public class FileServiceImpl implements IFileService {
|
||||
private final ChannelObjectUtil channelObjectUtil;
|
||||
private final RemoveInfoUtils removeInfoUtils;
|
||||
private static Integer mid = 1;
|
||||
private final DictTreeFeignClient dictTreeFeignClient;
|
||||
private final EquipmentFeignClient equipmentFeignClient;
|
||||
|
||||
@Override
|
||||
public void analysisFileInfo(AppFileMessage appFileMessage) {
|
||||
@@ -135,6 +141,10 @@ public class FileServiceImpl implements IFileService {
|
||||
csEventLogs.setNdid(appFileMessage.getId());
|
||||
csEventLogs.setFileName(appFileMessage.getMsg().getName());
|
||||
csEventLogs.setStatus(0);
|
||||
//获取装置id
|
||||
CsEquipmentDeliveryPO po = equipmentFeignClient.findDevByNDid(appFileMessage.getId()).getData();
|
||||
//设备型号
|
||||
String code = dictTreeFeignClient.queryById(po.getDevModel()).getData().getCode();
|
||||
try {
|
||||
//todo 目前文件先只处理波形事件的,后续有其他文件再做处理
|
||||
String fileName = appFileMessage.getMsg().getName();
|
||||
@@ -256,7 +266,7 @@ public class FileServiceImpl implements IFileService {
|
||||
filePath = filePath.replaceAll(GeneralConstant.CFG,"").replaceAll(GeneralConstant.DAT,"");
|
||||
List<String> eventList = correlateEvents(fileInfoDto,filePath,fileName);
|
||||
//波形文件解析成图片
|
||||
if (CollectionUtil.isNotEmpty(eventList)){
|
||||
if (CollectionUtil.isNotEmpty(eventList) && Objects.equals(DicTreeEnum.PQ_COM.getCode(),code)){
|
||||
eventList.forEach(wavePicFeignClient::getWavePics);
|
||||
}
|
||||
//解析完删除、处理缓存
|
||||
@@ -302,7 +312,7 @@ public class FileServiceImpl implements IFileService {
|
||||
filePath = filePath.replaceAll(GeneralConstant.CFG, "").replaceAll(GeneralConstant.DAT, "");
|
||||
List<String> eventList = correlateEvents(fileInfoDto, filePath, fileName);
|
||||
//波形文件解析成图片
|
||||
if (CollectionUtil.isNotEmpty(eventList)) {
|
||||
if (CollectionUtil.isNotEmpty(eventList) && Objects.equals(DicTreeEnum.PQ_COM.getCode(),code)) {
|
||||
eventList.forEach(wavePicFeignClient::getWavePics);
|
||||
}
|
||||
redisUtil.delete(AppRedisKey.FILE_PART_TIME.concat(appFileMessage.getMsg().getName()));
|
||||
|
||||
Reference in New Issue
Block a user