干燥机配套车间生产管理系统/云平台服务端
baoshiwei
2023-03-27 88880cf067bf4d3aacdf9ba70353b731888cf9fe
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
package org.jeecg.modules.dry.controller;
 
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.dry.entity.DryHelloEntity;
import org.jeecg.modules.dry.service.IDryHelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import lombok.extern.slf4j.Slf4j;
 
import java.util.Map;
 
@Api(tags = "dry示例")
@RestController
@RequestMapping("/dry")
@Slf4j
public class DryHelloController {
 
    @Autowired
    private IDryHelloService jeecgHelloService;
 
    @ApiOperation(value = "hello", notes = "对外服务接口")
    @GetMapping(value = "/hello")
    public String sayHello() {
        log.info(" ---我被调用了--- ");
        return jeecgHelloService.hello();
    }
 
    @ApiOperation(value="接收实时数据Str", notes="设备实时数据上传")
    @PostMapping("/sendRealTimeData")
    public Result<?> realTimeData(String orderVo) {
        System.out.println("接收到实时数据:" + orderVo.toString());
        log.info("实时数据:"+ orderVo.toString());
        //service.saveRealTimeData(orderVo);
 
        return Result.ok();
    }
 
    @ApiOperation(value="接收实时数据Map", notes="设备实时数据上传")
    @PostMapping("/sendRealTimeDataMap")
    public Result<?> realTimeDataMap(@RequestBody Map<String,Object> orderVo) {
        System.out.println("接收到实时数据:" + orderVo.toString());
        log.info("实时数据:"+ orderVo.toString());
        //service.saveRealTimeData(orderVo);
 
        return Result.ok();
    }
 
    @ApiOperation(value="接收实时数据Json", notes="设备实时数据上传")
    @PostMapping("/sendRealTimeDataJson")
    public Result<?> realTimeDataJson(@RequestBody JSONObject orderVo) {
        System.out.println("接收到实时数据:" + orderVo.toJSONString());
        log.info("实时数据:"+orderVo.toJSONString());
        //service.saveRealTimeData(orderVo);
 
        return Result.ok();
    }
}