ZhongJiaoXingLuContoller.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package com.steerinfo.dil.controller;
  2. import com.steerinfo.dil.feign.OtmsFeign;
  3. import com.steerinfo.dil.feign.TmsTruckFeign;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.web.bind.annotation.PostMapping;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestParam;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import java.util.Map;
  10. @RestController
  11. @RequestMapping("apis")
  12. public class ZhongJiaoXingLuContoller {
  13. @Autowired
  14. private OtmsFeign otmsFeign;
  15. //偏离预警回调示例
  16. @PostMapping("/abnormalLineWarn")
  17. public String abnormalLineWarn(@RequestParam(value = "data") String data) throws Exception {
  18. otmsFeign.abnormalLineWarn(data);
  19. return "success";
  20. }
  21. //停车预警回调示例
  22. @PostMapping("/parkWarn")
  23. public String parkWarn(@RequestParam(value = "data") String data) throws Exception {
  24. otmsFeign.parkWarn(data);
  25. return "success";
  26. }
  27. //离线预警回调示例
  28. @PostMapping("/offLineWarn")
  29. public String offLineWarn(@RequestParam(value = "data") String data) throws Exception {
  30. otmsFeign.offLineWarn(data);
  31. return "success";
  32. }
  33. }