B2bInvoiceApplyController.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package com.jkcredit.invoice.controller;
  2. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  3. import com.jkcredit.invoice.annotation.LoginRequired;
  4. import com.jkcredit.invoice.model.entity.B2bInvoiceApply;
  5. import com.jkcredit.invoice.model.entity.CardTrade;
  6. import com.jkcredit.invoice.service.B2bInvoiceApplyService;
  7. import com.jkcredit.invoice.util.RespR;
  8. import io.swagger.annotations.ApiOperation;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.beans.factory.annotation.Value;
  11. import org.springframework.web.bind.annotation.PostMapping;
  12. import org.springframework.web.bind.annotation.RequestBody;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RestController;
  15. import java.util.List;
  16. /**
  17. * @description:
  18. * @author: sunzhaoning
  19. * @create: 2019-06-19 14:27
  20. * @version: V1.0
  21. **/
  22. @RestController
  23. @RequestMapping("/b2bInvoice")
  24. public class B2bInvoiceApplyController {
  25. @Autowired
  26. private B2bInvoiceApplyService b2bInvoiceApplyService;
  27. @LoginRequired
  28. @ApiOperation(value = "批量申请开票,入参企业编号、车牌号、开始时间、结束时间",notes = "批量申请开票,入参企业编号、车牌号、开始时间、结束时间")
  29. @PostMapping("/apply")
  30. public RespR invoiceApply(@RequestBody List<CardTrade> cardTradeList){
  31. return b2bInvoiceApplyService.invoiceApply(cardTradeList);
  32. }
  33. @PostMapping("/page")
  34. @ApiOperation(value = "查询已申请开票列表", notes = "查询已申请开票列表")
  35. @LoginRequired
  36. public RespR getB2bInvoiceApplyList(Page page, B2bInvoiceApply b2bInvoiceApply){
  37. return new RespR<>(b2bInvoiceApplyService.getB2bInvoiceApplyPage(page,b2bInvoiceApply));
  38. }
  39. }