Merge remote-tracking branch 'origin/station' into station

This commit is contained in:
nieziyan 2023-10-23 10:41:09 +08:00
commit 6e40dce95c
12 changed files with 142 additions and 133 deletions

View File

@ -3109,13 +3109,15 @@ public class GammaFileUtil extends AbstractLogOrReport {
qsScacPath = qsScacPath.replace(StringPool.BACK_SLASH, StringPool.SLASH); qsScacPath = qsScacPath.replace(StringPool.BACK_SLASH, StringPool.SLASH);
String savePath = StringPool.SLASH + spectrumPathProperties.getSaveFilePath();
String rootPath = spectrumPathProperties.getRootPath();
String qsSaveBaseLine = StringPool.SLASH+spectrumPathProperties.getSaveFilePath()+StringPool.SLASH+qsBaseLinePath; String qsSaveBaseLine = savePath + StringPool.SLASH + qsBaseLinePath;
String qsSaveLc = StringPool.SLASH+spectrumPathProperties.getSaveFilePath()+StringPool.SLASH+qsLcPath; String qsSaveLc = savePath + StringPool.SLASH + qsLcPath;
String qsSaveScac = StringPool.SLASH+spectrumPathProperties.getSaveFilePath()+StringPool.SLASH+qsScacPath; String qsSaveScac = savePath + StringPool.SLASH + qsScacPath;
GammaReportUtil.writeFile(fileAnlyse.getBaseCtrls(), qsSaveBaseLine); GammaReportUtil.writeFile(fileAnlyse.getBaseCtrls(), rootPath + qsSaveBaseLine);
GammaReportUtil.writeFile(fileAnlyse.getVLc(), "LC", qsSaveLc); GammaReportUtil.writeFile(fileAnlyse.getVLc(), "LC", rootPath + qsSaveLc);
GammaReportUtil.writeFile(fileAnlyse.getVScac(), "SCSC", qsSaveScac); GammaReportUtil.writeFile(fileAnlyse.getVScac(), "SCSC", rootPath + qsSaveScac);
double totalNumber = 0.0; double totalNumber = 0.0;
for(int m=0;m<fileAnlyse.getSpec().getCounts().size();m++) { for(int m=0;m<fileAnlyse.getSpec().getCounts().size();m++) {
@ -4183,6 +4185,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
} }
public File analyzeFile(String path, String fileName) { public File analyzeFile(String path, String fileName) {
path = path.replace("\\", "/");
//连接ftp //连接ftp
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
InputStream inputStream = null; InputStream inputStream = null;

View File

@ -76,6 +76,7 @@ public class GammaController {
} }
@PostMapping("configureSave") @PostMapping("configureSave")
@ApiOperation(value = "analyze菜单下configure页面数据保存按钮", notes = "analyze菜单下configure页面数据保存按钮")
public Result configureSave(@RequestBody ConfigureData configureData, HttpServletRequest request) { public Result configureSave(@RequestBody ConfigureData configureData, HttpServletRequest request) {
return gammaService.configureSave(configureData, request); return gammaService.configureSave(configureData, request);
} }

View File

@ -14,7 +14,6 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringPool; import com.baomidou.mybatisplus.core.toolkit.StringPool;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import io.minio.credentials.Jwt;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import com.google.common.cache.Cache; import com.google.common.cache.Cache;
@ -148,7 +147,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
//根据sampleId获取sample文件路径 //根据sampleId获取sample文件路径
String sampleFilePath = spectrumAnalysisMapper.getSampleFilePath(sampleId); String sampleFilePath = spectrumAnalysisMapper.getSampleFilePath(sampleId);
if (StringUtils.isBlank(sampleFilePath)){ if (StringUtils.isBlank(sampleFilePath)){
result.error500("样品文件不存在!"); result.error500("Sample file does not exist!");
return result; return result;
} }
String pathName = StringPool.SLASH + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH + sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH)); 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()); phd.setXmlFilePath(parameterProperties.getFilePath());
String systemType = fileName.substring(2, 3); String systemType = fileName.substring(2, 3);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
//查询当前用户关联的核素信息 //查询当前用户关联的核素信息
@ -421,7 +420,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
//根据sampleId获取sample文件路径 //根据sampleId获取sample文件路径
String sampleFilePath = spectrumAnalysisMapper.getSampleFilePath(sampleId); String sampleFilePath = spectrumAnalysisMapper.getSampleFilePath(sampleId);
if (StringUtils.isBlank(sampleFilePath)){ if (StringUtils.isBlank(sampleFilePath)){
result.error500("样品文件不存在!"); result.error500("Sample file does not exist!");
return result; return result;
} }
//切割数据库存储的文件路径获取路径信息 //切割数据库存储的文件路径获取路径信息
@ -828,7 +827,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
long m_nCount = phd.getSpec().getNum_g_channel(); 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(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
long m_nCount = phd.getSpec().getNum_g_channel(); 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(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
@ -928,7 +927,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
SpecSetup phdSetting = phd.getSetting(); SpecSetup phdSetting = phd.getSetting();
@ -946,7 +945,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
phdSetting.setRefTime_act(configureData.getRefTime_act()); phdSetting.setRefTime_act(configureData.getRefTime_act());
phdSetting.setRefTime_conc(configureData.getRefTime_conc()); phdSetting.setRefTime_conc(configureData.getRefTime_conc());
map.put("checkBox_updateCal", phd.getSetting().isBUpdateCal()); map.put("checkBox_updateCal", phd.getSetting().isBUpdateCal());
result.success("保存成功"); result.success("Save successfully");
result.setResult(map); result.setResult(map);
return result; return result;
} }
@ -958,7 +957,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
//获取当前用户信息 //获取当前用户信息
@ -1048,7 +1047,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, String> colorMap = sysUserColorService.initColor(userName); Map<String, String> colorMap = sysUserColorService.initColor(userName);
@ -1100,7 +1099,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
//判断当前选中的channel是否在正常允许范围内 //判断当前选中的channel是否在正常允许范围内
@ -1264,7 +1263,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
try { try {
@ -1396,7 +1395,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, String> colorMap = sysUserColorService.initColor(userName); Map<String, String> colorMap = sysUserColorService.initColor(userName);
@ -1435,7 +1434,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
//判断当前phd文件对应的peak的数据是否小于1 //判断当前phd文件对应的peak的数据是否小于1
@ -1483,7 +1482,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if(phd.getVPeak().size() < 1){ if(phd.getVPeak().size() < 1){
@ -1520,12 +1519,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
//获取需要新增的核素名称 //获取需要新增的核素名称
if(StringUtils.isBlank(nuclideName)) { if(StringUtils.isBlank(nuclideName)) {
result.error500("核素名称不能为空"); result.error500("The nuclide name cannot be empty");
return result; return result;
} }
//判断当前用户的核素列表是否有核素信息 如果不为空就返回 不进行改变 //判断当前用户的核素列表是否有核素信息 如果不为空就返回 不进行改变
@ -1576,7 +1575,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
int index = list_identify.indexOf(nuclideName); int index = list_identify.indexOf(nuclideName);
@ -1608,14 +1607,14 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if(curRow >= 0 && curRow < phd.getVPeak().size()) { if(curRow >= 0 && curRow < phd.getVPeak().size()) {
result.setSuccess(true); result.setSuccess(true);
result.setResult(phd.getVPeak().get(curRow).comments); result.setResult(phd.getVPeak().get(curRow).comments);
} else { } else {
result.error500("请先选择要添加注释的峰"); result.error500("Please first select the peak to which you want to add comments");
} }
return result; return result;
} }
@ -1628,7 +1627,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if(curRow >= 0 && curRow < phd.getVPeak().size()) { if(curRow >= 0 && curRow < phd.getVPeak().size()) {
@ -1638,7 +1637,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
result.setSuccess(true); result.setSuccess(true);
result.setResult(map); result.setResult(map);
} else { } else {
result.error500("请先选择要添加注释的峰"); result.error500("Please first select the peak to which you want to add comments");
} }
return result; return result;
} }
@ -1650,7 +1649,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
result.setSuccess(true); result.setSuccess(true);
@ -1665,7 +1664,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (StringUtils.isNotBlank(comments)) { if (StringUtils.isNotBlank(comments)) {
@ -1685,7 +1684,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, String> colorMap = sysUserColorService.initColor(userName); Map<String, String> colorMap = sysUserColorService.initColor(userName);
@ -1779,7 +1778,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, String> colorMap = sysUserColorService.initColor(userName); Map<String, String> colorMap = sysUserColorService.initColor(userName);
@ -1797,7 +1796,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, String> colorMap = sysUserColorService.initColor(userName); Map<String, String> colorMap = sysUserColorService.initColor(userName);
@ -1841,7 +1840,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
List<Long> m_vCount = new LinkedList<>(); List<Long> m_vCount = new LinkedList<>();
@ -1892,7 +1891,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
// if(baseLineCtrls.getBaseStack().size() > 1) { // if(baseLineCtrls.getBaseStack().size() > 1) {
@ -2365,7 +2364,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (StringUtils.isBlank(currentText)) { if (StringUtils.isBlank(currentText)) {
@ -2419,7 +2418,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
DataChangeEnergy(m_vCurCentroid, m_vCurEnergy, m_vCurUncert, m_curParam, phd, width, map); 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(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if(!curCalName.contains("Input")) { if(!curCalName.contains("Input")) {
@ -2535,7 +2534,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (Objects.nonNull(file)) { if (Objects.nonNull(file)) {
@ -2629,7 +2628,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (StringUtils.isNotBlank(currentName)) { if (StringUtils.isNotBlank(currentName)) {
@ -2637,7 +2636,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
} }
phdCache.put(fileName, phd); phdCache.put(fileName, phd);
localCache.setPHDCache(phdCache); localCache.setPHDCache(phdCache);
result.success("修改成功"); result.success("Modified successfully");
return result; return result;
} }
@ -2649,7 +2648,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (StringUtils.isBlank(currentText)) { if (StringUtils.isBlank(currentText)) {
@ -2703,7 +2702,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
DataChangeResolution(m_vCurReso, m_vCurEnergy, m_vCurUncert, m_curParam, phd, width, map); 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(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if(!curCalName.contains("Input")) { if(!curCalName.contains("Input")) {
@ -2808,7 +2807,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (Objects.nonNull(file)) { if (Objects.nonNull(file)) {
@ -2902,7 +2901,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (StringUtils.isNotBlank(currentName)) { if (StringUtils.isNotBlank(currentName)) {
@ -2910,7 +2909,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
} }
phdCache.put(fileName, phd); phdCache.put(fileName, phd);
localCache.setPHDCache(phdCache); localCache.setPHDCache(phdCache);
result.success("修改成功"); result.success("Modified successfully");
return result; return result;
} }
@ -2931,7 +2930,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (StringUtils.isBlank(currentText)) { if (StringUtils.isBlank(currentText)) {
@ -2985,7 +2984,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
DataChangeEfficiency(m_vCurEffi, m_vCurEnergy, m_vCurUncert, m_curParam, funcId, phd, width, map); 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(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if(!curCalName.contains("Input")) { if(!curCalName.contains("Input")) {
@ -3091,7 +3090,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(sampleFileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (Objects.nonNull(file)) { if (Objects.nonNull(file)) {
@ -3197,7 +3196,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (StringUtils.isNotBlank(currentName)) { if (StringUtils.isNotBlank(currentName)) {
@ -3205,7 +3204,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
} }
phdCache.put(fileName, phd); phdCache.put(fileName, phd);
localCache.setPHDCache(phdCache); localCache.setPHDCache(phdCache);
result.success("修改成功"); result.success("Modified successfully");
return result; return result;
} }
@ -3217,7 +3216,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
List<String> nuclides = new LinkedList<>(); List<String> nuclides = new LinkedList<>();
@ -3371,7 +3370,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
List<String> nuclides = spectrumAnalysisMapper.getNuclideNames("CONFIGURATION.GARDS_NUCL_LIB"); 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(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if (CollectionUtils.isEmpty(userLibraryName)) { if (CollectionUtils.isEmpty(userLibraryName)) {
@ -3403,9 +3402,9 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
userLibraryName = userLibraryName.stream().distinct().collect(Collectors.toList()); userLibraryName = userLibraryName.stream().distinct().collect(Collectors.toList());
boolean save = defaultNuclideSpectrumService.saveNuclidesByUserName(userLibraryName, userName, phd.getHeader().getSystem_type().toUpperCase()); boolean save = defaultNuclideSpectrumService.saveNuclidesByUserName(userLibraryName, userName, phd.getHeader().getSystem_type().toUpperCase());
if (save) { if (save) {
result.success("修改成功"); result.success("Modified successfully");
} else { } else {
result.success("修改失败"); result.success("Modification failure");
} }
return result; return result;
} }
@ -3418,7 +3417,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
String temp = phd.getOriTotalCmt().trim(); String temp = phd.getOriTotalCmt().trim();
@ -3446,13 +3445,13 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
if(StringUtils.isNotBlank(comment)) { if(StringUtils.isNotBlank(comment)) {
phd.setTotalCmt(comment); phd.setTotalCmt(comment);
} }
result.success("修改成功"); result.success("Modified successfully");
return result; return result;
} }
@ -3462,7 +3461,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
List<PeakInfo> vPeak = phd.getVPeak(); List<PeakInfo> vPeak = phd.getVPeak();
@ -3610,7 +3609,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
String reportContent = gammaFileUtil.GetReportContent(phd, false); String reportContent = gammaFileUtil.GetReportContent(phd, false);
@ -3656,7 +3655,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, Object> map = gammaFileUtil.UpdateDatasNuclideActivity(phd.getMapNucActMda(), phd.getUsedSetting().getRefTime_act(), phd.getUsedSetting().getRefTime_conc()); 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(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
String spectrum = gammaFileUtil.makeUpSpectrum(phd); String spectrum = gammaFileUtil.makeUpSpectrum(phd);
@ -3708,7 +3707,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
@ -3766,7 +3765,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, QcCheckItem> m_mapQC = phd.getQcItems(); Map<String, QcCheckItem> m_mapQC = phd.getQcItems();
@ -3849,7 +3848,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
@ -4144,7 +4143,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
String reportContent = gammaFileUtil.GetReportContent(phd, true); String reportContent = gammaFileUtil.GetReportContent(phd, true);
@ -4160,7 +4159,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)){ if (Objects.isNull(phd)){
result.error500("请先选择解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
int size = phd.getVPeak().size(); int size = phd.getVPeak().size();
@ -4207,7 +4206,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
Cache<String, PHDFile> phdCache = localCache.getPHDCache(); Cache<String, PHDFile> phdCache = localCache.getPHDCache();
PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName); PHDFile phd = phdCache.getIfPresent(fileName+"-"+userName);
if (Objects.isNull(phd)) { if (Objects.isNull(phd)) {
result.error500("请先解析文件"); result.error500("Please select the parse file first");
return result; return result;
} }
//查看分析员是否有权限操作当前台站信息 //查看分析员是否有权限操作当前台站信息
@ -4539,7 +4538,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
peakInfoDto.setNuclides(nuclide); peakInfoDto.setNuclides(nuclide);
peakInfoDtos.add(peakInfoDto); peakInfoDtos.add(peakInfoDto);
} }
data.put("peak", peakInfoDtos); data.put("peakInfoDto", peakInfoDtos);
/* The Results of Nuclide Identify */ /* The Results of Nuclide Identify */
// 获取所有核素名称 去重 // 获取所有核素名称 去重
List<String> nuclides = peakInfos.stream() List<String> nuclides = peakInfos.stream()
@ -4610,9 +4609,15 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
nuclideActs.add(nuclideActMdaDto); nuclideActs.add(nuclideActMdaDto);
} }
data.put("nuclideActs", nuclideActs); 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(); String template = SAVETOEXCEL_G.getName();
// 导出时使用默认文件名 file.xls // 导出时使用默认文件名 file.xls
ExportUtil.exportXls(response, template, data); ExportUtil.exportXls(response, template, data, xlsFileName);
} }
@Override @Override

View File

@ -116,12 +116,12 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
List<String> menuTypeList = Arrays.asList(menuTypes); List<String> menuTypeList = Arrays.asList(menuTypes);
//查询谱对应的台站类型 //查询谱对应的台站类型
if (CollectionUtils.isEmpty(menuTypeList)){ if (CollectionUtils.isEmpty(menuTypeList)){
result.error500("谱类型不能为空"); result.error500("The spectrum type cannot be empty");
return result; return result;
} }
List<String> stationTypes = sysDictService.findStationType(menuTypeList); List<String> stationTypes = sysDictService.findStationType(menuTypeList);
if (CollectionUtils.isEmpty(stationTypes)) { 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; return result;
} }
List<String> userStations = new LinkedList<>(); List<String> userStations = new LinkedList<>();
@ -129,7 +129,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
if (Objects.nonNull(AllUsers) && !AllUsers){ if (Objects.nonNull(AllUsers) && !AllUsers){
String userName = JwtUtil.getUserNameByToken(request); String userName = JwtUtil.getUserNameByToken(request);
if (StringUtils.isBlank(userName)){ if (StringUtils.isBlank(userName)){
result.error500("当前登录用户信息获取失败"); result.error500("Description Failed to obtain the current login user information");
return result; return result;
} }
userStations = userTaskUtil.findUserStation(userName); userStations = userTaskUtil.findUserStation(userName);
@ -139,7 +139,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
}else if (dbName.equalsIgnoreCase("man")){ }else if (dbName.equalsIgnoreCase("man")){
dbName = "RNMAN.GARDS_ANALYSES"; dbName = "RNMAN.GARDS_ANALYSES";
}else { }else {
result.error500("数据库类型不存在"); result.error500("The database type does not exist");
return result; return result;
} }
List<GardsSampleDataSpectrum> sampleData = spectrumAnalysisMapper.getDBSearchList(dbName, stationTypes, userStations, AllUsers); 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) { 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(); Result result = new Result();
if (Objects.isNull(startDate)){ if (Objects.isNull(startDate)){
result.error500("开始时间不能为空"); result.error500("The start time cannot be empty");
return result; return result;
} }
String startTime = DateUtils.formatDate(startDate, "yyyy-MM-dd") + " 00:00:00"; String startTime = DateUtils.formatDate(startDate, "yyyy-MM-dd") + " 00:00:00";
if (Objects.isNull(endDate)) { if (Objects.isNull(endDate)) {
result.error500("结束时间不能为空"); result.error500("The end time cannot be empty");
return result; return result;
} }
String endTime = DateUtils.formatDate(endDate, "yyyy-MM-dd") + " 23:59:59"; String endTime = DateUtils.formatDate(endDate, "yyyy-MM-dd") + " 23:59:59";
List<String> menuTypeList = Arrays.asList(menuTypes); List<String> menuTypeList = Arrays.asList(menuTypes);
if (CollectionUtils.isEmpty(menuTypeList)){ if (CollectionUtils.isEmpty(menuTypeList)){
result.error500("谱类型不能为空"); result.error500("The spectrum type cannot be empty");
return result; return result;
} }
List<String> stationTypes = sysDictService.findStationType(menuTypeList); List<String> stationTypes = sysDictService.findStationType(menuTypeList);
if (CollectionUtils.isEmpty(stationTypes)) { 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; return result;
} }
if (StringUtils.isBlank(dbName)){ if (StringUtils.isBlank(dbName)){
result.error500("请勾选数据库类型"); result.error500("Please select the database type");
return result; return result;
} }
String tempDBName = dbName; String tempDBName = dbName;
@ -190,14 +190,14 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
}else if (dbName.equalsIgnoreCase("man")){ }else if (dbName.equalsIgnoreCase("man")){
dbName = "RNMAN.GARDS_ANALYSES"; dbName = "RNMAN.GARDS_ANALYSES";
}else { }else {
result.error500("数据库类型不存在"); result.error500("The database type does not exist");
return result; return result;
} }
List<String> userStations = new LinkedList<>(); List<String> userStations = new LinkedList<>();
if (Objects.nonNull(AllUsers) && !AllUsers){ if (Objects.nonNull(AllUsers) && !AllUsers){
String userName = JwtUtil.getUserNameByToken(request); String userName = JwtUtil.getUserNameByToken(request);
if (StringUtils.isBlank(userName)){ if (StringUtils.isBlank(userName)){
result.error500("当前登录用户信息获取失败"); result.error500("Description Failed to obtain the current login user information");
return result; return result;
} }
userStations = userTaskUtil.findUserStation(userName); userStations = userTaskUtil.findUserStation(userName);
@ -238,7 +238,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
//查询sampleFile文件内容信息 获取文件内容 获取大致的gas det文件名称 //查询sampleFile文件内容信息 获取文件内容 获取大致的gas det文件名称
Map<String, String> fileData = phdFileUtil.getFileData(filePath, matchFileName); Map<String, String> fileData = phdFileUtil.getFileData(filePath, matchFileName);
if (CollectionUtils.isEmpty(fileData)) { if (CollectionUtils.isEmpty(fileData)) {
result.error500("ftp文件查询失败"); result.error500("Failed to query the ftp file. Procedure");
return result; return result;
} }
String sampleFileName = fileData.get("sampleFileName"); String sampleFileName = fileData.get("sampleFileName");
@ -309,7 +309,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
List<Boundary> detBoundary = new LinkedList<>(); List<Boundary> detBoundary = new LinkedList<>();
List<Boundary> qcBoundary = new LinkedList<>(); List<Boundary> qcBoundary = new LinkedList<>();
if (Objects.isNull(sampleId)){ if (Objects.isNull(sampleId)){
result.error500("请选择一条数据"); result.error500("Please select a piece of data");
return result; return result;
} }
Integer analysisID = null; Integer analysisID = null;
@ -322,7 +322,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
analysisID = spectrumAnalysisMapper.getAnalysisID(dbName, sampleId, userName); analysisID = spectrumAnalysisMapper.getAnalysisID(dbName, sampleId, userName);
xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId); xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId);
}else { }else {
result.error500("数据库类型不存在"); result.error500("The database type does not exist");
return result; return result;
} }
//查询数据库文件信息 //查询数据库文件信息
@ -610,7 +610,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
//连接ftp //连接ftp
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){ if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败"); result.error500("ftp connection failed");
return result; return result;
} }
InputStream inputStream = null; InputStream inputStream = null;
@ -1289,7 +1289,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
if (StringUtils.isNotBlank(sampleFileName)){ if (StringUtils.isNotBlank(sampleFileName)){
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){ if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败"); result.error500("ftp connection failed");
return result; return result;
} }
InputStream inputStream = null; InputStream inputStream = null;
@ -1457,7 +1457,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
gasTmp = phdFileUtil.analyzeFile(path, gasFileName); gasTmp = phdFileUtil.analyzeFile(path, gasFileName);
detTmp = phdFileUtil.analyzeFile(path, detFileName); detTmp = phdFileUtil.analyzeFile(path, detFileName);
if ( Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp) ) { if ( Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp) ) {
result.error500("ftp下文件不存在"); result.error500("The file under ftp does not exist");
return result; return result;
} }
xeDataList = phdFileUtil.analyzeQCResultXe(sampleTmp, gasTmp, detTmp); xeDataList = phdFileUtil.analyzeQCResultXe(sampleTmp, gasTmp, detTmp);
@ -1570,7 +1570,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
List<GardsXeResultsSpectrum> xeDataList = new LinkedList<>(); List<GardsXeResultsSpectrum> xeDataList = new LinkedList<>();
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){ if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败"); result.error500("ftp connection failed");
return result; return result;
} }
InputStream inputStream = null; InputStream inputStream = null;
@ -1596,7 +1596,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
gasTmp = phdFileUtil.analyzeFile(path, gasFileName); gasTmp = phdFileUtil.analyzeFile(path, gasFileName);
detTmp = phdFileUtil.analyzeFile(path, detFileName); detTmp = phdFileUtil.analyzeFile(path, detFileName);
if ( Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp) ) { if ( Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp) ) {
result.error500("ftp下文件不存在"); result.error500("The file under ftp does not exist");
return result; return result;
} }
xeDataList = phdFileUtil.analyzeQCResultXe(sampleTmp, gasTmp, detTmp); xeDataList = phdFileUtil.analyzeQCResultXe(sampleTmp, gasTmp, detTmp);
@ -1710,7 +1710,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
} }
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){ if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败"); result.error500("ftp connection failed");
return result; return result;
} }
InputStream inputStream = null; InputStream inputStream = null;
@ -1856,7 +1856,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
} }
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){ if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败"); result.error500("ftp connection failed");
return result; return result;
} }
InputStream inputStream = null; InputStream inputStream = null;
@ -1999,7 +1999,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
} }
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){ if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败"); result.error500("ftp connection failed");
return result; return result;
} }
InputStream inputStream = null; InputStream inputStream = null;
@ -2409,7 +2409,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
} }
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){ if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败"); result.error500("ftp connection failed");
return result; return result;
} }
InputStream inputStream = null; InputStream inputStream = null;
@ -2436,13 +2436,13 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
//根据台站id查询台站名称 //根据台站id查询台站名称
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
if (CollectionUtils.isEmpty(stationMap)){ if (CollectionUtils.isEmpty(stationMap)){
result.error500("台站缓存信息为空!"); result.error500("The station cache information is empty!");
return result; return result;
} }
List<String> stationNames = stationMap.values().stream().collect(Collectors.toList()); List<String> stationNames = stationMap.values().stream().collect(Collectors.toList());
int index = stationNames.indexOf(stationName); int index = stationNames.indexOf(stationName);
if (index<0){ if (index<0){
result.error500("台站信息不存在!"); result.error500("The station information does not exist!");
return result; return result;
} }
List<Integer> stationIds = stationMap.keySet().stream().collect(Collectors.toList()); List<Integer> stationIds = stationMap.keySet().stream().collect(Collectors.toList());
@ -2488,13 +2488,13 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
//根据台站id查询台站名称 //根据台站id查询台站名称
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
if (CollectionUtils.isEmpty(stationMap)){ if (CollectionUtils.isEmpty(stationMap)){
result.error500("台站缓存信息为空!"); result.error500("The station cache information is empty!");
return result; return result;
} }
List<String> stationNames = stationMap.values().stream().collect(Collectors.toList()); List<String> stationNames = stationMap.values().stream().collect(Collectors.toList());
int index = stationNames.indexOf(stationName); int index = stationNames.indexOf(stationName);
if (index<0){ if (index<0){
result.error500("台站信息不存在!"); result.error500("The station information does not exist!");
return result; return result;
} }
List<Integer> stationIds = stationMap.keySet().stream().collect(Collectors.toList()); List<Integer> stationIds = stationMap.keySet().stream().collect(Collectors.toList());
@ -2518,13 +2518,13 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
public Result statisticsQuery(StatisticsQueryData statisticsQueryData) { public Result statisticsQuery(StatisticsQueryData statisticsQueryData) {
Result result = new Result(); Result result = new Result();
if (Objects.isNull(statisticsQueryData.getStartTime())){ if (Objects.isNull(statisticsQueryData.getStartTime())){
result.error500("开始时间不能为空"); result.error500("The start time cannot be empty");
return result; return result;
} }
String startDate = DateUtils.formatDate(statisticsQueryData.getStartTime(), "yyyy-MM-dd"); String startDate = DateUtils.formatDate(statisticsQueryData.getStartTime(), "yyyy-MM-dd");
statisticsQueryData.setStartDate(startDate); statisticsQueryData.setStartDate(startDate);
if (Objects.isNull(statisticsQueryData.getEndTime())){ if (Objects.isNull(statisticsQueryData.getEndTime())){
result.error500("结束时间不能为空"); result.error500("The end time cannot be empty");
return result; return result;
} }
String endDate = DateUtils.formatDate(statisticsQueryData.getEndTime(), "yyyy-MM-dd"); 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) { public Result statisticsQueryBtn(Integer detectorId, String detectorName, Integer stationId, String statisticsType, Date startTime, Date endTime) {
Result result = new Result(); Result result = new Result();
if (Objects.isNull(startTime)){ if (Objects.isNull(startTime)){
result.error500("开始时间不能为空"); result.error500("The start time cannot be empty");
return result; return result;
} }
String startDate = DateUtils.formatDate(startTime, "yyyy-MM-dd"); String startDate = DateUtils.formatDate(startTime, "yyyy-MM-dd");
if (Objects.isNull(endTime)){ if (Objects.isNull(endTime)){
result.error500("结束时间不能为空"); result.error500("The end time cannot be empty");
return result; return result;
} }
String endDate = DateUtils.formatDate(endTime, "yyyy-MM-dd"); String endDate = DateUtils.formatDate(endTime, "yyyy-MM-dd");
@ -2927,7 +2927,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
} }
FTPClient ftpClient = ftpUtil.LoginFTP(); FTPClient ftpClient = ftpUtil.LoginFTP();
if (Objects.isNull(ftpClient)){ if (Objects.isNull(ftpClient)){
result.error500("ftp连接失败"); result.error500("ftp connection failed");
return result; return result;
} }
InputStream inputStream = null; InputStream inputStream = null;
@ -3583,7 +3583,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
gasTmp = phdFileUtil.analyzeFile(gasPath, gasFileName); gasTmp = phdFileUtil.analyzeFile(gasPath, gasFileName);
detTmp = phdFileUtil.analyzeFile(detPath, detFileName); detTmp = phdFileUtil.analyzeFile(detPath, detFileName);
if (Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp)) { if (Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp)) {
result.error500("ftp文件获取失败"); result.error500("Failed to obtain the ftp file. Procedure");
return result; return result;
} }
map.put("sampleFileName", sampleFileName); map.put("sampleFileName", sampleFileName);

