| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -8,11 +8,9 @@ import com.cuit.solarenergy.entity.TGeoserverinfo;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.entity.vo.req.SolarPredicReq;
 | 
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.entity.vo.req.SolarPredicReq;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.entity.vo.ret.RetResponse;
 | 
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.entity.vo.ret.RetResponse;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.entity.vo.ret.RetResult;
 | 
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.entity.vo.ret.RetResult;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.entity.vo.ret.SituationRet;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.exception.ParamsException;
 | 
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.exception.ParamsException;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.service.DataImportService;
 | 
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.service.DataImportService;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.service.GeoServerPubService;
 | 
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.service.GeoServerPubService;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.service.SituationService;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.service.SolarenergyService;
 | 
					 | 
					 | 
					 | 
					import com.cuit.solarenergy.service.SolarenergyService;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.github.xiaoymin.knife4j.annotations.ApiSupport;
 | 
					 | 
					 | 
					 | 
					import com.github.xiaoymin.knife4j.annotations.ApiSupport;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import io.swagger.annotations.*;
 | 
					 | 
					 | 
					 | 
					import io.swagger.annotations.*;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -41,8 +39,6 @@ public class SimulAndPredicController {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    GeoServerPubService geoServerPubService;
 | 
					 | 
					 | 
					 | 
					    GeoServerPubService geoServerPubService;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @Autowired
 | 
					 | 
					 | 
					 | 
					    @Autowired
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private DataImportService dataImportService;
 | 
					 | 
					 | 
					 | 
					    private DataImportService dataImportService;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @Autowired
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    SituationService situationService;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @AopLog
 | 
					 | 
					 | 
					 | 
					    @AopLog
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @AuthToken
 | 
					 | 
					 | 
					 | 
					    @AuthToken
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -109,36 +105,14 @@ public class SimulAndPredicController {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //2.发布geoserverter服务并存入数据库
 | 
					 | 
					 | 
					 | 
					            //2.发布geoserverter服务并存入数据库
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            Long aLong = geoServerPubService.pubGeoServerAndSavetoDB("style_tynday", "EPSG:3857",pathFile, solarReq.getRegionname());
 | 
					 | 
					 | 
					 | 
					            Long aLong = geoServerPubService.pubGeoServerAndSavetoDB("style_tynday", "EPSG:3857",pathFile, solarReq.getRegionname());
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (Objects.isNull(aLong)|| aLong == -1){
 | 
					 | 
					 | 
					 | 
					            if (Objects.isNull(aLong)|| aLong == -1){
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return RetResponse.makeErrRsp("太阳能日总辐射预报服务有误");
 | 
					 | 
					 | 
					 | 
					                return RetResponse.makeErrRsp("太阳能日总辐射实时模拟服务有误");
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //3.查询tif
 | 
					 | 
					 | 
					 | 
					            //3.查询tif
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            log.info("Tif查询");
 | 
					 | 
					 | 
					 | 
					            log.info("Tif查询");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            TGeoserverinfo regionInfo = dataImportService.getTifByRegionAndTime(solarReq.getRegionname());
 | 
					 | 
					 | 
					 | 
					            TGeoserverinfo regionInfo = dataImportService.getTifByRegionAndTime(solarReq.getRegionname());
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return RetResponse.makeOKRsp(regionInfo);
 | 
					 | 
					 | 
					 | 
					            return RetResponse.makeOKRsp(regionInfo);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }catch (RuntimeException e){
 | 
					 | 
					 | 
					 | 
					        }catch (RuntimeException e){
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return RetResponse.makeErrRsp("太阳能日总辐射预报有误!"+e.getMessage());
 | 
					 | 
					 | 
					 | 
					            return RetResponse.makeErrRsp("太阳能日总辐射实时模拟有误!"+e.getMessage());
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @AopLog
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @AuthToken
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @ApiOperation("3、总体影响情况")
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @PreAuthorize("hasAuthority('minio:upload')")
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @RequestMapping(value = "/solarenergy/getGerneralSituation", method = {RequestMethod.GET})
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @ApiResponses({
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            @ApiResponse(code = 200, message = "成功"),
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            @ApiResponse(code = 401, message = "访问未经授权"),
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            @ApiResponse(code = 403, message = "访问被禁止的"),
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            @ApiResponse(code = 404, message = "未找到访问接口"),
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            @ApiResponse(code = 500, message = "服务器内部错误"),
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            @ApiResponse(code = 900, message = "失败")
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    })
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public RetResult<List<SituationRet>> getGerneralSituation() {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        try {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            List<SituationRet> situations = situationService.getSituations();
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return RetResponse.makeOKRsp(situations);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }catch (RuntimeException e){
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return RetResponse.makeErrRsp("总体影响情况有误!"+e.getMessage());
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |