zjh
2025-02-13 955a66eec02b8c3fde019110d9c1b604eac017e5
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java
@@ -39,6 +39,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import jodd.util.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Autowired;
@@ -114,6 +115,7 @@
    public AjaxResult savePdf() {
        //从文件地址读入PDF文件  仅存储一次
        String base64String = PDFBinaryUtil.getPDFBinary(configService.selectConfigByKey("default_pdf5Template"));
        if(StringUtil.isNotBlank(base64String)){
        reportTemplateService.remove(new LambdaQueryWrapper<TjReportTemplate>().eq(TjReportTemplate::getName,"体检报告模板5"));
        TjReportTemplate tem = new TjReportTemplate();
        tem.setName("体检报告模板5");
@@ -126,6 +128,8 @@
        if (save) {
            return AjaxResult.success("保存成功");
        }
        }
        return AjaxResult.success("保存失败");
//        String base64String2 = PDFBinaryUtil.getPDFBinary("D:\\Tjreport\\心电图1.pdf");
//        TjReport tem2 = new TjReport();
@@ -1711,7 +1715,7 @@
        we.eq(TjReport::getType, "体检报告");
        TjReport one = tjReportService.getOne(we);
        if (one == null) {
            return AjaxResult.error("暂无体检报告");
            return AjaxResult.error("暂无体检报告,请撤回到总检未审核页面,需总检医生重新审核并生成报告!");
        }
        if ("pdf".equals(one.getPrint())) {
            res.put("flag", "0");
@@ -1721,7 +1725,7 @@
            res.put("url", one.getPath());
            return AjaxResult.success(res);
        } else {
            return AjaxResult.error("暂无体检报告");
            return AjaxResult.error("暂无体检报告,请撤回到总检未审核页面,需总检医生重新审核并生成报告!");
        }
    }
@@ -2146,7 +2150,7 @@
            // 不在使用逻辑删除 逻辑删除导致打印报告生成 查询sql缓慢
            int i = tjReportService.deleteTjReportByReId(tjReport.getReId());
            if (i == 0) {
                return AjaxResult.error("撤回失败!");
                return AjaxResult.error("暂无体检报告,请撤回到总检未审核页面,需总检医生重新审核并生成报告!");
            }
        }
@@ -2169,11 +2173,10 @@
            one.setPrintLastTime(null);
            one.setDownloadLastTime(null);
            if (tjOrderService.updateById(one)) {
//                ycxmService.delOrderYcXmJyByTjh(tjNumber);
                return AjaxResult.success("撤回成功!");
            }
        }
        return AjaxResult.error("撤回失败!");
        return AjaxResult.error("该人员体检记录不存在,请核实人员信息!");
    }