feat:自建台站AUX表增加GPS信息

This commit is contained in:
nieziyan 2024-07-19 16:11:10 +08:00
parent 55b14e66b6
commit 108f2db587
4 changed files with 33 additions and 11 deletions

View File

@ -1,9 +1,11 @@
package org.jeecg.common.util; package org.jeecg.common.util;
import com.baomidou.mybatisplus.core.toolkit.StringPool; import com.baomidou.mybatisplus.core.toolkit.StringPool;
import org.jeecg.common.properties.SpectrumPathProperties;
import org.jeecg.modules.base.enums.DataType; import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.base.enums.SystemType; import org.jeecg.modules.base.enums.SystemType;
import org.jeecg.modules.entity.vo.PHDFile; import org.jeecg.modules.entity.vo.PHDFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -18,21 +20,22 @@ import java.util.Map;
@Component @Component
public class NameStandUtil { public class NameStandUtil {
@Autowired
private SpectrumPathProperties pathProperties;
public String GetSysTemSubdir(String systemType) { public String GetSysTemSubdir(String systemType) {
StringBuffer path = new StringBuffer(); String path = null;
Map<String, String> pathMap = pathProperties.getFilePathMap();
if(systemType.contains(SystemType.BETA.getType())) { if(systemType.contains(SystemType.BETA.getType())) {
path.append("Spectrum"); path = pathMap.getOrDefault(SystemType.BETA.getType(), "Spectrum/Xenon/Sauna");
path.append(StringPool.SLASH+"Xenon");
path.append(StringPool.SLASH+"Sauna");
} else if(systemType.contains(SystemType.GAMMA.getType())) { } else if(systemType.contains(SystemType.GAMMA.getType())) {
path.append("Spectrum"); path = pathMap.getOrDefault(SystemType.GAMMA.getType(), "Spectrum/Xenon/Spalax");
path.append(StringPool.SLASH+"Xenon");
path.append(StringPool.SLASH+"Spalax");
} else if(systemType.contains(SystemType.PARTICULATE.getType())) { } else if(systemType.contains(SystemType.PARTICULATE.getType())) {
path.append("Spectrum"); path = pathMap.getOrDefault(SystemType.PARTICULATE.getType(), "Spectrum/Particulates");
path.append(StringPool.SLASH+"Particulates"); } else if(systemType.contains(SystemType.WATER.getType())) {
path = pathMap.getOrDefault(SystemType.WATER.getType(), "Spectrum/Water");
} }
return path.toString(); return path;
} }
public String GetDateTypeSubdir(String dataType){ public String GetDateTypeSubdir(String dataType){

View File

@ -97,4 +97,10 @@ public class GardsSampleAux implements Serializable {
*/ */
@TableField(value = "XE_COLLECTION_YIED_UNCER") @TableField(value = "XE_COLLECTION_YIED_UNCER")
private Double xeCollectionYiedUncer; private Double xeCollectionYiedUncer;
@TableField("LON")
private Double lon;
@TableField("LAT")
private Double lat;
} }

View File

@ -1,5 +1,7 @@
package org.jeecg.modules.service.impl; package org.jeecg.modules.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.constant.StringConstant; import org.jeecg.common.constant.StringConstant;
@ -8,6 +10,7 @@ import org.jeecg.modules.base.entity.configuration.GardsDetectors;
import org.jeecg.modules.base.entity.configuration.GardsStations; import org.jeecg.modules.base.entity.configuration.GardsStations;
import org.jeecg.modules.base.entity.original.GardsSampleAux; import org.jeecg.modules.base.entity.original.GardsSampleAux;
import org.jeecg.modules.base.entity.original.GardsSampleData; import org.jeecg.modules.base.entity.original.GardsSampleData;
import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.file.FileOperation; import org.jeecg.modules.file.FileOperation;
import org.jeecg.modules.mapper.GardsSampleAuxMapper; import org.jeecg.modules.mapper.GardsSampleAuxMapper;
import org.jeecg.modules.mapper.GardsSampleDataMapper; import org.jeecg.modules.mapper.GardsSampleDataMapper;
@ -122,6 +125,14 @@ public class SpectrumBaseBlockServiceImpl implements ISpectrumBaseBlockService {
gardsSampleAux.setXeCollectionYied(struct.Xe_collection_yield); gardsSampleAux.setXeCollectionYied(struct.Xe_collection_yield);
gardsSampleAux.setXeCollectionYiedUncer(struct.uncertainty_2); gardsSampleAux.setXeCollectionYiedUncer(struct.uncertainty_2);
// 如果是样品谱类型 自建台站谱需要存储GPS坐标信息 其它样品谱GPS坐标为0
String dataType = struct.data_type;
if (StrUtil.contains(dataType, DataType.SAMPLEPHD.getType())
|| StrUtil.contains(dataType, DataType.SPHDF.getType())
|| StrUtil.contains(dataType, DataType.SPHDP.getType())){
gardsSampleAux.setLon(struct.lon);
gardsSampleAux.setLat(struct.lat);
}
this.sampleAuxMapper.insert(gardsSampleAux); this.sampleAuxMapper.insert(gardsSampleAux);
} }
} }

View File

@ -110,7 +110,9 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
Sample_B_Analysis bAnalysis = new Sample_B_Analysis(this); Sample_B_Analysis bAnalysis = new Sample_B_Analysis(this);
bAnalysis.analysis(); bAnalysis.analysis();
} }
if (this.sourceData.system_type.equals(SystemType.PARTICULATE.getType()) || this.sourceData.system_type.equals(SystemType.GAMMA.getType())) { if (this.sourceData.system_type.equals(SystemType.PARTICULATE.getType())
|| this.sourceData.system_type.equals(SystemType.GAMMA.getType())
|| this.sourceData.system_type.equals(SystemType.WATER.getType())) {
Sample_G_Analysis sample_g_analysis = new Sample_G_Analysis(this, super.sourceData, super.spectrumServiceQuotes, super.sampleData); Sample_G_Analysis sample_g_analysis = new Sample_G_Analysis(this, super.sourceData, super.spectrumServiceQuotes, super.sampleData);
sample_g_analysis.analysis(); sample_g_analysis.analysis();
} }