NoCarController.java 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. package com.jkcredit.invoice.controller.localBussiness;
  2. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  3. import com.jkcredit.invoice.annotation.LoginRequired;
  4. import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
  5. import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
  6. import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
  7. import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
  8. import com.jkcredit.invoice.service.CalculateInfor.NoCarCalculateInfoService;
  9. import com.jkcredit.invoice.service.nocar.NoCarBillWayService;
  10. import com.jkcredit.invoice.service.nocar.NoCarRecService;
  11. import com.jkcredit.invoice.service.nocar.NocarInvoiceService;
  12. import com.jkcredit.invoice.util.RespR;
  13. import io.swagger.annotations.Api;
  14. import io.swagger.annotations.ApiOperation;
  15. import org.springframework.beans.factory.annotation.Autowired;
  16. import org.springframework.web.bind.annotation.PostMapping;
  17. import org.springframework.web.bind.annotation.RequestMapping;
  18. import org.springframework.web.bind.annotation.RestController;
  19. @Api(tags = "无车操作")
  20. @RestController
  21. @RequestMapping(value = {"/noCar"})
  22. public class NoCarController {
  23. @Autowired
  24. NoCarRecService noCarService;
  25. @Autowired
  26. NoCarBillWayService noCarBillWayService;
  27. @Autowired
  28. NocarInvoiceService nocarInvoiceService;
  29. @Autowired
  30. NoCarCalculateInfoService noCarCalculateInfoService;
  31. /**
  32. * 分页查询无车备案信息
  33. *
  34. * @param page 参数集
  35. * @return 用户集合
  36. */
  37. @PostMapping("/findCarRec")
  38. @ApiOperation(value="分页查询无车备案信息", notes="分页查询无车备案信息")
  39. @LoginRequired
  40. public RespR getCustomersByPage(Page page, CustomerCarRec customerCarRec) {
  41. try {
  42. RespR respR = new RespR(noCarService.findByPageAndCarRec(page, customerCarRec));
  43. return respR;
  44. }catch (Exception e){
  45. e.printStackTrace();
  46. return new RespR(false,e.getMessage());
  47. }
  48. }
  49. /**
  50. * 分页查询运单信息
  51. *
  52. * @param page 参数集
  53. * @return 用户集合
  54. */
  55. @PostMapping("/findBillWay")
  56. @ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
  57. @LoginRequired
  58. public RespR findBillWay(Page page, NoCarWayBill noCarWayBill) {
  59. try {
  60. RespR respR = new RespR(noCarBillWayService.findByPageAndWayBill(page, noCarWayBill));
  61. return respR;
  62. }catch (Exception e){
  63. e.printStackTrace();
  64. return new RespR(false,e.getMessage());
  65. }
  66. }
  67. /**
  68. * 分页查询异常运单信息
  69. *
  70. * @param page 参数集
  71. * @return 用户集合
  72. */
  73. @PostMapping("/findBillWayException")
  74. @ApiOperation(value="分页查询异常运单信息", notes="分页查询异常运单信息")
  75. @LoginRequired
  76. public RespR findBillWayException(Page page, NoCarWayBill noCarWayBill) {
  77. try {
  78. RespR respR = new RespR(noCarBillWayService.findByPageAndWayBillException(page, noCarWayBill));
  79. return respR;
  80. }catch (Exception e){
  81. e.printStackTrace();
  82. return new RespR(false,e.getMessage());
  83. }
  84. }
  85. /**
  86. * 分页查询无车运单信息
  87. *
  88. * @param page 参数集
  89. * @return 用户集合
  90. */
  91. @PostMapping("/findNocarInvoices")
  92. @ApiOperation(value="分页查询无车发票信息", notes="分页查询无车发票信息")
  93. @LoginRequired
  94. public RespR findNocarInvoices(Page page, BillInvoice billInvoice) {
  95. try {
  96. RespR respR = new RespR(nocarInvoiceService.findByPageAndInvoice(page, billInvoice));
  97. return respR;
  98. }catch (Exception e){
  99. e.printStackTrace();
  100. return new RespR(false,e.getMessage());
  101. }
  102. }
  103. /**
  104. * 分页查询无车计费信息
  105. *
  106. * @param page 参数集
  107. * @return 用户集合
  108. */
  109. @PostMapping("/findNocarCalculateInfo")
  110. @ApiOperation(value="分页查询无车计费信息", notes="分页查询无车计费信息")
  111. @LoginRequired
  112. public RespR findNocarCalculateInfo(Page page, NoCarCalculateInfor carCalculateInfor) {
  113. try {
  114. RespR respR = new RespR(noCarCalculateInfoService.findByPageAndCalculateInfor(page, carCalculateInfor));
  115. return respR;
  116. }catch (Exception e){
  117. e.printStackTrace();
  118. return new RespR(false,e.getMessage());
  119. }
  120. }
  121. }