feat:自建台站AUX表增加GPS信息
This commit is contained in:
parent
55b14e66b6
commit
108f2db587
|
@ -1,9 +1,11 @@
|
|||
package org.jeecg.common.util;
|
||||
|
||||
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.SystemType;
|
||||
import org.jeecg.modules.entity.vo.PHDFile;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -18,21 +20,22 @@ import java.util.Map;
|
|||
@Component
|
||||
public class NameStandUtil {
|
||||
|
||||
@Autowired
|
||||
private SpectrumPathProperties pathProperties;
|
||||
|
||||
public String GetSysTemSubdir(String systemType) {
|
||||
StringBuffer path = new StringBuffer();
|
||||
String path = null;
|
||||
Map<String, String> pathMap = pathProperties.getFilePathMap();
|
||||
if(systemType.contains(SystemType.BETA.getType())) {
|
||||
path.append("Spectrum");
|
||||
path.append(StringPool.SLASH+"Xenon");
|
||||
path.append(StringPool.SLASH+"Sauna");
|
||||
path = pathMap.getOrDefault(SystemType.BETA.getType(), "Spectrum/Xenon/Sauna");
|
||||
} else if(systemType.contains(SystemType.GAMMA.getType())) {
|
||||
path.append("Spectrum");
|
||||
path.append(StringPool.SLASH+"Xenon");
|
||||
path.append(StringPool.SLASH+"Spalax");
|
||||
path = pathMap.getOrDefault(SystemType.GAMMA.getType(), "Spectrum/Xenon/Spalax");
|
||||
} else if(systemType.contains(SystemType.PARTICULATE.getType())) {
|
||||
path.append("Spectrum");
|
||||
path.append(StringPool.SLASH+"Particulates");
|
||||
path = pathMap.getOrDefault(SystemType.PARTICULATE.getType(), "Spectrum/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){
|
||||
|
|
|
@ -97,4 +97,10 @@ public class GardsSampleAux implements Serializable {
|
|||
*/
|
||||
@TableField(value = "XE_COLLECTION_YIED_UNCER")
|
||||
private Double xeCollectionYiedUncer;
|
||||
|
||||
@TableField("LON")
|
||||
private Double lon;
|
||||
|
||||
@TableField("LAT")
|
||||
private Double lat;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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.original.GardsSampleAux;
|
||||
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.mapper.GardsSampleAuxMapper;
|
||||
import org.jeecg.modules.mapper.GardsSampleDataMapper;
|
||||
|
@ -122,6 +125,14 @@ public class SpectrumBaseBlockServiceImpl implements ISpectrumBaseBlockService {
|
|||
gardsSampleAux.setXeCollectionYied(struct.Xe_collection_yield);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,9 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
|||
Sample_B_Analysis bAnalysis = new Sample_B_Analysis(this);
|
||||
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.analysis();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user