包头修改配置去掉天气
This commit is contained in:
parent
c89c0dd3d6
commit
4a5064d82d
@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import com.gexin.fastjson.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@ -37,7 +39,8 @@ import java.util.Map;
|
||||
public class AirQualityAnalysisController {
|
||||
@Autowired
|
||||
private IAirQualityAnalysisService airQualityAnalysisService;
|
||||
|
||||
@Value("${enableTianqi:0}")
|
||||
private Integer enableTianqi;
|
||||
|
||||
/**
|
||||
* 添加
|
||||
@ -61,7 +64,6 @@ public class AirQualityAnalysisController {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
@ -78,7 +80,6 @@ public class AirQualityAnalysisController {
|
||||
return Result.success(airQualityAnalysis);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "当天空气质量统计", notes = "当天空气质量统计", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ -90,7 +91,6 @@ public class AirQualityAnalysisController {
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询天气-周", notes = "查询天气-周", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "cityid", value = "市区编码", paramType = "body", required = false, dataType = "String"),
|
||||
@ -98,6 +98,9 @@ public class AirQualityAnalysisController {
|
||||
})
|
||||
@PostMapping(value = "/getWeatherData")
|
||||
public Result<String> getWeatherData(@RequestBody Map<String, Object> map) {
|
||||
if (Objects.equals(enableTianqi, 0)) {
|
||||
return Result.ok();
|
||||
}
|
||||
return Result.success(airQualityAnalysisService.getWeatherData(map));
|
||||
}
|
||||
|
||||
@ -107,6 +110,9 @@ public class AirQualityAnalysisController {
|
||||
})
|
||||
@PostMapping(value = "/getWeatherLiveData")
|
||||
public Result<Object> getWeatherLiveData(@RequestBody Map<String, Object> map) {
|
||||
if (Objects.equals(enableTianqi, 0)) {
|
||||
return Result.ok();
|
||||
}
|
||||
return Result.success(airQualityAnalysisService.getWeatherLiveData(MapUtils.getString(map, "cityid")));
|
||||
}
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -23,6 +24,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/rainBigScreen")
|
||||
@ -37,6 +39,8 @@ public class RainBigScreenController {
|
||||
private IRainAlarmService rainAlarmService;
|
||||
@Autowired
|
||||
private IAirQualityAnalysisService airQualityAnalysisService;
|
||||
@Value("${enableTianqi:0}")
|
||||
private Integer enableTianqi;
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@ -54,7 +58,6 @@ public class RainBigScreenController {
|
||||
return Result.success(airQualityAnalysis);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "当天空气质量统计", notes = "当天空气质量统计", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ -73,6 +76,9 @@ public class RainBigScreenController {
|
||||
})
|
||||
@PostMapping(value = "/getWeatherData")
|
||||
public Result<String> getWeatherData(@RequestBody Map<String, Object> map) {
|
||||
if (Objects.equals(enableTianqi, 0)) {
|
||||
return Result.ok();
|
||||
}
|
||||
return Result.success(airQualityAnalysisService.getWeatherData(map));
|
||||
}
|
||||
|
||||
|
||||
@ -326,7 +326,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
@Override
|
||||
public IPage<WorkerInfo> selectWorkerInfoList(Map<String, Object> map) {
|
||||
int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString());
|
||||
int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10000).toString());
|
||||
int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 50000).toString());
|
||||
map.put("workerInfoGreenScore", PropertiesUtil.getWorkerInfoGreenScore());
|
||||
map.put("workerInfoRedScore", PropertiesUtil.getWorkerInfoRedScore());
|
||||
if (SecurityUtils.getUser() != null) {
|
||||
|
||||
@ -219,3 +219,4 @@ h5.exam.url=http://192.168.34.133:20626/#/pages/personLocation/login/login?examP
|
||||
facePass=1
|
||||
#logback-spring.xml指定配置路径
|
||||
#logging.config=/root/java/logback-spring.xml
|
||||
enableTianqi=0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user