AccountController.java 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. package com.dk.mdm.controller.mac;
  2. import com.dk.common.response.ResponseResultVO;
  3. import com.dk.mdm.model.pojo.mac.Account;
  4. import com.dk.common.controller.BaseController;
  5. import com.dk.common.service.BaseService;
  6. import com.dk.mdm.model.query.mac.AccountItemQuery;
  7. import io.swagger.annotations.ApiOperation;
  8. import org.springframework.web.bind.annotation.*;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import io.swagger.annotations.Api;
  11. import com.dk.mdm.service.mac.AccountService;
  12. @Api(tags = "账款对象API接口")
  13. @RestController
  14. @RequestMapping("/mac/account")
  15. public class AccountController extends BaseController<Account> {
  16. public BaseService<Account> getService() {
  17. return accountService;
  18. }
  19. @Autowired
  20. private AccountService accountService;
  21. /**
  22. * @desc : 查看来源单据,总单加明细
  23. * @author : 姜永辉
  24. * @date : 2024/3/6 10:36
  25. */
  26. @PostMapping({"/{id}"})
  27. public ResponseResultVO selectById(@PathVariable String id) {
  28. return accountService.selectById(id);
  29. }
  30. /**
  31. * @desc : 只查询总单, 不包含总单加明细
  32. * @author : 姜永辉
  33. * @date : 2024/3/6 10:36
  34. */
  35. @PostMapping({"/get_account/{id}"})
  36. public ResponseResultVO selectAccountById(@PathVariable String id) {
  37. return accountService.selectAccountById(id);
  38. }
  39. /**
  40. * @desc : 总单加明细总数量
  41. * @author : 姜永辉
  42. * @date : 2024/3/6 10:36
  43. */
  44. @PostMapping({"/get_account_item_count"})
  45. public ResponseResultVO countByCond(@RequestBody AccountItemQuery accountItemQuery) {
  46. return accountService.countByCond(accountItemQuery);
  47. }
  48. /**
  49. * @desc : 查询应收账款明细
  50. * @author : 付斌
  51. * @date : 2023/1/9 10:36
  52. */
  53. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  54. @PostMapping({"get_receivable_account_item"})
  55. public ResponseResultVO<?> getReceivableAccountItem(@RequestBody AccountItemQuery accountItemQuery) {
  56. return accountService.getReceivableAccountItem(accountItemQuery);
  57. }
  58. /**
  59. * @desc : 查询应付账款明细
  60. * @author : 付斌
  61. * @date : 2023/1/9 10:36
  62. */
  63. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  64. @PostMapping({"get_payable_account_item"})
  65. public ResponseResultVO<?> getPayableAccountItem(@RequestBody AccountItemQuery accountItemQuery) {
  66. return accountService.getPayableAccountItem(accountItemQuery);
  67. }
  68. }