View File

@ -130,7 +130,7 @@ public class SysUserFocusStationServiceImpl extends ServiceImpl<SysUserFocusStat
this.baseMapper.insert(sysUserFocusStation); this.baseMapper.insert(sysUserFocusStation);
} }
} }
result.success("新增成功"); result.success("Save successfully");
return result; return result;
} }

View File

@ -81,13 +81,13 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
queryWrapper.eq(GardsDetectorsSystem::getDetectorCode, gardsDetectors.getDetectorCode()); queryWrapper.eq(GardsDetectorsSystem::getDetectorCode, gardsDetectors.getDetectorCode());
GardsDetectorsSystem detectors = this.baseMapper.selectOne(queryWrapper); GardsDetectorsSystem detectors = this.baseMapper.selectOne(queryWrapper);
if (Objects.nonNull(detectors)) { if (Objects.nonNull(detectors)) {
result.error500("当前数据已存在,新增失败"); result.error500("The current data already existsAdd failure");
return result; return result;
} }
} }
gardsDetectors.setModdate(new Date()); gardsDetectors.setModdate(new Date());
this.baseMapper.insert(gardsDetectors); this.baseMapper.insert(gardsDetectors);
result.success("新增成功"); result.success("Save successfully");
this.findDetectors(); this.findDetectors();
return result; return result;
} }
@ -99,7 +99,7 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
wrapper.eq(GardsDetectorsSystem::getDetectorId, gardsDetectors.getDetectorId()); wrapper.eq(GardsDetectorsSystem::getDetectorId, gardsDetectors.getDetectorId());
GardsDetectorsSystem stations = this.baseMapper.selectOne(wrapper); GardsDetectorsSystem stations = this.baseMapper.selectOne(wrapper);
if (Objects.isNull(stations)) { if (Objects.isNull(stations)) {
result.error500("当前数据不存在,修改失败"); result.error500("The current data does not existModification failure");
return result; return result;
} }
if (StringUtils.isNotBlank(gardsDetectors.getDetectorCode())){ if (StringUtils.isNotBlank(gardsDetectors.getDetectorCode())){
@ -107,14 +107,14 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
queryWrapper.eq(GardsDetectorsSystem::getDetectorCode, gardsDetectors.getDetectorCode()); queryWrapper.eq(GardsDetectorsSystem::getDetectorCode, gardsDetectors.getDetectorCode());
GardsDetectorsSystem detectors = this.baseMapper.selectOne(queryWrapper); GardsDetectorsSystem detectors = this.baseMapper.selectOne(queryWrapper);
if (Objects.nonNull(detectors) && !detectors.getDetectorId().equals(gardsDetectors.getDetectorId())) { if (Objects.nonNull(detectors) && !detectors.getDetectorId().equals(gardsDetectors.getDetectorId())) {
result.error500("当前数据"+gardsDetectors.getDetectorCode()+"已存在,修改失败"); result.error500("Current data "+gardsDetectors.getDetectorCode()+" Already existModification failure");
return result; return result;
} }
} }
LambdaQueryWrapper<GardsDetectorsSystem> detectorsQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsDetectorsSystem> detectorsQueryWrapper = new LambdaQueryWrapper<>();
detectorsQueryWrapper.eq(GardsDetectorsSystem::getDetectorId, gardsDetectors.getDetectorId()); detectorsQueryWrapper.eq(GardsDetectorsSystem::getDetectorId, gardsDetectors.getDetectorId());
this.baseMapper.update(gardsDetectors, detectorsQueryWrapper); this.baseMapper.update(gardsDetectors, detectorsQueryWrapper);
result.success("修改成功"); result.success("Modified successfully");
this.findDetectors(); this.findDetectors();
return result; return result;
} }
@ -125,7 +125,7 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
LambdaQueryWrapper<GardsDetectorsSystem> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsDetectorsSystem> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(GardsDetectorsSystem::getDetectorId, id); queryWrapper.eq(GardsDetectorsSystem::getDetectorId, id);
this.baseMapper.delete(queryWrapper); this.baseMapper.delete(queryWrapper);
result.success("删除成功"); result.success("Successfully deleted");
this.findDetectors(); this.findDetectors();
return result; return result;
} }

