CostCostingCollectionController.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. package com.imed.costaccount.web;
  2. import com.imed.costaccount.common.util.Result;
  3. import com.imed.costaccount.model.CostCostingCollection;
  4. import com.imed.costaccount.model.User;
  5. import com.imed.costaccount.service.CostCostingCollectionService;
  6. import org.apache.shiro.SecurityUtils;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.bind.annotation.*;
  9. import java.util.Arrays;
  10. /**
  11. * 成本数据归集后列表
  12. *
  13. * @author KCYG
  14. * @date 2021-08-18 15:27:02
  15. */
  16. @RestController
  17. @RequestMapping("/costAccount/costcostingcollection")
  18. public class CostCostingCollectionController {
  19. private final CostCostingCollectionService costCostingCollectionService;
  20. public CostCostingCollectionController(CostCostingCollectionService costCostingCollectionService) {
  21. this.costCostingCollectionService = costCostingCollectionService;
  22. }
  23. /**
  24. * 分页查询列表
  25. * 查询的是
  26. */
  27. @RequestMapping("/list")
  28. public Result list(@RequestParam(value = "current", defaultValue = "1") Integer current,
  29. @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){
  30. User user = (User) SecurityUtils.getSubject().getPrincipal();
  31. return Result.ok();
  32. }
  33. /**
  34. * 信息
  35. */
  36. @RequestMapping("/info/{id}")
  37. public Result info(@PathVariable("id") Long id){
  38. CostCostingCollection costCostingCollection = costCostingCollectionService.getById(id);
  39. return Result.ok(costCostingCollection);
  40. }
  41. /**
  42. * 保存
  43. */
  44. @RequestMapping("/save")
  45. public Result save(@RequestBody CostCostingCollection costCostingCollection){
  46. costCostingCollectionService.save(costCostingCollection);
  47. return Result.ok();
  48. }
  49. /**
  50. * 修改
  51. */
  52. @RequestMapping("/update")
  53. public Result update(@RequestBody CostCostingCollection costCostingCollection){
  54. costCostingCollectionService.updateById(costCostingCollection);
  55. return Result.ok();
  56. }
  57. /**
  58. * 删除
  59. */
  60. @RequestMapping("/delete")
  61. public Result delete(@RequestBody Long[] ids){
  62. costCostingCollectionService.removeByIds(Arrays.asList(ids));
  63. return Result.ok();
  64. }
  65. /**
  66. * 科室计算
  67. */
  68. }