BusinessSceduleController.java 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. package com.chinaitop.agile.controller;
  2. import java.io.IOException;
  3. import java.util.HashMap;
  4. import java.util.List;
  5. import java.util.Map;
  6. import javax.annotation.Resource;
  7. import javax.servlet.http.HttpServletRequest;
  8. import org.apache.commons.lang3.StringUtils;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.http.MediaType;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RequestMethod;
  13. import org.springframework.web.bind.annotation.RestController;
  14. import com.chinaitop.agile.service.BusinessSceduleService;
  15. import com.chinaitop.agile.model.BusinessScedule;
  16. import com.fasterxml.jackson.core.JsonParseException;
  17. import com.fasterxml.jackson.core.type.TypeReference;
  18. import com.fasterxml.jackson.databind.JsonMappingException;
  19. import com.fasterxml.jackson.databind.ObjectMapper;
  20. import com.github.pagehelper.PageInfo;
  21. import io.swagger.annotations.Api;
  22. import io.swagger.annotations.ApiImplicitParam;
  23. import io.swagger.annotations.ApiImplicitParams;
  24. import io.swagger.annotations.ApiOperation;
  25. /**
  26. * 执行进度
  27. * @author My Sunshine
  28. *
  29. */
  30. @RestController
  31. @RequestMapping(value="/agile/scedule")
  32. @Api(value= "BusinessSceduleController", description = "执行进度")
  33. public class BusinessSceduleController {
  34. @Resource
  35. private BusinessSceduleService businessSceduleService;
  36. /**
  37. * 修改出入库系统的 通知单状态.
  38. */
  39. @RequestMapping(value="/updateNoticeStatus", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
  40. @ApiOperation(value="修改出入库系统的 通知单状态.", notes = "修改出入库系统的 通知单状态.")
  41. public void updateNoticeStatus(Map<String, Object> paramMap) {
  42. businessSceduleService.updateNoticeStatus(paramMap);
  43. }
  44. /**
  45. * 计划执行进度
  46. */
  47. @RequestMapping(value="/getPlanSceduleInPlanId",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
  48. @ApiOperation(value="计划执行进度", notes = "计划执行进度")
  49. @ApiImplicitParams({
  50. @ApiImplicitParam(name = "planIds", value = "计划id", paramType = "query")
  51. })
  52. public List<BusinessScedule> getPlanSceduleInPlanId(String planIds) {
  53. return businessSceduleService.getPlanSceduleInPlanId(planIds);
  54. }
  55. /**
  56. * 合同执行进度
  57. */
  58. @RequestMapping(value="/getContractSceduleInContractId",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
  59. @ApiOperation(value="合同执行进度", notes = "合同执行进度")
  60. @ApiImplicitParams({
  61. @ApiImplicitParam(name = "contractIds", value = "合同id", paramType = "query")
  62. })
  63. public List<BusinessScedule> getContractSceduleInContractId(String contractIds) {
  64. return businessSceduleService.getContractSceduleInContractId(contractIds);
  65. }
  66. /**
  67. * 通知单执行进度
  68. */
  69. @RequestMapping(value="/getNoticeSceduleInNoticeId",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
  70. @ApiOperation(value="通知单执行进度", notes = "通知单执行进度")
  71. @ApiImplicitParams({
  72. @ApiImplicitParam(name = "planIds", value = "通知单id", paramType = "query")
  73. })
  74. public List<BusinessScedule> getNoticeSceduleInNoticeId(String noticeIds) {
  75. return businessSceduleService.getNoticeSceduleInNoticeId(noticeIds);
  76. }
  77. /**
  78. * 到站中转执行进度
  79. */
  80. @RequestMapping(value="/getDzContractSceduleInContractId",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
  81. @ApiOperation(value="到站中转执行进度", notes = "到站中转执行进度")
  82. @ApiImplicitParams({
  83. @ApiImplicitParam(name = "contractIds", value = "到站中转id", paramType = "query")
  84. })
  85. public List<BusinessScedule> getDzContractSceduleInContractId(String contractIds) {
  86. return businessSceduleService.getDzContractSceduleInContractId(contractIds);
  87. }
  88. /**
  89. * 发运中转执行进度
  90. */
  91. @RequestMapping(value="/getFyContractSceduleInContractId",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
  92. @ApiOperation(value="发运中转执行进度", notes = "发运中转执行进度")
  93. @ApiImplicitParams({
  94. @ApiImplicitParam(name = "contractIds", value = "发运中转id", paramType = "query")
  95. })
  96. public List<BusinessScedule> getFyContractSceduleInContractId(String contractIds) {
  97. return businessSceduleService.getFyContractSceduleInContractId(contractIds);
  98. }
  99. /**
  100. * 提货单执行进度
  101. */
  102. @RequestMapping(value="/getThdInNumber",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
  103. @ApiOperation(value="提货单执行进度", notes = "提货单执行进度")
  104. @ApiImplicitParams({
  105. @ApiImplicitParam(name = "thdNumbers", value = "提货单", paramType = "query")
  106. })
  107. public List<BusinessScedule> getThdInNumber(String thdNumbers) {
  108. return businessSceduleService.getThdInNumber(thdNumbers);
  109. }
  110. }