View File

@ -75,12 +75,12 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
queryWrapper.eq(GardsNuclearfacility::getFacilityName, gardsNuclearfacility.getFacilityName()); queryWrapper.eq(GardsNuclearfacility::getFacilityName, gardsNuclearfacility.getFacilityName());
GardsNuclearfacility nuclearfacility = this.baseMapper.selectOne(queryWrapper); GardsNuclearfacility nuclearfacility = this.baseMapper.selectOne(queryWrapper);
if (Objects.nonNull(nuclearfacility)){ if (Objects.nonNull(nuclearfacility)){
result.error500("当前同名称的核设施已存在,新增失败"); result.error500("At present, nuclear facilities with the same name already existAdd failure");
return result; return result;
} }
} }
this.baseMapper.insert(gardsNuclearfacility); this.baseMapper.insert(gardsNuclearfacility);
result.success("新增成功"); result.success("Save successfully");
this.findNuclearFacility(); this.findNuclearFacility();
return result; return result;
} }
@ -93,7 +93,7 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
wrapper.eq(GardsNuclearfacility::getFacilityId,gardsNuclearfacility.getFacilityId()); wrapper.eq(GardsNuclearfacility::getFacilityId,gardsNuclearfacility.getFacilityId());
GardsNuclearfacility stations = this.baseMapper.selectOne(wrapper); GardsNuclearfacility stations = this.baseMapper.selectOne(wrapper);
if (Objects.isNull(stations)){ if (Objects.isNull(stations)){
result.error500("修改失败,当前数据不存在"); result.error500("Modification failureThe current data does not exist");
return result; return result;
} }
if (StringUtils.isNotBlank(gardsNuclearfacility.getFacilityName())){ if (StringUtils.isNotBlank(gardsNuclearfacility.getFacilityName())){
@ -101,14 +101,14 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
queryWrapper.eq(GardsNuclearfacility::getFacilityName, gardsNuclearfacility.getFacilityName()); queryWrapper.eq(GardsNuclearfacility::getFacilityName, gardsNuclearfacility.getFacilityName());
GardsNuclearfacility nuclearfacility = this.baseMapper.selectOne(queryWrapper); GardsNuclearfacility nuclearfacility = this.baseMapper.selectOne(queryWrapper);
if (Objects.nonNull(nuclearfacility) && !nuclearfacility.getFacilityId().equals(gardsNuclearfacility.getFacilityId())){ if (Objects.nonNull(nuclearfacility) && !nuclearfacility.getFacilityId().equals(gardsNuclearfacility.getFacilityId())){
result.error500("当前核设施"+gardsNuclearfacility.getFacilityName()+"已存在,修改失败"); result.error500("Current nuclear facility "+gardsNuclearfacility.getFacilityName()+" Already existModification failure");
return result; return result;
} }
} }
LambdaQueryWrapper<GardsNuclearfacility> nuclearfacilityQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsNuclearfacility> nuclearfacilityQueryWrapper = new LambdaQueryWrapper<>();
nuclearfacilityQueryWrapper.eq(GardsNuclearfacility::getFacilityId, gardsNuclearfacility.getFacilityId()); nuclearfacilityQueryWrapper.eq(GardsNuclearfacility::getFacilityId, gardsNuclearfacility.getFacilityId());
this.baseMapper.update(gardsNuclearfacility, nuclearfacilityQueryWrapper); this.baseMapper.update(gardsNuclearfacility, nuclearfacilityQueryWrapper);
result.success("修改成功"); result.success("Modified successfully");
this.findNuclearFacility(); this.findNuclearFacility();
return result; return result;
} }
@ -120,7 +120,7 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
LambdaQueryWrapper<GardsNuclearfacility> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsNuclearfacility> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(GardsNuclearfacility::getFacilityId, id); queryWrapper.eq(GardsNuclearfacility::getFacilityId, id);
this.baseMapper.delete(queryWrapper); this.baseMapper.delete(queryWrapper);
result.success("删除成功"); result.success("Successfully deleted");
this.findNuclearFacility(); this.findNuclearFacility();
return result; return result;
} }

