InvoiceLibraryController.java 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. package com.malk.qiwang.Controller;
  2. import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  3. import com.malk.qiwang.Service.IInvoiceLibraryService;
  4. import com.malk.qiwang.Service.QiWangService;
  5. import com.malk.qiwang.Service.TXYInvoice;
  6. import com.malk.qiwang.entity.InvoiceLibrary;
  7. import com.malk.qiwang.mapper.InvoiceLibraryMapper;
  8. import com.malk.server.common.McR;
  9. import com.malk.service.aliwork.YDClient;
  10. import com.malk.service.dingtalk.DDClient;
  11. import com.malk.service.dingtalk.DDClient_Contacts;
  12. import com.malk.service.dingtalk.DDClient_Workflow;
  13. import com.malk.utils.UtilMap;
  14. import lombok.extern.slf4j.Slf4j;
  15. import org.apache.commons.lang3.StringUtils;
  16. import org.springframework.beans.factory.annotation.Autowired;
  17. import org.springframework.beans.factory.annotation.Value;
  18. import org.springframework.web.bind.annotation.*;
  19. import org.springframework.stereotype.Controller;
  20. import java.util.Map;
  21. /**
  22. * <p>
  23. * 发票库表 前端控制器
  24. * </p>
  25. *
  26. * @author LQY
  27. * @since 2026-04-27
  28. */
  29. @RestController
  30. @RequestMapping("/qw2")
  31. @Slf4j
  32. public class InvoiceLibraryController {
  33. @Autowired
  34. private IInvoiceLibraryService invoiceLibrary;
  35. @Autowired
  36. private DDClient ddClient;
  37. @Autowired
  38. private YDClient ydClient;
  39. @Autowired
  40. private TXYInvoice txyInvoice;
  41. @Value("${dingtalk.operator}")
  42. private String operator;
  43. @Value("${dingtalk.downloadPath}")
  44. private String downloadPath;
  45. @Autowired
  46. private DDClient_Workflow ddClientWorkflow ;
  47. @Autowired
  48. private DDClient_Contacts ddClient_contacts;
  49. @Autowired
  50. private InvoiceLibraryMapper baseMapper;
  51. private static final String url = "http://47.103.203.2:9092/qiwang/";
  52. //员工报销
  53. //private static final String url = "http://24120b4f.r39.cpolar.top/qiwang/";
  54. @PostMapping("/invoiceLibrary")
  55. public McR test(@RequestBody Map map) {
  56. log.info("map:{}", map);
  57. invoiceLibrary.invoiceLibrary(map);
  58. return McR.success();
  59. }
  60. //付款申请
  61. @PostMapping("/invoiceLibrary1")
  62. public McR invoiceLibrary1(@RequestBody Map map) {
  63. log.info("map:{}", map);
  64. invoiceLibrary.invoiceLibrary1(map);
  65. return McR.success();
  66. }
  67. //合作商付款申请
  68. @PostMapping("/invoiceLibrary2")
  69. public McR invoiceLibrary2(@RequestBody Map map) {
  70. log.info("map:{}", map);
  71. invoiceLibrary.invoiceLibrary2(map);
  72. return McR.success();
  73. }
  74. //合作商报销申请
  75. @PostMapping("/invoiceLibrary3")
  76. public McR invoiceLibrary3(@RequestBody Map map) {
  77. log.info("map:{}", map);
  78. invoiceLibrary.invoiceLibrary3(map);
  79. return McR.success();
  80. }
  81. //出差费用申请
  82. @PostMapping("/invoiceLibrary5")
  83. public McR invoiceLibrary5(@RequestBody Map map) {
  84. log.info("map:{}", map);
  85. invoiceLibrary.invoiceLibrary5(map);
  86. return McR.success();
  87. }
  88. //批量付款申请(一对多)
  89. @PostMapping("/invoiceLibrary6")
  90. public McR invoiceLibrary6(@RequestBody Map map) {
  91. log.info("map:{}", map);
  92. invoiceLibrary.invoiceLibrary6(map);
  93. return McR.success();
  94. }
  95. @PostMapping("/invoiceLibrarys")
  96. public McR test2(@RequestBody Map map) {
  97. log.info("map:{}", map);
  98. invoiceLibrary.invoiceLibrarys(map);
  99. return McR.success();
  100. }
  101. @PostMapping("/updateOaStatusByOaId")
  102. public McR test1(@RequestBody Map map) {
  103. log.info("map:{}", map);
  104. invoiceLibrary.updateOaStatusByOaId(map);
  105. return McR.success();
  106. }
  107. @PostMapping("/updateSfctByOaId")
  108. public McR updateSfctByOaId(@RequestBody Map map) {
  109. log.info("map:{}", map);
  110. invoiceLibrary.updateSfctByOaId(map);
  111. return McR.success();
  112. }
  113. @PostMapping("/deleteAll")
  114. public McR deleteAllByOaId(@RequestParam("oaId") String oaId) {
  115. log.info("map:{}", oaId);
  116. invoiceLibrary.deleteAllByOaId(oaId);
  117. return McR.success();
  118. }
  119. }