Merge remote-tracking branch 'origin/main'
# Conflicts: # pqs-device/pq-device/pq-device-boot/src/main/java/com/njcn/device/pq/service/impl/RStatIntegrityDServiceImpl.java
This commit is contained in:
@@ -182,7 +182,7 @@ public class EventWaveAnalysisServiceImpl implements EventWaveAnalysisService {
|
|||||||
JSONObject jsonObject = JSONObject.fromObject(hdrStr);
|
JSONObject jsonObject = JSONObject.fromObject(hdrStr);
|
||||||
translateData(jsonObject, rmpEventDetailPO.getStartTime(), entityAdvancedData);
|
translateData(jsonObject, rmpEventDetailPO.getStartTime(), entityAdvancedData);
|
||||||
|
|
||||||
if (rmpEventDetailPO.getDealFlag() != 1) {
|
if (!Objects.equals(rmpEventDetailPO.getDealFlag(),1) ) {
|
||||||
//如果存在三个文件但是没有调用dll/so计算
|
//如果存在三个文件但是没有调用dll/so计算
|
||||||
getDataFromDLL(rmpEventDetailPO, waveOriginalData, rect, entityAdvancedData, causeStruct);
|
getDataFromDLL(rmpEventDetailPO, waveOriginalData, rect, entityAdvancedData, causeStruct);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4365,6 +4365,10 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
|
|||||||
|
|
||||||
// 比较装置 所属前置
|
// 比较装置 所属前置
|
||||||
flag |= compareAndAppend(stringBuilder, devDetail.getNodeId(), updateDeviceParam.getNodeId(), "终端所属前置机");
|
flag |= compareAndAppend(stringBuilder, devDetail.getNodeId(), updateDeviceParam.getNodeId(), "终端所属前置机");
|
||||||
|
//如果前置机切换,可能装置在进程2上,但是切换后前置机只有一个进程,因此修改装置进程表设为默认进程1
|
||||||
|
if(!Objects.equals(updateDeviceParam.getNodeId(), devDetail.getNodeId())){
|
||||||
|
deviceProcessService.lambdaUpdate().eq(DeviceProcess::getId,devDetail.getId()).set(DeviceProcess::getProcessNo,1).update();
|
||||||
|
}
|
||||||
|
|
||||||
// 比较装置端口号
|
// 比较装置端口号
|
||||||
flag |= compareAndAppend(stringBuilder, devDetail.getPort(), updateDeviceParam.getPort(), "终端端口号");
|
flag |= compareAndAppend(stringBuilder, devDetail.getPort(), updateDeviceParam.getPort(), "终端端口号");
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.influxdb.impl.InfluxDBResultMapper;
|
import org.influxdb.impl.InfluxDBResultMapper;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -157,9 +158,15 @@ public class EventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper, Rm
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean addEventDetail(EventDeatilDTO deatilDTO) {
|
public Boolean addEventDetail(EventDeatilDTO deatilDTO) {
|
||||||
|
RmpEventDetailPO one = this.lambdaQuery().eq(RmpEventDetailPO::getLineId, deatilDTO.getMonitorId()).eq(RmpEventDetailPO::getStartTime, deatilDTO.getStartTime()).one();
|
||||||
RmpEventDetailPO rmpEventDetailPO = new RmpEventDetailPO();
|
RmpEventDetailPO rmpEventDetailPO = new RmpEventDetailPO();
|
||||||
|
|
||||||
|
if(Objects.nonNull(one)){
|
||||||
|
BeanUtils.copyProperties(one,rmpEventDetailPO);
|
||||||
|
|
||||||
|
}
|
||||||
// rmpEventDetailPO.setMeasurementPointId(deatilDTO.getMonitorId());
|
// rmpEventDetailPO.setMeasurementPointId(deatilDTO.getMonitorId());
|
||||||
rmpEventDetailPO.setLineId(deatilDTO.getMonitorId());
|
rmpEventDetailPO.setLineId(deatilDTO.getMonitorId());
|
||||||
DictData data = dicDataFeignClient.getDicDataByCode(eventTypeReflection(deatilDTO.getEventType())).getData();
|
DictData data = dicDataFeignClient.getDicDataByCode(eventTypeReflection(deatilDTO.getEventType())).getData();
|
||||||
@@ -184,7 +191,6 @@ public class EventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper, Rm
|
|||||||
rmpEventDetailPO.setSeverity(Double.valueOf(severity));
|
rmpEventDetailPO.setSeverity(Double.valueOf(severity));
|
||||||
rmpEventDetailPO.setCreateTime(LocalDateTime.now());
|
rmpEventDetailPO.setCreateTime(LocalDateTime.now());
|
||||||
|
|
||||||
RmpEventDetailPO one = this.lambdaQuery().eq(RmpEventDetailPO::getLineId, rmpEventDetailPO.getLineId()).eq(RmpEventDetailPO::getStartTime, rmpEventDetailPO.getStartTime()).one();
|
|
||||||
if(Objects.nonNull(one)){
|
if(Objects.nonNull(one)){
|
||||||
rmpEventDetailPO.setEventId(one.getEventId());
|
rmpEventDetailPO.setEventId(one.getEventId());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user