View File

@ -68,7 +68,7 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
LambdaQueryWrapper<GardsSampleDataSystem> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GardsSampleDataSystem> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(GardsSampleDataSystem::getSampleId, sampleId); queryWrapper.eq(GardsSampleDataSystem::getSampleId, sampleId);
this.baseMapper.delete(queryWrapper); this.baseMapper.delete(queryWrapper);
result.success("删除成功"); result.success("Successfully deleted");
return result; return result;
} }

View File

@ -98,14 +98,14 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
GardsStations stations = this.baseMapper.selectOne(queryWrapper); GardsStations stations = this.baseMapper.selectOne(queryWrapper);
//如果数据不为空 //如果数据不为空
if (Objects.nonNull(stations)) { if (Objects.nonNull(stations)) {
result.error500("当前台站信息已存在,新增失败"); result.error500("The current station information already existsAdd failure");
return result; return result;
} }
} }
gardsStations.setModdate(new Date()); gardsStations.setModdate(new Date());
this.baseMapper.insert(gardsStations); this.baseMapper.insert(gardsStations);
result.setSuccess(true); result.setSuccess(true);
result.success("新增成功"); result.success("Save successfully");
this.getGardsStations(); this.getGardsStations();
return result; return result;
} }
@ -122,7 +122,7 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
wrapper.eq(GardsStations::getStationId,gardsStations.getStationId()); wrapper.eq(GardsStations::getStationId,gardsStations.getStationId());
GardsStations stations = this.baseMapper.selectOne(wrapper); GardsStations stations = this.baseMapper.selectOne(wrapper);
if (Objects.isNull(stations)){ if (Objects.isNull(stations)){
result.error500("修改失败,当前数据不存在"); result.error500("Modification failureThe current data does not exist");
return result; return result;
} }
if (StringUtils.isNotBlank(gardsStations.getStationCode())){ if (StringUtils.isNotBlank(gardsStations.getStationCode())){
@ -131,7 +131,7 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
queryWrapper.eq(GardsStations::getStationCode,gardsStations.getStationCode()); queryWrapper.eq(GardsStations::getStationCode,gardsStations.getStationCode());
GardsStations oldStations = this.baseMapper.selectOne(queryWrapper); GardsStations oldStations = this.baseMapper.selectOne(queryWrapper);
if (Objects.nonNull(oldStations) && !oldStations.getStationId().equals(gardsStations.getStationId())) { if (Objects.nonNull(oldStations) && !oldStations.getStationId().equals(gardsStations.getStationId())) {
result.error500("当前台站信息"+gardsStations.getStationCode()+"已存在,修改失败"); result.error500("Current station information "+gardsStations.getStationCode()+" Already existModification failure");
return result; return result;
} }
} }
@ -139,7 +139,7 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
stationsQueryWrapper.eq(GardsStations::getStationId,gardsStations.getStationId()); stationsQueryWrapper.eq(GardsStations::getStationId,gardsStations.getStationId());
this.baseMapper.update(gardsStations, stationsQueryWrapper); this.baseMapper.update(gardsStations, stationsQueryWrapper);
result.setSuccess(true); result.setSuccess(true);
result.success("修改成功"); result.success("Modified successfully");
this.getGardsStations(); this.getGardsStations();
return result; return result;
} }
@ -156,7 +156,7 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
wrapper.eq(GardsStations::getStationId,stationId); wrapper.eq(GardsStations::getStationId,stationId);
this.baseMapper.delete(wrapper); this.baseMapper.delete(wrapper);
result.setSuccess(true); result.setSuccess(true);
result.success("删除成功"); result.success("Successfully deleted");
this.getGardsStations(); this.getGardsStations();
return result; return result;
} }

