Compare commits
5 Commits
a0f6846f53
...
bb22857fc9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb22857fc9 | ||
|
|
6ef908ff60 | ||
|
|
7461801657 | ||
|
|
4ecec5e6ef | ||
|
|
04a667531b |
@@ -199,7 +199,7 @@ public class SocketSourceResponseService {
|
||||
phaseSequenceParam.setMoniterIdList(monitorIdList);
|
||||
phaseSequenceParam.setDataType(Arrays.asList("real$VRMS", "real$IRMS"));
|
||||
phaseSequenceParam.setReadCount(3);
|
||||
phaseSequenceParam.setIgnoreCount(4);
|
||||
phaseSequenceParam.setIgnoreCount(8);
|
||||
socketMsg.setData(JSON.toJSONString(phaseSequenceParam));
|
||||
SocketManager.sendMsg(s, JSON.toJSONString(socketMsg));
|
||||
|
||||
|
||||
@@ -1474,7 +1474,12 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
//String scriptId = adPlan.getScriptId();
|
||||
Integer devChns = pqDevVO.getDevChns();
|
||||
for (int i = 1; i <= devChns; i++) {
|
||||
ClassPathResource resource = new ClassPathResource("/model/report_table.docx");
|
||||
String path = "/model/report_table.docx";
|
||||
DevType devType = devTypeService.getById(pqDevVO.getDevType());
|
||||
if (devType.getName().equals("PQ-COM")) {
|
||||
path = "/model/report_table - PQ-COM.docx";
|
||||
}
|
||||
ClassPathResource resource = new ClassPathResource(path);
|
||||
XWPFDocument dataModelDocumentTemp = new XWPFDocument(resource.getInputStream());
|
||||
|
||||
SingleNonHarmParam singleNonHarmParam = new SingleNonHarmParam();
|
||||
@@ -1502,11 +1507,20 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
List<AdHarmonicResult> adHarmonicResultList = adHarmonicService.listAllResultData(devReportParam.getScriptId(), devReportParam.getPlanCode(), devReportParam.getDevId() + "_" + i);
|
||||
|
||||
// 填充数据
|
||||
int finalI = i;
|
||||
indexKeysMap.forEach((index, keys) -> {
|
||||
String s1 = keys.stream().findFirst().get();
|
||||
// 谐波类
|
||||
if (DetectionCodeEnum.V2_50.getCode().equals(s1) || DetectionCodeEnum.I2_50.getCode().equals(s1) || DetectionCodeEnum.SV_1_49.getCode().equals(s1) || DetectionCodeEnum.SI_1_49.getCode().equals(s1)) {
|
||||
fillMapValueHarm(adHarmonicResultList, dataModelMap, keys, index);
|
||||
// 查找一下U1
|
||||
double u1 = 57.74;
|
||||
List<AdHarmonicResult> rawData = adHarmonicService.listAllRawData(devReportParam.getScriptId(), devReportParam.getPlanCode(), devReportParam.getDevId() + "_" + finalI);
|
||||
AdHarmonicResult adHarmonicResult = rawData.stream().filter(obj -> obj.getAdType().equals(DetectionCodeEnum.V2_50.getCode())).sorted((obj1, obj2) -> obj2.getTimeId().compareTo(obj1.getTimeId())).findFirst().orElse(null);
|
||||
if (ObjectUtil.isNotNull(adHarmonicResult)) {
|
||||
String aValue1 = adHarmonicResult.getAValue1();
|
||||
u1 = Double.parseDouble(aValue1);
|
||||
}
|
||||
fillMapValueHarm(adHarmonicResultList, dataModelMap, keys, index, u1);
|
||||
} else {
|
||||
// 非谐波类
|
||||
if (DetectionCodeEnum.V_UNBAN.getCode().equals(s1) || DetectionCodeEnum.FREQ.getCode().equals(s1)) {
|
||||
@@ -1574,14 +1588,14 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
||||
* @param keys
|
||||
* @param index
|
||||
*/
|
||||
private void fillMapValueHarm(List<AdHarmonicResult> allHarmonicResultList, Map<String, String> dataModelMap, Set<String> keys, String index) {
|
||||
private void fillMapValueHarm(List<AdHarmonicResult> allHarmonicResultList, Map<String, String> dataModelMap, Set<String> keys, String index, double baseValue) {
|
||||
keys.forEach(key -> {
|
||||
List<AdHarmonicResult> resultList = allHarmonicResultList.stream().filter(obj -> obj.getAdType().equals(key) && obj.getSort().toString().equals(index)).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(resultList)) {
|
||||
AdHarmonicResult adHarmonicResult = resultList.get(0);
|
||||
if (Objects.nonNull(adHarmonicResult)) {
|
||||
if (DetectionCodeEnum.V2_50.getCode().equals(key) || DetectionCodeEnum.SV_1_49.getCode().equals(key)) {
|
||||
fillHarm(dataModelMap, adHarmonicResult, index, key, 57.74, 100);
|
||||
fillHarm(dataModelMap, adHarmonicResult, index, key, baseValue, 100);
|
||||
}
|
||||
if (DetectionCodeEnum.I2_50.getCode().equals(key) || DetectionCodeEnum.SI_1_49.getCode().equals(key)) {
|
||||
fillHarm(dataModelMap, adHarmonicResult, index, key, 1, 1);
|
||||
|
||||
@@ -1015,11 +1015,12 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
PqScriptDtls dip = dipList.get(0);
|
||||
dipDataDTO.setFTransValue(dip.getTransValue());
|
||||
if (devFly) {
|
||||
if (isValueType) {
|
||||
// if (isValueType) {
|
||||
dipDataDTO.setFTransValue(dip.getTransValue());
|
||||
} else {
|
||||
dipDataDTO.setFTransValue(NumberUtil.round(dip.getTransValue() / dtls.getValue(), 4).doubleValue());
|
||||
}
|
||||
// }
|
||||
// else {
|
||||
// dipDataDTO.setFTransValue(NumberUtil.round(dip.getTransValue() / dtls.getValue(), 4).doubleValue());
|
||||
// }
|
||||
}
|
||||
// 1.0/频率*持续时间(周波)= 暂态持续时间(s)
|
||||
dipDataDTO.setFRetainTime(NumberUtil.round(1.0 / fFreq * dip.getRetainTime(), 3).doubleValue());
|
||||
|
||||
Binary file not shown.
BIN
entrance/src/main/resources/model/PQ-COM.docx
Normal file
BIN
entrance/src/main/resources/model/PQ-COM.docx
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
entrance/src/main/resources/model/report_table - PQ-COM.docx
Normal file
BIN
entrance/src/main/resources/model/report_table - PQ-COM.docx
Normal file
Binary file not shown.
Binary file not shown.
@@ -70,7 +70,7 @@ public class AuthController extends BaseController {
|
||||
if (ObjectUtil.isNull(user)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, UserValidMessage.LOGIN_FAILED);
|
||||
} else {
|
||||
String accessToken = JwtUtil.getAccessToken(user.getId());
|
||||
String accessToken = JwtUtil.getAccessToken(user.getId(),user.getLoginName());
|
||||
String refreshToken = JwtUtil.getRefreshToken(accessToken);
|
||||
Token token = new Token();
|
||||
token.setAccessToken(accessToken);
|
||||
@@ -117,7 +117,7 @@ public class AuthController extends BaseController {
|
||||
Map<String, Object> map = JwtUtil.parseToken(accessToken);
|
||||
String userId = (String) map.get(SecurityConstants.USER_ID);
|
||||
SysUser user = sysUserService.getById(userId);
|
||||
String accessTokenNew = JwtUtil.getAccessToken(userId);
|
||||
String accessTokenNew = JwtUtil.getAccessToken(userId,user.getLoginName());
|
||||
request.setAttribute(SecurityConstants.AUTHENTICATE_USERNAME, user.getLoginName());
|
||||
// String refreshTokenNew = JwtUtil.getRefreshToken(accessTokenNew);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user