李旭东
2023-11-03 a07b4b6ff1c98dcf81338bb45d59308db7c058a9
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
95
96
97
98
package com.thhy.materials.modules.biz.helmet.controller;
 
import com.alibaba.fastjson.JSONObject;
import com.thhy.general.common.BasicResult;
import com.thhy.materials.modules.biz.helmet.service.HelmetService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.util.Map;
 
@RestController
@RequestMapping("/helmet")
public class HelmetController {
 
 
    @Resource
    private HelmetService helmetService;
 
    //安全帽设备 列表
    @PostMapping("/helmetList")
    public BasicResult helmetList(@RequestBody Map<String,Object> values){
        return helmetService.helmetList(values);
    }
    //照片 列表
    @PostMapping("/helmetPictureList")
    public BasicResult helmetPictureList(@RequestBody Map<String,Object> values){
        return helmetService.helmetPictureList(values);
    }
 
    //轨迹统计
    @PostMapping("/helmetTrajectoryList")
    public BasicResult helmetTrajectoryList(@RequestBody Map<String,Object> values){
        return helmetService.helmetTrajectoryList(values);
    }
 
    //轨迹坐标
    @PostMapping("/helmetMotionList")
    public BasicResult helmetMotionList(@RequestBody Map<String,Object> values){
        return helmetService.helmetMotionList(values);
    }
 
 
 
    //接数据 环境监测 数据
    @PostMapping("/dataValueIn")
    public BasicResult dataValueIn(@RequestBody Map<String,Object> values){
        return helmetService.dataValueIn(values);
    }
 
    /**
     * 报警次数
     * @param values
     * @return
     */
    @PostMapping("/helmetReportTotal")
    public BasicResult helmetReportTotal(@RequestBody Map<String,Object> values){
        return helmetService.helmetReportTotal(values);
 
 
 
    }
    /**
     * 报警用户详情
     * @param values
     * @returna
     */
    @PostMapping("/helmetReportUser")
    public BasicResult helmetReportUser(@RequestBody Map<String,Object> values){
        return helmetService.helmetReportUser(values);
    }
    //烟尘数据
    @PostMapping("/dataSmockList")
    public BasicResult dataSmockList(@RequestBody Map<String,Object> values){
        return helmetService.dataSmockList(values);
    }
 
    //环境监测
    @PostMapping("/dataValuesList")
    public BasicResult dataValuesList(@RequestBody Map<String,Object> values){
        return helmetService.dataValuesList(values);
    }
    //AI边缘盒子   数据接收
    @PostMapping("/dataBox")
    public BasicResult dataBox(@RequestBody String message){
        /** 将String转换为JSON **/
        JSONObject result= JSONObject.parseObject(message);
        System.out.println("--------接收的参数为 :---------------"+result);
        Integer type = Integer.valueOf(result.get("type").toString());
        return helmetService.dataBox(result);
    }
 
 
 
}