修改gamma,beta功能的提示语句替换成英文
gamma功能的导出excel失败问题修改
This commit is contained in:
parent
4d47579788
commit
21c0fa8edc
Binary file not shown.
|
@ -76,6 +76,7 @@ public class GammaController {
|
|||
}
|
||||
|
||||
@PostMapping("configureSave")
|
||||
@ApiOperation(value = "analyze菜单下configure页面数据保存按钮", notes = "analyze菜单下configure页面数据保存按钮")
|
||||
public Result configureSave(@RequestBody ConfigureData configureData, HttpServletRequest request) {
|
||||
return gammaService.configureSave(configureData, request);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.minio.credentials.Jwt;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.google.common.cache.Cache;
|
||||
|
@ -148,7 +147,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
//根据sampleId获取sample文件路径
|
||||
String sampleFilePath = spectrumAnalysisMapper.getSampleFilePath(sampleId);
|
||||
if (StringUtils.isBlank(sampleFilePath)){
|
||||
result.error500("样品文件不存在!");
|
||||
result.error500("Sample file does not exist!");
|
||||
return result;
|
||||
}
|
||||
String pathName = StringPool.SLASH + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH + sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH));
|
||||
|
@ -191,7 +190,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
phd.setXmlFilePath(parameterProperties.getFilePath());
|
||||
String systemType = fileName.substring(2, 3);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
//查询当前用户关联的核素信息
|
||||
|
@ -421,7 +420,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
//根据sampleId获取sample文件路径
|
||||
String sampleFilePath = spectrumAnalysisMapper.getSampleFilePath(sampleId);
|
||||
if (StringUtils.isBlank(sampleFilePath)){
|
||||
result.error500("样品文件不存在!");
|
||||
result.error500("Sample file does not exist!");
|
||||
return result;
|
||||
}
|
||||
//切割数据库存储的文件路径获取路径信息
|
||||
|
@ -828,7 +827,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
long m_nCount = phd.getSpec().getNum_g_channel();
|
||||
|
@ -853,7 +852,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
long m_nCount = phd.getSpec().getNum_g_channel();
|
||||
|
@ -888,7 +887,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
@ -928,7 +927,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
SpecSetup phdSetting = phd.getSetting();
|
||||
|
@ -946,7 +945,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
phdSetting.setRefTime_act(configureData.getRefTime_act());
|
||||
phdSetting.setRefTime_conc(configureData.getRefTime_conc());
|
||||
map.put("checkBox_updateCal", phd.getSetting().isBUpdateCal());
|
||||
result.success("保存成功");
|
||||
result.success("Save successfully");
|
||||
result.setResult(map);
|
||||
return result;
|
||||
}
|
||||
|
@ -958,7 +957,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
//获取当前用户信息
|
||||
|
@ -1048,7 +1047,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, String> colorMap = sysUserColorService.initColor(userName);
|
||||
|
@ -1100,7 +1099,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
//判断当前选中的channel是否在正常允许范围内
|
||||
|
@ -1264,7 +1263,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
try {
|
||||
|
@ -1396,7 +1395,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, String> colorMap = sysUserColorService.initColor(userName);
|
||||
|
@ -1435,7 +1434,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
//判断当前phd文件对应的peak的数据是否小于1
|
||||
|
@ -1483,7 +1482,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if(phd.getVPeak().size() < 1){
|
||||
|
@ -1520,12 +1519,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
//获取需要新增的核素名称
|
||||
if(StringUtils.isBlank(nuclideName)) {
|
||||
result.error500("核素名称不能为空!");
|
||||
result.error500("The nuclide name cannot be empty!");
|
||||
return result;
|
||||
}
|
||||
//判断当前用户的核素列表是否有核素信息 如果不为空就返回 不进行改变
|
||||
|
@ -1576,7 +1575,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
int index = list_identify.indexOf(nuclideName);
|
||||
|
@ -1608,14 +1607,14 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if(curRow >= 0 && curRow < phd.getVPeak().size()) {
|
||||
result.setSuccess(true);
|
||||
result.setResult(phd.getVPeak().get(curRow).comments);
|
||||
} else {
|
||||
result.error500("请先选择要添加注释的峰!");
|
||||
result.error500("Please first select the peak to which you want to add comments!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1628,7 +1627,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if(curRow >= 0 && curRow < phd.getVPeak().size()) {
|
||||
|
@ -1638,7 +1637,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
result.setSuccess(true);
|
||||
result.setResult(map);
|
||||
} else {
|
||||
result.error500("请先选择要添加注释的峰!");
|
||||
result.error500("Please first select the peak to which you want to add comments!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1650,7 +1649,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
|
@ -1665,7 +1664,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(comments)) {
|
||||
|
@ -1685,7 +1684,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, String> colorMap = sysUserColorService.initColor(userName);
|
||||
|
@ -1779,7 +1778,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, String> colorMap = sysUserColorService.initColor(userName);
|
||||
|
@ -1797,7 +1796,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, String> colorMap = sysUserColorService.initColor(userName);
|
||||
|
@ -1841,7 +1840,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
List<Long> m_vCount = new LinkedList<>();
|
||||
|
@ -1892,7 +1891,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
// if(baseLineCtrls.getBaseStack().size() > 1) {
|
||||
|
@ -2365,7 +2364,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isBlank(currentText)) {
|
||||
|
@ -2419,7 +2418,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
DataChangeEnergy(m_vCurCentroid, m_vCurEnergy, m_vCurUncert, m_curParam, phd, width, map);
|
||||
|
@ -2480,7 +2479,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if(!curCalName.contains("Input")) {
|
||||
|
@ -2535,7 +2534,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件");
|
||||
result.error500("Please select the parse file first");
|
||||
return result;
|
||||
}
|
||||
if (Objects.nonNull(file)) {
|
||||
|
@ -2629,7 +2628,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(currentName)) {
|
||||
|
@ -2637,7 +2636,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
phdCache.put(fileName, phd);
|
||||
localCache.setPHDCache(phdCache);
|
||||
result.success("修改成功");
|
||||
result.success("Modified successfully");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2649,7 +2648,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isBlank(currentText)) {
|
||||
|
@ -2703,7 +2702,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
DataChangeResolution(m_vCurReso, m_vCurEnergy, m_vCurUncert, m_curParam, phd, width, map);
|
||||
|
@ -2753,7 +2752,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if(!curCalName.contains("Input")) {
|
||||
|
@ -2808,7 +2807,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件");
|
||||
result.error500("Please select the parse file first");
|
||||
return result;
|
||||
}
|
||||
if (Objects.nonNull(file)) {
|
||||
|
@ -2902,7 +2901,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(currentName)) {
|
||||
|
@ -2910,7 +2909,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
phdCache.put(fileName, phd);
|
||||
localCache.setPHDCache(phdCache);
|
||||
result.success("修改成功");
|
||||
result.success("Modified successfully");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2931,7 +2930,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isBlank(currentText)) {
|
||||
|
@ -2985,7 +2984,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
DataChangeEfficiency(m_vCurEffi, m_vCurEnergy, m_vCurUncert, m_curParam, funcId, phd, width, map);
|
||||
|
@ -3035,7 +3034,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if(!curCalName.contains("Input")) {
|
||||
|
@ -3091,7 +3090,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先选择解析文件");
|
||||
result.error500("Please select the parse file first");
|
||||
return result;
|
||||
}
|
||||
if (Objects.nonNull(file)) {
|
||||
|
@ -3197,7 +3196,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(currentName)) {
|
||||
|
@ -3205,7 +3204,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
phdCache.put(fileName, phd);
|
||||
localCache.setPHDCache(phdCache);
|
||||
result.success("修改成功");
|
||||
result.success("Modified successfully");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -3217,7 +3216,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
List<String> nuclides = new LinkedList<>();
|
||||
|
@ -3371,7 +3370,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
List<String> nuclides = spectrumAnalysisMapper.getNuclideNames("CONFIGURATION.GARDS_NUCL_LIB");
|
||||
|
@ -3393,7 +3392,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (CollectionUtils.isEmpty(userLibraryName)) {
|
||||
|
@ -3403,9 +3402,9 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
userLibraryName = userLibraryName.stream().distinct().collect(Collectors.toList());
|
||||
boolean save = defaultNuclideSpectrumService.saveNuclidesByUserName(userLibraryName, userName, phd.getHeader().getSystem_type().toUpperCase());
|
||||
if (save) {
|
||||
result.success("修改成功!");
|
||||
result.success("Modified successfully!");
|
||||
} else {
|
||||
result.success("修改失败!");
|
||||
result.success("Modification failure!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -3418,7 +3417,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
String temp = phd.getOriTotalCmt().trim();
|
||||
|
@ -3446,13 +3445,13 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if(StringUtils.isNotBlank(comment)) {
|
||||
phd.setTotalCmt(comment);
|
||||
}
|
||||
result.success("修改成功");
|
||||
result.success("Modified successfully");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -3462,7 +3461,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
List<PeakInfo> vPeak = phd.getVPeak();
|
||||
|
@ -3610,7 +3609,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, false);
|
||||
|
@ -3656,7 +3655,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, Object> map = gammaFileUtil.UpdateDatasNuclideActivity(phd.getMapNucActMda(), phd.getUsedSetting().getRefTime_act(), phd.getUsedSetting().getRefTime_conc());
|
||||
|
@ -3692,7 +3691,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
String spectrum = gammaFileUtil.makeUpSpectrum(phd);
|
||||
|
@ -3708,7 +3707,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, String> map = new HashMap<>();
|
||||
|
@ -3766,7 +3765,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, QcCheckItem> m_mapQC = phd.getQcItems();
|
||||
|
@ -3849,7 +3848,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
@ -4144,7 +4143,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, true);
|
||||
|
@ -4160,7 +4159,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)){
|
||||
result.error500("请先选择解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
int size = phd.getVPeak().size();
|
||||
|
@ -4207,7 +4206,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
Cache<String, PHDFile> phdCache = localCache.getPHDCache();
|
||||
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
|
||||
if (Objects.isNull(phd)) {
|
||||
result.error500("请先解析文件!");
|
||||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
//查看分析员是否有权限操作当前台站信息
|
||||
|
@ -4539,7 +4538,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
peakInfoDto.setNuclides(nuclide);
|
||||
peakInfoDtos.add(peakInfoDto);
|
||||
}
|
||||
data.put("peak", peakInfoDtos);
|
||||
data.put("peakInfoDto", peakInfoDtos);
|
||||
/* The Results of Nuclide Identify */
|
||||
// 获取所有核素名称 去重
|
||||
List<String> nuclides = peakInfos.stream()
|
||||
|
@ -4610,9 +4609,15 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
nuclideActs.add(nuclideActMdaDto);
|
||||
}
|
||||
data.put("nuclideActs", nuclideActs);
|
||||
String detectorCode = phd.getHeader().getDetector_code();
|
||||
String date = phd.getAcq().getAcquisition_start_date().replace("/", "");
|
||||
String time = phd.getAcq().getAcquisition_start_time().replace(":", "").substring(0, 4);
|
||||
String dataType = phd.getMsgInfo().getData_type().substring(0, 1);
|
||||
String format = ".xls";
|
||||
String xlsFileName = String.format("%s-%s_%s_%s_RESULT%s", detectorCode, date, time, dataType, format);
|
||||
String template = SAVETOEXCEL_G.getName();
|
||||
// 导出时使用默认文件名 file.xls
|
||||
ExportUtil.exportXls(response, template, data);
|
||||
ExportUtil.exportXls(response, template, data, xlsFileName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -116,12 +116,12 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
List<String> menuTypeList = Arrays.asList(menuTypes);
|
||||
//查询谱对应的台站类型
|
||||
if (CollectionUtils.isEmpty(menuTypeList)){
|
||||
result.error500("谱类型不能为空");
|
||||
result.error500("The spectrum type cannot be empty");
|
||||
return result;
|
||||
}
|
||||
List<String> stationTypes = sysDictService.findStationType(menuTypeList);
|
||||
if (CollectionUtils.isEmpty(stationTypes)) {
|
||||
result.error500("请先补充数据字典中当前系统类型对应的台站类型信息");
|
||||
result.error500("Please add the station type corresponding to the current system type in the data dictionary");
|
||||
return result;
|
||||
}
|
||||
List<String> userStations = new LinkedList<>();
|
||||
|
@ -129,7 +129,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
if (Objects.nonNull(AllUsers) && !AllUsers){
|
||||
String userName = JwtUtil.getUserNameByToken(request);
|
||||
if (StringUtils.isBlank(userName)){
|
||||
result.error500("当前登录用户信息获取失败!");
|
||||
result.error500("Description Failed to obtain the current login user information!");
|
||||
return result;
|
||||
}
|
||||
userStations = userTaskUtil.findUserStation(userName);
|
||||
|
@ -139,7 +139,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}else if (dbName.equalsIgnoreCase("man")){
|
||||
dbName = "RNMAN.GARDS_ANALYSES";
|
||||
}else {
|
||||
result.error500("数据库类型不存在");
|
||||
result.error500("The database type does not exist");
|
||||
return result;
|
||||
}
|
||||
List<GardsSampleDataSpectrum> sampleData = spectrumAnalysisMapper.getDBSearchList(dbName, stationTypes, userStations, AllUsers);
|
||||
|
@ -161,27 +161,27 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
public Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleDataSpectrum gardsSampleData, String dbName, String[] menuTypes, boolean AllUsers, boolean CollectStopB, boolean AcqStartB, Date startDate, Date endDate, HttpServletRequest request) {
|
||||
Result result = new Result();
|
||||
if (Objects.isNull(startDate)){
|
||||
result.error500("开始时间不能为空");
|
||||
result.error500("The start time cannot be empty");
|
||||
return result;
|
||||
}
|
||||
String startTime = DateUtils.formatDate(startDate, "yyyy-MM-dd") + " 00:00:00";
|
||||
if (Objects.isNull(endDate)) {
|
||||
result.error500("结束时间不能为空");
|
||||
result.error500("The end time cannot be empty");
|
||||
return result;
|
||||
}
|
||||
String endTime = DateUtils.formatDate(endDate, "yyyy-MM-dd") + " 23:59:59";
|
||||
List<String> menuTypeList = Arrays.asList(menuTypes);
|
||||
if (CollectionUtils.isEmpty(menuTypeList)){
|
||||
result.error500("谱类型不能为空");
|
||||
result.error500("The spectrum type cannot be empty");
|
||||
return result;
|
||||
}
|
||||
List<String> stationTypes = sysDictService.findStationType(menuTypeList);
|
||||
if (CollectionUtils.isEmpty(stationTypes)) {
|
||||
result.error500("请先补充数据字典中当前系统类型对应的台站类型信息");
|
||||
result.error500("Please add the station type corresponding to the current system type in the data dictionary");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isBlank(dbName)){
|
||||
result.error500("请勾选数据库类型");
|
||||
result.error500("Please select the database type");
|
||||
return result;
|
||||
}
|
||||
String tempDBName = dbName;
|
||||
|
@ -190,14 +190,14 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}else if (dbName.equalsIgnoreCase("man")){
|
||||
dbName = "RNMAN.GARDS_ANALYSES";
|
||||
}else {
|
||||
result.error500("数据库类型不存在");
|
||||
result.error500("The database type does not exist");
|
||||
return result;
|
||||
}
|
||||
List<String> userStations = new LinkedList<>();
|
||||
if (Objects.nonNull(AllUsers) && !AllUsers){
|
||||
String userName = JwtUtil.getUserNameByToken(request);
|
||||
if (StringUtils.isBlank(userName)){
|
||||
result.error500("当前登录用户信息获取失败!");
|
||||
result.error500("Description Failed to obtain the current login user information!");
|
||||
return result;
|
||||
}
|
||||
userStations = userTaskUtil.findUserStation(userName);
|
||||
|
@ -238,7 +238,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
//查询sampleFile文件内容信息 获取文件内容 获取大致的gas det文件名称
|
||||
Map<String, String> fileData = phdFileUtil.getFileData(filePath, matchFileName);
|
||||
if (CollectionUtils.isEmpty(fileData)) {
|
||||
result.error500("ftp文件查询失败");
|
||||
result.error500("Failed to query the ftp file. Procedure");
|
||||
return result;
|
||||
}
|
||||
String sampleFileName = fileData.get("sampleFileName");
|
||||
|
@ -309,7 +309,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
List<Boundary> detBoundary = new LinkedList<>();
|
||||
List<Boundary> qcBoundary = new LinkedList<>();
|
||||
if (Objects.isNull(sampleId)){
|
||||
result.error500("请选择一条数据");
|
||||
result.error500("Please select a piece of data");
|
||||
return result;
|
||||
}
|
||||
Integer analysisID = null;
|
||||
|
@ -322,7 +322,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
analysisID = spectrumAnalysisMapper.getAnalysisID(dbName, sampleId, userName);
|
||||
xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId);
|
||||
}else {
|
||||
result.error500("数据库类型不存在");
|
||||
result.error500("The database type does not exist");
|
||||
return result;
|
||||
}
|
||||
//查询数据库文件信息
|
||||
|
@ -610,7 +610,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
//连接ftp
|
||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
if (Objects.isNull(ftpClient)){
|
||||
result.error500("ftp连接失败");
|
||||
result.error500("ftp connection failed");
|
||||
return result;
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
|
@ -1289,7 +1289,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
if (StringUtils.isNotBlank(sampleFileName)){
|
||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
if (Objects.isNull(ftpClient)){
|
||||
result.error500("ftp连接失败");
|
||||
result.error500("ftp connection failed");
|
||||
return result;
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
|
@ -1457,7 +1457,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
gasTmp = phdFileUtil.analyzeFile(path, gasFileName);
|
||||
detTmp = phdFileUtil.analyzeFile(path, detFileName);
|
||||
if ( Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp) ) {
|
||||
result.error500("ftp下文件不存在");
|
||||
result.error500("The file under ftp does not exist");
|
||||
return result;
|
||||
}
|
||||
xeDataList = phdFileUtil.analyzeQCResultXe(sampleTmp, gasTmp, detTmp);
|
||||
|
@ -1570,7 +1570,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
List<GardsXeResultsSpectrum> xeDataList = new LinkedList<>();
|
||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
if (Objects.isNull(ftpClient)){
|
||||
result.error500("ftp连接失败");
|
||||
result.error500("ftp connection failed");
|
||||
return result;
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
|
@ -1596,7 +1596,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
gasTmp = phdFileUtil.analyzeFile(path, gasFileName);
|
||||
detTmp = phdFileUtil.analyzeFile(path, detFileName);
|
||||
if ( Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp) ) {
|
||||
result.error500("ftp下文件不存在");
|
||||
result.error500("The file under ftp does not exist");
|
||||
return result;
|
||||
}
|
||||
xeDataList = phdFileUtil.analyzeQCResultXe(sampleTmp, gasTmp, detTmp);
|
||||
|
@ -1710,7 +1710,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}
|
||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
if (Objects.isNull(ftpClient)){
|
||||
result.error500("ftp连接失败");
|
||||
result.error500("ftp connection failed");
|
||||
return result;
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
|
@ -1856,7 +1856,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}
|
||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
if (Objects.isNull(ftpClient)){
|
||||
result.error500("ftp连接失败");
|
||||
result.error500("ftp connection failed");
|
||||
return result;
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
|
@ -1999,7 +1999,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}
|
||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
if (Objects.isNull(ftpClient)){
|
||||
result.error500("ftp连接失败");
|
||||
result.error500("ftp connection failed");
|
||||
return result;
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
|
@ -2409,7 +2409,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}
|
||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
if (Objects.isNull(ftpClient)){
|
||||
result.error500("ftp连接失败");
|
||||
result.error500("ftp connection failed");
|
||||
return result;
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
|
@ -2436,13 +2436,13 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
//根据台站id查询台站名称
|
||||
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
||||
if (CollectionUtils.isEmpty(stationMap)){
|
||||
result.error500("台站缓存信息为空!");
|
||||
result.error500("The station cache information is empty!");
|
||||
return result;
|
||||
}
|
||||
List<String> stationNames = stationMap.values().stream().collect(Collectors.toList());
|
||||
int index = stationNames.indexOf(stationName);
|
||||
if (index<0){
|
||||
result.error500("台站信息不存在!");
|
||||
result.error500("The station information does not exist!");
|
||||
return result;
|
||||
}
|
||||
List<Integer> stationIds = stationMap.keySet().stream().collect(Collectors.toList());
|
||||
|
@ -2488,13 +2488,13 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
//根据台站id查询台站名称
|
||||
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
||||
if (CollectionUtils.isEmpty(stationMap)){
|
||||
result.error500("台站缓存信息为空!");
|
||||
result.error500("The station cache information is empty!");
|
||||
return result;
|
||||
}
|
||||
List<String> stationNames = stationMap.values().stream().collect(Collectors.toList());
|
||||
int index = stationNames.indexOf(stationName);
|
||||
if (index<0){
|
||||
result.error500("台站信息不存在!");
|
||||
result.error500("The station information does not exist!");
|
||||
return result;
|
||||
}
|
||||
List<Integer> stationIds = stationMap.keySet().stream().collect(Collectors.toList());
|
||||
|
@ -2518,13 +2518,13 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
public Result statisticsQuery(StatisticsQueryData statisticsQueryData) {
|
||||
Result result = new Result();
|
||||
if (Objects.isNull(statisticsQueryData.getStartTime())){
|
||||
result.error500("开始时间不能为空");
|
||||
result.error500("The start time cannot be empty");
|
||||
return result;
|
||||
}
|
||||
String startDate = DateUtils.formatDate(statisticsQueryData.getStartTime(), "yyyy-MM-dd");
|
||||
statisticsQueryData.setStartDate(startDate);
|
||||
if (Objects.isNull(statisticsQueryData.getEndTime())){
|
||||
result.error500("结束时间不能为空");
|
||||
result.error500("The end time cannot be empty");
|
||||
return result;
|
||||
}
|
||||
String endDate = DateUtils.formatDate(statisticsQueryData.getEndTime(), "yyyy-MM-dd");
|
||||
|
@ -2706,12 +2706,12 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
public Result statisticsQueryBtn(Integer detectorId, String detectorName, Integer stationId, String statisticsType, Date startTime, Date endTime) {
|
||||
Result result = new Result();
|
||||
if (Objects.isNull(startTime)){
|
||||
result.error500("开始时间不能为空");
|
||||
result.error500("The start time cannot be empty");
|
||||
return result;
|
||||
}
|
||||
String startDate = DateUtils.formatDate(startTime, "yyyy-MM-dd");
|
||||
if (Objects.isNull(endTime)){
|
||||
result.error500("结束时间不能为空");
|
||||
result.error500("The end time cannot be empty");
|
||||
return result;
|
||||
}
|
||||
String endDate = DateUtils.formatDate(endTime, "yyyy-MM-dd");
|
||||
|
@ -2927,7 +2927,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}
|
||||
FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||
if (Objects.isNull(ftpClient)){
|
||||
result.error500("ftp连接失败");
|
||||
result.error500("ftp connection failed");
|
||||
return result;
|
||||
}
|
||||
InputStream inputStream = null;
|
||||
|
@ -3583,7 +3583,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
gasTmp = phdFileUtil.analyzeFile(gasPath, gasFileName);
|
||||
detTmp = phdFileUtil.analyzeFile(detPath, detFileName);
|
||||
if (Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp)) {
|
||||
result.error500("ftp文件获取失败!");
|
||||
result.error500("Failed to obtain the ftp file. Procedure!");
|
||||
return result;
|
||||
}
|
||||
map.put("sampleFileName", sampleFileName);
|
||||
|
|
|
@ -130,7 +130,7 @@ public class SysUserFocusStationServiceImpl extends ServiceImpl<SysUserFocusStat
|
|||
this.baseMapper.insert(sysUserFocusStation);
|
||||
}
|
||||
}
|
||||
result.success("新增成功");
|
||||
result.success("Save successfully");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,13 +81,13 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
|
|||
queryWrapper.eq(GardsDetectorsSystem::getDetectorCode, gardsDetectors.getDetectorCode());
|
||||
GardsDetectorsSystem detectors = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.nonNull(detectors)) {
|
||||
result.error500("当前数据已存在,新增失败!");
|
||||
result.error500("The current data already exists,Add failure!");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
gardsDetectors.setModdate(new Date());
|
||||
this.baseMapper.insert(gardsDetectors);
|
||||
result.success("新增成功");
|
||||
result.success("Save successfully");
|
||||
this.findDetectors();
|
||||
return result;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
|
|||
wrapper.eq(GardsDetectorsSystem::getDetectorId, gardsDetectors.getDetectorId());
|
||||
GardsDetectorsSystem stations = this.baseMapper.selectOne(wrapper);
|
||||
if (Objects.isNull(stations)) {
|
||||
result.error500("当前数据不存在,修改失败");
|
||||
result.error500("The current data does not exist,Modification failure");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(gardsDetectors.getDetectorCode())){
|
||||
|
@ -107,14 +107,14 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
|
|||
queryWrapper.eq(GardsDetectorsSystem::getDetectorCode, gardsDetectors.getDetectorCode());
|
||||
GardsDetectorsSystem detectors = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.nonNull(detectors) && !detectors.getDetectorId().equals(gardsDetectors.getDetectorId())) {
|
||||
result.error500("当前数据"+gardsDetectors.getDetectorCode()+"已存在,修改失败!");
|
||||
result.error500("Current data "+gardsDetectors.getDetectorCode()+" Already exist,Modification failure!");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
LambdaQueryWrapper<GardsDetectorsSystem> detectorsQueryWrapper = new LambdaQueryWrapper<>();
|
||||
detectorsQueryWrapper.eq(GardsDetectorsSystem::getDetectorId, gardsDetectors.getDetectorId());
|
||||
this.baseMapper.update(gardsDetectors, detectorsQueryWrapper);
|
||||
result.success("修改成功");
|
||||
result.success("Modified successfully");
|
||||
this.findDetectors();
|
||||
return result;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
|
|||
LambdaQueryWrapper<GardsDetectorsSystem> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(GardsDetectorsSystem::getDetectorId, id);
|
||||
this.baseMapper.delete(queryWrapper);
|
||||
result.success("删除成功");
|
||||
result.success("Successfully deleted");
|
||||
this.findDetectors();
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -75,12 +75,12 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
|
|||
queryWrapper.eq(GardsNuclearfacility::getFacilityName, gardsNuclearfacility.getFacilityName());
|
||||
GardsNuclearfacility nuclearfacility = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.nonNull(nuclearfacility)){
|
||||
result.error500("当前同名称的核设施已存在,新增失败");
|
||||
result.error500("At present, nuclear facilities with the same name already exist,Add failure");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
this.baseMapper.insert(gardsNuclearfacility);
|
||||
result.success("新增成功");
|
||||
result.success("Save successfully");
|
||||
this.findNuclearFacility();
|
||||
return result;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
|
|||
wrapper.eq(GardsNuclearfacility::getFacilityId,gardsNuclearfacility.getFacilityId());
|
||||
GardsNuclearfacility stations = this.baseMapper.selectOne(wrapper);
|
||||
if (Objects.isNull(stations)){
|
||||
result.error500("修改失败,当前数据不存在!");
|
||||
result.error500("Modification failure,The current data does not exist!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(gardsNuclearfacility.getFacilityName())){
|
||||
|
@ -101,14 +101,14 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
|
|||
queryWrapper.eq(GardsNuclearfacility::getFacilityName, gardsNuclearfacility.getFacilityName());
|
||||
GardsNuclearfacility nuclearfacility = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.nonNull(nuclearfacility) && !nuclearfacility.getFacilityId().equals(gardsNuclearfacility.getFacilityId())){
|
||||
result.error500("当前核设施"+gardsNuclearfacility.getFacilityName()+"已存在,修改失败");
|
||||
result.error500("Current nuclear facility "+gardsNuclearfacility.getFacilityName()+" Already exist,Modification failure");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
LambdaQueryWrapper<GardsNuclearfacility> nuclearfacilityQueryWrapper = new LambdaQueryWrapper<>();
|
||||
nuclearfacilityQueryWrapper.eq(GardsNuclearfacility::getFacilityId, gardsNuclearfacility.getFacilityId());
|
||||
this.baseMapper.update(gardsNuclearfacility, nuclearfacilityQueryWrapper);
|
||||
result.success("修改成功");
|
||||
result.success("Modified successfully");
|
||||
this.findNuclearFacility();
|
||||
return result;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
|
|||
LambdaQueryWrapper<GardsNuclearfacility> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(GardsNuclearfacility::getFacilityId, id);
|
||||
this.baseMapper.delete(queryWrapper);
|
||||
result.success("删除成功");
|
||||
result.success("Successfully deleted");
|
||||
this.findNuclearFacility();
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
|
|||
LambdaQueryWrapper<GardsSampleDataSystem> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(GardsSampleDataSystem::getSampleId, sampleId);
|
||||
this.baseMapper.delete(queryWrapper);
|
||||
result.success("删除成功");
|
||||
result.success("Successfully deleted");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,14 +98,14 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
|
|||
GardsStations stations = this.baseMapper.selectOne(queryWrapper);
|
||||
//如果数据不为空
|
||||
if (Objects.nonNull(stations)) {
|
||||
result.error500("当前台站信息已存在,新增失败");
|
||||
result.error500("The current station information already exists,Add failure");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
gardsStations.setModdate(new Date());
|
||||
this.baseMapper.insert(gardsStations);
|
||||
result.setSuccess(true);
|
||||
result.success("新增成功");
|
||||
result.success("Save successfully");
|
||||
this.getGardsStations();
|
||||
return result;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
|
|||
wrapper.eq(GardsStations::getStationId,gardsStations.getStationId());
|
||||
GardsStations stations = this.baseMapper.selectOne(wrapper);
|
||||
if (Objects.isNull(stations)){
|
||||
result.error500("修改失败,当前数据不存在!");
|
||||
result.error500("Modification failure,The current data does not exist!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(gardsStations.getStationCode())){
|
||||
|
@ -131,7 +131,7 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
|
|||
queryWrapper.eq(GardsStations::getStationCode,gardsStations.getStationCode());
|
||||
GardsStations oldStations = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.nonNull(oldStations) && !oldStations.getStationId().equals(gardsStations.getStationId())) {
|
||||
result.error500("当前台站信息"+gardsStations.getStationCode()+"已存在,修改失败");
|
||||
result.error500("Current station information "+gardsStations.getStationCode()+" Already exist,Modification failure");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
|
|||
stationsQueryWrapper.eq(GardsStations::getStationId,gardsStations.getStationId());
|
||||
this.baseMapper.update(gardsStations, stationsQueryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.success("修改成功");
|
||||
result.success("Modified successfully");
|
||||
this.getGardsStations();
|
||||
return result;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
|
|||
wrapper.eq(GardsStations::getStationId,stationId);
|
||||
this.baseMapper.delete(wrapper);
|
||||
result.setSuccess(true);
|
||||
result.success("删除成功");
|
||||
result.success("Successfully deleted");
|
||||
this.getGardsStations();
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
|
|||
}
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.success("新增成功");
|
||||
result.success("Save successfully");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
|
|||
}
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.success("修改成功");
|
||||
result.success("Modified successfully");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
|
|||
wrapper.eq(SysTaskSystem::getId, taskId);
|
||||
wrapper.eq(SysTaskSystem::getUserId, userId);
|
||||
this.baseMapper.delete(wrapper);
|
||||
result.success("删除成功");
|
||||
result.success("Successfully deleted");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,15 +74,15 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
|
|||
//获取redis中缓存的台站信息
|
||||
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
||||
if (StringUtils.isBlank(dataType)) {
|
||||
result.error500("数据类型不能为空");
|
||||
result.error500("The data type cannot be empty");
|
||||
return result;
|
||||
}
|
||||
if (Objects.isNull(startTime)){
|
||||
result.error500("开始时间不能为空");
|
||||
result.error500("The start time cannot be empty");
|
||||
return result;
|
||||
}
|
||||
if (Objects.isNull(endTime)){
|
||||
result.error500("结束时间不能为空");
|
||||
result.error500("The end time cannot be empty");
|
||||
return result;
|
||||
}
|
||||
if (Objects.isNull(stationIds)){
|
||||
|
|
Loading…
Reference in New Issue
Block a user