微调
This commit is contained in:
@@ -273,14 +273,14 @@ public class PreDetectionServiceImpl implements PreDetectionService {
|
||||
@Override
|
||||
public void sendScript(SimulateDetectionParam param) {
|
||||
Channel channel = SocketManager.getChannelByUserId(param.getUserPageId() + DetectionCommunicateConstant.SOURCE);
|
||||
// if (Objects.isNull(channel) || !channel.isActive()) {
|
||||
// // 进行源通信连接
|
||||
// PreDetectionParam preDetectionParam = new PreDetectionParam();
|
||||
// preDetectionParam.setSourceId(param.getSourceId());
|
||||
// preDetectionParam.setUserPageId(param.getUserPageId());
|
||||
// preDetectionParam.setSendWebMsg(false);
|
||||
// this.sendYtxSocketSimulate(preDetectionParam);
|
||||
// }
|
||||
if (Objects.isNull(channel) || !channel.isActive()) {
|
||||
// 进行源通信连接
|
||||
PreDetectionParam preDetectionParam = new PreDetectionParam();
|
||||
preDetectionParam.setSourceId(param.getSourceId());
|
||||
preDetectionParam.setUserPageId(param.getUserPageId());
|
||||
preDetectionParam.setSendWebMsg(false);
|
||||
this.sendYtxSocketSimulate(preDetectionParam);
|
||||
}
|
||||
//组装源控制脚本
|
||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||
issueParam.setSourceId(param.getSourceId());
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<foreach collection="devIds" item="devId" open="(" separator="," close=")">
|
||||
#{devId}
|
||||
</foreach>
|
||||
order by Num
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
@@ -628,9 +628,9 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setEnable(channelListDTO.getEnable());
|
||||
//电压*电流*cos(电压角度-电流角度)
|
||||
checkData.setValue(channelI.get(0).getFAmp() * listDTO.getFAmp() / 10000 * Math.cos((listDTO.getFPhase() - channelI.get(0).getFPhase()) * Math.PI / 180));
|
||||
if (valueType) {
|
||||
// if (valueType) {
|
||||
checkData.setValue(checkData.getValue() * 57.74 * 5);
|
||||
}
|
||||
// }
|
||||
setCheck(info, checkData, channelListDTO, checkArchive, listDTO);
|
||||
}
|
||||
}
|
||||
@@ -651,9 +651,9 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setEnable(channelListDTO.getEnable());
|
||||
//电压*电流*cos(电压角度-电流角度)
|
||||
checkData.setValue(channelI.get(0).getFAmp() * listDTO.getFAmp() / 10000 * Math.sin((listDTO.getFPhase() - channelI.get(0).getFPhase()) * Math.PI / 180));
|
||||
if (valueType) {
|
||||
// if (valueType) {
|
||||
checkData.setValue(checkData.getValue() * 57.74 * 5);
|
||||
}
|
||||
// }
|
||||
setCheck(info, checkData, channelListDTO, checkArchive, listDTO);
|
||||
}
|
||||
}
|
||||
@@ -674,9 +674,9 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
checkData.setEnable(channelListDTO.getEnable());
|
||||
//电压*电流*cos(电压角度-电流角度)
|
||||
checkData.setValue(channelI.get(0).getFAmp() * listDTO.getFAmp() / 10000);
|
||||
if (valueType) {
|
||||
// if (valueType) {
|
||||
checkData.setValue(checkData.getValue() * 57.74 * 5);
|
||||
}
|
||||
// }
|
||||
setCheck(info, checkData, channelListDTO, checkArchive, listDTO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,14 +109,13 @@ public class DetectionDataServiceImpl extends ReplenishMybatisServiceImpl<Detect
|
||||
}
|
||||
if (nonHarmonicResultList.get(0) instanceof ContrastNonHarmonicResult) {
|
||||
List<ContrastNonHarmonicResult> contrastNonHarmonicResultList = BeanUtil.copyToList(nonHarmonicResultList, ContrastNonHarmonicResult.class);
|
||||
List<String> monitorIds = contrastNonHarmonicResultList.stream().map(ContrastNonHarmonicResult::getDevMonitorId).distinct().collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(monitorIds)) {
|
||||
contrastNonHarmonicService.remove(new LambdaQueryWrapper<ContrastNonHarmonicResult>().in(ContrastNonHarmonicResult::getDevMonitorId, monitorIds)
|
||||
.eq(ContrastNonHarmonicResult::getNum, contrastNonHarmonicResultList.get(0).getNum())
|
||||
.eq(ContrastNonHarmonicResult::getDataType, contrastNonHarmonicResultList.get(0).getDataType())
|
||||
.eq(ObjectUtil.isNotNull(contrastNonHarmonicResultList.get(0).getWaveNum()), ContrastNonHarmonicResult::getWaveNum, contrastNonHarmonicResultList.get(0).getWaveNum())
|
||||
.isNull(ObjectUtil.isNull(contrastNonHarmonicResultList.get(0).getWaveNum()), ContrastNonHarmonicResult::getWaveNum));
|
||||
}
|
||||
ContrastNonHarmonicResult contrastNonHarmonicResult = contrastNonHarmonicResultList.get(0);
|
||||
contrastNonHarmonicService.remove(new LambdaQueryWrapper<ContrastNonHarmonicResult>().in(ContrastNonHarmonicResult::getDevMonitorId, contrastNonHarmonicResult.getDevMonitorId())
|
||||
.eq(ContrastNonHarmonicResult::getNum, contrastNonHarmonicResult.getNum())
|
||||
.eq(ContrastNonHarmonicResult::getAdType, contrastNonHarmonicResult.getAdType())
|
||||
.eq(ContrastNonHarmonicResult::getDataType, contrastNonHarmonicResult.getDataType())
|
||||
.eq(ObjectUtil.isNotNull(contrastNonHarmonicResult.getWaveNum()), ContrastNonHarmonicResult::getWaveNum, contrastNonHarmonicResult.getWaveNum())
|
||||
.isNull(ObjectUtil.isNull(contrastNonHarmonicResult.getWaveNum()), ContrastNonHarmonicResult::getWaveNum));
|
||||
contrastNonHarmonicService.saveBatch(contrastNonHarmonicResultList);
|
||||
}
|
||||
DynamicTableNameHandler.remove();
|
||||
@@ -143,14 +142,13 @@ public class DetectionDataServiceImpl extends ReplenishMybatisServiceImpl<Detect
|
||||
|
||||
if (harmonicResultList.get(0) instanceof ContrastHarmonicResult) {
|
||||
List<ContrastHarmonicResult> contrastHarmonicResultList = BeanUtil.copyToList(harmonicResultList, ContrastHarmonicResult.class);
|
||||
List<String> monitorIds = contrastHarmonicResultList.stream().map(ContrastHarmonicResult::getDevMonitorId).distinct().collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(monitorIds)) {
|
||||
contrastHarmonicService.remove(new LambdaQueryWrapper<ContrastHarmonicResult>().in(ContrastHarmonicResult::getDevMonitorId, monitorIds)
|
||||
.eq(ContrastHarmonicResult::getNum, contrastHarmonicResultList.get(0).getNum())
|
||||
.eq(ContrastHarmonicResult::getDataType, contrastHarmonicResultList.get(0).getDataType())
|
||||
.eq(ObjectUtil.isNotNull(contrastHarmonicResultList.get(0).getWaveNum()), ContrastHarmonicResult::getWaveNum, contrastHarmonicResultList.get(0).getWaveNum())
|
||||
.isNull(ObjectUtil.isNull(contrastHarmonicResultList.get(0).getWaveNum()), ContrastHarmonicResult::getWaveNum));
|
||||
}
|
||||
ContrastHarmonicResult contrastHarmonicResult = contrastHarmonicResultList.get(0);
|
||||
contrastHarmonicService.remove(new LambdaQueryWrapper<ContrastHarmonicResult>().eq(ContrastHarmonicResult::getDevMonitorId, contrastHarmonicResult.getDevMonitorId())
|
||||
.eq(ContrastHarmonicResult::getNum, contrastHarmonicResult.getNum())
|
||||
.eq(ContrastHarmonicResult::getAdType, contrastHarmonicResult.getAdType())
|
||||
.eq(ContrastHarmonicResult::getDataType, contrastHarmonicResult.getDataType())
|
||||
.eq(ObjectUtil.isNotNull(contrastHarmonicResult.getWaveNum()), ContrastHarmonicResult::getWaveNum, contrastHarmonicResult.getWaveNum())
|
||||
.isNull(ObjectUtil.isNull(contrastHarmonicResult.getWaveNum()), ContrastHarmonicResult::getWaveNum));
|
||||
contrastHarmonicService.saveBatch(contrastHarmonicResultList);
|
||||
}
|
||||
DynamicTableNameHandler.remove();
|
||||
|
||||
Reference in New Issue
Block a user