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 values){ return helmetService.helmetList(values); } //照片 列表 @PostMapping("/helmetPictureList") public BasicResult helmetPictureList(@RequestBody Map values){ return helmetService.helmetPictureList(values); } //轨迹统计 @PostMapping("/helmetTrajectoryList") public BasicResult helmetTrajectoryList(@RequestBody Map values){ return helmetService.helmetTrajectoryList(values); } //轨迹坐标 @PostMapping("/helmetMotionList") public BasicResult helmetMotionList(@RequestBody Map values){ return helmetService.helmetMotionList(values); } //接数据 环境监测 数据 @PostMapping("/dataValueInsert") public BasicResult dataValueInsert(@RequestBody Map values){ return helmetService.dataValueInsert(values); } /** * 报警次数 * @param values * @return */ @PostMapping("/helmetReportTotal") public BasicResult helmetReportTotal(@RequestBody Map values){ return helmetService.helmetReportTotal(values); } /** * 报警用户详情 * @param values * @returna */ @PostMapping("/helmetReportUser") public BasicResult helmetReportUser(@RequestBody Map values){ return helmetService.helmetReportUser(values); } //烟尘数据 @PostMapping("/dataSmockList") public BasicResult dataSmockList(@RequestBody Map values){ return helmetService.dataSmockList(values); } //环境监测 @PostMapping("/dataValuesList") public BasicResult dataValuesList(@RequestBody Map 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); } }