| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -8,15 +8,15 @@ import com.alibaba.excel.read.metadata.ReadSheet;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.beust.jcommander.internal.Nullable;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.mete.geoserver.GeoServerConfig;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.config.LayerDispConfig;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.config.MyGeoServerConfig;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.entity.*;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.entity.vo.ret.ElementValueRet;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.exception.ParamsException;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.mapper.TGeoserverinfoMapper;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.mapper.TSamplingDataDetailsMapper;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.mapper.TSiteBaseInfoMapper;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.mapper.radi_chn_mul_horMapper;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.model.poi.listener.ExcelUtil;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.model.poi.listener.ImportExcelListener;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import com.cuit.solarenergy.model.poi.listener.head.DataManageExcelModel;
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -67,9 +67,6 @@ public class DataImportServiceImpl implements DataImportService {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    LayerDispConfig layerDispConfig;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    @Autowired
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    MyGeoServerConfig mygeoServerConfig;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    @Autowired
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    radi_chn_mul_horMapper radichnmulhorMapper;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -464,10 +461,14 @@ public class DataImportServiceImpl implements DataImportService {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    @Override
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    public List<ElementRet> getElementInfo() {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    public List<String> getElementInfo() {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        try {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            List<ElementRet> elementInfo = new ArrayList<>();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            elementInfo = radichnmulhorMapper.getElementInfo();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            List<String> elementInfo = new ArrayList<>();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            elementInfo.add("辐射最大值");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            elementInfo.add("辐射最小值");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            elementInfo.add("紫外线最大值");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            elementInfo.add("紫外线最小值");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            elementInfo.add("日辐射量");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            return elementInfo;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }catch (ParamsException e){
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            return null;
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -475,31 +476,35 @@ public class DataImportServiceImpl implements DataImportService {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    @Override
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    public List<ElementValue> getValueByElement(String element) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				       Map<String, String> elementMap = new HashMap<String, String>() {{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("总辐射辐照度", "V14311");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("净辐射辐照度", "V14312");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("直接辐射辐照度", "V14313");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("散射辐射辐照度", "V14314");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("反射辐射辐照度", "V14315");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    public List<String> getValueByElement(String element) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        List retValue;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        try {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        List<ElementValue> retValue = new ArrayList<>();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        // 检查传入的中文element是否在映射关系中
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        String mappedElementCode = elementMap.get(element);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        if (mappedElementCode != null) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            // 如果在映射关系中,使用对应的英文代码去查询数据库
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            retValue = tSamplingDataDetailsMapper.getValueByElement(element); // 这里传入的是中文元素名称
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        if (retValue != null && !retValue.isEmpty()) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            return retValue;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            retValue = new ArrayList<>();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            switch (element) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                case "辐射最大值":
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    retValue.add(10);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    break;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                case "辐射最小值":
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    retValue.add(1);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    break;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                case "紫外线最大值":
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    retValue.add(20);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    break;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                case "紫外线最小值":
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    retValue.add(2);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    break;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                case "日辐射量":
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    retValue.add(5);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    break;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                default:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    retValue = null;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    break;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        } catch (ParamsException e) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        throw new RuntimeException("Failed to get element info", e);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            return null;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        return retValue;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    @Override
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    public List<MonitorRet> getMonitorInfo() {
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -584,41 +589,6 @@ public class DataImportServiceImpl implements DataImportService {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        return baseMapVoRetList;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    @Override
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    public List<ElementValueRet> getElementStatus(String element) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				     Map<String, String> elementMap = new HashMap<String, String>() {{
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("总辐射辐照度", "V14311");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("净辐射辐照度", "V14312");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("直接辐射辐照度", "V14313");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("散射辐射辐照度", "V14314");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        put("反射辐射辐照度", "V14315");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }};
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    try {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        List<ElementValueRet> retValue = new ArrayList<>();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        // 检查传入的中文element是否在映射关系中
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        String mappedElementCode = elementMap.get(element);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        if (mappedElementCode == null) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            // 如果映射关系中没有对应的代码,返回空列表或者抛出异常
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            return retValue; // 或者抛出一个自定义异常
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        // 如果在映射关系中,使用对应的英文代码去查询数据库
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        List<ElementValueRet> dbValues = tSamplingDataDetailsMapper.getElementStatus(mappedElementCode);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        if (dbValues != null) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            for (ElementValueRet value : dbValues) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                if (value != null) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    // 设置status为"正常"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    value.setStatus("正常");
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    retValue.add(value);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        return retValue;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    } catch (ParamsException e) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        throw new RuntimeException("Failed to get element info", e);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    private String getURL(TGeoserverinfo geoBasedatageoserverinfo) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        String url = "";
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        String geoServerURL = "";
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |