From 0e0e10203673f80205e156aacf19e2ac46da6dc6 Mon Sep 17 00:00:00 2001 From: orgin Date: Mon, 23 Oct 2023 14:15:45 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix=EF=BC=9Agamma=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=BC=82=E5=B8=B8=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/exception/GAnalyseException.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 jeecg-module-auto-process/src/main/java/org/jeecg/modules/exception/GAnalyseException.java diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/exception/GAnalyseException.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/exception/GAnalyseException.java new file mode 100644 index 00000000..406dc605 --- /dev/null +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/exception/GAnalyseException.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.exception; + +/** + * B谱分析异常 + */ +public class GAnalyseException extends Exception{ + + /** + * Constructs a new exception with the specified detail message. The + * cause is not initialized, and may subsequently be initialized by + * a call to {@link #initCause}. + * + * @param message the detail message. The detail message is saved for + * later retrieval by the {@link #getMessage()} method. + */ + public GAnalyseException(String message) { + super(message); + } +} From 8045c3fc3759c9ac1a01a22cbc6cbeac918e0460 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Mon, 23 Oct 2023 15:24:01 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=AD=E5=8F=A5=E4=B8=AD=E6=96=87=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/common/util/GammaFileUtil.java | 10 +++++----- .../org/jeecg/common/util/PHDFileUtil.java | 2 +- .../impl/StationOperationServiceImpl.java | 18 +++++++++--------- .../impl/SysUserFocusStationServiceImpl.java | 4 ++-- .../service/impl/SysTaskServiceImpl.java | 2 +- .../modules/service/impl/AutoServiceImpl.java | 4 ++-- .../service/impl/GardsMetDataServiceImpl.java | 4 ++-- .../service/impl/GardsSohDataServiceImpl.java | 8 ++++---- .../service/impl/ReviewedServiceImpl.java | 4 ++-- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java index 90900af8..0502e66b 100644 --- a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java @@ -67,7 +67,7 @@ public class GammaFileUtil extends AbstractLogOrReport { //连接ftp FTPClient ftpClient = ftpUtil.LoginFTP(); if (Objects.isNull(ftpClient)){ - result.error500("ftp连接失败"); + result.error500("ftp connection failed!"); return false; } InputStream inputStream = null; @@ -280,7 +280,7 @@ public class GammaFileUtil extends AbstractLogOrReport { //连接ftp FTPClient ftpClient = ftpUtil.LoginFTP(); if (Objects.isNull(ftpClient)){ - String warning = "ftp连接失败"; + String warning = "ftp connection failed!"; } InputStream inputStream = null; File file = null; @@ -328,7 +328,7 @@ public class GammaFileUtil extends AbstractLogOrReport { //连接ftp FTPClient ftpClient = ftpUtil.LoginFTP(); if (Objects.isNull(ftpClient)){ - String warning = "ftp连接失败"; + String warning = "ftp connection failed!"; } InputStream inputStream = null; File file = null; @@ -376,7 +376,7 @@ public class GammaFileUtil extends AbstractLogOrReport { //连接ftp FTPClient ftpClient = ftpUtil.LoginFTP(); if (Objects.isNull(ftpClient)){ - String warning = "ftp连接失败"; + String warning = "ftp connection failed!"; } InputStream inputStream = null; try { @@ -4064,7 +4064,7 @@ public class GammaFileUtil extends AbstractLogOrReport { //连接ftp FTPClient ftpClient = ftpUtil.LoginFTP(); if (Objects.isNull(ftpClient)){ - result.error500("ftp连接失败"); + result.error500("ftp connection failed!"); return m_vecCompare; } InputStream inputStream = null; diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java index 7d1e29bf..c2f3c2bb 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java @@ -265,7 +265,7 @@ public class PHDFileUtil { FTPClient ftpClient = ftpUtil.LoginFTP(); //判断ftp是否连接成功 if (Objects.isNull(ftpClient)){ - throw new RuntimeException("ftp连接失败!"); + throw new RuntimeException("ftp connection failed!"); } InputStream iStream= null; File file = null; diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java index f6be1886..1c4c02b2 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/modules/service/impl/StationOperationServiceImpl.java @@ -134,7 +134,7 @@ public class StationOperationServiceImpl extends ServiceImpl nuclearFacilityMap = (HashMap) redisUtil.get("nuclearFacilityMap"); @@ -148,10 +148,10 @@ public class StationOperationServiceImpl extends ServiceImpl= -180 && longitudeD <= 180)) { - result.error500("经度不合法"); + result.error500("Longitude is not legal"); } if (!(latitudeD >= -85.05112878 && latitudeD <= 85.05112878)) { - result.error500("纬度不合法"); + result.error500("Latitude illegality"); } // 1.获取外接正方形 Rectangle rectangle = getRectangle(radius, longitudeD, latitudeD); @@ -383,7 +383,7 @@ public class StationOperationServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTaskServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTaskServiceImpl.java index 2ed534dc..8f76cec7 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTaskServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTaskServiceImpl.java @@ -322,7 +322,7 @@ public class SysTaskServiceImpl extends ServiceImpl stationMap = (Map)redisUtil.get("stationMap"); if (Objects.isNull(startTime)){ - result.error500("开始时间不能为空"); + result.error500("The start time cannot be empty"); return result; } String startDate = DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00"; if (Objects.isNull(endTime)){ - result.error500("结束时间不能为空"); + result.error500("The end time cannot be empty"); return result; } String endDate = DateUtils.formatDate(endTime, "yyyy-MM-dd") + " 23:59:59"; diff --git a/jeecg-module-web-statistics/src/main/java/org/jeecg/modules/service/impl/GardsMetDataServiceImpl.java b/jeecg-module-web-statistics/src/main/java/org/jeecg/modules/service/impl/GardsMetDataServiceImpl.java index e1aff6df..3bed3945 100644 --- a/jeecg-module-web-statistics/src/main/java/org/jeecg/modules/service/impl/GardsMetDataServiceImpl.java +++ b/jeecg-module-web-statistics/src/main/java/org/jeecg/modules/service/impl/GardsMetDataServiceImpl.java @@ -40,11 +40,11 @@ public class GardsMetDataServiceImpl extends ServiceImpl stationMap = (Map)redisUtil.get("stationMap"); if (Objects.isNull(startTime)){ - result.error500("开始时间不能为空"); + result.error500("The start time cannot be empty"); return result; } String startDate = DateUtils.formatDate(startTime, "yyyy-MM-dd") + " 00:00:00"; if (Objects.isNull(endTime)){ - result.error500("结束时间不能为空"); + result.error500("The end time cannot be empty"); return result; } String endDate = DateUtils.formatDate(endTime, "yyyy-MM-dd") + " 23:59:59"; From 554e50a71d82287c7187b97ccb34981c4f3023a5 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Mon, 23 Oct 2023 16:52:27 +0800 Subject: [PATCH 3/6] =?UTF-8?q?GammaFileUtil=E6=96=B0=E5=A2=9E=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=8A=A5=E5=91=8A=E6=97=B6=E9=94=99=E8=AF=AF=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/common/util/GammaFileUtil.java | 583 +++++++++--------- 1 file changed, 294 insertions(+), 289 deletions(-) diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java index 0502e66b..ef6357c1 100644 --- a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/GammaFileUtil.java @@ -2641,349 +2641,354 @@ public class GammaFileUtil extends AbstractLogOrReport { } public String GetReportContent(GStoreMiddleProcessData middleData) { - StringBuffer strBuffer = new StringBuffer(); - strBuffer.append(" CNL06 GENERATED REPORT"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(" "+middleData.analyses_type+" RADIONUCLIDE REPORT"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(" (Noble Gas Version) "); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(" Creation Date "+DateUtils.formatDate(new Date(), "yyyy/MM/dd-HH:mm:ss")); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append("#SAMPLE INFORMATION"); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - //报告内容第一部分数据 - String[] cells1 = new String[]{" Station ID", " Detector ID", " Sample ID", " Sample Geometry", " Sample Quantity[m3]", " Sample Type", " Collection Start", " Collection Stop", - " Sampling Time[h]", " Decay Time[h]", " Acquisition Start", " Acquisition Stop", " Acquisition Time[s]", " Avg Flow Rate[m3/h]", " Collection Station Comments"}; - String[] datas1 = new String[]{middleData.sample_stationID, middleData.sample_detectID, middleData.sample_id, middleData.sample_Geometry, middleData.sample_quantity, middleData.sample_Type, middleData.sample_collection_start, - middleData.sample_collection_stop, middleData.sample_time, middleData.sample_decay_time, middleData.sample_acquisiton_start, middleData.sample_acquistion_stop, middleData.sample_acquistion_time, middleData.sample_Avg_Flow_Rate, - middleData.Collection_Station_Comments}; - //根据固定宽度切割数据 - Map> reportMap1 = GetReportFixedWidth(cells1, datas1, 30); - List title1 = reportMap1.get("title"); - List content1 = reportMap1.get("content"); - for (int i=0; i< title1.size(); i++) { - String title = title1.get(i); - String content = content1.get(i); - strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + try { + StringBuffer strBuffer = new StringBuffer(); + strBuffer.append(" CNL06 GENERATED REPORT"); //换行 strBuffer.append(System.lineSeparator()); - } - //报告内容第二部分数据 - String[] cell2 = new String[]{" Analysis General Comments"}; - String[] datas2 = new String[]{middleData.NDC_Analysis_General_Comments}; - //根据固定宽度切割数据 - Map> reportMap2 = GetReportFixedWidth(cell2, datas2, 30); - List title2 = reportMap2.get("title"); - List content2 = reportMap2.get("content"); - for (int i=0; i< title2.size(); i++) { - String title = title2.get(i); - String content = content2.get(i); - strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + strBuffer.append(" "+middleData.analyses_type+" RADIONUCLIDE REPORT"); //换行 strBuffer.append(System.lineSeparator()); - } - //获取核素信息 - String qsNuclidesName = ""; - for(int m=0;m1) { - qsNuclidesName = qsNuclidesName+middleData.nucl_ided_Nuclidename.get(middleData.nucl_ided_Nuclidename.size()-1); - } - strBuffer.append("#ACTIVITY SUMMARY"); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - //报告内容第三部分数据 - String[] cells3 = new String[]{" Nuclides Identified"}; - String[] datas3 = new String[]{qsNuclidesName}; - //根据固定宽度切割数据 - Map> reportMap3 = GetReportFixedWidth(cells3, datas3, 30); - List title3 = reportMap3.get("title"); - List content3 = reportMap3.get("content"); - for (int i=0; i< title3.size(); i++) { - String title = title3.get(i); - String content = content3.get(i); - strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + strBuffer.append(" (Noble Gas Version) "); //换行 strBuffer.append(System.lineSeparator()); - } - strBuffer.append(String.format("%s:%-30s%s", " Keyline Activities for Nuclides", StringPool.SPACE, "")); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " with defined Reference Line", StringPool.SPACE, "")); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " Activity Reference Time", StringPool.SPACE, middleData.sample_acquisiton_start)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " Concentration Reference Time", StringPool.SPACE, middleData.sample_collection_start)); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - String nuclideTitle = "%-41s%-33s%-15s%-14s%-15s%-21s%-15s"; - String[] nuclideData = new String[]{" Nuclide", "Halflife(s)", "Activity(Bq)", "RelErr%", "MDA(Bq)", "Conc(uBq/m^3)", "MDC"}; - strBuffer.append(rowFormat(nuclideTitle, nuclideData)); - strBuffer.append(System.lineSeparator()); - for (int i=0; i0) { - strBuffer.append("#Calibration"); + strBuffer.append("#SAMPLE INFORMATION"); //换行 strBuffer.append(System.lineSeparator()); - strBuffer.append(" Energy Calibration ["+middleData.calibration_pairs_E_Input+" ]"); //换行 strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " Function", StringPool.SPACE, middleData.calibration_E_functionTypeDef)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " E", StringPool.SPACE, middleData.calibration_E_functionDef)); - //换行 - strBuffer.append(System.lineSeparator()); - String[] cells4 = new String[]{" P"}; - String[] datas4 = new String[]{middleData.calibration_E_coeff_string}; + //报告内容第一部分数据 + String[] cells1 = new String[]{" Station ID", " Detector ID", " Sample ID", " Sample Geometry", " Sample Quantity[m3]", " Sample Type", " Collection Start", " Collection Stop", + " Sampling Time[h]", " Decay Time[h]", " Acquisition Start", " Acquisition Stop", " Acquisition Time[s]", " Avg Flow Rate[m3/h]", " Collection Station Comments"}; + String[] datas1 = new String[]{middleData.sample_stationID, middleData.sample_detectID, middleData.sample_id, middleData.sample_Geometry, middleData.sample_quantity, middleData.sample_Type, middleData.sample_collection_start, + middleData.sample_collection_stop, middleData.sample_time, middleData.sample_decay_time, middleData.sample_acquisiton_start, middleData.sample_acquistion_stop, middleData.sample_acquistion_time, middleData.sample_Avg_Flow_Rate, + middleData.Collection_Station_Comments}; //根据固定宽度切割数据 - Map> reportMap4 = GetReportFixedWidth(cells4, datas4, 30); - List title4 = reportMap4.get("title"); - List content4 = reportMap4.get("content"); - for (int i=0; i< title4.size(); i++) { - String title = title4.get(i); - String content = content4.get(i); + Map> reportMap1 = GetReportFixedWidth(cells1, datas1, 30); + List title1 = reportMap1.get("title"); + List content1 = reportMap1.get("content"); + for (int i=0; i< title1.size(); i++) { + String title = title1.get(i); + String content = content1.get(i); strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); //换行 strBuffer.append(System.lineSeparator()); } + //报告内容第二部分数据 + String[] cell2 = new String[]{" Analysis General Comments"}; + String[] datas2 = new String[]{middleData.NDC_Analysis_General_Comments}; + //根据固定宽度切割数据 + Map> reportMap2 = GetReportFixedWidth(cell2, datas2, 30); + List title2 = reportMap2.get("title"); + List content2 = reportMap2.get("content"); + for (int i=0; i< title2.size(); i++) { + String title = title2.get(i); + String content = content2.get(i); + strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + //换行 + strBuffer.append(System.lineSeparator()); + } + //获取核素信息 + String qsNuclidesName = ""; + for(int m=0;m1) { + qsNuclidesName = qsNuclidesName+middleData.nucl_ided_Nuclidename.get(middleData.nucl_ided_Nuclidename.size()-1); + } + strBuffer.append("#ACTIVITY SUMMARY"); + //换行 + strBuffer.append(System.lineSeparator()); + //换行 + strBuffer.append(System.lineSeparator()); + //报告内容第三部分数据 + String[] cells3 = new String[]{" Nuclides Identified"}; + String[] datas3 = new String[]{qsNuclidesName}; + //根据固定宽度切割数据 + Map> reportMap3 = GetReportFixedWidth(cells3, datas3, 30); + List title3 = reportMap3.get("title"); + List content3 = reportMap3.get("content"); + for (int i=0; i< title3.size(); i++) { + String title = title3.get(i); + String content = content3.get(i); + strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + //换行 + strBuffer.append(System.lineSeparator()); + } + strBuffer.append(String.format("%s:%-30s%s", " Keyline Activities for Nuclides", StringPool.SPACE, "")); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " with defined Reference Line", StringPool.SPACE, "")); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Activity Reference Time", StringPool.SPACE, middleData.sample_acquisiton_start)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Concentration Reference Time", StringPool.SPACE, middleData.sample_collection_start)); + //换行 + strBuffer.append(System.lineSeparator()); + //换行 + strBuffer.append(System.lineSeparator()); + //换行 + strBuffer.append(System.lineSeparator()); + String nuclideTitle = "%-41s%-33s%-15s%-14s%-15s%-21s%-15s"; + String[] nuclideData = new String[]{" Nuclide", "Halflife(s)", "Activity(Bq)", "RelErr%", "MDA(Bq)", "Conc(uBq/m^3)", "MDC"}; + strBuffer.append(rowFormat(nuclideTitle, nuclideData)); + strBuffer.append(System.lineSeparator()); + for (int i=0; i0) { - strBuffer.append(" Resolution Calibration ["+middleData.calibration_pairs_R_Input+" ]"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " Function", StringPool.SPACE, middleData.calibration_R_functionTypeDef)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " E", StringPool.SPACE, middleData.calibration_R_functionDef)); - //换行 - strBuffer.append(System.lineSeparator()); - String[] cells5 = new String[]{" P"}; - String[] datas5 = new String[]{middleData.calibration_R_coeff_string}; - //根据固定宽度切割数据 - Map> reportMap5 = GetReportFixedWidth(cells5, datas5, 30); - List title5 = reportMap5.get("title"); - List content5 = reportMap5.get("content"); - for (int i=0; i< title5.size(); i++) { - String title = title5.get(i); - String content = content5.get(i); - strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + for (int i=0; i0) { - strBuffer.append(" Efficiency Calibration ["+middleData.calibration_pairs_EF_Input+" ]"); + strBuffer.append(String.format("%s:%-30s%s", " ECutAnalysis_High", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getECutAnalysis_High()))); //换行 strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " Function", StringPool.SPACE, middleData.calibration_EF_functionTypeDef)); + strBuffer.append(String.format("%s:%-30s%s", " EnergyTolerance", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getEnergyTolerance()))); //换行 strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " E", StringPool.SPACE, middleData.calibration_EF_functionDef)); + strBuffer.append(String.format("%s:%-30s%s", " BaseImprovePSS", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getBaseImprovePSS()))); //换行 strBuffer.append(System.lineSeparator()); - String[] cells6 = new String[]{" P"}; - String[] datas6 = new String[]{middleData.calibration_EF_coeff_string}; - //根据固定宽度切割数据 - Map> reportMap6 = GetReportFixedWidth(cells6, datas6, 30); - List title6 = reportMap6.get("title"); - List content6 = reportMap6.get("content"); - for (int i=0; i< title6.size(); i++) { - String title = title6.get(i); - String content = content6.get(i); - strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + strBuffer.append(String.format("%s:%-30s%s", " PSS_low", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getPss_low()))); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " k_back", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getK_back()))); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " k_alpha", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getK_alpha()))); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " k_beta", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getK_beta()))); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " RiskLevelK", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getRiskLevelK()))); + //换行 + strBuffer.append(System.lineSeparator()); + Date refTimeAct = middleData.setting_specSetup.getRefTime_act(); + strBuffer.append(String.format("%s:%-30s%s", " refTime_act", StringPool.SPACE, DateUtils.formatDate(refTimeAct), "yyyy-MM-dd HH:mm:ss")); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " refTime_conc", StringPool.SPACE, DateUtils.formatDate(middleData.setting_specSetup.getRefTime_conc(), "yyyy-MM-dd HH:mm:ss"))); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append("#CALIBRATION PARAMETERS"); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " CalibrationPSS_low", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getCalibrationPSS_low()))); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " CalibrationPSS_high", StringPool.SPACE, String.valueOf(middleData.setting_specSetup.getCalibrationPSS_high()))); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " bUpdateCal", StringPool.SPACE, (middleData.setting_specSetup.isBUpdateCal()?"1":"0"))); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " KeepCalPeakSearchPeaks", StringPool.SPACE, (middleData.setting_specSetup.isKeepCalPeakSearchPeaks()?"1":"0"))); + //换行 + strBuffer.append(System.lineSeparator()); + if(middleData.calibration_pairs_E_idCalPoint.size()>0) { + strBuffer.append("#Calibration"); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(" Energy Calibration ["+middleData.calibration_pairs_E_Input+" ]"); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Function", StringPool.SPACE, middleData.calibration_E_functionTypeDef)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " E", StringPool.SPACE, middleData.calibration_E_functionDef)); + //换行 + strBuffer.append(System.lineSeparator()); + String[] cells4 = new String[]{" P"}; + String[] datas4 = new String[]{middleData.calibration_E_coeff_string}; + //根据固定宽度切割数据 + Map> reportMap4 = GetReportFixedWidth(cells4, datas4, 30); + List title4 = reportMap4.get("title"); + List content4 = reportMap4.get("content"); + for (int i=0; i< title4.size(); i++) { + String title = title4.get(i); + String content = content4.get(i); + strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + //换行 + strBuffer.append(System.lineSeparator()); + } + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Err", StringPool.SPACE, middleData.calibration_E_uncoeff_string)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Data", StringPool.SPACE, middleData.calibration_pairs_E_Input)); + //换行 + strBuffer.append(System.lineSeparator()); + //换行 + strBuffer.append(System.lineSeparator()); //换行 strBuffer.append(System.lineSeparator()); } - strBuffer.append(String.format("%s:%-30s%s", " Err", StringPool.SPACE, middleData.calibration_EF_uncoeff_string)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " Data", StringPool.SPACE, middleData.calibration_pairs_EF_Input)); - //换行 - strBuffer.append(System.lineSeparator()); - //换行 - strBuffer.append(System.lineSeparator()); - } - if(middleData.calibration_pairs_T_idCalPoint.size()>0) { - strBuffer.append(" Tot_efficiency Calibration ["+middleData.calibration_pairs_T_Input+" ]"); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " Function", StringPool.SPACE, middleData.calibration_T_functionTypeDef)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " E", StringPool.SPACE, middleData.calibration_T_functionDef)); - //换行 - strBuffer.append(System.lineSeparator()); - String[] cells7 = new String[]{" P"}; - String[] datas7 = new String[]{middleData.calibration_T_coeff_string}; - //根据固定宽度切割数据 - Map> reportMap7 = GetReportFixedWidth(cells7, datas7, 30); - List title7 = reportMap7.get("title"); - List content7 = reportMap7.get("content"); - for (int i=0; i< title7.size(); i++) { - String title = title7.get(i); - String content = content7.get(i); - strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + if(middleData.calibration_pairs_R_idCalPoint.size()>0) { + strBuffer.append(" Resolution Calibration ["+middleData.calibration_pairs_R_Input+" ]"); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Function", StringPool.SPACE, middleData.calibration_R_functionTypeDef)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " E", StringPool.SPACE, middleData.calibration_R_functionDef)); + //换行 + strBuffer.append(System.lineSeparator()); + String[] cells5 = new String[]{" P"}; + String[] datas5 = new String[]{middleData.calibration_R_coeff_string}; + //根据固定宽度切割数据 + Map> reportMap5 = GetReportFixedWidth(cells5, datas5, 30); + List title5 = reportMap5.get("title"); + List content5 = reportMap5.get("content"); + for (int i=0; i< title5.size(); i++) { + String title = title5.get(i); + String content = content5.get(i); + strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + //换行 + strBuffer.append(System.lineSeparator()); + } + strBuffer.append(String.format("%s:%-30s%s", " Err", StringPool.SPACE, middleData.calibration_R_uncoeff_string)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Data", StringPool.SPACE, middleData.calibration_pairs_R_Input)); + //换行 + strBuffer.append(System.lineSeparator()); //换行 strBuffer.append(System.lineSeparator()); } - strBuffer.append(String.format("%s:%-30s%s", " Err", StringPool.SPACE, middleData.calibration_T_uncoeff_string)); - //换行 - strBuffer.append(System.lineSeparator()); - strBuffer.append(String.format("%s:%-30s%s", " Data", StringPool.SPACE, middleData.calibration_pairs_T_Input)); + if(middleData.calibration_pairs_EF_idCalPoint.size()>0) { + strBuffer.append(" Efficiency Calibration ["+middleData.calibration_pairs_EF_Input+" ]"); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Function", StringPool.SPACE, middleData.calibration_EF_functionTypeDef)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " E", StringPool.SPACE, middleData.calibration_EF_functionDef)); + //换行 + strBuffer.append(System.lineSeparator()); + String[] cells6 = new String[]{" P"}; + String[] datas6 = new String[]{middleData.calibration_EF_coeff_string}; + //根据固定宽度切割数据 + Map> reportMap6 = GetReportFixedWidth(cells6, datas6, 30); + List title6 = reportMap6.get("title"); + List content6 = reportMap6.get("content"); + for (int i=0; i< title6.size(); i++) { + String title = title6.get(i); + String content = content6.get(i); + strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + //换行 + strBuffer.append(System.lineSeparator()); + } + strBuffer.append(String.format("%s:%-30s%s", " Err", StringPool.SPACE, middleData.calibration_EF_uncoeff_string)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Data", StringPool.SPACE, middleData.calibration_pairs_EF_Input)); + //换行 + strBuffer.append(System.lineSeparator()); + //换行 + strBuffer.append(System.lineSeparator()); + } + if(middleData.calibration_pairs_T_idCalPoint.size()>0) { + strBuffer.append(" Tot_efficiency Calibration ["+middleData.calibration_pairs_T_Input+" ]"); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Function", StringPool.SPACE, middleData.calibration_T_functionTypeDef)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " E", StringPool.SPACE, middleData.calibration_T_functionDef)); + //换行 + strBuffer.append(System.lineSeparator()); + String[] cells7 = new String[]{" P"}; + String[] datas7 = new String[]{middleData.calibration_T_coeff_string}; + //根据固定宽度切割数据 + Map> reportMap7 = GetReportFixedWidth(cells7, datas7, 30); + List title7 = reportMap7.get("title"); + List content7 = reportMap7.get("content"); + for (int i=0; i< title7.size(); i++) { + String title = title7.get(i); + String content = content7.get(i); + strBuffer.append(String.format("%s:%-30s%s", title, StringPool.SPACE, content)); + //换行 + strBuffer.append(System.lineSeparator()); + } + strBuffer.append(String.format("%s:%-30s%s", " Err", StringPool.SPACE, middleData.calibration_T_uncoeff_string)); + //换行 + strBuffer.append(System.lineSeparator()); + strBuffer.append(String.format("%s:%-30s%s", " Data", StringPool.SPACE, middleData.calibration_pairs_T_Input)); + //换行 + strBuffer.append(System.lineSeparator()); + //换行 + strBuffer.append(System.lineSeparator()); + } + strBuffer.append("#DATA QUALITY FLAGS"); //换行 strBuffer.append(System.lineSeparator()); + String qualityTitle = "%-41s%-33s%-15s%-14s"; + strBuffer.append(rowFormat(qualityTitle, " Name", "Pass/Fail", "Value", "Test")); //换行 strBuffer.append(System.lineSeparator()); + for (int i=0;i DoubleLimit(List data) { From 06daa65138ea2b7c9f0486cd3701d22e001b8985 Mon Sep 17 00:00:00 2001 From: panbaolin <123456> Date: Mon, 23 Oct 2023 19:08:06 +0800 Subject: [PATCH 4/6] =?UTF-8?q?fix:1.=E6=B7=BB=E5=8A=A0Alert=E8=B0=B1file?= =?UTF-8?q?=20repeat=E9=97=AE=E9=A2=982.=E4=BF=AE=E6=94=B9=E6=8C=89?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E9=A1=BA=E5=BA=8F=E6=9F=A5=E8=AF=A2=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E6=97=B6=E4=B8=8D=E6=8C=89=E6=97=A5=E6=9C=9F=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BF=87=E6=BB=A4=EF=BC=8C=E6=8F=90=E9=AB=98=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/email/EmailServiceManager.java | 12 ++-- .../service/IAlertSpectrumService.java | 7 +++ .../modules/service/ISOHSpectrumService.java | 1 - .../impl/AlertSpectrumServiceImpl.java | 21 ++++++- .../service/impl/MetSpectrumServiceImpl.java | 3 +- .../service/impl/SOHSpectrumServiceImpl.java | 3 +- .../jeecg/modules/spectrum/AlertSpectrum.java | 61 +++++++++++++------ .../spectrum/HealthStatusSpectrum.java | 11 ++-- .../jeecg/modules/spectrum/MetSpectrum.java | 2 +- .../modules/spectrum/SamplephdSpectrum.java | 1 - .../spectrum/SpectrumParsingActuator.java | 1 - .../jeecg/JeecgAutoProcessApplication.java | 2 +- 12 files changed, 90 insertions(+), 35 deletions(-) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/email/EmailServiceManager.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/email/EmailServiceManager.java index b7ca04b3..24f3f3f5 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/email/EmailServiceManager.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/email/EmailServiceManager.java @@ -126,8 +126,14 @@ public class EmailServiceManager { //如果邮箱邮件数量 > 0 final int messageCount = folder.getMessageCount(); if(messageCount > 0){ + Message[] messages = null; + if(Objects.isNull(this.systemStartupTime)){ + int finalNum = messageCount > this.receiveNum?this.receiveNum:messageCount; + //邮箱邮件下标是从1开始的 + return folder.getMessages(1,finalNum); + } SearchTerm searchTerm = new ReceivedDateTerm(ComparisonTerm.GE,this.systemStartupTime); - Message[] messages = folder.search(searchTerm); + messages = folder.search(searchTerm); Arrays.sort(messages, (o1, o2) -> { try { return o1.getReceivedDate().compareTo(o2.getReceivedDate()); @@ -139,9 +145,8 @@ public class EmailServiceManager { if(this.receiveNum >= messages.length){ return messages; }else{ - messages = Arrays.copyOfRange(messages,0,this.receiveNum-1); + return Arrays.copyOfRange(messages,0,this.receiveNum-1); } - return messages; } return null; } @@ -233,7 +238,6 @@ public class EmailServiceManager { if(part.isMimeType(MailContentType.PLAIN.getContentType())){ content.append(part.getContent()); }else if(part.isMimeType("multipart/*")){ - System.out.println(part.getContentType()); Multipart multipart = (Multipart) part.getContent(); for(int i=0;i { * @param fileName */ public GardsAlertData create(AlertSpectrumStruct struct,String fileName) throws Exception; + + /** + * 查询GardsAlertData + * @param inputFileName + * @return + */ + public GardsAlertData findByInputFileName(String inputFileName); } diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/ISOHSpectrumService.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/ISOHSpectrumService.java index 394517a5..5ff62673 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/ISOHSpectrumService.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/ISOHSpectrumService.java @@ -3,7 +3,6 @@ package org.jeecg.modules.service; import com.baomidou.mybatisplus.extension.service.IService; import org.jeecg.modules.base.entity.original.GardsSohData; import org.jeecg.modules.native_jni.struct.SOHSpectrumStruct; - import java.util.List; /** diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/AlertSpectrumServiceImpl.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/AlertSpectrumServiceImpl.java index 10ac3480..9595be0c 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/AlertSpectrumServiceImpl.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/AlertSpectrumServiceImpl.java @@ -1,5 +1,6 @@ package org.jeecg.modules.service.impl; +import cn.hutool.core.util.StrUtil; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -7,6 +8,7 @@ import lombok.RequiredArgsConstructor; import org.jeecg.common.util.DateUtils; import org.jeecg.modules.base.entity.configuration.GardsStations; import org.jeecg.modules.base.entity.original.GardsAlertData; +import org.jeecg.modules.file.FileOperation; import org.jeecg.modules.mapper.GardsAlertDataMapper; import org.jeecg.modules.mapper.GardsStationsMapper; import org.jeecg.modules.native_jni.struct.AlertSpectrumStruct; @@ -48,8 +50,25 @@ public class AlertSpectrumServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(GardsAlertData::getInputFileName,inputFileName); + return this.getOne(queryWrapper); + } + return null; + } } diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/MetSpectrumServiceImpl.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/MetSpectrumServiceImpl.java index 2a90c29c..3696307d 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/MetSpectrumServiceImpl.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/MetSpectrumServiceImpl.java @@ -8,6 +8,7 @@ import org.apache.commons.compress.utils.Lists; import org.jeecg.common.util.DateUtils; import org.jeecg.modules.base.entity.configuration.GardsStations; import org.jeecg.modules.base.entity.original.GardsMetData; +import org.jeecg.modules.file.FileOperation; import org.jeecg.modules.mapper.GardsMetDataMapper; import org.jeecg.modules.mapper.GardsStationsMapper; import org.jeecg.modules.native_jni.struct.MetSpectrumStruct; @@ -61,7 +62,7 @@ public class MetSpectrumServiceImpl extends ServiceImpl sohDatas; + private List sohData; /** * 设置过滤链路 @@ -134,7 +133,7 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{ @Override protected void handlerOriginalData() throws Exception { this.startIntoDatabaseTime = new Date(); - this.sohDatas = spectrumServiceQuotes.getSohSpectrumService().create(this.sourceData, super.spectrumFileRelativePath); + this.sohData = spectrumServiceQuotes.getSohSpectrumService().create(this.sourceData, super.spectrumFileRelativePath); this.endIntoDatabaseTime = new Date(); } @@ -145,8 +144,8 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{ protected void saveLogToLogDir() throws IOException { //获取健康谱记录ID范围 String sohIdRange = ""; - if(!CollectionUtils.isEmpty(this.sohDatas)){ - sohIdRange = this.sohDatas.get(0).getSohId()+"-"+this.sohDatas.get(this.sohDatas.size()-1).getSohId(); + if(!CollectionUtils.isEmpty(this.sohData)){ + sohIdRange = this.sohData.get(0).getSohId()+"-"+this.sohData.get(this.sohData.size()-1).getSohId(); } //组装日志文件内容 StringBuilder logContent = new StringBuilder(); @@ -157,7 +156,7 @@ public class HealthStatusSpectrum extends AbstractSpectrumHandler{ logContent.append("------------------- ").append("Write Data into Database Successfully at ").append(DateUtils.formatDate(this.endIntoDatabaseTime,"yyyy-MM-dd HH:mm:ss")).append(" --------------------"); final SpectrumPathProperties properties = this.spectrumServiceQuotes.getSpectrumPathProperties(); - final String dirPath = properties.getLogPath()+File.separator+this.getFileSaveRelativePath(); + final String dirPath = properties.getRootPath()+File.separator+properties.getLogPath()+File.separator+this.getFileSaveRelativePath(); final String fileName = super.spectrumFile.getName().replace(this.currDataType.getSuffix(),LOG_FILE_SUFFIX); final String finalPath = dirPath+ File.separator+fileName; FileOperation.saveOrAppendFile(finalPath,logContent.toString(),true); diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/MetSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/MetSpectrum.java index fe038c89..f1c2f9d6 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/MetSpectrum.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/MetSpectrum.java @@ -150,7 +150,7 @@ public class MetSpectrum extends AbstractSpectrumHandler{ logContent.append("------------------- ").append("Write Data into Database Successfully at ").append(DateUtils.formatDate(this.endIntoDatabaseTime,"yyyy-MM-dd HH:mm:ss")).append(" --------------------"); final SpectrumPathProperties properties = this.spectrumServiceQuotes.getSpectrumPathProperties(); - final String dirPath = properties.getLogPath()+File.separator+this.getFileSaveRelativePath(); + final String dirPath = properties.getRootPath()+File.separator+properties.getLogPath()+File.separator+this.getFileSaveRelativePath(); final String fileName = super.spectrumFile.getName().replace(this.currDataType.getSuffix(),LOG_FILE_SUFFIX); final String finalPath = dirPath+File.separator+fileName; FileOperation.saveOrAppendFile(finalPath,logContent.toString(),true); diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SamplephdSpectrum.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SamplephdSpectrum.java index 1d518d60..7c555044 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SamplephdSpectrum.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SamplephdSpectrum.java @@ -50,7 +50,6 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler { super.status = SampleStatus.COMPLETE.getValue(); super.updateStatus(); }catch (Exception e){ - e.printStackTrace(); //修改状态为解析失败 super.status = SampleStatus.FAIL.getValue(); super.updateStatus(); diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumParsingActuator.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumParsingActuator.java index 76e924f2..2b3f1a5d 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumParsingActuator.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/SpectrumParsingActuator.java @@ -104,7 +104,6 @@ public class SpectrumParsingActuator implements Runnable{ } } } catch (Exception e) { -// log.error(mailContent.toString()); log.error("This email failed to parse. The email subject is: {}, sent on: {}, received on: {}, and the reason for the failure is: {}",subject,sendTime,receiveTime,e.getMessage()); e.printStackTrace(); }finally { diff --git a/jeecg-server-cloud/armd-auto-process-start/src/main/java/org/jeecg/JeecgAutoProcessApplication.java b/jeecg-server-cloud/armd-auto-process-start/src/main/java/org/jeecg/JeecgAutoProcessApplication.java index 5195acdb..40c28ed3 100644 --- a/jeecg-server-cloud/armd-auto-process-start/src/main/java/org/jeecg/JeecgAutoProcessApplication.java +++ b/jeecg-server-cloud/armd-auto-process-start/src/main/java/org/jeecg/JeecgAutoProcessApplication.java @@ -71,7 +71,7 @@ public class JeecgAutoProcessApplication extends SpringBootServletInitializer im System.loadLibrary("ReadPHDFile"); System.loadLibrary("GammaAnaly"); //根据配置文件配置邮件获取策略定义时间条件,默认EmailReceivePolicy.HISTORY_ORDER_RECEIVE.getPolicy() - Date systemStartupTime = DateUtils.parseDate("1970-01-01 00:00:00","yyyy-MM-dd HH:mm:ss"); + Date systemStartupTime = null; if(EmailReceivePolicy.CURR_DATE_ORDER_RECEIVE.getPolicy().equals(taskProperties.getReceivePolicy())){ systemStartupTime = new Date(); } From f35c832731facd9444d5e201d6a8ae7edfd718a1 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Tue, 24 Oct 2023 09:58:08 +0800 Subject: [PATCH 5/6] =?UTF-8?q?web-statistics=E7=BC=BA=E5=B0=91=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B7=AF=E5=BE=84=E9=85=8D=E7=BD=AE=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=95=E5=85=A5yml=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jeecg-server-cloud/armd-web-statistics-start/src/main/resources/application.yml b/jeecg-server-cloud/armd-web-statistics-start/src/main/resources/application.yml index b0595745..9c30abc9 100644 --- a/jeecg-server-cloud/armd-web-statistics-start/src/main/resources/application.yml +++ b/jeecg-server-cloud/armd-web-statistics-start/src/main/resources/application.yml @@ -15,4 +15,5 @@ spring: config: import: - optional:nacos:armd.yaml - - optional:nacos:armd-@profile.name@.yaml \ No newline at end of file + - optional:nacos:armd-@profile.name@.yaml + - optional:nacos:armd-analysis-@profile.name@.yaml \ No newline at end of file From e52e27cebc60ad23b00d185564198bcd3378b047 Mon Sep 17 00:00:00 2001 From: orgin Date: Tue, 24 Oct 2023 10:03:46 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix=EF=BC=9A=E8=A7=A3=E5=86=B3gamma?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84LC=E5=92=8CSCAC=E5=A4=9A=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E8=A1=8C=E9=87=8D=E5=A4=8D=E6=95=B0=E6=8D=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/jeecg/common/util/GammaReportUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/GammaReportUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/GammaReportUtil.java index 42890ddf..4bc97ac6 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/GammaReportUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/GammaReportUtil.java @@ -59,7 +59,7 @@ public class GammaReportUtil { try { out = new PrintWriter(file); out.println("#" + fileType); - out.printf("%" + (String.valueOf(data.size()).length() + (colLength - String.valueOf(data.size()).length())) + "s", data.size() + "\n"); +// out.printf("%" + (String.valueOf(data.size()).length() + (colLength - String.valueOf(data.size()).length())) + "s", data.size() + "\n"); format(data, out); } catch (FileNotFoundException e) {