Commit d8b3ba6e authored by duanruiming's avatar duanruiming

[update] 济南测试平台-转向数据优化

parent c3340a83
...@@ -309,8 +309,8 @@ public class TrendController { ...@@ -309,8 +309,8 @@ public class TrendController {
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = List.class), @ApiResponse(code = 200, message = "OK", response = List.class),
}) })
public JsonViewObject lanePeriodTurnData(@RequestBody CommonCrossIdDateTimeVO crossIdDateTimeVO) throws Exception { public JsonViewObject lanePeriodTurnData(@RequestBody LanePeriodTurnVO lanePeriodTurnVO) throws Exception {
List<AnalysisRidTurnIndicators> result = trendService.lanePeriodTurnData(crossIdDateTimeVO); List<AnalysisRidTurnIndicators> result = trendService.lanePeriodTurnData(lanePeriodTurnVO);
return JsonViewObject.newInstance().success(result); return JsonViewObject.newInstance().success(result);
} }
} }
\ No newline at end of file
...@@ -62,5 +62,5 @@ public interface TrendService { ...@@ -62,5 +62,5 @@ public interface TrendService {
List<TableQueryVO.RealTimeDataElement> laneSnapshotIndex(CommonCrossIdDateTimeVO crossIdDateTimeVO) throws Exception; List<TableQueryVO.RealTimeDataElement> laneSnapshotIndex(CommonCrossIdDateTimeVO crossIdDateTimeVO) throws Exception;
List<AnalysisRidTurnIndicators> lanePeriodTurnData(CommonCrossIdDateTimeVO crossIdDateTimeVO) throws Exception; List<AnalysisRidTurnIndicators> lanePeriodTurnData(LanePeriodTurnVO lanePeriodTurnVO) throws Exception;
} }
...@@ -1968,12 +1968,17 @@ public class TrendServiceImpl implements TrendService { ...@@ -1968,12 +1968,17 @@ public class TrendServiceImpl implements TrendService {
} }
@Override @Override
public List<AnalysisRidTurnIndicators> lanePeriodTurnData(CommonCrossIdDateTimeVO crossIdDateTimeVO) throws Exception { public List<AnalysisRidTurnIndicators> lanePeriodTurnData(LanePeriodTurnVO lanePeriodTurnVO) throws Exception {
String crossId = crossIdDateTimeVO.getCrossId(); String crossId = lanePeriodTurnVO.getCrossId();
Date start = crossIdDateTimeVO.getStart(); Date start = lanePeriodTurnVO.getStart();
Date end = crossIdDateTimeVO.getEnd(); Date end = lanePeriodTurnVO.getEnd();
String granularity = lanePeriodTurnVO.getGranularity();
if (StringUtils.isBlank(granularity)) {
granularity = "5m";
}
LambdaQueryWrapper<AnalysisRidTurnIndicators> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<AnalysisRidTurnIndicators> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(AnalysisRidTurnIndicators::getCrossId, crossId); queryWrapper.eq(AnalysisRidTurnIndicators::getCrossId, crossId);
queryWrapper.eq(AnalysisRidTurnIndicators::getGranularity, granularity);
queryWrapper.between(AnalysisRidTurnIndicators::getRuksj, start, end); queryWrapper.between(AnalysisRidTurnIndicators::getRuksj, start, end);
return ridTurnIndicatorsMapper.selectList(queryWrapper); return ridTurnIndicatorsMapper.selectList(queryWrapper);
} }
......
package net.wanji.opt.vo;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author duanruiming
* @date 2024/05/17 9:00
*/
@Data
@NoArgsConstructor
@ApiModel(value = "LanePeriodTurnVO")
public class LanePeriodTurnVO extends CommonCrossIdDateTimeVO {
@ApiModelProperty(value = "分析粒度【5m:五分钟 10m:10分钟 30m:30分钟 1h:一小时】")
@JsonProperty
private String granularity;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment