SupplierInfoController.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package com.fjhx.supply.controller.supplier;
  2. import com.baomidou.dynamic.datasource.annotation.DS;
  3. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  4. import com.fjhx.common.constant.SourceConstant;
  5. import com.fjhx.supply.entity.supplier.dto.SupplierInfoDto;
  6. import com.fjhx.supply.entity.supplier.dto.SupplierInfoSelectDto;
  7. import com.fjhx.supply.entity.supplier.vo.SupplierInfoVo;
  8. import com.fjhx.supply.service.supplier.SupplierInfoService;
  9. import com.ruoyi.common.core.domain.BaseSelectDto;
  10. import org.springframework.beans.factory.annotation.Autowired;
  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.Map;
  16. /**
  17. * <p>
  18. * 供应商 前端控制器
  19. * </p>
  20. *
  21. * @author
  22. * @since 2023-03-17
  23. */
  24. @DS(SourceConstant.SUPPLY)
  25. @RestController
  26. @RequestMapping("/supplierInfo")
  27. public class SupplierInfoController {
  28. @Autowired
  29. private SupplierInfoService supplierInfoService;
  30. /**
  31. * 供应商分页
  32. */
  33. @PostMapping("/page")
  34. public Page<SupplierInfoVo> page(@RequestBody SupplierInfoSelectDto dto) {
  35. return supplierInfoService.getPage(dto);
  36. }
  37. /**
  38. * 供应商分页 维多利亚
  39. */
  40. @PostMapping("/pageByWdly")
  41. public Page<SupplierInfoVo> pageByWdly(@RequestBody SupplierInfoSelectDto dto) {
  42. return supplierInfoService.getPageByWdly(dto);
  43. }
  44. /**
  45. * 供应商明细
  46. */
  47. @PostMapping("/detail")
  48. public SupplierInfoVo detail(@RequestBody BaseSelectDto dto) {
  49. return supplierInfoService.detail(dto.getId());
  50. }
  51. @PostMapping("/detailByWdly")
  52. public SupplierInfoVo detailByWdly(@RequestBody BaseSelectDto dto) {
  53. return supplierInfoService.detailByWdly(dto.getId());
  54. }
  55. /**
  56. * 供应商新增
  57. */
  58. @PostMapping("/add")
  59. public void add(@RequestBody SupplierInfoDto supplierInfoDto) {
  60. supplierInfoService.add(supplierInfoDto);
  61. }
  62. /**
  63. * 供应商编辑
  64. */
  65. @PostMapping("/edit")
  66. public void edit(@RequestBody SupplierInfoDto supplierInfoDto) {
  67. supplierInfoService.edit(supplierInfoDto);
  68. }
  69. /**
  70. * 供应商删除
  71. */
  72. @PostMapping("/delete")
  73. public void delete(@RequestBody BaseSelectDto dto) {
  74. supplierInfoService.delete(dto.getId());
  75. }
  76. /**
  77. * 供应商统计(列表)
  78. */
  79. @PostMapping("/supplierStatistics")
  80. public Map<String,Object> supplierStatistics(@RequestBody BaseSelectDto dto) {
  81. return supplierInfoService.supplierStatistics(dto);
  82. }
  83. }