添加人流测试点接口
This commit is contained in:
parent
bb6029cce9
commit
1721ee0f9b
|
@ -1,30 +0,0 @@
|
||||||
package com.hisense.monitormanage.controller;
|
|
||||||
|
|
||||||
import com.hisense.monitormanage.entity.Result;
|
|
||||||
import com.hisense.monitormanage.service.PassengerFlowService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@Api("实时人流")
|
|
||||||
@RequestMapping("api/project/passenger")
|
|
||||||
public class PassengerFlowController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private PassengerFlowService passengerFlowService;
|
|
||||||
|
|
||||||
@GetMapping("selectPassengerFlow")
|
|
||||||
public Result selectPassengerFlow(List<Double> vertX, List<Double> vertY,String timeId){
|
|
||||||
List<Double> list = new ArrayList<>();
|
|
||||||
|
|
||||||
Integer integer = passengerFlowService.pnpolyAlgorithm(vertX, vertY, timeId);
|
|
||||||
Result success = Result.success(integer);
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.hisense.monitormanage.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.hisense.monitormanage.entity.PassengerTest;
|
||||||
|
import com.hisense.monitormanage.entity.Result;
|
||||||
|
import com.hisense.monitormanage.mapper.PassengerTestMapper;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api("人流测试点")
|
||||||
|
@RequestMapping("api/project/passenger")
|
||||||
|
public class PassengerTestController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PassengerTestMapper passengerTestMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部人流测试点
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectPassengerTest")
|
||||||
|
@ApiOperation("查询全部人流测试点")
|
||||||
|
public Result selectPassengerTest(){
|
||||||
|
QueryWrapper<PassengerTest> queryWrapper = new QueryWrapper<>();
|
||||||
|
List<PassengerTest> passengerTests = passengerTestMapper.selectList(queryWrapper);
|
||||||
|
Result success = Result.success(passengerTests);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hisense.monitormanage.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("t_passenger_test")
|
||||||
|
public class PassengerTest {
|
||||||
|
@TableId
|
||||||
|
private Integer id;
|
||||||
|
private double longitude;
|
||||||
|
private double latitude;
|
||||||
|
private String label;
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.hisense.monitormanage.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.hisense.monitormanage.entity.PassengerTest;
|
||||||
|
|
||||||
|
public interface PassengerTestMapper extends BaseMapper<PassengerTest> {
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hisense.monitormanage.mapper.PassengerTestMapper">
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue