1.变压器策略代码提交

2.数据中心bug修改
This commit is contained in:
wr
2023-08-03 19:22:49 +08:00
parent d11003f530
commit 13d5d73ce1
34 changed files with 1547 additions and 12 deletions

View File

@@ -160,7 +160,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
//相别统计为T时业务数据处理
if (StrUtil.isBlank(harmonicHistoryDataList.get(0).getPhasicType()) || harmonicHistoryDataList.get(0).getPhasicType().equalsIgnoreCase("t")) {
for (HarmonicHistoryData harmonicHistoryData : harmonicHistoryDataList) {
time.add(new Date(harmonicHistoryData.getTime().toEpochMilli()));
time.add(PubUtils.instantToDate(harmonicHistoryData.getTime()));
fValue.add(BigDecimal.valueOf(harmonicHistoryData.getAValue()).setScale(4, RoundingMode.HALF_UP).floatValue());
//返回结果有多个值,需要额外处理下
if (Integer.parseInt(contion) == 14) {
@@ -196,7 +196,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
.filter(temp -> temp.getPhasicType().equalsIgnoreCase(InfluxDBTableConstant.PHASE_TYPE_C))
.collect(Collectors.toList());
time = aList.stream()
.map(temp -> new Date(temp.getTime().toEpochMilli()))
.map(temp -> PubUtils.instantToDate(temp.getTime()))
.collect(Collectors.toList());
aValue = aList.stream()
.map(temp -> BigDecimal.valueOf(temp.getAValue()).setScale(4, RoundingMode.HALF_UP).floatValue())
@@ -324,7 +324,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
break;
case 14:
//电压不平衡
sql = "SELECT time as time, v_zero as aValue, v_pos as bValue, v_neg as cValue ," + InfluxDBTableConstant.PHASIC_TYPE + "FROM data_v WHERE " + stringBuilder +
sql = "SELECT time as time, v_zero as aValue, v_pos as bValue, v_neg as cValue ," + InfluxDBTableConstant.PHASIC_TYPE + " FROM data_v WHERE " + stringBuilder +
" and (phasic_type ='T') group by phasic_type order by time asc tz('Asia/Shanghai');";
phasicType.add("零序电压");
phasicType.add("正序电压");