From 20c1786b96999ff2c1711afeef8f03b359d4fc60 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Fri, 5 Jan 2024 17:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=A4=84=E7=90=86gamma?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=97=A5=E5=BF=97=E5=B7=A5=E5=85=B7=E7=B1=BB?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E9=80=9A=E8=BF=87=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=A4=84=E7=90=86beta=EF=BC=8Cgamma=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E6=97=A5=E5=BF=97=E5=86=85=E5=AE=B9=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E8=BE=93=E5=87=BA=E5=88=86=E6=9E=90=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E7=A7=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jeecg/common/util/FTPUtil.java | 32 ------------------- .../jeecg/common/util/MyLogFormatUtil.java | 9 +----- .../modules/spectrum/Sample_B_Analysis.java | 1 - 3 files changed, 1 insertion(+), 41 deletions(-) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java index 66486d14..dde61ecb 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java @@ -102,38 +102,6 @@ public class FTPUtil { } } - public static void main(String[] args) throws IOException { - long l = System.currentTimeMillis(); - String path = "/rn/datatest/savefile/"; - String fromPath = "Spectrum/Particulates/Samplephd/2015/11/AUP09_004-20151119_0421_S_PREL_42710.PHD"; - String fromPath2 = "Spectrum/Particulates/Samplephd/2015/11/NZP46_002-20151119_0021_S_PREL_57588.PHD"; - FTPClient ftpClient = new FTPClient(); - //连接 - ftpClient.connect("172.21.70.87", 21); - //登录 - ftpClient.login("rmsops", "cnndc66367220"); - System.out.println("login>>>"+(System.currentTimeMillis()-l)); - // 切换为本地被动模式,可以解决FTP上传后文件为空的问题,但需要服务器将FTP服务添加至防火墙白名单 - ftpClient.enterLocalPassiveMode(); - //判断是否连接成功 - int reply = ftpClient.getReplyCode(); - ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE); - // 设置编码,当文件中存在中文且上传后文件乱码时可使用此配置项 - ftpClient.setControlEncoding("UTF-8"); - ftpClient.setFileTransferMode(FTPClient.STREAM_TRANSFER_MODE); - InputStream inputStream = ftpClient.retrieveFileStream(path+fromPath); - File file = new File("D:\\test1.txt"); - FileUtils.copyInputStreamToFile(inputStream, file); - System.out.println(null == inputStream); - System.out.println(ftpClient.printWorkingDirectory()); - ftpClient.completePendingCommand(); - InputStream inputStream2 = ftpClient.retrieveFileStream(path+fromPath2); - File file2 = new File("D:\\test2.txt"); - FileUtils.copyInputStreamToFile(inputStream2, file2); - System.out.println(null == inputStream2); - System.out.println(System.currentTimeMillis() - l); - } - public void downloadFTPFile(String localPath, String fileName, HttpServletResponse response) { InputStream in = null; ServletOutputStream out = null; diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/MyLogFormatUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/MyLogFormatUtil.java index aa6689de..60cda981 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/MyLogFormatUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/MyLogFormatUtil.java @@ -1,6 +1,5 @@ package org.jeecg.common.util; -import cn.hutool.core.lang.Console; import com.google.common.collect.Lists; import lombok.Data; import org.apache.commons.lang.StringUtils; @@ -143,10 +142,6 @@ public class MyLogFormatUtil { attributeItemVo.setContext(errors); energys.add(attributeItemVo); MyLogFormatUtil.getBlock(MyLogFormatUtil.SetSampleGEnergyChannel, "sampleId", energys); - - - Console.log(getTitleFormat("Read calibration finished",".")); - Console.log(getHeaderFormat("header",".")); } /** @@ -220,7 +215,6 @@ public class MyLogFormatUtil { Object value = entry.getValue(); String formattedKey = String.format("%-"+ (keyWidth + 4) + "s", key); String formattedValue = String.format("%-"+ (valueWidth + 4) + "s", value); - System.out.println(formattedKey + " : " + formattedValue); result.add(formattedKey + formattedValue + "\n"); } return result; @@ -306,7 +300,6 @@ public class MyLogFormatUtil { // 构造格式化字符串 result.add(String.format(sb.toString(), row.toArray())); result.add(STRING_END); - Console.log(String.format(sb.toString(), row.toArray())); sb = new StringBuilder(); } return result; @@ -347,7 +340,7 @@ public class MyLogFormatUtil { public static List getPass(List source) { List result = Lists.newLinkedList(); for (String str : source) { - result.add(str.contains("0") ? "Fail" : "Pass"); + result.add(Double.valueOf(str)< 1? "Fail" : "Pass"); } return result; } diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Sample_B_Analysis.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Sample_B_Analysis.java index 4e6a1c1c..dad40675 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Sample_B_Analysis.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/spectrum/Sample_B_Analysis.java @@ -224,7 +224,6 @@ public class Sample_B_Analysis implements BlockConstant { */ private void autoAnalyse() throws BAnalyseException, FileNotExistException { BgAnalyseResult analyseResult = EnergySpectrumHandler.bgAnalyse(this.sampleFileFinalPath,this.gasFileFinalPath,this.detFileFinalPath); - System.out.println(analyseResult); this.analyseResult = analyseResult; if(Objects.isNull(analyseResult) || !analyseResult.analyse_flag){ ErrorLogManager.getInstance().write(new SpectrumErrorEvent(new Date(), analyseResult.error_log, this.phdFileName));