增加监测项目单个设备最近数据
This commit is contained in:
parent
aedc45bfa5
commit
a0bad0f31e
|
|
@ -59,9 +59,20 @@ public class BigScreenControllerP2 {
|
||||||
@PostMapping(value = "/survItemSummary")
|
@PostMapping(value = "/survItemSummary")
|
||||||
public Result<VOHisResult> survItemSummary(@RequestBody VOBigScreenSurvQ voBigScreenSurvQ) {
|
public Result<VOHisResult> survItemSummary(@RequestBody VOBigScreenSurvQ voBigScreenSurvQ) {
|
||||||
PollutionEnum pollutionEnum = PollutionEnum.catchPollution(voBigScreenSurvQ.getSurvItem());
|
PollutionEnum pollutionEnum = PollutionEnum.catchPollution(voBigScreenSurvQ.getSurvItem());
|
||||||
|
SurvDeviceDeploy deploy = null;
|
||||||
|
if(StringUtils.isNotBlank(voBigScreenSurvQ.getStationCode())){
|
||||||
|
deploy = survDeviceDeployService.getOne(Wrappers.<SurvDeviceDeploy>lambdaQuery()
|
||||||
|
.eq(SurvDeviceDeploy::getStationCode,voBigScreenSurvQ.getStationCode())
|
||||||
|
.like(SurvDeviceDeploy::getDeployType,pollutionEnum.getType())
|
||||||
|
.last("limit 1"));
|
||||||
|
} else if (StringUtils.isNotBlank(voBigScreenSurvQ.getDeployId())) {
|
||||||
|
deploy = survDeviceDeployService.getById(voBigScreenSurvQ.getDeployId());
|
||||||
|
}else {
|
||||||
|
deploy = survDeviceDeployService.getOne(Wrappers.<SurvDeviceDeploy>lambdaQuery()
|
||||||
|
.like(SurvDeviceDeploy::getDeployType,pollutionEnum.getType())
|
||||||
|
.last("limit 1"));
|
||||||
|
}
|
||||||
|
|
||||||
SurvDeviceDeploy deploy = survDeviceDeployService.getOne(Wrappers.<SurvDeviceDeploy>lambdaQuery()
|
|
||||||
.eq(SurvDeviceDeploy::getStationCode,voBigScreenSurvQ.getStationCode()).like(SurvDeviceDeploy::getDeployType,pollutionEnum.getType()).last("limit 1"));
|
|
||||||
Assert.notNull(deploy, "无效的设备");
|
Assert.notNull(deploy, "无效的设备");
|
||||||
LocalDateTime startDateTime = null;
|
LocalDateTime startDateTime = null;
|
||||||
LocalDateTime endDateTime = null;
|
LocalDateTime endDateTime = null;
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ import lombok.Data;
|
||||||
public class VOBigScreenSurvQ {
|
public class VOBigScreenSurvQ {
|
||||||
@ApiModelProperty("站点编号")
|
@ApiModelProperty("站点编号")
|
||||||
private String stationCode;
|
private String stationCode;
|
||||||
|
@ApiModelProperty("设备ID")
|
||||||
|
private String deployId;
|
||||||
@ApiModelProperty("检测项的变量名")
|
@ApiModelProperty("检测项的变量名")
|
||||||
private String survItem;
|
private String survItem;
|
||||||
@ApiModelProperty("开始时间")
|
@ApiModelProperty("开始时间")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue