You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
4.9 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. package com.jtem.modules.board.controller;
  2. import com.jtem.common.utils.R;
  3. import com.jtem.modules.board.entity.BoardInData;
  4. import com.jtem.modules.board.entity.StockPrintData;
  5. import com.jtem.modules.board.service.BoardService;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.*;
  8. import java.util.HashMap;
  9. import java.util.List;
  10. import java.util.Map;
  11. /**
  12. *
  13. *BoardController 看板控制类
  14. * @author rq
  15. * @date 2021-02-24 11:10:37
  16. */
  17. @RestController
  18. @RequestMapping("/board")
  19. public class BoardController {
  20. @Autowired
  21. private BoardService boardService;
  22. /**
  23. * @Description 看板
  24. * @Title soLiuhuaBoard
  25. * @param
  26. * @author rq
  27. * @date 2021/8/13 14:08
  28. * @return double
  29. * @throw
  30. */
  31. @PostMapping("/SORoutingBoard")
  32. public Object SORoutingBoard(@RequestBody BoardInData inData) {
  33. Map<String, Object> map = boardService.SORoutingBoard(inData);
  34. map.put("code", 200);
  35. map.put("msg", "success");
  36. return map;
  37. //
  38. }
  39. /**
  40. * @Description 看板
  41. * @Title soLiuhuaBoard
  42. * @param
  43. * @author rq
  44. * @date 2021/8/13 14:08
  45. * @return double
  46. * @throw
  47. */
  48. @PostMapping("/abnormalBoardList")
  49. public Object abnormalBoardList(@RequestBody BoardInData inData) {
  50. Map<String, Object> map = boardService.abnormalBoardList(inData);
  51. map.put("code", 200);
  52. map.put("msg", "success");
  53. return map;
  54. //
  55. }
  56. /**
  57. * @Description TODO
  58. * @Title getPrintsList
  59. * @param
  60. * @author rq
  61. * @date 2022/9/25 20:46
  62. * @return R
  63. * @throw
  64. */
  65. @PostMapping("/getStockPrintList")
  66. public R getPrintsList(@RequestBody BoardInData inData) {
  67. String ip =inData.getIp();
  68. List<StockPrintData> resultList = boardService.getStockPrintListCaiGou(ip);
  69. return R.ok().put("rows", resultList);
  70. }
  71. /**
  72. *@Description 获取看板当前时间
  73. * @Title getTime
  74. * @author rq
  75. * @date 2020/11/17 15:39
  76. * @return {@link Object}
  77. * @throw
  78. */
  79. @PostMapping("/getTime")
  80. @ResponseBody
  81. public Object getTime() {
  82. Map<String, Object> map = new HashMap<>();
  83. try {
  84. String date = boardService.getTime();
  85. map.put("success", true);
  86. map.put("rows", date);
  87. } catch (Exception e) {
  88. map.put("msg", e.getMessage());
  89. }
  90. return map;
  91. }
  92. /**
  93. * @Title getReportAbnormalData
  94. * @Description TODO
  95. * @author rq
  96. * @date 2021/7/21 14:48
  97. * @return {@link Object}
  98. */
  99. @PostMapping("/kanKanYouMeiYouDiaoXian")
  100. @ResponseBody
  101. public Object kanKanYouMeiYouDiaoXian() {
  102. Map<String, Object> map = new HashMap<>();
  103. try {
  104. map.put("success", true);
  105. } catch (Exception e) {
  106. map.put("success", false);
  107. map.put("msg", e.getMessage());
  108. }
  109. return map;
  110. }
  111. /**
  112. *@Description 获取派工单完成情况看板信息
  113. * @Title getNewScheduledTableData
  114. * @author rq
  115. * @date 2020/11/17 15:39
  116. * @return {@link Object}
  117. * @throw
  118. */
  119. @GetMapping("/getNewScheduledTableData/{number}")
  120. @ResponseBody
  121. public Object getNewScheduledTableData(@PathVariable("number") int number){
  122. Map<String, Object> map = new HashMap<>();
  123. try {
  124. map = boardService.getNewScheduledTableData(number);
  125. map.put("success", true);
  126. } catch (Exception e) {
  127. map.put("success", false);
  128. map.put("msg", e.getMessage());
  129. }
  130. return map;
  131. }
  132. /**
  133. *@Description 获取看板数据刷新时间
  134. * @Title getJumpTime
  135. * @author rq
  136. * @date 2020/11/17 15:39
  137. * @return {@link Object}
  138. * @throw
  139. */
  140. // @PostMapping("/getRefreshTime")
  141. // @ResponseBody
  142. @GetMapping("/getRefreshTime/{boardName}")
  143. @ResponseBody
  144. public Object getRefreshTime(@PathVariable("boardName") String boardName) {
  145. Map<String, Object> map = new HashMap<>();
  146. try {
  147. String date = boardService.getRefreshTime(boardName);
  148. map.put("success", true);
  149. map.put("rows", date);
  150. } catch (Exception e) {
  151. map.put("msg", e.getMessage());
  152. }
  153. return map;
  154. }
  155. /**
  156. *@Description 获取派工单完成情况看板信息
  157. * @Title getNewScheduledData
  158. * @author rq
  159. * @date 2020/11/17 15:39
  160. * @return {@link Object}
  161. * @throw
  162. */
  163. @PostMapping("/getScheduledData")
  164. @ResponseBody
  165. public Object getScheduledData() {
  166. Map<String, Object> map = new HashMap<>();
  167. try {
  168. map= boardService.getNewScheduledData();
  169. map.put("success", true);
  170. } catch (Exception e) {
  171. map.put("msg", e.getMessage());
  172. }
  173. return map;
  174. }
  175. }