林火综合应急信息管理系统cloud后端
guoshilong
2023-03-13 22f138ca6a2141342387be6a1aa885503ccf78a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package org.springblade.modules.dp.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
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.system.dto.DeptDTO;
import org.springblade.system.feign.ISysClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletResponse;
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 IMilitaryLocalCoordinationService militaryLocalCoordinationService;
 
    private final ISysClient sysClient;
 
    /**
     * 火警事件
     */
    @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() {
        return sysClient.getUserGroupByDept();
    }
 
    /**
     * 周边查询
     * @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);
    }
 
    /**
     * 导出火灾报告
     */
    @GetMapping("export-fire-report")
    @ApiOperation(value = "导出火灾报告", notes = "传入火灾id")
    public void exportUser(String fireId,HttpServletResponse response) {
        militaryLocalCoordinationService.getFireAllDetail(fireId,response);
    }
}