| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/report") |
| | | @Api(tags = "体检报告") |
| | | @Api(tags = "AAAA_体检报告") |
| | | @Transactional |
| | | public class TjReportController extends BaseController { |
| | | @Resource |
| | |
| | | public AjaxResult savePdf() { |
| | | //从文件地址读入PDF文件 仅存储一次 |
| | | String base64String = PDFBinaryUtil.getPDFBinary(configService.selectConfigByKey("default_pdf5Template")); |
| | | reportTemplateService.remove(new LambdaQueryWrapper<TjReportTemplate>().eq(TjReportTemplate::getName,"体检报告模板5")); |
| | | TjReportTemplate tem = new TjReportTemplate(); |
| | | tem.setName("体检报告模板5"); |
| | | tem.setRemark("体检报告模板5"); |
| | | tem.setTemplate(base64String); |
| | | tem.setFlag("1"); |
| | | tem.setOpen("0"); |
| | | tem.setCreateTime(DateUtil.date()); |
| | | final boolean save = reportTemplateService.save(tem); |
| | | if (save) { |
| | | return AjaxResult.success("保存成功"); |
| | |
| | | // return error; |
| | | // } |
| | | // return AjaxResult.success("该用户体检未完成,不能打印报告!!!"); |
| | | int num = tjOrderRemarkService.getTjYqOrderRemarkByTjNum(tjNumber); |
| | | if (num > 0) { |
| | | return AjaxResult.error("有延期项目暂不能生成报告!!!"); |
| | | String config = configService.selectConfigByKey("sfjcwjhyqxm"); |
| | | if(null != config && config.equalsIgnoreCase("Y")){ |
| | | int num = tjOrderRemarkService.getTjYqOrderRemarkByTjNum(tjNumber); |
| | | if (num > 0) return AjaxResult.error("存在未检或延期项目暂不能生成报告!!!"); |
| | | } |
| | | |
| | | // String configByKey = configService.selectConfigByKey("sfkqdyhis"); |
| | |
| | | } else { |
| | | one.setStatus(TjConstants.TJ_CONFIRM); |
| | | } |
| | | one.setReportTime(null); |
| | | //将状态改为未审核 |
| | | // UpdateWrapper updateWrapper=new UpdateWrapper(); |
| | | // updateWrapper.eq("tj_number",tjNumber); |