乐天mes后端
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.

170 lines
4.6 KiB

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