修复数模式的相序校验电流加量问题
This commit is contained in:
@@ -14,6 +14,7 @@ import com.njcn.gather.detection.pojo.enums.SourceOperateCodeEnum;
|
|||||||
import com.njcn.gather.detection.pojo.param.PreDetectionParam;
|
import com.njcn.gather.detection.pojo.param.PreDetectionParam;
|
||||||
import com.njcn.gather.device.pojo.enums.CommonEnum;
|
import com.njcn.gather.device.pojo.enums.CommonEnum;
|
||||||
import com.njcn.gather.device.pojo.po.PqDev;
|
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.device.service.IPqDevService;
|
||||||
import com.njcn.gather.plan.mapper.AdPlanMapper;
|
import com.njcn.gather.plan.mapper.AdPlanMapper;
|
||||||
import com.njcn.gather.plan.pojo.po.AdPlan;
|
import com.njcn.gather.plan.pojo.po.AdPlan;
|
||||||
@@ -886,6 +887,22 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
|||||||
queryWrapper.eq(PqScriptDtls::getScriptIndex, -1)
|
queryWrapper.eq(PqScriptDtls::getScriptIndex, -1)
|
||||||
.eq(PqScriptDtls::getEnable, 1);
|
.eq(PqScriptDtls::getEnable, 1);
|
||||||
pqScriptDtls = this.list(queryWrapper);
|
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())) {
|
} else if (param.getIsPhaseSequence().equals(CommonEnum.COEFFICIENT_TEST.getValue())) {
|
||||||
//系数
|
//系数
|
||||||
queryWrapper.in(PqScriptDtls::getScriptIndex, param.getIndexList())
|
queryWrapper.in(PqScriptDtls::getScriptIndex, param.getIndexList())
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://192.168.1.24:13306/pqs9100_2f?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.1.24:13306/pqs9100_bj?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: njcnpqs
|
password: njcnpqs
|
||||||
# url: jdbc:mysql://localhost:3306/pqs91001?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=CTT
|
# url: jdbc:mysql://localhost:3306/pqs91001?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=CTT
|
||||||
@@ -49,10 +49,10 @@ phaseAngle:
|
|||||||
|
|
||||||
socket:
|
socket:
|
||||||
source:
|
source:
|
||||||
ip: 192.168.1.138
|
ip: 192.168.1.125
|
||||||
port: 62000
|
port: 62000
|
||||||
device:
|
device:
|
||||||
ip: 192.168.1.138
|
ip: 192.168.1.125
|
||||||
port: 61000
|
port: 61000
|
||||||
# source:
|
# source:
|
||||||
# ip: 192.168.1.121
|
# ip: 192.168.1.121
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class AuthController extends BaseController {
|
|||||||
if (ObjectUtil.isNull(user)) {
|
if (ObjectUtil.isNull(user)) {
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, UserValidMessage.LOGIN_FAILED);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, UserValidMessage.LOGIN_FAILED);
|
||||||
} else {
|
} else {
|
||||||
String accessToken = JwtUtil.getAccessToken(user.getId());
|
String accessToken = JwtUtil.getAccessToken(user.getId(),user.getLoginName());
|
||||||
String refreshToken = JwtUtil.getRefreshToken(accessToken);
|
String refreshToken = JwtUtil.getRefreshToken(accessToken);
|
||||||
Token token = new Token();
|
Token token = new Token();
|
||||||
token.setAccessToken(accessToken);
|
token.setAccessToken(accessToken);
|
||||||
@@ -117,7 +117,7 @@ public class AuthController extends BaseController {
|
|||||||
Map<String, Object> map = JwtUtil.parseToken(accessToken);
|
Map<String, Object> map = JwtUtil.parseToken(accessToken);
|
||||||
String userId = (String) map.get(SecurityConstants.USER_ID);
|
String userId = (String) map.get(SecurityConstants.USER_ID);
|
||||||
SysUser user = sysUserService.getById(userId);
|
SysUser user = sysUserService.getById(userId);
|
||||||
String accessTokenNew = JwtUtil.getAccessToken(userId);
|
String accessTokenNew = JwtUtil.getAccessToken(userId,user.getLoginName());
|
||||||
request.setAttribute(SecurityConstants.AUTHENTICATE_USERNAME, user.getLoginName());
|
request.setAttribute(SecurityConstants.AUTHENTICATE_USERNAME, user.getLoginName());
|
||||||
// String refreshTokenNew = JwtUtil.getRefreshToken(accessTokenNew);
|
// String refreshTokenNew = JwtUtil.getRefreshToken(accessTokenNew);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user