From 2b2d292c1a274aa95aab8c2ac20530e54a503923 Mon Sep 17 00:00:00 2001 From: 张磊磊 <201175954@qq.com> Date: 星期三, 08 十一月 2023 10:39:32 +0800 Subject: [PATCH] 对接数据 web接口 --- hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/controller/HelmetController.java | 35 +++++++++++++++++++++++++++-------- 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/controller/HelmetController.java b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/controller/HelmetController.java index 6988e97..d6350b6 100644 --- a/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/controller/HelmetController.java +++ b/hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/controller/HelmetController.java @@ -1,12 +1,10 @@ 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 org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.Map; @@ -44,10 +42,10 @@ - //接数据 - @PostMapping("/dataValueInsert") - public BasicResult dataValueInsert(@RequestBody Map<String,Object> values){ - return helmetService.dataValueInsert(values); + //接数据 环境监测 数据 + @PostMapping("/dataValueIn") + public BasicResult dataValueIn(@RequestBody Map<String,Object> values){ + return helmetService.dataValueIn(values); } /** @@ -82,6 +80,27 @@ 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); + } + // 智能监控 + @PostMapping("/dataAIList") + public BasicResult dataAIList(@RequestBody Map<String,Object> values){ + return helmetService.dataAIList(values); + } + + //智能监控类型 + @GetMapping("dataAIType") + public BasicResult dataAIType(){ + return helmetService.dataAIType(); + } + } -- Gitblit v1.9.3