微调
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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user