diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/GardsGammaDefaultParamsServiceImpl.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/GardsGammaDefaultParamsServiceImpl.java index edefb9bd..0ff002cb 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/GardsGammaDefaultParamsServiceImpl.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/service/impl/GardsGammaDefaultParamsServiceImpl.java @@ -8,7 +8,6 @@ import org.jeecg.modules.service.IGardsGammaDefaultParamsService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -20,7 +19,7 @@ public class GardsGammaDefaultParamsServiceImpl extends ServiceImpl mapSetting() { Map paramsMap = list().stream() .collect(Collectors.toMap(GardsGammaDefaultParams::getName, - v->v.getValue() == null ? "" : v.getValue())); + GardsGammaDefaultParams::getValue)); return paramsMap; } } diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/GammaFileUtil.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/GammaFileUtil.java index 2afce7c5..58e7573a 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/GammaFileUtil.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/GammaFileUtil.java @@ -1515,14 +1515,10 @@ public class GammaFileUtil { try { String phdStr = mapper.writeValueAsString(phd); String mapLinesStr = mapper.writeValueAsString(mapLines); - - //解析获取临时文件信息 - File tmpFile = this.analyzeFile(phd.getFilepath()); String analyseSpectrum = CalValuesHandler.analyseSpectrum(phdStr, mapLinesStr, ""); JSONObject jsonObject = JSONObject.parseObject(analyseSpectrum); String jsonString = jsonObject.toJSONString(); - } catch (JsonProcessingException e) { throw new RuntimeException(e); } @@ -4210,40 +4206,5 @@ public class GammaFileUtil { } return file; } - public File analyzeFile(String path) { - //连接ftp - FTPClient ftpClient = ftpUtil.LoginFTP(); - InputStream inputStream = null; - File file = null; - try { - //被动模式 - ftpClient.enterLocalPassiveMode(); - //设置文件类型--二进制文件 - ftpClient.setFileType(FTP.BINARY_FILE_TYPE); - // - ftpClient.setControlEncoding("UTF-8"); - ftpClient.setFileTransferMode(FTPClient.STREAM_TRANSFER_MODE); - inputStream = ftpClient.retrieveFileStream(path); - if (Objects.nonNull(inputStream)){ - file = File.createTempFile("tmp", null); - //将ftp文件的输入流复制给临时文件 - FileUtils.copyInputStreamToFile(inputStream, file); - } - } catch (IOException e) { - throw new RuntimeException(e); - } finally { - try { - if (Objects.nonNull(ftpClient)){ - ftpClient.disconnect(); - } - if (Objects.nonNull(inputStream)){ - inputStream.close(); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - return file; - } } diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/GammaController.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/GammaController.java index 5a714eda..b45f634c 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/GammaController.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/controller/GammaController.java @@ -2,7 +2,6 @@ package org.jeecg.modules.controller; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.apache.poi.hdgf.pointers.Pointer; import org.jeecg.common.api.vo.Result; import org.jeecg.common.base.BaseMap; import org.jeecg.common.constant.GlobalConstants; @@ -20,7 +19,6 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.TreeMap; @RestController @RequestMapping("gamma") diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java index c4a10b2d..25042ab3 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java @@ -213,7 +213,6 @@ public class GammaServiceImpl implements IGammaService { @Override public Result gammaByDB(String dbName, Integer sampleId, HttpServletRequest request) { - long l = System.currentTimeMillis(); Result result = new Result(); String userName = JwtUtil.getUserNameByToken(request); Map map = new HashMap<>(); @@ -228,22 +227,14 @@ public class GammaServiceImpl implements IGammaService { } String pathName = StringPool.SLASH + spectrumPathProperties.getRootPath() + StringPool.SLASH + sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH)); String fileName = sampleFilePath.substring(sampleFilePath.lastIndexOf(StringPool.SLASH)+1); - System.out.println("loadFile之前>>>>"+(System.currentTimeMillis() - l)); - l = System.currentTimeMillis(); boolean flag = gammaFileUtil.loadFile(pathName, fileName, phd, result); - System.out.println("loadFile>>>>"+(System.currentTimeMillis() - l)); if (!flag){ return result; } - l = System.currentTimeMillis(); //声明基础数组信息 gammaFileUtil.SetBaseInfo(phd); - System.out.println("SetBaseInfo>>>>"+(System.currentTimeMillis() - l)); - l = System.currentTimeMillis(); //从数据库中读取相关信息 boolean bRet = gammaFileUtil.getResultFromDB(dbName, userName, sampleId, phd, result); - System.out.println("getResultFromDB>>>>"+(System.currentTimeMillis() - l)); - l = System.currentTimeMillis(); if (!bRet){ return result; } diff --git a/jeecg-module-station-operation/src/main/java/org/jeecg/common/CalculateStationData.java b/jeecg-module-station-operation/src/main/java/org/jeecg/common/CalculateStationData.java index 064dc347..90caa72a 100644 --- a/jeecg-module-station-operation/src/main/java/org/jeecg/common/CalculateStationData.java +++ b/jeecg-module-station-operation/src/main/java/org/jeecg/common/CalculateStationData.java @@ -32,7 +32,6 @@ public class CalculateStationData { try { //文件路径 String filePath = parameterFilePath+ File.separator +"parameter.xml"; - filePath = "F:\\RunSoftware\\ARMD1.0.4\\SystemManager.xml"; //声明一个实体类存储参数信息 RateParam mRateParam = new RateParam(); //创建一个文档解析器工厂