@@ -14,6 +14,7 @@ import com.njcn.gather.detection.pojo.enums.SourceOperateCodeEnum;
import com.njcn.gather.detection.pojo.param.PreDetectionParam ;
import com.njcn.gather.device.pojo.enums.CommonEnum ;
import com.njcn.gather.device.pojo.po.PqDev ;
import com.njcn.gather.device.pojo.vo.PqDevVO ;
import com.njcn.gather.device.service.IPqDevService ;
import com.njcn.gather.plan.mapper.AdPlanMapper ;
import com.njcn.gather.plan.pojo.po.AdPlan ;
@@ -886,6 +887,22 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
queryWrapper . eq ( PqScriptDtls : : getScriptIndex , - 1 )
. eq ( PqScriptDtls : : getEnable , 1 ) ;
pqScriptDtls = this . list ( queryWrapper ) ;
// 相序校验中电流需加量需要依据企标10650.2中章节5.5.3的描述过载能力: 2 倍额定电流连续, 10 倍额定电流持续 1 s。
// 考虑到有可能存在1A的额定电流, 本处做特殊处理, 加量分别为额定电流的0.2/0.4/0.6的标幺乘积加量
// 电压暂不做处理, 原因: 1、电压的企标描述过载能力为4倍, 空间较大; 2、额定电压比如57.74V为浮点数,存在不确定小数位,避免引起算术误差;
// 1. 获取额定电流,前端已做限制,相同额定电流才能一起检测
String deviceId = param . getDevIds ( ) . get ( 0 ) ;
PqDevVO pqDev = pqDevService . getPqDevById ( deviceId ) ;
String devTypeId = pqDev . getDevType ( ) ;
DevType devType = devTypeService . getById ( devTypeId ) ;
Double devCurr = devType . getDevCurr ( ) ;
for ( int i = 0 ; i < pqScriptDtls . size ( ) ; i + + ) {
PqScriptDtls scriptDtls = pqScriptDtls . get ( i ) ;
// 注意此处scriptDtls.getValue() < 1.0,考虑到有些已经投入运行的地方,可能没有改库,避免不必要的异常
if ( scriptDtls . getValueType ( ) . equalsIgnoreCase ( " CUR " ) & & scriptDtls . getValue ( ) < 1 . 0 ) {
scriptDtls . setValue ( devCurr * scriptDtls . getValue ( ) ) ;
}
}
} else if ( param . getIsPhaseSequence ( ) . equals ( CommonEnum . COEFFICIENT_TEST . getValue ( ) ) ) {
//系数
queryWrapper . in ( PqScriptDtls : : getScriptIndex , param . getIndexList ( ) )