jiazx0107@163.com
2023-09-18 4dc585d5bf2fd0a01602aba0d9fa25adbaf4a7fb
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
package com.ld.igds.sec.controller;
 
import com.ld.igds.sec.dto.SecPatrolRecordDto;
import com.ld.igds.sec.manager.SecManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.List;
 
/**
 * 安防--电子巡更管理控制层
 */
@RestController
@RequestMapping("basic/security")
public class PatrolController {
 
    @Autowired
    private SecManager securityManager;
 
    /**
     * 电子巡更轨迹查看
     *
     * @param patrolId
     * @return
     */
    @RequestMapping("/show-locus")
    public ModelAndView showLocus(
            @RequestParam(value = "patrolId", required = true) String patrolId) {
 
        ModelAndView view = new ModelAndView();
 
        // 获取当情人所在分库 -用于默认定位
        //DefaultDept curDept = ContextUtil.getCurDeptByUser(null);
        //view.addObject("curDept", curDept);
 
        // 获取当前人的当日巡更记录
        List<SecPatrolRecordDto> listPatrol = securityManager
                .getPatrolRecord(patrolId);
 
        view.addObject("listPatrol", listPatrol);
 
        view.setViewName("admin/afgl/patrol-locus");
        return view;
    }
 
    /**
     * 查询巡更图片
     *
     * @param id
     * @return
     */
    @RequestMapping("/patrol-img")
    public SecPatrolRecordDto patrolImg(
            @RequestParam(value = "id", required = true) String id) {
 
        return securityManager.getPatrolImg(id);
    }
}