package org.springblade.modules.dp.controller;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.mp.support.Condition;
|
import org.springblade.core.mp.support.Query;
|
import org.springblade.core.tool.api.R;
|
import org.springblade.modules.dp.service.IMilitaryLocalCoordinationService;
|
import org.springblade.modules.fire.service.IFireService;
|
import org.springblade.modules.fire.vo.FireVO;
|
import org.springblade.modules.fireSupplement.entity.FireSupplementEntity;
|
import org.springblade.modules.fireSupplement.service.IFireSupplementService;
|
import org.springblade.modules.system.dto.DeptDTO;
|
import org.springblade.modules.system.service.IDeptService;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.HashMap;
|
import java.util.List;
|
|
/**
|
* 大屏军地协同 控制器
|
*
|
* @author GuoShiLong
|
* @since 2023-03-08
|
*/
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("dp/militaryLocalCoordination")
|
@Api(value = "军地协同", tags = "军地协同接口")
|
public class MilitaryLocalCoordinationController extends BladeController {
|
private final IFireService fireService;
|
private final IFireSupplementService fireSupplementService;
|
private final IDeptService deptService;
|
private final IMilitaryLocalCoordinationService militaryLocalCoordinationService;
|
|
/**
|
* 火警事件
|
*/
|
@GetMapping("/fireAlarmIncident")
|
@ApiOperation(value = "火警事件", notes = "火警事件")
|
public R<IPage<FireVO>> getEarlyWarningLedger(FireVO fire, Query query) {
|
IPage<FireVO> pages = fireService.selectFirePage(Condition.getPage(query), fire);
|
return R.data(pages);
|
}
|
|
/**
|
* 灾后评估
|
*/
|
@GetMapping("/disasterAssessment")
|
@ApiOperation(value = "详情", notes = "传入fireSupplement")
|
public R<FireSupplementEntity> detail(FireSupplementEntity fireSupplement) {
|
FireSupplementEntity detail = fireSupplementService.getOne(Condition.getQueryWrapper(fireSupplement));
|
return R.data(detail);
|
}
|
|
/**
|
* 视频会商,传部门和部门下的人
|
*/
|
@GetMapping("/getUserGroupByDept")
|
@ApiOperation(value = "视频会商", notes = "视频会商")
|
public R getUserGroupByDept() {
|
List<DeptDTO> deptDTO = deptService.getUserGroupByDept();
|
return R.data(deptDTO);
|
}
|
|
/**
|
* 周边查询
|
* @param lon 经度
|
* @param lat 纬度
|
* @param distance 查询范围
|
* @return
|
*/
|
@GetMapping("/surroundingQuery")
|
@ApiOperation(value = "周边查询", notes = "周边查询")
|
public R getSurroundingQueryList(String lon,String lat,String distance) {
|
HashMap<String, List<HashMap<String, String>>> surroundingQueryList = militaryLocalCoordinationService.getSurroundingQueryList(lon,lat,distance);
|
return R.data(surroundingQueryList);
|
}
|
}
|