修改bug
This commit is contained in:
@@ -48,6 +48,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.time.Instant;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
@@ -265,6 +266,10 @@ public class CarryCapacityServiceImpl implements CarryCapacityService {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
dataHarmPowerpList = dataHarmPowerpList.stream().map(temp -> {
|
||||||
|
temp.setTime(temp.getTime().plusMillis(TimeUnit.HOURS.toMillis(8)));
|
||||||
|
return temp;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
carryCapacityDataVO.setData(dataHarmPowerpList);
|
carryCapacityDataVO.setData(dataHarmPowerpList);
|
||||||
|
|
||||||
|
|
||||||
@@ -331,6 +336,11 @@ public class CarryCapacityServiceImpl implements CarryCapacityService {
|
|||||||
redisUtil.saveByKey(lineId + "#" + LocalDateTimeUtil.format(startDate, formatter) + "#" + LocalDateTimeUtil.format(endDate, formatter) + "#" + "Q",
|
redisUtil.saveByKey(lineId + "#" + LocalDateTimeUtil.format(startDate, formatter) + "#" + LocalDateTimeUtil.format(endDate, formatter) + "#" + "Q",
|
||||||
dataHarmPowerqList);
|
dataHarmPowerqList);
|
||||||
}
|
}
|
||||||
|
dataHarmPowerqList = dataHarmPowerqList.stream().map(temp -> {
|
||||||
|
temp.setTime(temp.getTime().plusMillis(TimeUnit.HOURS.toMillis(8)));
|
||||||
|
return temp;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
carryCapacityDataqVO.setData(dataHarmPowerqList);
|
carryCapacityDataqVO.setData(dataHarmPowerqList);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.njcn.advance.utils;
|
package com.njcn.advance.utils;
|
||||||
|
|
||||||
|
import com.njcn.advance.enums.AdvanceResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import org.apache.commons.math3.linear.DecompositionSolver;
|
import org.apache.commons.math3.linear.DecompositionSolver;
|
||||||
import org.apache.commons.math3.linear.LUDecomposition;
|
import org.apache.commons.math3.linear.LUDecomposition;
|
||||||
import org.apache.commons.math3.linear.MatrixUtils;
|
import org.apache.commons.math3.linear.MatrixUtils;
|
||||||
@@ -102,10 +104,16 @@ public class CZNLPG {
|
|||||||
//矩阵求逆
|
//矩阵求逆
|
||||||
|
|
||||||
public static RealMatrix inverseMatrix(RealMatrix matrix) {
|
public static RealMatrix inverseMatrix(RealMatrix matrix) {
|
||||||
LUDecomposition LUDe = new LUDecomposition(matrix);
|
try {
|
||||||
DecompositionSolver solver = LUDe.getSolver();
|
LUDecomposition LUDe = new LUDecomposition(matrix);
|
||||||
RealMatrix result = solver.getInverse();
|
DecompositionSolver solver = LUDe.getSolver();
|
||||||
return result;
|
RealMatrix result = solver.getInverse();
|
||||||
|
return result;
|
||||||
|
}catch (Exception e){
|
||||||
|
throw new BusinessException("数据存在问题无法进行矩阵求逆");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user