This commit is contained in:
caozehui
2025-09-18 08:58:48 +08:00
parent c3c46b5257
commit 947ee4f771
4 changed files with 32 additions and 33 deletions

View File

@@ -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());

View File

@@ -39,6 +39,7 @@
<foreach collection="devIds" item="devId" open="(" separator="," close=")">
#{devId}
</foreach>
order by Num
</select>
</mapper>

View File

@@ -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) {
checkData.setValue(checkData.getValue() * 57.74 * 5);
}
// 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) {
checkData.setValue(checkData.getValue() * 57.74 * 5);
}
// 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) {
checkData.setValue(checkData.getValue() * 57.74 * 5);
}
// if (valueType) {
checkData.setValue(checkData.getValue() * 57.74 * 5);
// }
setCheck(info, checkData, channelListDTO, checkArchive, listDTO);
}
}