1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- package com.imed.costaccount.web;
- import com.imed.costaccount.common.util.PageUtils;
- import com.imed.costaccount.common.util.Result;
- import com.imed.costaccount.common.util.UserContext;
- import com.imed.costaccount.model.CostDepartmentProfit;
- import com.imed.costaccount.service.CostDepartmentProfitService;
- import io.swagger.annotations.*;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.Arrays;
- /**
- * 科室损益计算
- *
- * @author KCYG
- * @date 2021-08-24 16:24:08
- */
- @RestController
- @RequestMapping("/costAccount/costdepartmentprofit")
- @Api(tags = "科室损益计算")
- public class CostDepartmentProfitController {
- @Autowired
- private CostDepartmentProfitService costDepartmentProfitService;
- /**
- * 分页查询列表
- * 查询的是
- */
- @GetMapping("/list")
- @ApiOperation("科室损益计算查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "current", value = "当前页", required = true),
- @ApiImplicitParam(name = "pageSize", value = "当前页大小", required = true),
- @ApiImplicitParam(name = "responsibilityCode", value = "责任中心代码", required = false),
- @ApiImplicitParam(name = "date", value = "年月yyyy-MM-dd",required = false)
- })
- public Result list(@RequestParam(value = "current", defaultValue = "1") Integer current,
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
- @RequestParam(value = "responsibilityCode") String responsibilityCode,
- @RequestParam(value = "date") String date){
- Long hospId = UserContext.getHospId();
- PageUtils pageUtils = costDepartmentProfitService.queryList(current,pageSize,responsibilityCode,date,hospId);
- return Result.ok(pageUtils);
- }
- /**
- * 科室损益计算
- */
- @PostMapping("/setDepartmentProfit")
- @ApiOperation("进行科室损益计算")
- public Result setDepartmentProfit(@RequestParam @ApiParam(name = "date", value = "yyyy-MM-dd") String date){
- Long hospId = UserContext.getHospId();
- costDepartmentProfitService.setDepartmentProfit(date,hospId);
- return Result.ok();
- }
- /**
- * 信息
- */
- @RequestMapping("/info/{id}")
- public Result info(@PathVariable("id") Long id){
- CostDepartmentProfit costDepartmentProfit = costDepartmentProfitService.getById(id);
- return Result.ok(costDepartmentProfit);
- }
- /**
- * 保存
- */
- @RequestMapping("/save")
- public Result save(@RequestBody CostDepartmentProfit costDepartmentProfit){
- costDepartmentProfitService.save(costDepartmentProfit);
- return Result.ok();
- }
- /**
- * 修改
- */
- @RequestMapping("/update")
- public Result update(@RequestBody CostDepartmentProfit costDepartmentProfit){
- costDepartmentProfitService.updateById(costDepartmentProfit);
- return Result.ok();
- }
- /**
- * 删除
- */
- @RequestMapping("/delete")
- public Result delete(@RequestBody Long[] ids){
- costDepartmentProfitService.removeByIds(Arrays.asList(ids));
- return Result.ok();
- }
- }
|