package com.panzhihua.service_grid.api;
|
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.service_grid.service.EventGridDataService;
|
import com.panzhihua.service_grid.service.EventGridMemberGpsLogService;
|
import com.panzhihua.service_grid.service.EventGridMemberRelationService;
|
import com.panzhihua.service_grid.service.EventService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
|
/**
|
* 地图模块api
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("/map")
|
public class MapApi {
|
|
@Resource
|
private EventService eventService;
|
@Resource
|
private EventGridDataService eventGridDataService;
|
@Resource
|
private EventGridMemberGpsLogService eventGridMemberGpsLogService;
|
@Resource
|
private EventGridMemberRelationService eventGridMemberRelationService;
|
|
/**
|
* 地图模块-根据网格id查询网格详细信息
|
* @param gridId 网格id
|
* @return 网格详细信息
|
*/
|
@PostMapping("getGridDetail")
|
public R getGridDetail(@RequestParam("gridId") Long gridId){
|
return eventGridDataService.getMapGridDetail(gridId);
|
}
|
|
/**
|
* 根据网格员id查询今日轨迹
|
* @param userId 网格员id
|
* @return 网格员今日轨迹
|
*/
|
@PostMapping("/getTrajectoryByApp")
|
public R getTrajectoryByApp(@RequestParam("userId") Long userId){
|
return eventGridMemberGpsLogService.getTrajectoryByApp(userId);
|
}
|
|
/**
|
* 根据网格员id查询关联网格列表
|
* @param userId 网格员id
|
* @return 网格列表
|
*/
|
@PostMapping("getMapGridListByApp")
|
public R getMapGridListByApp(@RequestParam("userId") Long userId){
|
return eventGridMemberRelationService.getMapGridListByApp(userId);
|
}
|
|
}
|