From d044d7ad6250604e111daad4f2ef818d980ddca2 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Mon, 19 Jan 2026 11:35:05 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix=EF=BC=9A[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=E5=A1=AB=E6=8A=A5=E8=A1=A8=E5=8D=95=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StudyFormFillController.java | 2 +- .../service/impl/StudyFormFillJcgjServiceImpl.java | 8 +- .../java/com/hxhq/business/utils/GyzjJcnrUtil.java | 1 + .../java/com/hxhq/business/utils/MjyJcnrUtil.java | 2 + .../java/com/hxhq/business/utils/TemplateUtil.java | 3 + .../com/hxhq/business/utils/pdf/PdfBaseUtil.java | 20 +- .../hxhq/business/utils/pdf/resource/Dosage.java | 5 +- .../com/hxhq/business/utils/pdf/resource/Drug.java | 5 +- .../hxhq/business/utils/pdf/template/SP001.java | 144 +----------- .../utils/pdf/template/TemplateBaseUtil.java | 247 +++++++++++++++++++++ 10 files changed, 291 insertions(+), 146 deletions(-) create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/TemplateBaseUtil.java 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 21cb675..400bc97 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 @@ -100,7 +100,7 @@ public class StudyFormFillController extends BaseController { StudyFormFillQmxx studyFormFillQmxx = new StudyFormFillQmxx(); studyFormFillQmxx.setFormId(form.getFormId()); List studyFormFillQmxxList = studyFormFillQmxxService.queryList(studyFormFillQmxx); - StudyFormFill studyFormFill=studyFormFillService.getById(form.getFormId()); + StudyFormFill studyFormFill=studyFormFillService.queryInfo(form.getFormId()); Template template=templateService.getById(studyFormFill.getTemplateId()); if(template!=null){ return AjaxResult.success(localFilePrefix + PdfExportUtil.export( diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillJcgjServiceImpl.java index 156b0b1..cc3812d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillJcgjServiceImpl.java @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.GyzjJcgj; import com.hxhq.business.domain.StudyFormPreJcgj; +import com.hxhq.business.enums.zykgl.JcgjlxEnum; import com.hxhq.business.utils.StudyFormUtil; import com.hxhq.business.utils.JctUtil; import com.hxhq.business.utils.StudyFormUtil; @@ -44,7 +45,12 @@ public class StudyFormFillJcgjServiceImpl extends ServiceImpl0){ - queryWrapper.eq("jcgjlx",studyFormFillJcgj.getJcgjlx()); + Integer jcgjlxExport=999; + if(studyFormFillJcgj.getJcgjlx().intValue()==jcgjlxExport){ + queryWrapper.notIn("jcgjlx", JcgjlxEnum.xg.getValue()); + }else{ + queryWrapper.eq("jcgjlx",studyFormFillJcgj.getJcgjlx()); + } } if (StringUtils.isNoneBlank(studyFormFillJcgj.getJcmc())) { queryWrapper.and(p -> p.like("`jcmc`", studyFormFillJcgj.getJcmc()) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/GyzjJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/GyzjJcnrUtil.java index 3b08616..c0aeaff 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/GyzjJcnrUtil.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/GyzjJcnrUtil.java @@ -96,6 +96,7 @@ public class GyzjJcnrUtil { mapLang.put("领取发放","Distribution"); mapLang.put("存储","Storage"); mapLang.put("取出","Take Out"); + mapLang.put("给药制剂详情","Dose Information"); mapLang.put("表单名称","Preset Name"); mapLang.put("锁定发放记录","Lock Record"); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/MjyJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/MjyJcnrUtil.java index 6b73853..b12af56 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/MjyJcnrUtil.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/MjyJcnrUtil.java @@ -98,6 +98,8 @@ public class MjyJcnrUtil { mapLang.put("解锁发放记录","Unlock Record"); mapLang.put("麻精药入库","Controlled Drug Check-in"); mapLang.put("目的","Purpose"); + mapLang.put("麻精药详情","Drug Information"); + mapLang.put("入库位置","入库位置"); mapLang.put("入库条件","入库条件"); mapLang.put("减少量","减少量"); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/TemplateUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/TemplateUtil.java index dc688cb..4fc0d1b 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/TemplateUtil.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/TemplateUtil.java @@ -67,6 +67,9 @@ public class TemplateUtil { mapLang.put("签名时间","Date"); mapLang.put("备注原因","Comment/Reason"); + + + } public static void main(String[] args) { diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java index 0cea8e3..a42c6f4 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java @@ -107,7 +107,7 @@ public class PdfBaseUtil { * @param filePath * @param signText */ - public static Document init(Document document, FileOutputStream fos, String filePath, String signText, String headerText) { + public static Document init(Document document, FileOutputStream fos, String filePath, String signText, String headerText,Boolean showHaderLine) { try { // 创建PDF文档 设置文档边距,避免内容遮挡页眉页脚 // 顶部边距(为页眉留出空间) @@ -125,11 +125,11 @@ public class PdfBaseUtil { fos = new FileOutputStream(filePath); PdfWriter writer = PdfWriter.getInstance(document, fos); // 设置页面事件,每页添加文字页眉 - writer.setPageEvent(new PdfBaseUtil.TextHeaderEvent(signText, headerText)); + writer.setPageEvent(new PdfBaseUtil.TextHeaderEvent(signText, headerText,showHaderLine)); // 5. 设置PDF属性 - document.addTitle("华西海圻"); - document.addAuthor("华西海圻"); - document.addCreator("华西海圻"); + document.addTitle("hxhq"); + document.addAuthor("hxhq"); + document.addCreator("hxhq"); document.addCreationDate(); document.open(); return document; @@ -234,11 +234,13 @@ public class PdfBaseUtil { private String signText; private String headerText; private BaseFont baseFont; + private Boolean showHaderLine=true; private int totalPages = 0; private PdfTemplate total; - public TextHeaderEvent(String signText, String headerText) throws Exception { + public TextHeaderEvent(String signText, String headerText,Boolean showHaderLine) throws Exception { try { + this.showHaderLine = showHaderLine; this.signText = signText; this.headerText = headerText; // 创建字体(支持中文) @@ -350,8 +352,10 @@ public class PdfBaseUtil { canvas.showText(headerText); canvas.endText(); - // 添加页眉分隔线(可选) - addHeaderLine(canvas, pageWidth, textY - 10); + if(showHaderLine){ + // 添加页眉分隔线(可选) + addHeaderLine(canvas, pageWidth, textY - 10); + } } } catch (Exception e) { 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 b884f0f..1a49748 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 @@ -48,7 +48,7 @@ public class Dosage { if (loginUser != null) { sign = loginUser.getSysUser().getNickName(); } - document = PdfBaseUtil.init(document, fos, filePath, sign + PdfExportUtil.parseDateToStr(new Date()), null); + document = PdfBaseUtil.init(document, fos, filePath, sign + PdfExportUtil.parseDateToStr(new Date()), getName("麻精药详情"),false); // 基本信息 PdfBaseUtil.addUnderlinedTitle(document, getName("基本信息"), 10, true); Map formData1 = new LinkedHashMap<>(); @@ -149,9 +149,9 @@ public class Dosage { */ public void addJcgj(Document document, List gyzjJcgjList, String lang) throws IOException, DocumentException { for (GyzjJcgj jcgj : gyzjJcgjList) { - PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime())+ " " + getName(jcgj.getJcmc()), 10, false); StringJoiner result = new StringJoiner(", "); if ("en".equals(lang)) { + PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime())+ " " + getName(jcgj.getJcnrEn()), 10, false); if (StringUtils.isNoneBlank(jcgj.getJcnrEn())) { ObjectMapper mapper = new ObjectMapper(); JsonNode jsonArray = mapper.readTree(jcgj.getJcnrEn()); @@ -165,6 +165,7 @@ public class Dosage { } } else { if (StringUtils.isNoneBlank(jcgj.getJcnr())) { + PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime())+ " " + getName(jcgj.getJcmc()), 10, false); ObjectMapper mapper = new ObjectMapper(); JsonNode jsonArray = mapper.readTree(jcgj.getJcnr()); for (JsonNode node : jsonArray) { 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 d67a7d3..68dc726 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 @@ -47,7 +47,7 @@ public class Drug { if (loginUser != null) { sign = loginUser.getSysUser().getNickName(); } - document = PdfBaseUtil.init(document, fos, filePath, sign + PdfExportUtil.parseDateToStr(new Date()), null); + document = PdfBaseUtil.init(document, fos, filePath, sign + PdfExportUtil.parseDateToStr(new Date()), getName("麻精药详情"),false); // 基本信息 PdfBaseUtil.addUnderlinedTitle(document, getName("基本信息"), 10, true); Map formData1 = new LinkedHashMap<>(); @@ -148,9 +148,9 @@ public class Drug { */ public void addJcgj(Document document, List mjyJcgjList, String lang) throws IOException, DocumentException { for (MjyJcgj jcgj : mjyJcgjList) { - PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime())+ " " + getName(jcgj.getJcmc()), 10, false); StringJoiner result = new StringJoiner(", "); if ("en".equals(lang)) { + PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime())+ " " + getName(jcgj.getJcnrEn()), 10, false); if (StringUtils.isNoneBlank(jcgj.getJcnrEn())) { ObjectMapper mapper = new ObjectMapper(); JsonNode jsonArray = mapper.readTree(jcgj.getJcnrEn()); @@ -163,6 +163,7 @@ public class Drug { } } } else { + PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime())+ " " + getName(jcgj.getJcmc()), 10, false); if (StringUtils.isNoneBlank(jcgj.getJcnr())) { ObjectMapper mapper = new ObjectMapper(); JsonNode jsonArray = mapper.readTree(jcgj.getJcnr()); 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/SP001.java index 1621b94..6a29759 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/SP001.java @@ -49,7 +49,7 @@ public class SP001 { if (loginUser != null) { sign = loginUser.getSysUser().getNickName(); } - document = PdfBaseUtil.init(document, fos, filePath, sign +PdfExportUtil.parseDateToStr(new Date()), "en".equals(language)?template.getShowSn():template.getName()); + document = PdfBaseUtil.init(document, fos, filePath, sign +PdfExportUtil.parseDateToStr(new Date()), "en".equals(language)?template.getShowSn():template.getName(),false); // 基本信息 JSONObject bdnr = JSONObject.parseObject(studyFormFill.getBdnr()); @@ -57,14 +57,14 @@ public class SP001 { Map formData1 = new LinkedHashMap<>(); formData1.put(getName("试验名称"), studyFormFill.getStudyMc()); formData1.put(getName("试验编号"), studyFormFill.getStudySn()); - formData1.put(getName("方法编号"), bdnr.getString("methodCode")); - formData1.put(getName("版本号"), bdnr.getString("methodCode")); + formData1.put(getName("方法编号"), (StringUtils.isNoneBlank(bdnr.getString("methodCode"))? bdnr.getString("methodCode"):"")); + formData1.put(getName("版本号"), (StringUtils.isNoneBlank(bdnr.getString("methodCode"))? bdnr.getString("methodCode"):"")); PdfBaseUtil.addFormTableColumns(document, formData1, 2); PdfBaseUtil.addUnderlinedTitle(document, getName("试验配置条件"), 10, true); Map formData2 = new LinkedHashMap<>(); - formData2.put(getName("预填"), bdnr.getString("pre") + (StringUtils.isNoneBlank(bdnr.getString("preOther")) ? bdnr.getString("preOther") : "")); - formData2.put(getName("实际"), bdnr.getString("act") + (StringUtils.isNoneBlank(bdnr.getString("actOther")) ? bdnr.getString("actOther") : "")); + formData2.put(getName("预填"),(StringUtils.isNoneBlank(bdnr.getString("pre"))? bdnr.getString("pre"):"") + (StringUtils.isNoneBlank(bdnr.getString("preOther")) ? bdnr.getString("preOther") : "")); + formData2.put(getName("实际"),(StringUtils.isNoneBlank(bdnr.getString("act"))? bdnr.getString("act"):"") + (StringUtils.isNoneBlank(bdnr.getString("actOther")) ? bdnr.getString("actOther") : "")); PdfBaseUtil.addFormTableColumns(document, formData2, 2); PdfBaseUtil.addUnderlinedTitle(document, getName("配置时间"), 10, true); @@ -75,10 +75,13 @@ public class SP001 { // 签名信息 PdfBaseUtil.addUnderlinedTitle(document, getName("试验试剂信息"), 10, true); - addResource(document, studyFormFill.getResource()); + TemplateBaseUtil.addResource(document, studyFormFill.getResource(),language); PdfBaseUtil.addUnderlinedTitle(document, getName("仪器使用信息"), 10, true); + TemplateBaseUtil.addInstrument(document, "",language); + PdfBaseUtil.addUnderlinedTitle(document, getName("存储条件"), 10, true); + Map formData4 = new LinkedHashMap<>(); formData4.put(getName("存储条件"), bdnr.getString("storageCondition") + (StringUtils.isNoneBlank(bdnr.getString("storageConditionOther")) ? bdnr.getString("storageConditionOther") : "")); PdfBaseUtil.addFormTableColumns(document, formData4, 1); @@ -98,10 +101,10 @@ public class SP001 { // 签名信息 PdfBaseUtil.addUnderlinedTitle(document, getName("签名信息"), 10, true); - addQmxx(document, studyFormFillQmxxList); + TemplateBaseUtil.addQmxx(document, studyFormFillQmxxList,language); //稽查轨迹 PdfBaseUtil.addUnderlinedTitle(document, getName("稽查轨迹"), 10, true); - addJcgj(document, studyFormFillJcgjList); + TemplateBaseUtil.addJcgj(document, studyFormFillJcgjList,language); logger.info("生成成功:{}", filePath); } catch (Exception e) { logger.error("生成失败", e); @@ -121,129 +124,6 @@ public class SP001 { return filePath; } - /** - * 仪器使用信息 - * - * @param document - * @param resource - * @throws IOException - * @throws DocumentException - */ - public void addResource(Document document, String resource) 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"}] - if (StringUtils.isNoneBlank(resource)) { - JSONArray jsonArray = JSONArray.parseArray(resource); - // 9. 表头 - BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); - Font headerFont = new Font(bfChinese, 10, Font.NORMAL); - Font contentFont = new Font(bfChinese, 10, Font.NORMAL); - // 8. 创建表格 - PdfPTable table = new PdfPTable(6); - table.setWidthPercentage(100); - String[] headers = {getName("试剂名称"), getName("编号"), getName("批号"), getName("浓度/含量/纯度"), getName("来源"), getName("失效日")}; - for (String header : headers) { - PdfPCell cell = new PdfPCell(new Phrase(header, headerFont)); - cell.setHorizontalAlignment(Element.ALIGN_CENTER); - cell.setPadding(8); - cell.setBorderWidth(1); - table.addCell(cell); - } - int rowNum = 0; - for (int i = 0; i < jsonArray.size(); i++) { - JSONObject obj = jsonArray.getJSONObject(i); - // 交替行颜色 - if (rowNum % 2 == 0) { - table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); - } else { - table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); - } - table.addCell(PdfBaseUtil.createCell(obj.getString("mc"), contentFont)); - table.addCell(PdfBaseUtil.createCell(obj.getString("bh"), contentFont)); - table.addCell(PdfBaseUtil.createCell(obj.getString("ph"), contentFont)); - table.addCell(PdfBaseUtil.createCell(obj.getString("nd"), contentFont)); - table.addCell(PdfBaseUtil.createCell(obj.getString("source"), contentFont)); - table.addCell(PdfBaseUtil.createCell(StringUtils.isNoneBlank(obj.getString("sxrq")) ? obj.getString("sxrq") : "", contentFont)); - rowNum++; - } - document.add(table); - - } - } - - - /** - * 签名信息 - * - * @param document - * @param studyFormFillQmxxList - * @throws IOException - * @throws DocumentException - */ - public void addQmxx(Document document, List studyFormFillQmxxList) throws IOException, DocumentException { - // 9. 表头 - BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); - Font headerFont = new Font(bfChinese, 10, Font.NORMAL); - Font contentFont = new Font(bfChinese, 10, Font.NORMAL); - // 8. 创建表格 - PdfPTable table = new PdfPTable(4); - table.setWidthPercentage(100); - String[] headers = {getName("签名人"), getName("签名意义"), getName("签名时间"), getName("备注原因")}; - for (String header : headers) { - PdfPCell cell = new PdfPCell(new Phrase(header, headerFont)); - cell.setHorizontalAlignment(Element.ALIGN_CENTER); - cell.setPadding(8); - cell.setBorderWidth(1); - table.addCell(cell); - } - int rowNum = 0; - for (StudyFormFillQmxx studyFormFillQmxx : studyFormFillQmxxList) { - // 交替行颜色 - if (rowNum % 2 == 0) { - table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); - } else { - table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); - } - table.addCell(PdfBaseUtil.createCell(studyFormFillQmxx.getQmrMc(), contentFont)); - table.addCell(PdfBaseUtil.createCell(studyFormFillQmxx.getQmyy(), contentFont)); - table.addCell(PdfBaseUtil.createCell(PdfExportUtil.parseDateToStr(studyFormFillQmxx.getCreateTime()), contentFont)); - table.addCell(PdfBaseUtil.createCell(studyFormFillQmxx.getRemark(), contentFont)); - rowNum++; - } - document.add(table); - } - - /** - * 稽查轨迹 - * - * @param document - * @param studyFormFillJcgjList - * @throws IOException - * @throws DocumentException - */ - public void addJcgj(Document document, List studyFormFillJcgjList) throws IOException, DocumentException { - for (StudyFormFillJcgj jcgj : studyFormFillJcgjList) { - PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime()) + " " + jcgj.getJcmc(), 10, false); - StringJoiner result = new StringJoiner(", "); - if (StringUtils.isNoneBlank(jcgj.getJcnr())) { - ObjectMapper mapper = new ObjectMapper(); - JsonNode jsonArray = mapper.readTree(jcgj.getJcnr()); - for (JsonNode node : jsonArray) { - 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); - } - } - } - if (StringUtils.isNoneBlank(jcgj.getRemark())) { - result.add(getName("备注") + ":" + jcgj.getRemark()); - } - if (StringUtils.isNoneBlank(jcgj.getRemark())) { - result.add(getName("签名人") + ":" + jcgj.getQmrMc()); - } - PdfBaseUtil.addUnderlinedTitle(document, result.toString(), 10, false); - } - } /** * 获取名称 @@ -252,7 +132,7 @@ public class SP001 { * @return */ public String getName(String name) { - return "en".equals(language) ? TemplateUtil.getEn(name) : name; + return TemplateBaseUtil.getNameByLanguage(name,language); } } 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 new file mode 100644 index 0000000..2891049 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/TemplateBaseUtil.java @@ -0,0 +1,247 @@ +package com.hxhq.business.utils.pdf.template; + +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.hxhq.business.domain.StudyFormFill; +import com.hxhq.business.domain.StudyFormFillJcgj; +import com.hxhq.business.domain.StudyFormFillQmxx; +import com.hxhq.business.domain.Template; +import com.hxhq.business.utils.TemplateUtil; +import com.hxhq.business.utils.pdf.PdfBaseUtil; +import com.hxhq.business.utils.pdf.PdfExportUtil; +import com.hxhq.common.core.utils.StringUtils; +import com.hxhq.common.security.utils.SecurityUtils; +import com.hxhq.system.api.model.LoginUser; +import com.itextpdf.text.*; +import com.itextpdf.text.pdf.BaseFont; +import com.itextpdf.text.pdf.PdfPCell; +import com.itextpdf.text.pdf.PdfPTable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.List; +import java.util.*; + +/** + * 色谱-生物样品分析溶液配制表 + * + * @author tanfei + */ +public class TemplateBaseUtil { + private static final Logger logger = LoggerFactory.getLogger(TemplateBaseUtil.class.getName()); + public static String language = "zh"; + + /** + * 试验试剂信息 + * + * @param document + * @param resource + * @throws IOException + * @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"}] + language = lang; + // 9. 表头 + BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); + Font headerFont = new Font(bfChinese, 10, Font.NORMAL); + Font contentFont = new Font(bfChinese, 10, Font.NORMAL); + // 8. 创建表格 + PdfPTable table = new PdfPTable(6); + table.setWidthPercentage(100); + String[] headers = {getName("试剂名称"), getName("编号"), getName("批号"), getName("浓度/含量/纯度"), getName("来源"), getName("失效日")}; + for (String header : headers) { + PdfPCell cell = new PdfPCell(new Phrase(header, headerFont)); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setPadding(8); + table.addCell(cell); + } + if (StringUtils.isNoneBlank(resource)) { + JSONArray jsonArray = JSONArray.parseArray(resource); + int rowNum = 0; + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject obj = jsonArray.getJSONObject(i); + // 交替行颜色 + if (rowNum % 2 == 0) { + table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); + } else { + table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); + } + table.addCell(PdfBaseUtil.createCell(obj.getString("mc"), contentFont)); + table.addCell(PdfBaseUtil.createCell(obj.getString("bh"), contentFont)); + table.addCell(PdfBaseUtil.createCell(obj.getString("ph"), contentFont)); + table.addCell(PdfBaseUtil.createCell(obj.getString("nd"), contentFont)); + table.addCell(PdfBaseUtil.createCell(obj.getString("source"), contentFont)); + table.addCell(PdfBaseUtil.createCell(StringUtils.isNoneBlank(obj.getString("sxrq")) ? obj.getString("sxrq") : "", contentFont)); + rowNum++; + } + } + document.add(table); + } + + /** + * 仪器使用信息 + * + * @param document + * @param instrument + * @throws IOException + * @throws DocumentException + */ + public static void addInstrument(Document document, String instrument, String lang) throws IOException, DocumentException { + language = lang; + // 9. 表头 + BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); + Font headerFont = new Font(bfChinese, 10, Font.NORMAL); + Font contentFont = new Font(bfChinese, 10, Font.NORMAL); + // 8. 创建表格 + PdfPTable table = new PdfPTable(4); + table.setWidthPercentage(100); + String[] headers = {getName("仪器名称"), getName("仪器型号"), getName("仪器编号"), getName("下次测试/校准/检定日期")}; + for (String header : headers) { + PdfPCell cell = new PdfPCell(new Phrase(header, headerFont)); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setPadding(8); + table.addCell(cell); + } + if (StringUtils.isNoneBlank(instrument)) { +// JSONArray jsonArray = JSONArray.parseArray(instrument); +// int rowNum = 0; +// for (int i = 0; i < jsonArray.size(); i++) { +// JSONObject obj = jsonArray.getJSONObject(i); +// // 交替行颜色 +// if (rowNum % 2 == 0) { +// table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); +// } else { +// table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); +// } +// table.addCell(PdfBaseUtil.createCell(obj.getString("mc"), contentFont)); +// table.addCell(PdfBaseUtil.createCell(obj.getString("bh"), contentFont)); +// table.addCell(PdfBaseUtil.createCell(obj.getString("ph"), contentFont)); +// table.addCell(PdfBaseUtil.createCell(obj.getString("nd"), contentFont)); +// table.addCell(PdfBaseUtil.createCell(obj.getString("source"), contentFont)); +// table.addCell(PdfBaseUtil.createCell(StringUtils.isNoneBlank(obj.getString("sxrq")) ? obj.getString("sxrq") : "", contentFont)); +// rowNum++; +// } + } + document.add(table); + } + + + /** + * 签名信息 + * + * @param document + * @param studyFormFillQmxxList + * @throws IOException + * @throws DocumentException + */ + public static void addQmxx(Document document, List studyFormFillQmxxList, String lang) throws IOException, DocumentException { + language = lang; + // 9. 表头 + BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); + Font headerFont = new Font(bfChinese, 10, Font.NORMAL); + Font contentFont = new Font(bfChinese, 10, Font.NORMAL); + // 8. 创建表格 + PdfPTable table = new PdfPTable(4); + table.setWidthPercentage(100); + String[] headers = {getName("签名人"), getName("签名意义"), getName("签名时间"), getName("备注原因")}; + for (String header : headers) { + PdfPCell cell = new PdfPCell(new Phrase(header, headerFont)); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setPadding(8); + table.addCell(cell); + } + if(studyFormFillQmxxList.size()>0){ + int rowNum = 0; + for (StudyFormFillQmxx studyFormFillQmxx : studyFormFillQmxxList) { + // 交替行颜色 + if (rowNum % 2 == 0) { + table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); + } else { + table.getDefaultCell().setBackgroundColor(BaseColor.WHITE); + } + table.addCell(PdfBaseUtil.createCell(studyFormFillQmxx.getQmrMc(), contentFont)); + table.addCell(PdfBaseUtil.createCell("en".equals(language)?studyFormFillQmxx.getQmyyEn():studyFormFillQmxx.getQmyy(), contentFont)); + table.addCell(PdfBaseUtil.createCell(PdfExportUtil.parseDateToStr(studyFormFillQmxx.getCreateTime()), contentFont)); + table.addCell(PdfBaseUtil.createCell(studyFormFillQmxx.getRemark(), contentFont)); + rowNum++; + } + } + document.add(table); + } + + /** + * 稽查轨迹 + * + * @param document + * @param studyFormFillJcgjList + * @throws IOException + * @throws DocumentException + */ + public static void addJcgj(Document document, List studyFormFillJcgjList, String lang) throws IOException, DocumentException { + language = lang; + for (StudyFormFillJcgj jcgj : studyFormFillJcgjList) { + StringJoiner result = new StringJoiner(", "); + if ("en".equals(lang)) { + PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime()) + " " + jcgj.getJcmcEn(), 10, false); + if (StringUtils.isNoneBlank(jcgj.getJcnrEn())) { + ObjectMapper mapper = new ObjectMapper(); + JsonNode jsonArray = mapper.readTree(jcgj.getJcnrEn()); + for (JsonNode node : jsonArray) { + 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); + } + } + } + }else{ + PdfBaseUtil.addUnderlinedTitle(document, PdfExportUtil.parseDateToStr(jcgj.getCreateTime()) + " " + jcgj.getJcmc(), 10, false); + if (StringUtils.isNoneBlank(jcgj.getJcnr())) { + ObjectMapper mapper = new ObjectMapper(); + JsonNode jsonArray = mapper.readTree(jcgj.getJcnr()); + for (JsonNode node : jsonArray) { + 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); + } + } + } + } + + if (StringUtils.isNoneBlank(jcgj.getRemark())) { + result.add(getName("备注") + ":" + jcgj.getRemark()); + } + if (StringUtils.isNoneBlank(jcgj.getRemark())) { + result.add(getName("签名人") + ":" + jcgj.getQmrMc()); + } + PdfBaseUtil.addUnderlinedTitle(document, result.toString(), 10, false); + } + } + + /** + * 获取名称 + * + * @param name + * @return + */ + public static String getNameByLanguage(String name, String lang) { + return "en".equals(lang) ? TemplateUtil.getEn(name) : name; + } + + /** + * 获取名称 + * + * @param name + * @return + */ + public static String getName(String name) { + return "en".equals(language) ? TemplateUtil.getEn(name) : name; + } + +} From bf22da7c623d800a2de085312c65da44450bdb2a Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Mon, 19 Jan 2026 12:06:53 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix=EF=BC=9A[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=E8=A1=A8=E5=8D=95=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java | 12 ++++++------ .../java/com/hxhq/business/utils/pdf/resource/Dosage.java | 2 +- .../main/java/com/hxhq/business/utils/pdf/resource/Drug.java | 2 +- .../java/com/hxhq/business/utils/pdf/template/SP001.java | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java index a42c6f4..bcdbf9d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/PdfBaseUtil.java @@ -33,7 +33,7 @@ public class PdfBaseUtil { * * @return 完整文件路径, */ - public static String getFilePath(String localFilePath) { + public static String getFilePath(String localFilePath,String type) { // 1. 获取当前年月日并创建文件夹 Date now = new Date(); SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy"); @@ -55,13 +55,13 @@ public class PdfBaseUtil { dir.mkdirs(); } // 4. 生成文件名 - String fileName = "document_" + timestamp + ".pdf"; + String fileName =type+ "_" + timestamp + ".pdf"; // 5. 完整文件路径 return Paths.get(folderPath, fileName).toString(); } /** - * 添加带下划线的标题 + * 添加标题 * * @param document PDF文档对象 * @param titleText 标题文本 @@ -373,13 +373,13 @@ public class PdfBaseUtil { */ private void addRepeatedWatermark(PdfContentByte content, float width, float height, String signText) { // 计算文字尺寸 - float fontSize = Convert.toFloat("8"); - float textWidth = baseFont.getWidthPoint(signText, fontSize); + float fontSize = Convert.toFloat("10"); + float textWidth = baseFont.getWidthPoint(signText, fontSize)+50; float textHeight = baseFont.getAscentPoint(signText, fontSize) - baseFont.getDescentPoint(signText, fontSize); // 计算间距 - float stepX = textWidth + 150; + float stepX = textWidth + 70; float stepY = textHeight + 100; // 添加重复水印 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 1a49748..58fc9a9 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 @@ -41,7 +41,7 @@ public class Dosage { language=lang; Document document = null; FileOutputStream fos = null; - String filePath = PdfBaseUtil.getFilePath(localFilePath); + String filePath = PdfBaseUtil.getFilePath(localFilePath,"Dosage"); try { String sign = "hxhq"; LoginUser loginUser = SecurityUtils.getLoginUser(); 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 68dc726..1badc9b 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 @@ -40,7 +40,7 @@ public class Drug { language=lang; Document document = null; FileOutputStream fos = null; - String filePath = PdfBaseUtil.getFilePath(localFilePath); + String filePath = PdfBaseUtil.getFilePath(localFilePath,"Drug"); try { String sign = "hxhq" ; LoginUser loginUser = SecurityUtils.getLoginUser(); 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/SP001.java index 6a29759..399734e 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/SP001.java @@ -42,7 +42,7 @@ public class SP001 { language = lang; Document document = null; FileOutputStream fos = null; - String filePath = PdfBaseUtil.getFilePath(localFilePath); + String filePath = PdfBaseUtil.getFilePath(localFilePath,"SP001"); try { String sign = "hxhq"; LoginUser loginUser = SecurityUtils.getLoginUser(); From 17b5b646142a88fedcffb8639f593eadecab92a1 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Mon, 19 Jan 2026 12:10:01 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix=EF=BC=9A[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/GyzjFfjlJcgjServiceImpl.java | 4 +- .../business/service/impl/GyzjJcgjServiceImpl.java | 5 +- .../business/service/impl/GyzjTzServiceImpl.java | 4 +- .../service/impl/MjyFfjlJcgjServiceImpl.java | 4 +- .../business/service/impl/MjyJcgjServiceImpl.java | 3 +- .../business/service/impl/MjyTzServiceImpl.java | 2 +- .../impl/StudyFormApplyJcgjServiceImpl.java | 5 +- .../impl/StudyFormApplyQmxxServiceImpl.java | 5 +- .../service/impl/StudyFormApplyServiceImpl.java | 5 +- .../service/impl/StudyFormFillJcgjServiceImpl.java | 6 +- .../service/impl/StudyFormFillQmxxServiceImpl.java | 4 +- .../service/impl/StudyFormFillServiceImpl.java | 2 +- .../service/impl/StudyFormPlanJcgjServiceImpl.java | 5 +- .../service/impl/StudyFormPlanQmxxServiceImpl.java | 5 +- .../service/impl/StudyFormPlanServiceImpl.java | 3 +- .../service/impl/StudyFormPreJcgjServiceImpl.java | 5 +- .../service/impl/StudyFormPreQmxxServiceImpl.java | 6 +- .../service/impl/StudyFormPreServiceImpl.java | 6 +- .../java/com/hxhq/business/utils/GyzjJcnrUtil.java | 154 -------------------- .../java/com/hxhq/business/utils/MjyJcnrUtil.java | 151 -------------------- .../com/hxhq/business/utils/StudyFormUtil.java | 99 ------------- .../java/com/hxhq/business/utils/TemplateUtil.java | 116 --------------- .../com/hxhq/business/utils/lang/GyzjJcnrUtil.java | 155 +++++++++++++++++++++ .../com/hxhq/business/utils/lang/MjyJcnrUtil.java | 151 ++++++++++++++++++++ .../hxhq/business/utils/lang/StudyFormUtil.java | 100 +++++++++++++ .../com/hxhq/business/utils/lang/TemplateUtil.java | 117 ++++++++++++++++ .../hxhq/business/utils/pdf/resource/Dosage.java | 2 +- .../com/hxhq/business/utils/pdf/resource/Drug.java | 2 +- .../hxhq/business/utils/pdf/template/SP001.java | 7 - .../utils/pdf/template/TemplateBaseUtil.java | 7 +- 30 files changed, 544 insertions(+), 596 deletions(-) delete mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/GyzjJcnrUtil.java delete mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/MjyJcnrUtil.java delete mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/StudyFormUtil.java delete mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/TemplateUtil.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GyzjJcnrUtil.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/MjyJcnrUtil.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/StudyFormUtil.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/TemplateUtil.java diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlJcgjServiceImpl.java index 09515a0..d3fec72 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlJcgjServiceImpl.java @@ -4,17 +4,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hxhq.business.domain.GyzjFfjlJcgj; -import com.hxhq.business.domain.GyzjFfjlJcgj; import com.hxhq.business.mapper.GyzjFfjlJcgjMapper; import com.hxhq.business.service.IGyzjFfjlJcgjService; import com.hxhq.business.utils.JctUtil; -import com.hxhq.business.utils.GyzjJcnrUtil; +import com.hxhq.business.utils.lang.GyzjJcnrUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; -import java.rmi.ServerException; import java.util.List; import java.util.Map; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjJcgjServiceImpl.java index 2a0637c..7124da8 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjJcgjServiceImpl.java @@ -6,16 +6,13 @@ import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.GyzjJcgj; -import com.hxhq.business.domain.GyzjJcgj; -import com.hxhq.business.domain.GyzjJcgj; import com.hxhq.business.utils.JctUtil; -import com.hxhq.business.utils.GyzjJcnrUtil; +import com.hxhq.business.utils.lang.GyzjJcnrUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.GyzjJcgjMapper; -import com.hxhq.business.domain.GyzjJcgj; import com.hxhq.business.service.IGyzjJcgjService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjTzServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjTzServiceImpl.java index 7e92e49..d7632c3 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjTzServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjTzServiceImpl.java @@ -3,14 +3,12 @@ package com.hxhq.business.service.impl; import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.domain.GyzjJcgj; import com.hxhq.business.domain.GyzjTz; -import com.hxhq.business.utils.GyzjJcnrUtil; +import com.hxhq.business.utils.lang.GyzjJcnrUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.GyzjTzMapper; -import com.hxhq.business.domain.GyzjTz; import com.hxhq.business.service.IGyzjTzService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlJcgjServiceImpl.java index d71b7ce..fcd6d8f 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlJcgjServiceImpl.java @@ -3,12 +3,10 @@ package com.hxhq.business.service.impl; import java.util.List; import java.util.Map; -import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.domain.MjyJcgj; import com.hxhq.business.utils.JctUtil; -import com.hxhq.business.utils.MjyJcnrUtil; +import com.hxhq.business.utils.lang.MjyJcnrUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyJcgjServiceImpl.java index d94325d..668543a 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyJcgjServiceImpl.java @@ -3,12 +3,11 @@ package com.hxhq.business.service.impl; import java.util.List; import java.util.Map; -import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.MjyJcgj; import com.hxhq.business.utils.JctUtil; -import com.hxhq.business.utils.MjyJcnrUtil; +import com.hxhq.business.utils.lang.MjyJcnrUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyTzServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyTzServiceImpl.java index e180c96..5d4b07c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyTzServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyTzServiceImpl.java @@ -4,7 +4,7 @@ import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.utils.MjyJcnrUtil; +import com.hxhq.business.utils.lang.MjyJcnrUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyJcgjServiceImpl.java index 88dd4b2..b9f3189 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyJcgjServiceImpl.java @@ -7,16 +7,13 @@ import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.StudyFormApplyJcgj; -import com.hxhq.business.domain.StudyFormPreJcgj; import com.hxhq.business.utils.JctUtil; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.utils.DateUtils; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormApplyJcgjMapper; -import com.hxhq.business.domain.StudyFormApplyJcgj; import com.hxhq.business.service.IStudyFormApplyJcgjService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyQmxxServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyQmxxServiceImpl.java index 18a8fe0..d4587bc 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyQmxxServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyQmxxServiceImpl.java @@ -4,14 +4,11 @@ import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.StudyFormApplyQmxx; -import com.hxhq.business.domain.StudyFormPreQmxx; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.utils.DateUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormApplyQmxxMapper; -import com.hxhq.business.domain.StudyFormApplyQmxx; import com.hxhq.business.service.IStudyFormApplyQmxxService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java index 22490e1..e33abff 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java @@ -6,21 +6,18 @@ import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.*; -import com.hxhq.business.dto.mjy.DetailDto; import com.hxhq.business.dto.study.StudyFormApplyListDto; import com.hxhq.business.enums.NormalEnum; import com.hxhq.business.enums.study.StudyFormApplyBdztEnum; -import com.hxhq.business.enums.study.StudyFormApplyBdztEnum; import com.hxhq.business.enums.zykgl.JcgjlxEnum; import com.hxhq.business.enums.zykgl.JcmcysEnum; -import com.hxhq.business.enums.zykgl.JlztEnum; import com.hxhq.business.form.study.*; import com.hxhq.business.form.study.StudyFormApplySearchForm; import com.hxhq.business.service.IStudyFormApplyJcgjService; import com.hxhq.business.service.IStudyFormApplyQmxxService; import com.hxhq.business.utils.JctUtil; import com.hxhq.business.utils.ObjectCompareUtil; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillJcgjServiceImpl.java index cc3812d..51169a1 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillJcgjServiceImpl.java @@ -6,14 +6,10 @@ import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.domain.GyzjJcgj; -import com.hxhq.business.domain.StudyFormPreJcgj; import com.hxhq.business.enums.zykgl.JcgjlxEnum; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.business.utils.JctUtil; -import com.hxhq.business.utils.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.utils.DateUtils; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillQmxxServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillQmxxServiceImpl.java index 08b3ed7..0370a73 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillQmxxServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillQmxxServiceImpl.java @@ -3,10 +3,8 @@ package com.hxhq.business.service.impl; import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.domain.StudyFormPreQmxx; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.utils.DateUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormFillQmxxMapper; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java index 57c1325..75c514b 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java @@ -17,7 +17,7 @@ import com.hxhq.business.form.study.StudyFormFillSearchForm; import com.hxhq.business.service.*; import com.hxhq.business.utils.JctUtil; import com.hxhq.business.utils.ObjectCompareUtil; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanJcgjServiceImpl.java index 090c4bd..f162229 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanJcgjServiceImpl.java @@ -7,16 +7,13 @@ import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.StudyFormPlanJcgj; -import com.hxhq.business.domain.StudyFormPlanJcgj; import com.hxhq.business.utils.JctUtil; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.utils.DateUtils; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormPlanJcgjMapper; -import com.hxhq.business.domain.StudyFormPlanJcgj; import com.hxhq.business.service.IStudyFormPlanJcgjService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanQmxxServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanQmxxServiceImpl.java index 3c3ab6b..a5624c3 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanQmxxServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanQmxxServiceImpl.java @@ -4,14 +4,11 @@ import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.StudyFormPlanQmxx; -import com.hxhq.business.domain.StudyFormPlanQmxx; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.utils.DateUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormPlanQmxxMapper; -import com.hxhq.business.domain.StudyFormPlanQmxx; import com.hxhq.business.service.IStudyFormPlanQmxxService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java index 5da583e..613555e 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java @@ -9,7 +9,6 @@ import com.hxhq.business.domain.*; import com.hxhq.business.domain.StudyFormPlan; import com.hxhq.business.dto.study.StudyFormPlanListDto; import com.hxhq.business.enums.study.StudyFormPlanBdztEnum; -import com.hxhq.business.enums.study.StudyFormPlanBdztEnum; import com.hxhq.business.enums.zykgl.JcgjlxEnum; import com.hxhq.business.enums.zykgl.JcmcysEnum; import com.hxhq.business.form.study.StudyFormPlanSearchForm; @@ -18,7 +17,7 @@ import com.hxhq.business.service.IStudyFormPlanJcgjService; import com.hxhq.business.service.IStudyFormPlanQmxxService; import com.hxhq.business.utils.JctUtil; import com.hxhq.business.utils.ObjectCompareUtil; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreJcgjServiceImpl.java index 8ee107b..46fefa0 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreJcgjServiceImpl.java @@ -6,17 +6,14 @@ import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.domain.MjyJcgj; import com.hxhq.business.domain.StudyFormPreJcgj; import com.hxhq.business.utils.JctUtil; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.utils.DateUtils; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormPreJcgjMapper; -import com.hxhq.business.domain.StudyFormPreJcgj; import com.hxhq.business.service.IStudyFormPreJcgjService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreQmxxServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreQmxxServiceImpl.java index e133943..e475bef 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreQmxxServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreQmxxServiceImpl.java @@ -4,15 +4,11 @@ import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.StudyFormPreQmxx; -import com.hxhq.business.domain.StudyFormPreJcgj; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.utils.DateUtils; -import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormPreQmxxMapper; -import com.hxhq.business.domain.StudyFormPreQmxx; import com.hxhq.business.service.IStudyFormPreQmxxService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java index 10a2c9b..404784e 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java @@ -7,20 +7,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.*; import com.hxhq.business.dto.study.StudyFormPreListDto; -import com.hxhq.business.enums.NormalEnum; -import com.hxhq.business.enums.study.StudyFormPlanBdztEnum; import com.hxhq.business.enums.study.StudyFormPreBdztEnum; import com.hxhq.business.enums.study.StudyFormPreFzrshztEnum; import com.hxhq.business.enums.zykgl.JcgjlxEnum; import com.hxhq.business.enums.zykgl.JcmcysEnum; -import com.hxhq.business.form.common.SignForm; import com.hxhq.business.form.study.StudyFormPreAuditForm; import com.hxhq.business.form.study.StudyFormPreSearchForm; import com.hxhq.business.form.study.StudyFormUpdateForm; import com.hxhq.business.service.*; import com.hxhq.business.utils.JctUtil; import com.hxhq.business.utils.ObjectCompareUtil; -import com.hxhq.business.utils.StudyFormUtil; +import com.hxhq.business.utils.lang.StudyFormUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; @@ -30,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormPreMapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.web.bind.annotation.PostMapping; /** * 试验-预填单Service业务层处理 diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/GyzjJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/GyzjJcnrUtil.java deleted file mode 100644 index c0aeaff..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/GyzjJcnrUtil.java +++ /dev/null @@ -1,154 +0,0 @@ -package com.hxhq.business.utils; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * @author tanfei - */ -public class GyzjJcnrUtil { - private static final Logger logger = LoggerFactory.getLogger(GyzjJcnrUtil.class.getName()); - private static HashMap mapLang=new HashMap<>(); - static { - mapLang.put("入库","In Storage"); - mapLang.put("未入库","Not in Storage"); - mapLang.put("已发放","In Use"); - mapLang.put("已锁定","'Locked'"); - mapLang.put("待归档","Pending Archiving"); - mapLang.put("归档","'Archived'"); - mapLang.put("待解档","Pending De-archiving"); - mapLang.put("借阅开始时间","Checkout Start Date"); - mapLang.put("借阅结束时间","Checkout End Date"); - mapLang.put("处置方式","Dispose Method"); - mapLang.put("处置原因","Reason"); - mapLang.put("处置量","Amount"); - mapLang.put("处置人","Operator"); - mapLang.put("复核人","Reviewer"); - mapLang.put("监督人","Supervisor"); - mapLang.put("钥匙1领取人","Key 1 User"); - mapLang.put("钥匙2领取人","Key 2 User"); - mapLang.put("出库量","Out Amount"); - mapLang.put("转移条件","Transfer Condition"); - mapLang.put("出库毛重","Check-out Gross Weight"); - mapLang.put("入库毛重","Check-in Gross Weight"); - mapLang.put("使用量","Usage Amount"); - mapLang.put("归还人1","Returner 1"); - mapLang.put("归还人2","Returner 2"); - mapLang.put("库管员1","Warehouse Keeper 1"); - mapLang.put("库管员2","Warehouse Keeper 2"); - mapLang.put("签名人1","Signed By 1"); - mapLang.put("签名人2","Signed By 2"); - mapLang.put("入库位置","Check-in Location"); - mapLang.put("入库条件","Check-in Condition"); - mapLang.put("入库净重","Check-in Net Weight"); - mapLang.put("入库量","Total Amount"); - mapLang.put("申请备注","Apply Comment"); - mapLang.put("审核备注","Approve Comment"); - mapLang.put("领取人","Recipient"); - mapLang.put("领取人2","Recipient 2"); - mapLang.put("发放人","Issuer"); - mapLang.put("发放人2","Issuer 2"); - mapLang.put("存储条件","Storage Condition"); - mapLang.put("存储位置","Storage Location"); - mapLang.put("使用人","User"); - mapLang.put("领取/归还人","Recipient/Returner"); - mapLang.put("发放/接收人","Issuer/Receiver"); - mapLang.put("操作类型","Action"); - mapLang.put("操作量","Amount"); - mapLang.put("备注/原因","Comment/Reason"); - mapLang.put("操作时间","Datetime"); - mapLang.put("名称","Name"); - mapLang.put("编号","ID"); - mapLang.put("浓度","Concentration"); - mapLang.put("库存量","Amount"); - mapLang.put("失效日期","Expiration"); - mapLang.put("制剂状态","Status"); - mapLang.put("所属表单","In Record"); - mapLang.put("所属试验信息","From Study"); - mapLang.put("表单所属人","By User"); - mapLang.put("基本信息","Information"); - mapLang.put("表单信息","Record Information"); - mapLang.put("稽查轨迹","Track Record"); - mapLang.put("给药制剂台账","Dose Table"); - mapLang.put("备注","Comment"); - mapLang.put("签名人","Signed By"); - - mapLang.put("申请解档","Apply for De-archiving"); - mapLang.put("申请借阅","Apply for Check-out"); - mapLang.put("申请归档","Apply for Archiving"); - mapLang.put("锁定给药制剂","Lock Drug"); - mapLang.put("解锁给药制剂","Unlock Drug"); - mapLang.put("处置药剂","Dispose Substance"); - mapLang.put("处置容器","Dispose Container"); - mapLang.put("钥匙发放","Issue Key"); - mapLang.put("申请编辑","Apply Edit"); - mapLang.put("同意编辑","Approve Edit"); - mapLang.put("拒绝编辑","Reject Edit"); - mapLang.put("修改库存申请","Apply Edit Inventory"); - mapLang.put("同意修改库存","Approve Edit Inventory"); - mapLang.put("拒绝修改库存","Reject Edit Inventory"); - mapLang.put("归还","Return"); - mapLang.put("确认归还","Confirm Check-in"); - mapLang.put("领取发放","Distribution"); - mapLang.put("存储","Storage"); - mapLang.put("取出","Take Out"); - mapLang.put("给药制剂详情","Dose Information"); - - mapLang.put("表单名称","Preset Name"); - mapLang.put("锁定发放记录","Lock Record"); - mapLang.put("解锁发放记录","Unlock Record"); - mapLang.put("给药制剂入库","Dose Formulation Check-in"); - mapLang.put("同意入库","Approve Check-in"); - mapLang.put("拒绝入库","Reject Check-in"); - mapLang.put("目的","Purpose"); - - } - - - public static void main(String[] args) { - Map formData = new LinkedHashMap<>(); - formData.put("申请备注", "1111"); - formData.put("审核备注", "22"); - logger.info(getJcnrEn(formData)); - } - /** - * 获取英文 - * @param name - * @return - */ - public static String getEn(String name) { - return mapLang.get(name); - } - - - /** - * 稽查名称英文 - * @param map - * @return - */ - public static String getJcnrEn(Map map) { - Map result =new LinkedHashMap<>(); - for (Map.Entry entry : map.entrySet()) { - result.put(mapLang.get(entry.getKey()),entry.getValue()); - } - return JctUtil.formatStr(result); - } - - /** - * 稽查名称英文 - * @param map - * @return - */ - public static Map getMapEn(Map map) { - Map result =new LinkedHashMap<>(); - for (Map.Entry entry : map.entrySet()) { - result.put(mapLang.get(entry.getKey()),entry.getValue()); - } - return result; - } - -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/MjyJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/MjyJcnrUtil.java deleted file mode 100644 index b12af56..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/MjyJcnrUtil.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.hxhq.business.utils; - -import com.alibaba.fastjson2.JSONObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * @author tanfei - */ -public class MjyJcnrUtil { - private static final Logger logger = LoggerFactory.getLogger(MjyJcnrUtil.class.getName()); - private static HashMap mapLang=new HashMap<>(); - static { - mapLang.put("入库","In Storage"); - mapLang.put("未入库","Not in Storage"); - mapLang.put("已发放","In Use"); - mapLang.put("已锁定","'Locked'"); - mapLang.put("待归档","Pending Archiving"); - mapLang.put("归档","'Archived'"); - mapLang.put("待解档","Pending De-archiving"); - mapLang.put("借阅开始时间","Checkout Start Date"); - mapLang.put("借阅结束时间","Checkout End Date"); - mapLang.put("处置方式","Dispose Method"); - mapLang.put("处置原因","Reason"); - mapLang.put("处置量","Amount"); - mapLang.put("处置人","Operator"); - mapLang.put("复核人","Reviewer"); - mapLang.put("监督人","Supervisor"); - mapLang.put("钥匙1领取人","Key 1 User"); - mapLang.put("钥匙2领取人","Key 2 User"); - mapLang.put("发放人","Issuer"); - mapLang.put("发放人2","Issuer 2"); - mapLang.put("出库量","Out Amount"); - mapLang.put("转移条件","Transfer Condition"); - mapLang.put("出库毛重","Check-out Gross Weight"); - mapLang.put("入库毛重","Check-in Gross Weight"); - mapLang.put("使用量","Usage Amount"); - mapLang.put("归还人1","Returner 1"); - mapLang.put("归还人2","Returner 2"); - mapLang.put("库管员1","Warehouse Keeper 1"); - mapLang.put("库管员2","Warehouse Keeper 2"); - mapLang.put("签名人1","Signed By 1"); - mapLang.put("签名人2","Signed By 2"); - mapLang.put("申请备注","Apply Comment"); - mapLang.put("审核备注","Approve Comment"); - mapLang.put("存储条件","Storage Condition"); - mapLang.put("存储位置","Storage Location"); - mapLang.put("使用人","User"); - mapLang.put("领取/归还人","Recipient/Returner"); - mapLang.put("发放/接收人","Issuer/Receiver"); - mapLang.put("操作类型","Action"); - mapLang.put("操作量","Amount"); - mapLang.put("备注/原因","Comment/Reason"); - mapLang.put("操作时间","Datetime"); - mapLang.put("名称","Name"); - mapLang.put("编号","ID"); - mapLang.put("浓度","Concentration"); - mapLang.put("库存量","Amount"); - mapLang.put("失效日期","Expiration"); - mapLang.put("制剂状态","Status"); - mapLang.put("所属表单","In Record"); - mapLang.put("所属试验信息","From Study"); - mapLang.put("表单所属人","By User"); - mapLang.put("基本信息","Information"); - mapLang.put("表单信息","Record Information"); - mapLang.put("稽查轨迹","Track Record"); - mapLang.put("给药制剂台账","Dose Table"); - mapLang.put("备注","Comment"); - mapLang.put("签名人","Signed By"); - - - - mapLang.put("申请解档","Apply for De-archiving"); - mapLang.put("申请借阅","Apply for Check-out"); - mapLang.put("申请归档","Apply for Archiving"); - mapLang.put("锁定麻精药","Lock Drug"); - mapLang.put("解锁麻精药","Unlock Drug"); - mapLang.put("处置药剂","Dispose Substance"); - mapLang.put("处置容器","Dispose Container"); - mapLang.put("钥匙发放","Issue Key"); - mapLang.put("申请编辑","Apply Edit"); - mapLang.put("同意编辑","Approve Edit"); - mapLang.put("拒绝编辑","Reject Edit"); - mapLang.put("修改库存申请","Apply Change Inventory"); - mapLang.put("同意修改库存","Approve Change Inventory"); - mapLang.put("拒绝修改库存","Reject Change Inventory"); - mapLang.put("归还","Return"); - mapLang.put("领取发放","Distribution"); - mapLang.put("存储","Storage"); - mapLang.put("取出","Take Out"); - - mapLang.put("表单名称","Preset Name"); - mapLang.put("锁定发放记录","Lock Record"); - mapLang.put("解锁发放记录","Unlock Record"); - mapLang.put("麻精药入库","Controlled Drug Check-in"); - mapLang.put("目的","Purpose"); - mapLang.put("麻精药详情","Drug Information"); - - mapLang.put("入库位置","入库位置"); - mapLang.put("入库条件","入库条件"); - mapLang.put("减少量","减少量"); - } - - - - public static void main(String[] args) { - Map formData = new LinkedHashMap<>(); - formData.put("申请备注", "1111"); - formData.put("审核备注", "22"); - logger.info(getJcnrEn(formData)); - } - /** - * 获取英文 - * @param qmyy - * @return - */ - public static String getEn(String qmyy) { - return mapLang.get(qmyy); - } - - /** - * 获取稽查内容英文 - * @param map - * @return - */ - public static String getJcnrEn(Map map) { - Map result =new LinkedHashMap<>(); - for (Map.Entry entry : map.entrySet()) { - result.put(mapLang.get(entry.getKey()),entry.getValue()); - } - return JctUtil.formatStr(result); - } - - /** - * 获取稽查内容英文 - * @param map - * @return - */ - public static Map getMapEn(Map map) { - Map result =new LinkedHashMap<>(); - for (Map.Entry entry : map.entrySet()) { - result.put(mapLang.get(entry.getKey()),entry.getValue()); - } - return result; - } - -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/StudyFormUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/StudyFormUtil.java deleted file mode 100644 index f1d60e4..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/StudyFormUtil.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.hxhq.business.utils; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * @author tanfei - */ -public class StudyFormUtil { - private static final Logger logger = LoggerFactory.getLogger(StudyFormUtil.class.getName()); - private static HashMap mapJcnr=new HashMap<>(); - private static HashMap mapQmyy=new HashMap<>(); - static { - //region 稽查内容 - - mapJcnr.put("字段名","Field"); - mapJcnr.put("原值","Old Value"); - mapJcnr.put("新值","New Value"); - mapJcnr.put("原因","Reason"); - mapJcnr.put("生长情况","Growth Status"); - mapJcnr.put("新归属人","New Owner"); - mapJcnr.put("原归属人","Old Owner"); - mapJcnr.put("填入值","Input Data"); - mapJcnr.put("填写人","Data Entry Person"); - mapJcnr.put("意见回复","意见回复"); - mapJcnr.put("复核意见","复核意见"); - //endregion - - //region 稽查名称 - mapQmyy.put("更换归属人","Change Owner"); - mapQmyy.put("良好","Good"); - mapQmyy.put("中","Average"); - mapQmyy.put("差","Bad"); - mapQmyy.put("修改","Edit"); - mapQmyy.put("修改记录","Change Data"); - mapQmyy.put("填写","Create Record"); - mapQmyy.put("意见回复","意见回复"); - mapQmyy.put("复核意见","复核意见"); - mapQmyy.put("免复核通过","免复核通过"); - mapQmyy.put("复核拒绝","Verification Reject"); - mapQmyy.put("复核通过","Verification Pass"); - mapQmyy.put("填写并提交记录","Create and Submit Record"); - mapQmyy.put("废止拒绝","废止拒绝"); - mapQmyy.put("废止通过","废止通过"); - mapQmyy.put("申请废止","申请废止"); - mapQmyy.put("开始现场复核","Start on-Site Verification"); - mapQmyy.put("结束现场复核","End on-Site Verification"); - mapQmyy.put("申明协作","Declaration of Collaboration"); - mapQmyy.put("已审阅","Reviewed"); - mapQmyy.put("审核通过","Approved"); - mapQmyy.put("补充说明","Additional Remark"); - mapQmyy.put("审核拒绝","Reject after Review"); - mapQmyy.put("制作保存预制表单","Save Record Preset"); - mapQmyy.put("制作提交预制表单","Submit Record Preset"); - mapQmyy.put("创建记录","Create Record"); - mapQmyy.put("填写并保存记录","Create and Save Record"); - mapQmyy.put("申请关闭","Apply Close"); - mapQmyy.put("关闭拒绝","Close Reject"); - mapQmyy.put("关闭同意","Close Approve"); - - //endregion - - } - - - - public static void main(String[] args) { - Map formData = new LinkedHashMap<>(); - formData.put("申请备注", "1111"); - formData.put("审核备注", "22"); - logger.info(getJcnrEn(formData)); - } - /** - * 获取签名意义英文 - * @param qmyy - * @return - */ - public static String getQmyyEn(String qmyy) { - return mapQmyy.get(qmyy); - } - - /** - * 稽查名称英文 - * @param map - * @return - */ - public static String getJcnrEn(Map map) { - Map result =new HashMap<>(); - for (Map.Entry entry : map.entrySet()) { - result.put(mapJcnr.get(entry.getKey()),entry.getValue()); - } - return JctUtil.formatStr(result); - } - -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/TemplateUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/TemplateUtil.java deleted file mode 100644 index 4fc0d1b..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/TemplateUtil.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.hxhq.business.utils; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * @author tanfei - */ -public class TemplateUtil { - private static final Logger logger = LoggerFactory.getLogger(TemplateUtil.class.getName()); - private static HashMap mapLang=new HashMap<>(); - static { - mapLang.put("试验基本信息","Test Basic Information"); - mapLang.put("试验试剂信息","Test Reagent Information"); - mapLang.put("仪器使用信息","Instrument Usage Information"); - mapLang.put("存储条件","Storage Conditions"); - mapLang.put("操作步骤","Operation Steps"); - mapLang.put("备注","Remarks"); - - mapLang.put("试验名称","Study Name"); - mapLang.put("试验编号","Study Number"); - mapLang.put("方法编号","Method Code"); - mapLang.put("版本号","Version Number"); - mapLang.put("试验配制条件","Study Configuration Conditions"); - mapLang.put("预填","Pre-Fill"); - mapLang.put("实际","Actual"); - mapLang.put("配置时间","Configuration Time"); - mapLang.put("开始时间","Start Time"); - mapLang.put("结束时间","End Time"); - mapLang.put("目标溶液名称","Target Solution Name"); - mapLang.put("目标溶液编号","Target Solution Code"); - mapLang.put("目标溶液预计浓度","Target Solution Expected Concentration"); - mapLang.put("目标溶液实际浓度","Target Solution Actual Concentration"); - mapLang.put("目标溶液预计体积","Target Solution Expected Volume"); - mapLang.put("目标溶液实际体积","Target Solution Actual Volume"); - mapLang.put("有效周期","Effective Period"); - mapLang.put("失效日","Expiry Date"); - mapLang.put("处理批编号","Analysis Batch Number"); - mapLang.put("容器材质","Container Material"); - mapLang.put("处理时间","Work Time"); - - mapLang.put("试剂名称","Reagent Name"); - mapLang.put("编号","Code"); - mapLang.put("批号","Batch Number"); - mapLang.put("浓度/含量/纯度","Concentration/Content/Purity"); - mapLang.put("来源","Source"); - - - mapLang.put("仪器名称","Instrument Name"); - mapLang.put("仪器型号","Instrument Model"); - mapLang.put("仪器编号","Instrument Number"); - mapLang.put("下次测试/校准/检定日期","Next Test/Calibration/Verification Date"); - - mapLang.put("给药剂量或组别","Administration Dose or Group"); - mapLang.put("配制浓度","Preparation Concentration"); - mapLang.put("配制体积","Preparation Volume"); - mapLang.put("其他","Other"); - mapLang.put("其他信息","Other Information"); - mapLang.put("单位","unit"); - - mapLang.put("签名人","Signed By"); - mapLang.put("签名意义","Meaning of Signature"); - mapLang.put("签名时间","Date"); - mapLang.put("备注原因","Comment/Reason"); - - - - - } - - public static void main(String[] args) { - Map formData = new LinkedHashMap<>(); - formData.put("申请备注", "1111"); - formData.put("审核备注", "22"); - logger.info(getJcnrEn(formData)); - } - /** - * 获取英文 - * @param qmyy - * @return - */ - public static String getEn(String qmyy) { - return mapLang.get(qmyy); - } - - /** - * 获取稽查内容英文 - * @param map - * @return - */ - public static String getJcnrEn(Map map) { - Map result =new LinkedHashMap<>(); - for (Map.Entry entry : map.entrySet()) { - result.put(mapLang.get(entry.getKey()),entry.getValue()); - } - return JctUtil.formatStr(result); - } - - /** - * 获取稽查内容英文 - * @param map - * @return - */ - public static Map getMapEn(Map map) { - Map result =new LinkedHashMap<>(); - for (Map.Entry entry : map.entrySet()) { - result.put(mapLang.get(entry.getKey()),entry.getValue()); - } - return result; - } - -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GyzjJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GyzjJcnrUtil.java new file mode 100644 index 0000000..8616bf7 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GyzjJcnrUtil.java @@ -0,0 +1,155 @@ +package com.hxhq.business.utils.lang; + +import com.hxhq.business.utils.JctUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * @author tanfei + */ +public class GyzjJcnrUtil { + private static final Logger logger = LoggerFactory.getLogger(GyzjJcnrUtil.class.getName()); + private static HashMap mapLang=new HashMap<>(); + static { + mapLang.put("入库","In Storage"); + mapLang.put("未入库","Not in Storage"); + mapLang.put("已发放","In Use"); + mapLang.put("已锁定","'Locked'"); + mapLang.put("待归档","Pending Archiving"); + mapLang.put("归档","'Archived'"); + mapLang.put("待解档","Pending De-archiving"); + mapLang.put("借阅开始时间","Checkout Start Date"); + mapLang.put("借阅结束时间","Checkout End Date"); + mapLang.put("处置方式","Dispose Method"); + mapLang.put("处置原因","Reason"); + mapLang.put("处置量","Amount"); + mapLang.put("处置人","Operator"); + mapLang.put("复核人","Reviewer"); + mapLang.put("监督人","Supervisor"); + mapLang.put("钥匙1领取人","Key 1 User"); + mapLang.put("钥匙2领取人","Key 2 User"); + mapLang.put("出库量","Out Amount"); + mapLang.put("转移条件","Transfer Condition"); + mapLang.put("出库毛重","Check-out Gross Weight"); + mapLang.put("入库毛重","Check-in Gross Weight"); + mapLang.put("使用量","Usage Amount"); + mapLang.put("归还人1","Returner 1"); + mapLang.put("归还人2","Returner 2"); + mapLang.put("库管员1","Warehouse Keeper 1"); + mapLang.put("库管员2","Warehouse Keeper 2"); + mapLang.put("签名人1","Signed By 1"); + mapLang.put("签名人2","Signed By 2"); + mapLang.put("入库位置","Check-in Location"); + mapLang.put("入库条件","Check-in Condition"); + mapLang.put("入库净重","Check-in Net Weight"); + mapLang.put("入库量","Total Amount"); + mapLang.put("申请备注","Apply Comment"); + mapLang.put("审核备注","Approve Comment"); + mapLang.put("领取人","Recipient"); + mapLang.put("领取人2","Recipient 2"); + mapLang.put("发放人","Issuer"); + mapLang.put("发放人2","Issuer 2"); + mapLang.put("存储条件","Storage Condition"); + mapLang.put("存储位置","Storage Location"); + mapLang.put("使用人","User"); + mapLang.put("领取/归还人","Recipient/Returner"); + mapLang.put("发放/接收人","Issuer/Receiver"); + mapLang.put("操作类型","Action"); + mapLang.put("操作量","Amount"); + mapLang.put("备注/原因","Comment/Reason"); + mapLang.put("操作时间","Datetime"); + mapLang.put("名称","Name"); + mapLang.put("编号","ID"); + mapLang.put("浓度","Concentration"); + mapLang.put("库存量","Amount"); + mapLang.put("失效日期","Expiration"); + mapLang.put("制剂状态","Status"); + mapLang.put("所属表单","In Record"); + mapLang.put("所属试验信息","From Study"); + mapLang.put("表单所属人","By User"); + mapLang.put("基本信息","Information"); + mapLang.put("表单信息","Record Information"); + mapLang.put("稽查轨迹","Track Record"); + mapLang.put("给药制剂台账","Dose Table"); + mapLang.put("备注","Comment"); + mapLang.put("签名人","Signed By"); + + mapLang.put("申请解档","Apply for De-archiving"); + mapLang.put("申请借阅","Apply for Check-out"); + mapLang.put("申请归档","Apply for Archiving"); + mapLang.put("锁定给药制剂","Lock Drug"); + mapLang.put("解锁给药制剂","Unlock Drug"); + mapLang.put("处置药剂","Dispose Substance"); + mapLang.put("处置容器","Dispose Container"); + mapLang.put("钥匙发放","Issue Key"); + mapLang.put("申请编辑","Apply Edit"); + mapLang.put("同意编辑","Approve Edit"); + mapLang.put("拒绝编辑","Reject Edit"); + mapLang.put("修改库存申请","Apply Edit Inventory"); + mapLang.put("同意修改库存","Approve Edit Inventory"); + mapLang.put("拒绝修改库存","Reject Edit Inventory"); + mapLang.put("归还","Return"); + mapLang.put("确认归还","Confirm Check-in"); + mapLang.put("领取发放","Distribution"); + mapLang.put("存储","Storage"); + mapLang.put("取出","Take Out"); + mapLang.put("给药制剂详情","Dose Information"); + + mapLang.put("表单名称","Preset Name"); + mapLang.put("锁定发放记录","Lock Record"); + mapLang.put("解锁发放记录","Unlock Record"); + mapLang.put("给药制剂入库","Dose Formulation Check-in"); + mapLang.put("同意入库","Approve Check-in"); + mapLang.put("拒绝入库","Reject Check-in"); + mapLang.put("目的","Purpose"); + + } + + + public static void main(String[] args) { + Map formData = new LinkedHashMap<>(); + formData.put("申请备注", "1111"); + formData.put("审核备注", "22"); + logger.info(getJcnrEn(formData)); + } + /** + * 获取英文 + * @param name + * @return + */ + public static String getEn(String name) { + return mapLang.get(name); + } + + + /** + * 稽查名称英文 + * @param map + * @return + */ + public static String getJcnrEn(Map map) { + Map result =new LinkedHashMap<>(); + for (Map.Entry entry : map.entrySet()) { + result.put(mapLang.get(entry.getKey()),entry.getValue()); + } + return JctUtil.formatStr(result); + } + + /** + * 稽查名称英文 + * @param map + * @return + */ + public static Map getMapEn(Map map) { + Map result =new LinkedHashMap<>(); + for (Map.Entry entry : map.entrySet()) { + result.put(mapLang.get(entry.getKey()),entry.getValue()); + } + return result; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/MjyJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/MjyJcnrUtil.java new file mode 100644 index 0000000..ccf0b48 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/MjyJcnrUtil.java @@ -0,0 +1,151 @@ +package com.hxhq.business.utils.lang; + +import com.hxhq.business.utils.JctUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * @author tanfei + */ +public class MjyJcnrUtil { + private static final Logger logger = LoggerFactory.getLogger(MjyJcnrUtil.class.getName()); + private static HashMap mapLang=new HashMap<>(); + static { + mapLang.put("入库","In Storage"); + mapLang.put("未入库","Not in Storage"); + mapLang.put("已发放","In Use"); + mapLang.put("已锁定","'Locked'"); + mapLang.put("待归档","Pending Archiving"); + mapLang.put("归档","'Archived'"); + mapLang.put("待解档","Pending De-archiving"); + mapLang.put("借阅开始时间","Checkout Start Date"); + mapLang.put("借阅结束时间","Checkout End Date"); + mapLang.put("处置方式","Dispose Method"); + mapLang.put("处置原因","Reason"); + mapLang.put("处置量","Amount"); + mapLang.put("处置人","Operator"); + mapLang.put("复核人","Reviewer"); + mapLang.put("监督人","Supervisor"); + mapLang.put("钥匙1领取人","Key 1 User"); + mapLang.put("钥匙2领取人","Key 2 User"); + mapLang.put("发放人","Issuer"); + mapLang.put("发放人2","Issuer 2"); + mapLang.put("出库量","Out Amount"); + mapLang.put("转移条件","Transfer Condition"); + mapLang.put("出库毛重","Check-out Gross Weight"); + mapLang.put("入库毛重","Check-in Gross Weight"); + mapLang.put("使用量","Usage Amount"); + mapLang.put("归还人1","Returner 1"); + mapLang.put("归还人2","Returner 2"); + mapLang.put("库管员1","Warehouse Keeper 1"); + mapLang.put("库管员2","Warehouse Keeper 2"); + mapLang.put("签名人1","Signed By 1"); + mapLang.put("签名人2","Signed By 2"); + mapLang.put("申请备注","Apply Comment"); + mapLang.put("审核备注","Approve Comment"); + mapLang.put("存储条件","Storage Condition"); + mapLang.put("存储位置","Storage Location"); + mapLang.put("使用人","User"); + mapLang.put("领取/归还人","Recipient/Returner"); + mapLang.put("发放/接收人","Issuer/Receiver"); + mapLang.put("操作类型","Action"); + mapLang.put("操作量","Amount"); + mapLang.put("备注/原因","Comment/Reason"); + mapLang.put("操作时间","Datetime"); + mapLang.put("名称","Name"); + mapLang.put("编号","ID"); + mapLang.put("浓度","Concentration"); + mapLang.put("库存量","Amount"); + mapLang.put("失效日期","Expiration"); + mapLang.put("制剂状态","Status"); + mapLang.put("所属表单","In Record"); + mapLang.put("所属试验信息","From Study"); + mapLang.put("表单所属人","By User"); + mapLang.put("基本信息","Information"); + mapLang.put("表单信息","Record Information"); + mapLang.put("稽查轨迹","Track Record"); + mapLang.put("给药制剂台账","Dose Table"); + mapLang.put("备注","Comment"); + mapLang.put("签名人","Signed By"); + + + + mapLang.put("申请解档","Apply for De-archiving"); + mapLang.put("申请借阅","Apply for Check-out"); + mapLang.put("申请归档","Apply for Archiving"); + mapLang.put("锁定麻精药","Lock Drug"); + mapLang.put("解锁麻精药","Unlock Drug"); + mapLang.put("处置药剂","Dispose Substance"); + mapLang.put("处置容器","Dispose Container"); + mapLang.put("钥匙发放","Issue Key"); + mapLang.put("申请编辑","Apply Edit"); + mapLang.put("同意编辑","Approve Edit"); + mapLang.put("拒绝编辑","Reject Edit"); + mapLang.put("修改库存申请","Apply Change Inventory"); + mapLang.put("同意修改库存","Approve Change Inventory"); + mapLang.put("拒绝修改库存","Reject Change Inventory"); + mapLang.put("归还","Return"); + mapLang.put("领取发放","Distribution"); + mapLang.put("存储","Storage"); + mapLang.put("取出","Take Out"); + + mapLang.put("表单名称","Preset Name"); + mapLang.put("锁定发放记录","Lock Record"); + mapLang.put("解锁发放记录","Unlock Record"); + mapLang.put("麻精药入库","Controlled Drug Check-in"); + mapLang.put("目的","Purpose"); + mapLang.put("麻精药详情","Drug Information"); + + mapLang.put("入库位置","入库位置"); + mapLang.put("入库条件","入库条件"); + mapLang.put("减少量","减少量"); + } + + + + public static void main(String[] args) { + Map formData = new LinkedHashMap<>(); + formData.put("申请备注", "1111"); + formData.put("审核备注", "22"); + logger.info(getJcnrEn(formData)); + } + /** + * 获取英文 + * @param qmyy + * @return + */ + public static String getEn(String qmyy) { + return mapLang.get(qmyy); + } + + /** + * 获取稽查内容英文 + * @param map + * @return + */ + public static String getJcnrEn(Map map) { + Map result =new LinkedHashMap<>(); + for (Map.Entry entry : map.entrySet()) { + result.put(mapLang.get(entry.getKey()),entry.getValue()); + } + return JctUtil.formatStr(result); + } + + /** + * 获取稽查内容英文 + * @param map + * @return + */ + public static Map getMapEn(Map map) { + Map result =new LinkedHashMap<>(); + for (Map.Entry entry : map.entrySet()) { + result.put(mapLang.get(entry.getKey()),entry.getValue()); + } + return result; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/StudyFormUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/StudyFormUtil.java new file mode 100644 index 0000000..9540743 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/StudyFormUtil.java @@ -0,0 +1,100 @@ +package com.hxhq.business.utils.lang; + +import com.hxhq.business.utils.JctUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * @author tanfei + */ +public class StudyFormUtil { + private static final Logger logger = LoggerFactory.getLogger(StudyFormUtil.class.getName()); + private static HashMap mapJcnr=new HashMap<>(); + private static HashMap mapQmyy=new HashMap<>(); + static { + //region 稽查内容 + + mapJcnr.put("字段名","Field"); + mapJcnr.put("原值","Old Value"); + mapJcnr.put("新值","New Value"); + mapJcnr.put("原因","Reason"); + mapJcnr.put("生长情况","Growth Status"); + mapJcnr.put("新归属人","New Owner"); + mapJcnr.put("原归属人","Old Owner"); + mapJcnr.put("填入值","Input Data"); + mapJcnr.put("填写人","Data Entry Person"); + mapJcnr.put("意见回复","意见回复"); + mapJcnr.put("复核意见","复核意见"); + //endregion + + //region 稽查名称 + mapQmyy.put("更换归属人","Change Owner"); + mapQmyy.put("良好","Good"); + mapQmyy.put("中","Average"); + mapQmyy.put("差","Bad"); + mapQmyy.put("修改","Edit"); + mapQmyy.put("修改记录","Change Data"); + mapQmyy.put("填写","Create Record"); + mapQmyy.put("意见回复","意见回复"); + mapQmyy.put("复核意见","复核意见"); + mapQmyy.put("免复核通过","免复核通过"); + mapQmyy.put("复核拒绝","Verification Reject"); + mapQmyy.put("复核通过","Verification Pass"); + mapQmyy.put("填写并提交记录","Create and Submit Record"); + mapQmyy.put("废止拒绝","废止拒绝"); + mapQmyy.put("废止通过","废止通过"); + mapQmyy.put("申请废止","申请废止"); + mapQmyy.put("开始现场复核","Start on-Site Verification"); + mapQmyy.put("结束现场复核","End on-Site Verification"); + mapQmyy.put("申明协作","Declaration of Collaboration"); + mapQmyy.put("已审阅","Reviewed"); + mapQmyy.put("审核通过","Approved"); + mapQmyy.put("补充说明","Additional Remark"); + mapQmyy.put("审核拒绝","Reject after Review"); + mapQmyy.put("制作保存预制表单","Save Record Preset"); + mapQmyy.put("制作提交预制表单","Submit Record Preset"); + mapQmyy.put("创建记录","Create Record"); + mapQmyy.put("填写并保存记录","Create and Save Record"); + mapQmyy.put("申请关闭","Apply Close"); + mapQmyy.put("关闭拒绝","Close Reject"); + mapQmyy.put("关闭同意","Close Approve"); + + //endregion + + } + + + + public static void main(String[] args) { + Map formData = new LinkedHashMap<>(); + formData.put("申请备注", "1111"); + formData.put("审核备注", "22"); + logger.info(getJcnrEn(formData)); + } + /** + * 获取签名意义英文 + * @param qmyy + * @return + */ + public static String getQmyyEn(String qmyy) { + return mapQmyy.get(qmyy); + } + + /** + * 稽查名称英文 + * @param map + * @return + */ + public static String getJcnrEn(Map map) { + Map result =new HashMap<>(); + for (Map.Entry entry : map.entrySet()) { + result.put(mapJcnr.get(entry.getKey()),entry.getValue()); + } + return JctUtil.formatStr(result); + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/TemplateUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/TemplateUtil.java new file mode 100644 index 0000000..39315df --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/TemplateUtil.java @@ -0,0 +1,117 @@ +package com.hxhq.business.utils.lang; + +import com.hxhq.business.utils.JctUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * @author tanfei + */ +public class TemplateUtil { + private static final Logger logger = LoggerFactory.getLogger(TemplateUtil.class.getName()); + private static HashMap mapLang=new HashMap<>(); + static { + mapLang.put("试验基本信息","Test Basic Information"); + mapLang.put("试验试剂信息","Test Reagent Information"); + mapLang.put("仪器使用信息","Instrument Usage Information"); + mapLang.put("存储条件","Storage Conditions"); + mapLang.put("操作步骤","Operation Steps"); + mapLang.put("备注","Remarks"); + + mapLang.put("试验名称","Study Name"); + mapLang.put("试验编号","Study Number"); + mapLang.put("方法编号","Method Code"); + mapLang.put("版本号","Version Number"); + mapLang.put("试验配制条件","Study Configuration Conditions"); + mapLang.put("预填","Pre-Fill"); + mapLang.put("实际","Actual"); + mapLang.put("配置时间","Configuration Time"); + mapLang.put("开始时间","Start Time"); + mapLang.put("结束时间","End Time"); + mapLang.put("目标溶液名称","Target Solution Name"); + mapLang.put("目标溶液编号","Target Solution Code"); + mapLang.put("目标溶液预计浓度","Target Solution Expected Concentration"); + mapLang.put("目标溶液实际浓度","Target Solution Actual Concentration"); + mapLang.put("目标溶液预计体积","Target Solution Expected Volume"); + mapLang.put("目标溶液实际体积","Target Solution Actual Volume"); + mapLang.put("有效周期","Effective Period"); + mapLang.put("失效日","Expiry Date"); + mapLang.put("处理批编号","Analysis Batch Number"); + mapLang.put("容器材质","Container Material"); + mapLang.put("处理时间","Work Time"); + + mapLang.put("试剂名称","Reagent Name"); + mapLang.put("编号","Code"); + mapLang.put("批号","Batch Number"); + mapLang.put("浓度/含量/纯度","Concentration/Content/Purity"); + mapLang.put("来源","Source"); + + + mapLang.put("仪器名称","Instrument Name"); + mapLang.put("仪器型号","Instrument Model"); + mapLang.put("仪器编号","Instrument Number"); + mapLang.put("下次测试/校准/检定日期","Next Test/Calibration/Verification Date"); + + mapLang.put("给药剂量或组别","Administration Dose or Group"); + mapLang.put("配制浓度","Preparation Concentration"); + mapLang.put("配制体积","Preparation Volume"); + mapLang.put("其他","Other"); + mapLang.put("其他信息","Other Information"); + mapLang.put("单位","unit"); + + mapLang.put("签名人","Signed By"); + mapLang.put("签名意义","Meaning of Signature"); + mapLang.put("签名时间","Date"); + mapLang.put("备注原因","Comment/Reason"); + + + + + } + + public static void main(String[] args) { + Map formData = new LinkedHashMap<>(); + formData.put("申请备注", "1111"); + formData.put("审核备注", "22"); + logger.info(getJcnrEn(formData)); + } + /** + * 获取英文 + * @param qmyy + * @return + */ + public static String getEn(String qmyy) { + return mapLang.get(qmyy); + } + + /** + * 获取稽查内容英文 + * @param map + * @return + */ + public static String getJcnrEn(Map map) { + Map result =new LinkedHashMap<>(); + for (Map.Entry entry : map.entrySet()) { + result.put(mapLang.get(entry.getKey()),entry.getValue()); + } + return JctUtil.formatStr(result); + } + + /** + * 获取稽查内容英文 + * @param map + * @return + */ + public static Map getMapEn(Map map) { + Map result =new LinkedHashMap<>(); + for (Map.Entry entry : map.entrySet()) { + result.put(mapLang.get(entry.getKey()),entry.getValue()); + } + return result; + } + +} 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 58fc9a9..465c628 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 @@ -6,7 +6,7 @@ import com.hxhq.business.domain.GyzjJcgj; import com.hxhq.business.domain.GyzjTz; import com.hxhq.business.dto.gyzj.DetailDto; import com.hxhq.business.enums.zykgl.ZjztEnum; -import com.hxhq.business.utils.GyzjJcnrUtil; +import com.hxhq.business.utils.lang.GyzjJcnrUtil; import com.hxhq.business.utils.pdf.PdfBaseUtil; import com.hxhq.business.utils.pdf.PdfExportUtil; import com.hxhq.common.core.utils.StringUtils; 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 1badc9b..4124f9e 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 @@ -5,7 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.hxhq.business.domain.*; import com.hxhq.business.dto.mjy.DetailDto; import com.hxhq.business.enums.zykgl.ZjztEnum; -import com.hxhq.business.utils.MjyJcnrUtil; +import com.hxhq.business.utils.lang.MjyJcnrUtil; import com.hxhq.business.utils.pdf.PdfBaseUtil; import com.hxhq.business.utils.pdf.PdfExportUtil; import com.hxhq.common.core.utils.StringUtils; 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/SP001.java index 399734e..499ce0e 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/SP001.java @@ -1,20 +1,13 @@ package com.hxhq.business.utils.pdf.template; -import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; import com.hxhq.business.domain.*; -import com.hxhq.business.utils.TemplateUtil; import com.hxhq.business.utils.pdf.PdfBaseUtil; import com.hxhq.business.utils.pdf.PdfExportUtil; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; import com.hxhq.system.api.model.LoginUser; import com.itextpdf.text.*; -import com.itextpdf.text.pdf.BaseFont; -import com.itextpdf.text.pdf.PdfPCell; -import com.itextpdf.text.pdf.PdfPTable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 2891049..ca33687 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 @@ -4,16 +4,12 @@ import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.hxhq.business.domain.StudyFormFill; import com.hxhq.business.domain.StudyFormFillJcgj; import com.hxhq.business.domain.StudyFormFillQmxx; -import com.hxhq.business.domain.Template; -import com.hxhq.business.utils.TemplateUtil; +import com.hxhq.business.utils.lang.TemplateUtil; import com.hxhq.business.utils.pdf.PdfBaseUtil; import com.hxhq.business.utils.pdf.PdfExportUtil; import com.hxhq.common.core.utils.StringUtils; -import com.hxhq.common.security.utils.SecurityUtils; -import com.hxhq.system.api.model.LoginUser; import com.itextpdf.text.*; import com.itextpdf.text.pdf.BaseFont; import com.itextpdf.text.pdf.PdfPCell; @@ -21,7 +17,6 @@ import com.itextpdf.text.pdf.PdfPTable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.FileOutputStream; import java.io.IOException; import java.util.List; import java.util.*; From c8cda38da41ce7b36db8adcda8284b148adf91e0 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Mon, 19 Jan 2026 12:51:51 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix=EF=BC=9A[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StudyFormFillController.java | 10 +---- .../com/hxhq/business/domain/StudyFormFill.java | 48 ++++++++++++++++++++++ .../java/com/hxhq/business/domain/Template.java | 33 +++++++++++++++ .../hxhq/business/utils/pdf/template/SP001.java | 4 +- .../mapper/business/StudyFormFillMapper.xml | 4 +- 5 files changed, 87 insertions(+), 12 deletions(-) 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 400bc97..e41e938 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,20 +101,14 @@ public class StudyFormFillController extends BaseController { studyFormFillQmxx.setFormId(form.getFormId()); List studyFormFillQmxxList = studyFormFillQmxxService.queryList(studyFormFillQmxx); StudyFormFill studyFormFill=studyFormFillService.queryInfo(form.getFormId()); - Template template=templateService.getById(studyFormFill.getTemplateId()); - if(template!=null){ return AjaxResult.success(localFilePrefix + PdfExportUtil.export( - "com.hxhq.business.utils.pdf.template."+template.getSn(), - "exportDetail", + studyFormFill.getTemplateExportClass(), + studyFormFill.getTemplateExportMethod(), studyFormFill, - template, studyFormFillQmxxList, studyFormFillJcgjList, form.getLang(), localFilePath)); - }else{ - return AjaxResult.error("模板不存在或已删除"); - } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java index 157c6da..fe7e0e8 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java @@ -109,10 +109,26 @@ public class StudyFormFill extends MpBaseEntity @Compare(name = "模板名称") private String templateMc; + /** 模板名称-英文 */ + @TableField(exist = false) + private String templateMcEn; + /** 模板编号 */ @TableField(exist = false) private String templateSn; + /** 模板编号 */ + @TableField(exist = false) + private String templateShowSn; + + /** 模板导出类 */ + @TableField(exist = false) + private String templateExportClass; + + /** 模板导出方法 */ + @TableField(exist = false) + private String templateExportMethod; + /** 模板所属部门/学科 */ @TableField(exist = false) private Long templateDeptId; @@ -125,6 +141,38 @@ public class StudyFormFill extends MpBaseEntity @TableField(exist = false) private String studyMc; + public String getTemplateShowSn() { + return templateShowSn; + } + + public void setTemplateShowSn(String templateShowSn) { + this.templateShowSn = templateShowSn; + } + + public String getTemplateExportClass() { + return templateExportClass; + } + + public void setTemplateExportClass(String templateExportClass) { + this.templateExportClass = templateExportClass; + } + + public String getTemplateExportMethod() { + return templateExportMethod; + } + + public void setTemplateExportMethod(String templateExportMethod) { + this.templateExportMethod = templateExportMethod; + } + + public String getTemplateMcEn() { + return templateMcEn; + } + + public void setTemplateMcEn(String templateMcEn) { + this.templateMcEn = templateMcEn; + } + public String getUserMcEn() { return userMcEn; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java index 0825fb7..28001e1 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java @@ -22,6 +22,15 @@ public class Template extends MpBaseEntity /** 模板名称 */ private String name; + /** 模板名称-英文 */ + private String nameEn; + + /** 导出类 */ + private String exportClass; + + /** 导出方法 */ + private String exportMethod; + /** 所属部门/学科 */ private Long deptId; @@ -47,6 +56,30 @@ public class Template extends MpBaseEntity @TableField(exist = false) private String deptName; + public String getExportMethod() { + return exportMethod; + } + + public void setExportMethod(String exportMethod) { + this.exportMethod = exportMethod; + } + + public String getNameEn() { + return nameEn; + } + + public void setNameEn(String nameEn) { + this.nameEn = nameEn; + } + + public String getExportClass() { + return exportClass; + } + + public void setExportClass(String exportClass) { + this.exportClass = exportClass; + } + public Integer getProduct() { return product; } 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/SP001.java index 499ce0e..0f09f07 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/SP001.java @@ -31,7 +31,7 @@ public class SP001 { * @param studyFormFill * @return */ - public String exportDetail(StudyFormFill studyFormFill,Template template, List studyFormFillQmxxList, List studyFormFillJcgjList, String lang, String localFilePath) { + public String exportDetail(StudyFormFill studyFormFill, List studyFormFillQmxxList, List studyFormFillJcgjList, String lang, String localFilePath) { language = lang; Document document = null; FileOutputStream fos = null; @@ -42,7 +42,7 @@ public class SP001 { if (loginUser != null) { sign = loginUser.getSysUser().getNickName(); } - document = PdfBaseUtil.init(document, fos, filePath, sign +PdfExportUtil.parseDateToStr(new Date()), "en".equals(language)?template.getShowSn():template.getName(),false); + document = PdfBaseUtil.init(document, fos, filePath, sign +PdfExportUtil.parseDateToStr(new Date()), "en".equals(language)?studyFormFill.getTemplateMcEn():studyFormFill.getTemplateMc(),false); // 基本信息 JSONObject bdnr = JSONObject.parseObject(studyFormFill.getBdnr()); diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml index 325caaa..40c7fec 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml @@ -17,8 +17,8 @@