package com.sinata.web.controller.backend;
|
|
import com.sinata.common.core.domain.R;
|
import com.sinata.system.domain.query.DisposalReportQuery;
|
import com.sinata.system.domain.query.HospitalReportQuery;
|
import com.sinata.system.domain.query.TransformQuery;
|
import com.sinata.system.domain.vo.DepartmentReportVO;
|
import com.sinata.system.service.biz.StaticsService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.validation.Valid;
|
import java.io.IOException;
|
|
/**
|
* @author mitao
|
* @date 2024/12/25
|
*/
|
@RestController
|
@Api(tags = {"统计分析相关接口"})
|
@RequiredArgsConstructor
|
@RequestMapping("/backend/statics")
|
public class StaticsController {
|
private final StaticsService staticsService;
|
|
|
/**
|
* 医院报表
|
*
|
* @param query
|
* @return
|
*/
|
@ApiOperation("医院报表")
|
@PostMapping("/hospitalReport")
|
public R<DepartmentReportVO> hospitalReport(@Valid @RequestBody HospitalReportQuery query) {
|
return R.ok(staticsService.hospitalReport(query));
|
}
|
|
/**
|
* 医院报表-导出
|
*
|
* @param query
|
*/
|
@ApiOperation("医院报表-导出")
|
@PostMapping("/hospitalReportExport")
|
public void hospitalReportExport(@Valid @RequestBody HospitalReportQuery query) {
|
try {
|
staticsService.hospitalReportExport(query);
|
} catch (IOException e) {
|
throw new RuntimeException(e);
|
}
|
}
|
|
/**
|
* 转运联单
|
*
|
* @param query
|
* @return
|
*/
|
@ApiOperation("转运联单")
|
@PostMapping("/transformList")
|
public R<DepartmentReportVO> transformList(@Valid @RequestBody TransformQuery query) {
|
return R.ok(staticsService.transformList(query));
|
}
|
|
/**
|
* 转运联单导出
|
*
|
* @param query
|
*/
|
@ApiOperation("转运联单导出")
|
@PostMapping("/transformListExport")
|
public void transformListExport(@Valid @RequestBody TransformQuery query) {
|
try {
|
staticsService.transformListExport(query);
|
} catch (IOException e) {
|
throw new RuntimeException(e);
|
}
|
}
|
|
/**
|
* 处置报表
|
*
|
* @param query
|
* @return
|
*/
|
@ApiOperation("处置报表")
|
@PostMapping("/disposalReport")
|
public R<DepartmentReportVO> disposalReport(@Valid @RequestBody DisposalReportQuery query) {
|
return R.ok(staticsService.disposalReport(query));
|
}
|
|
/**
|
* 处置报表导出
|
*
|
* @param query
|
* @return
|
*/
|
@ApiOperation("处置报表导出")
|
@PostMapping("/disposalReportExport")
|
public void disposalReportExport(@Valid @RequestBody DisposalReportQuery query) {
|
try {
|
staticsService.disposalReportExport(query);
|
} catch (IOException e) {
|
throw new RuntimeException(e);
|
}
|
}
|
|
/**
|
* 监管报表
|
*
|
* @param query
|
* @return
|
*/
|
@ApiOperation("监管报表")
|
@PostMapping("/regulationReport")
|
public R<DepartmentReportVO> regulationReport(@Valid @RequestBody DisposalReportQuery query) {
|
return R.ok(staticsService.regulationReport(query));
|
}
|
|
/**
|
* 监管报表导出
|
*
|
* @param query
|
*/
|
@ApiOperation("监管报表导出")
|
@PostMapping("/regulationReportExport")
|
public void regulationReportExport(@Valid @RequestBody DisposalReportQuery query) {
|
try {
|
staticsService.regulationReportExport(query);
|
} catch (IOException e) {
|
throw new RuntimeException(e);
|
}
|
}
|
}
|