HospProfitAndLossController.java 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.imed.costaccount.web;
  2. import com.imed.costaccount.common.util.PageUtils;
  3. import com.imed.costaccount.common.util.Result;
  4. import com.imed.costaccount.service.HospProfitAndLossService;
  5. import io.swagger.annotations.Api;
  6. import io.swagger.annotations.ApiOperation;
  7. import io.swagger.annotations.ApiParam;
  8. import org.springframework.web.bind.annotation.*;
  9. @Api(tags = "全院损益相关")
  10. @RestController
  11. @RequestMapping("/costAccount/hospProfitAndLoss")
  12. public class HospProfitAndLossController extends AbstractController {
  13. private final HospProfitAndLossService hospProfitAndLossService;
  14. public HospProfitAndLossController(HospProfitAndLossService hospProfitAndLossService) {
  15. this.hospProfitAndLossService = hospProfitAndLossService;
  16. }
  17. @ApiOperation("计算全院损益")
  18. @PostMapping("/calc")
  19. public Result calc(@RequestParam @ApiParam(name = "date", value = "yyyy-MM-dd") String date) {
  20. hospProfitAndLossService.calc(date, getHospId());
  21. return Result.ok();
  22. }
  23. @ApiOperation("全院损益列表")
  24. @GetMapping("/getHospProfits")
  25. public Result getHospProfits(@RequestParam(value = "current", defaultValue = "1") Integer current,
  26. @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
  27. @RequestParam(value = "date")String date) {
  28. PageUtils pageUtils = hospProfitAndLossService.getHospProfits(current, pageSize, date, getHospId());
  29. return Result.ok(pageUtils);
  30. }
  31. }