fix:Ftp改为本地
This commit is contained in:
parent
23ccf6bfac
commit
3a8b663833
|
@ -56,7 +56,7 @@ public class FileSourceHandleManager{
|
|||
|
||||
//初始化线程池
|
||||
ThreadFactory threadFactory = new CustomizableThreadFactory("filesource-file-parsing-");
|
||||
poolExecutor = new ThreadPoolExecutor(taskProperties.getReceiveNum(),maximumPoolSize,5, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),threadFactory);
|
||||
poolExecutor = new ThreadPoolExecutor(taskProperties.getFilesourceDirReceiveNum(),maximumPoolSize,5, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),threadFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
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;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.modules.base.entity.original.GardsSampleData;
|
||||
import org.jeecg.modules.file.FileOperation;
|
||||
import org.jeecg.modules.mapper.GardsSampleDataMapper;
|
||||
import org.jeecg.modules.service.GardsSampleDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -42,9 +44,13 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
|
|||
*/
|
||||
@Override
|
||||
public GardsSampleData findByInputFileName(String inputFileName) {
|
||||
LambdaQueryWrapper<GardsSampleData> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(GardsSampleData::getInputFileName,inputFileName);
|
||||
return this.getOne(queryWrapper);
|
||||
if (StrUtil.isNotBlank(inputFileName)){
|
||||
inputFileName = FileOperation.separatorConvert(inputFileName);
|
||||
LambdaQueryWrapper<GardsSampleData> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(GardsSampleData::getInputFileName,inputFileName);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -123,7 +123,8 @@ public class Sample_G_Analysis {
|
|||
// 解析PHD文件
|
||||
spectrumPathProperties = ApplicationContextUtil.getContext().getBean(SpectrumPathProperties.class);
|
||||
String sampleFilePath = sampleData.getInputFileName();
|
||||
String pathName = StringPool.SLASH + spectrumPathProperties.getRootPath() + StringPool.SLASH + sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH));
|
||||
String pathName = File.separator + spectrumPathProperties.getSaveFilePath() + File.separator +
|
||||
sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH));
|
||||
String fileName = sampleFilePath.substring(sampleFilePath.lastIndexOf(StringPool.SLASH)+1);
|
||||
boolean flag = gammaFileUtil.loadFile(pathName, fileName, phdFile, new Result());
|
||||
// todo 测试阶段暂时注释掉,获取数据库 Gamma 默认参数
|
||||
|
|
|
@ -1369,12 +1369,13 @@ public class GammaFileUtil {
|
|||
|
||||
public boolean AnalyseSpectrum(PHDFile phd, Map<String, NuclideLines> mapLines){
|
||||
//解析获取临时文件信息
|
||||
File tmpFile = analyzeFile(phd.getFilepath(), phd.getFilename());
|
||||
File tmpFile = new File(spectrumPathProperties.getRootPath() + phd.getFilepath(), phd.getFilename());
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
String phdStr = mapper.writeValueAsString(phd);
|
||||
String nuclideLinesMap = mapper.writeValueAsString(mapLines);
|
||||
String strValue = CalValuesHandler.analyseSpectrum(phdStr, nuclideLinesMap, tmpFile.getAbsolutePath(), analysisProcess);
|
||||
String strValue = CalValuesHandler.analyseSpectrum(phdStr, nuclideLinesMap, tmpFile.getAbsolutePath(), null);
|
||||
Map<String, Object> parseMap = JSON.parseObject(strValue, Map.class);
|
||||
for (Map.Entry<String, Object> entry:parseMap.entrySet()) {
|
||||
if (entry.getKey().equalsIgnoreCase("bAnalyed")) {
|
||||
|
|
|
@ -79,7 +79,7 @@ public class JeecgAutoProcessApplication extends SpringBootServletInitializer im
|
|||
checkTempStorageDirectory();
|
||||
//校验存储目录是否存在,不存在则创建,存在无操作
|
||||
checkStorageDirectory();
|
||||
// autoProcessManager.start(systemStartupTime);
|
||||
// autoProcessManager.start(systemStartupTime);
|
||||
undealHandleManager.start();
|
||||
fileSourceHandleManager.start();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user