干燥机配套车间生产管理系统/云平台服务端
zhuguifei
2024-11-29 339515558253d776769dc2e2560bbb4a0450c989
jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryHelloController.java
old mode 100644 new mode 100755
@@ -1,14 +1,16 @@
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import lombok.extern.slf4j.Slf4j;
import java.util.Map;
@Api(tags = "dry示例")
@RestController
@@ -26,4 +28,33 @@
      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();
   }
}