Commit e3ca3dd3 authored by duanruiming's avatar duanruiming

Revert "[update] test"

This reverts commit 381789aa.
parent 381789aa
......@@ -4,7 +4,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import net.wanji.common.framework.rest.JsonViewObject;
import net.wanji.databus.bo.CrossIdBO;
import net.wanji.databus.vo.GreenwaveListVO;
......@@ -32,7 +31,6 @@ import java.util.List;
@Api(value = "TrendController", description = "态势监测")
@RequestMapping("/trend")
@RestController
@Slf4j
public class TrendController {
private final TrendServiceImpl trendService;
......@@ -288,10 +286,7 @@ public class TrendController {
@ApiResponse(code = 200, message = "OK", response = TableQueryVO.CycleDataElement.class),
})
public JsonViewObject laneTrafficIndex(@RequestBody CommonCrossIdDateTimeVO crossIdDateTimeVO) throws Exception {
long l = System.currentTimeMillis();
List<TableQueryVO.CycleDataElement> result = trendService.laneTrafficIndex(crossIdDateTimeVO);
long l1 = System.currentTimeMillis();
log.error("接口调用时间== " + (l1 - l)/1000);
return JsonViewObject.newInstance().success(result);
}
......
......@@ -40,7 +40,6 @@ import net.wanji.opt.service.TrendService;
import net.wanji.opt.service.es.LaneSnapshotDataQueryService;
import net.wanji.opt.vo.*;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -1973,32 +1972,8 @@ public class TrendServiceImpl implements TrendService {
int start = (int) (crossIdDateTimeVO.getStart().getTime() / 1000);
int end = (int) (crossIdDateTimeVO.getEnd().getTime() / 1000);
LambdaQueryWrapper<CrossBaseLaneInfoPO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CrossBaseLaneInfoPO::getCrossId, crossId);
List<CrossBaseLaneInfoPO> crossBaseLaneInfoPOS = crossBaseLaneInfoMapper.selectList(queryWrapper);
// 查询周期数据
LambdaQueryWrapper<CrossLaneDataHistPO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CrossLaneDataHistPO::getCrossId, crossId);
wrapper.between(CrossLaneDataHistPO::getBatchTime, start, end);
long l = System.currentTimeMillis();
List<CrossLaneDataHistPO> crossLaneDataHistPOS = crossLaneDataHistMapper.selectList(wrapper);
List<CrossLaneDataHistPOExt> poExtList = new ArrayList<>(crossLaneDataHistPOS.size());
if (!CollectionUtils.isEmpty(crossLaneDataHistPOS) && !CollectionUtils.isEmpty(crossBaseLaneInfoPOS)) {
for (CrossLaneDataHistPO po : crossLaneDataHistPOS) {
CrossLaneDataHistPOExt crossLaneDataHistPOExt = new CrossLaneDataHistPOExt();
BeanUtils.copyProperties(po, crossLaneDataHistPOExt);
for (CrossBaseLaneInfoPO laneInfoPO : crossBaseLaneInfoPOS) {
if (StringUtils.equalsIgnoreCase(po.getCrossId(), laneInfoPO.getCrossId())) {
crossLaneDataHistPOExt.setDir(laneInfoPO.getDir());
crossLaneDataHistPOExt.setTurn(laneInfoPO.getTurn());
crossLaneDataHistPOExt.setSort(laneInfoPO.getSort());
poExtList.add(crossLaneDataHistPOExt);
}
}
}
}
long l1 = System.currentTimeMillis();
log.error("实体复制需要时间:", ((l1 - l) / 1000));
List<CrossLaneDataHistPOExt> poExtList = crossLaneDataHistMapper.selectByCrossIdAndTimeSpan(crossId, start, end);
return buildCycleData(crossId, poExtList);
} catch (Exception e) {
log.error("车道数据查询异常:", e);
......
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