13 changed files with 379 additions and 151 deletions
@ -0,0 +1,59 @@ |
|||
package com.ccsens.ht.api; |
|||
|
|||
import com.ccsens.ht.bean.dto.PatientReportDto; |
|||
import com.ccsens.ht.bean.vo.PatientReportVo; |
|||
import com.ccsens.ht.service.IPatientReportService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
import io.swagger.annotations.*; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: whj |
|||
* @time: 2021/4/21 19:01 |
|||
*/ |
|||
@Slf4j |
|||
@Api(tags = "报告单导出",value = "报告单导出") |
|||
@RestController |
|||
public class PatientReportExportController { |
|||
@Resource |
|||
private IPatientReportService patientReportService; |
|||
|
|||
@ApiOperation(value = "导出报告单",notes = "导出报告单") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name = "json", value = "导出报告单", required = true) |
|||
}) |
|||
@RequestMapping(value="/exportReport", method = RequestMethod.POST) |
|||
public JsonResponse<PatientReportVo.Export> exportReport(@RequestBody @ApiParam @Valid QueryDto<PatientReportDto.QueryDetail> param){ |
|||
//查询报告单信息
|
|||
log.info("查询报告单详情:{}", param); |
|||
String path = patientReportService.exportReport(param.getParam(), param.getUserId()); |
|||
log.info("文件路径:{}", path); |
|||
PatientReportVo.Export export = new PatientReportVo.Export(); |
|||
export.setPath(path); |
|||
return JsonResponse.newInstance().ok(export); |
|||
} |
|||
|
|||
@ApiOperation(value = "导出指定报告单",notes = "导出报告单") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name = "json", value = "导出报告单", required = true) |
|||
}) |
|||
@RequestMapping(value="/export", method = RequestMethod.POST) |
|||
public JsonResponse<PatientReportVo.Export> export(@RequestBody @ApiParam @Valid QueryDto<PatientReportDto.ExportCode> param){ |
|||
//查询报告单信息
|
|||
log.info("导出指定报告单:{}", param); |
|||
String path = patientReportService.export(param.getParam(), param.getUserId()); |
|||
log.info("文件路径:{}", path); |
|||
PatientReportVo.Export export = new PatientReportVo.Export(); |
|||
export.setPath(path); |
|||
return JsonResponse.newInstance().ok(export); |
|||
} |
|||
} |
Loading…
Reference in new issue