diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormFillController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormFillController.java index e41e938..88c49a8 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormFillController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormFillController.java @@ -101,15 +101,7 @@ public class StudyFormFillController extends BaseController { studyFormFillQmxx.setFormId(form.getFormId()); List studyFormFillQmxxList = studyFormFillQmxxService.queryList(studyFormFillQmxx); StudyFormFill studyFormFill=studyFormFillService.queryInfo(form.getFormId()); - return AjaxResult.success(localFilePrefix + PdfExportUtil.export( - studyFormFill.getTemplateExportClass(), - studyFormFill.getTemplateExportMethod(), - studyFormFill, - studyFormFillQmxxList, - studyFormFillJcgjList, - form.getLang(), - localFilePath)); - + return AjaxResult.success(localFilePrefix + PdfExportUtil.export(studyFormFill.getTemplateExportClass(), studyFormFill.getTemplateExportMethod(),studyFormFill,studyFormFillQmxxList,studyFormFillJcgjList,form.getLang(),form.getJcgjlx(),localFilePath)); } /** diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/Dosage.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/Dosage.java index fc18581..83a49c4 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/Dosage.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/Dosage.java @@ -159,7 +159,7 @@ public class Dosage { if (node.get("name") != null) { String name = node.get("name").asText(); String value = node.get("value").asText(); - result.add(name + ":" + value); + result.add(name + ":" + value); } } } @@ -172,7 +172,7 @@ public class Dosage { if (node.get("name") != null) { String name = node.get("name").asText(); String value = node.get("value").asText(); - result.add(name + ":" + value); + result.add(name + ":" + value); } } } @@ -180,7 +180,7 @@ public class Dosage { if (StringUtils.isNoneBlank(jcgj.getRemark())) { result.add(getName("备注")+":" + jcgj.getRemark()); } - if (StringUtils.isNoneBlank(jcgj.getRemark())) { + if (StringUtils.isNoneBlank(jcgj.getQmrMc())) { result.add(getName("签名人")+":" + jcgj.getQmrMc()); } PdfBaseUtil.addUnderlinedTitle(document, result.toString(), 10, false); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/Drug.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/Drug.java index 8627225..b0fd093 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/Drug.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/resource/Drug.java @@ -158,7 +158,7 @@ public class Drug { if (node.get("name") != null) { String name = node.get("name").asText(); String value = node.get("value").asText(); - result.add(name + ":" + value); + result.add(name + ":" + value); } } } @@ -171,7 +171,7 @@ public class Drug { if (node.get("name") != null) { String name = node.get("name").asText(); String value = node.get("value").asText(); - result.add(name + ":" + value); + result.add(name + ":" + value); } } } @@ -179,7 +179,7 @@ public class Drug { if (StringUtils.isNoneBlank(jcgj.getRemark())) { result.add(getName("备注")+":" + jcgj.getRemark()); } - if (StringUtils.isNoneBlank(jcgj.getRemark())) { + if (StringUtils.isNoneBlank(jcgj.getQmrMc())) { result.add(getName("签名人")+":" + jcgj.getQmrMc()); } PdfBaseUtil.addUnderlinedTitle(document, result.toString(), 10, false); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/TemplateBaseUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/TemplateBaseUtil.java index ca33687..68a85ba 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/TemplateBaseUtil.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/TemplateBaseUtil.java @@ -39,7 +39,7 @@ public class TemplateBaseUtil { * @throws DocumentException */ public static void addResource(Document document, String resource, String lang) throws IOException, DocumentException { -// [{"mc":"布洛芬","bh":"BLF260115-0014","ph":"","nd":"18ng/mL","source":"ELN配制","ndz":18,"nddw":"ng/mL","kc":1190,"kcdw":"3","syl":"4","syldw":"3","yxzq":360,"yxzqdw":"days"}] +// [{"mc":"布洛芬","bh":"BLF260115-0014","ph":"","nd":"18ng/mL","source":"ELN配制","ndz":18,"nddw":"ng/mL","kc":1190,"kcdw":"3","syl":"4","syldw":"3","yxzq":360,"yxzqdw":"days"}] language = lang; // 9. 表头 BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); @@ -190,7 +190,7 @@ public class TemplateBaseUtil { if (node.get("name") != null) { String name = node.get("name").asText(); String value = node.get("value") != null ? node.get("value").asText() : ""; - result.add(name + ":" + value); + result.add(name + ":" + value); } } } @@ -203,7 +203,7 @@ public class TemplateBaseUtil { if (node.get("name") != null) { String name = node.get("name").asText(); String value = node.get("value") != null ? node.get("value").asText() : ""; - result.add(name + ":" + value); + result.add(name + ":" + value); } } } @@ -212,7 +212,7 @@ public class TemplateBaseUtil { if (StringUtils.isNoneBlank(jcgj.getRemark())) { result.add(getName("备注") + ":" + jcgj.getRemark()); } - if (StringUtils.isNoneBlank(jcgj.getRemark())) { + if (StringUtils.isNoneBlank(jcgj.getQmrMc())) { result.add(getName("签名人") + ":" + jcgj.getQmrMc()); } PdfBaseUtil.addUnderlinedTitle(document, result.toString(), 10, false); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/SP001.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/sp/SP001.java similarity index 93% rename from hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/SP001.java rename to hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/sp/SP001.java index 0f09f07..debd4f5 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/SP001.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/sp/SP001.java @@ -1,9 +1,10 @@ -package com.hxhq.business.utils.pdf.template; +package com.hxhq.business.utils.pdf.template.sp; import com.alibaba.fastjson2.JSONObject; import com.hxhq.business.domain.*; import com.hxhq.business.utils.pdf.PdfBaseUtil; import com.hxhq.business.utils.pdf.PdfExportUtil; +import com.hxhq.business.utils.pdf.template.TemplateBaseUtil; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; import com.hxhq.system.api.model.LoginUser; @@ -31,7 +32,7 @@ public class SP001 { * @param studyFormFill * @return */ - public String exportDetail(StudyFormFill studyFormFill, List studyFormFillQmxxList, List studyFormFillJcgjList, String lang, String localFilePath) { + public String exportDetail(StudyFormFill studyFormFill, List studyFormFillQmxxList, List studyFormFillJcgjList, String lang,Integer jcgjlx, String localFilePath) { language = lang; Document document = null; FileOutputStream fos = null; @@ -96,8 +97,11 @@ public class SP001 { PdfBaseUtil.addUnderlinedTitle(document, getName("签名信息"), 10, true); TemplateBaseUtil.addQmxx(document, studyFormFillQmxxList,language); //稽查轨迹 - PdfBaseUtil.addUnderlinedTitle(document, getName("稽查轨迹"), 10, true); - TemplateBaseUtil.addJcgj(document, studyFormFillJcgjList,language); + Integer jcgjlxMark=999; + if(!jcgjlx.equals(jcgjlxMark)){ + PdfBaseUtil.addUnderlinedTitle(document, getName("稽查轨迹"), 10, true); + TemplateBaseUtil.addJcgj(document, studyFormFillJcgjList,language); + } logger.info("生成成功:{}", filePath); } catch (Exception e) { logger.error("生成失败", e);