View File

@ -206,7 +206,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
} }
} }
result.setSuccess(true); result.setSuccess(true);
result.success("新增成功"); result.success("Save successfully");
return result; return result;
} }
@ -243,7 +243,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
} }
} }
result.setSuccess(true); result.setSuccess(true);
result.success("修改成功"); result.success("Modified successfully");
return result; return result;
} }
@ -280,7 +280,7 @@ public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTaskSystem
wrapper.eq(SysTaskSystem::getId, taskId); wrapper.eq(SysTaskSystem::getId, taskId);
wrapper.eq(SysTaskSystem::getUserId, userId); wrapper.eq(SysTaskSystem::getUserId, userId);
this.baseMapper.delete(wrapper); this.baseMapper.delete(wrapper);
result.success("删除成功"); result.success("Successfully deleted");
return result; return result;
} }

View File

@ -74,15 +74,15 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
//获取redis中缓存的台站信息 //获取redis中缓存的台站信息
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap"); Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
if (StringUtils.isBlank(dataType)) { if (StringUtils.isBlank(dataType)) {
result.error500("数据类型不能为空"); result.error500("The data type cannot be empty");
return result; return result;
} }
if (Objects.isNull(startTime)){ if (Objects.isNull(startTime)){
result.error500("开始时间不能为空"); result.error500("The start time cannot be empty");
return result; return result;
} }
if (Objects.isNull(endTime)){ if (Objects.isNull(endTime)){
result.error500("结束时间不能为空"); result.error500("The end time cannot be empty");
return result; return result;
} }
if (Objects.isNull(stationIds)){ if (Objects.isNull(stationIds)){