|
@@ -7,6 +7,7 @@ import com.kcim.service.HospProfitAndLossService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@Api(tags = "全院损益相关")
|
|
@@ -20,20 +21,15 @@ public class HospProfitAndLossController extends AbstractController {
|
|
|
this.hospProfitAndLossService = hospProfitAndLossService;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- @ApiOperation("计算全院损益")
|
|
|
- @PostMapping("/calc")
|
|
|
- public Result calc(@RequestParam @ApiParam(name = "date", value = "yyyy-MM-dd") String date) {
|
|
|
-// hospProfitAndLossService.calc(date, getHospId());
|
|
|
- hospProfitAndLossService.calcByResponsibility(date, getHospId());
|
|
|
- return Result.ok();
|
|
|
- }
|
|
|
-
|
|
|
@ApiOperation("计算指定类型报表的全院损益")
|
|
|
- @PostMapping("/calcHospProfit")
|
|
|
- public Result calcHospProfit(@RequestParam @ApiParam(name = "date", value = "yyyy-MM-dd") String date,@RequestParam Integer reportType) {
|
|
|
-// hospProfitAndLossService.calc(date, getHospId());
|
|
|
- hospProfitAndLossService.calcHospProfit(date, getHospId(),reportType);
|
|
|
+ @PostMapping("/calc")
|
|
|
+ public Result calcHospProfit(@RequestParam @ApiParam(name = "date", value = "yyyy-MM-dd") String date,
|
|
|
+ @RequestParam(name = "reportType",required = false) Integer reportType) {
|
|
|
+ if(ObjectUtils.isEmpty(reportType)){
|
|
|
+ hospProfitAndLossService.calcByResponsibility(date, getHospId());
|
|
|
+ }else{
|
|
|
+ hospProfitAndLossService.calcHospProfit(date, getHospId(),reportType);
|
|
|
+ }
|
|
|
return Result.ok();
|
|
|
}
|
|
|
|