diff --git a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java index 23f89998..e4910649 100644 --- a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java +++ b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java @@ -78,19 +78,19 @@ public class PwrGnrSimService { // 태양 적위 double[] taiyousekii = readValuesFromFile("template/pwrGnrSimulation/taiyousekii.txt"); - static double[][] peakcut_by_pcs_data = + double[][] peakcut_by_pcs_data = readValuesFromFile2("template/pwrGnrSimulation/peakcut_by_pcs_data.txt"); - static double[][] tashounen_data_deg0 = + double[][] tashounen_data_deg0 = readValuesFromFile2("template/pwrGnrSimulation/tashounen_data_deg0.txt"); - static double[][] tashounen_data_deg90 = + double[][] tashounen_data_deg90 = readValuesFromFile2("template/pwrGnrSimulation/tashounen_data_deg90.txt"); - static double[][] amp_peakcut_data_deg0 = + double[][] amp_peakcut_data_deg0 = readValuesFromFile2("template/pwrGnrSimulation/amp_peakcut_data_deg0.txt"); - static double[][] amp_peakcut_data_deg90 = + double[][] amp_peakcut_data_deg90 = readValuesFromFile2("template/pwrGnrSimulation/amp_peakcut_data_deg90.txt"); /** @@ -515,7 +515,7 @@ public class PwrGnrSimService { } // 배열 변환 및 포맷 처리 메서드 - private static String[] formatAndPrintArray(double[] doubleArray) { + private String[] formatAndPrintArray(double[] doubleArray) { return Arrays.stream(doubleArray) .mapToInt(d -> (int) d) // double -> int 변환 .mapToObj(i -> String.format("%,d", i)) @@ -523,7 +523,7 @@ public class PwrGnrSimService { } // 설치면의 사면 일사량 계산 - public static double[] peakcut( + public double[] peakcut( int simulationPointNumber, double koubai, double houi, @@ -620,7 +620,7 @@ public class PwrGnrSimService { } /** 0도 방위 전력 피크 컷을 계산하는 방법 */ - private static double computePowerPeakCutDeg0( + private double computePowerPeakCutDeg0( int simulationPointNumber, double sekisairitsu, double koubai) { // 0度近似曲線係数 double[] x = {1, 5, 15, 20, 30, 40}; @@ -715,7 +715,7 @@ public class PwrGnrSimService { } /** 전류 피크 컷(5차) 90도 근사 곡선 계수 */ - private static double computeAmpPeakCutDeg90( + private double computeAmpPeakCutDeg90( int simulationPointNumber, double koubai, double amp_delta) { // 초기 설정 @@ -816,8 +816,7 @@ public class PwrGnrSimService { } /** 전류 피크 컷(5차) 0도 근사 곡선 계수 */ - private static double computeAmpPeakCutDeg0( - int simulationPointNumber, double koubai, double amp_delta) { + private double computeAmpPeakCutDeg0(int simulationPointNumber, double koubai, double amp_delta) { double[] x = {5, 15, 20, 30, 40, 50}; double[] z2 = new double[6]; @@ -907,7 +906,7 @@ public class PwrGnrSimService { } /** 0도 방위 전력 피크 컷을 계산하는 방법 */ - private static double computePowerPeakCutDeg90( + private double computePowerPeakCutDeg90( int simulationPointNumber, double sekisairitsu, double koubai) { // 데이터 초기화 double[] x = {1, 5, 15, 20, 30, 40}; @@ -1194,7 +1193,7 @@ public class PwrGnrSimService { return shamenNissha; } - public static double[] readValuesFromFile(String fileName) { + public double[] readValuesFromFile(String fileName) { List values = new ArrayList<>(); try (InputStream inputStream = @@ -1217,7 +1216,7 @@ public class PwrGnrSimService { return values.stream().mapToDouble(Double::doubleValue).toArray(); } - public static String[][] readValuesFromFileString2(String fileName) { + public String[][] readValuesFromFileString2(String fileName) { List values = new ArrayList<>(); StringBuilder sb = new StringBuilder(); @@ -1255,7 +1254,7 @@ public class PwrGnrSimService { return values.toArray(new String[0][]); } - public static double[][] readValuesFromFile2(String fileName) { + public double[][] readValuesFromFile2(String fileName) { List values = new ArrayList<>(); StringBuilder sb = new StringBuilder(); @@ -1313,7 +1312,7 @@ public class PwrGnrSimService { return guideResponse; } - public static Document pwrGnrSimPdfHtml(Document doc, PwrGnrSimResponse data) + public Document pwrGnrSimPdfHtml(Document doc, PwrGnrSimResponse data) throws IOException, QcastException { String[] pwrGnrSimList = data.getFrcPwrGnrList(); @@ -1485,7 +1484,7 @@ public class PwrGnrSimService { return doc; } - public static int roundUpAuto(double value) { + public int roundUpAuto(double value) { int length = (int) Math.log10(value) + 1; // 숫자의 자리수를 계산 int place = (int) Math.pow(10, length - 1); // 자리수에 따른 올림 기준(10, 100, 1000 등) diff --git a/src/main/resources/template/excel/excel_download_simulation_detail_template.xlsx b/src/main/resources/template/excel/excel_download_simulation_detail_template.xlsx index bd924070..18fe90ee 100644 Binary files a/src/main/resources/template/excel/excel_download_simulation_detail_template.xlsx and b/src/main/resources/template/excel/excel_download_simulation_detail_template.xlsx differ