From 8bc1fa471b934a0775265303a0af6468ed1ffc86 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Fri, 27 Feb 2026 17:54:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StudyFormFillController.java | 46 ++++++++++++++++++++++ .../com/hxhq/business/utils/lang/GspJcnrUtil.java | 3 ++ .../com/hxhq/business/utils/lang/GyzjJcnrUtil.java | 2 + .../com/hxhq/business/utils/lang/MjyJcnrUtil.java | 3 ++ .../hxhq/business/utils/lang/StudyFormUtil.java | 2 + .../com/hxhq/business/utils/lang/TemplateUtil.java | 2 + .../com/hxhq/business/utils/lang/ZcgJcnrUtil.java | 2 + 7 files changed, 60 insertions(+) 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 dbfa769..04232e0 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 @@ -1,5 +1,6 @@ package com.hxhq.business.controller; +import java.io.File; import java.util.*; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -16,7 +17,10 @@ import com.hxhq.business.form.sj.SjSubpackageForm; import com.hxhq.business.form.study.*; import com.hxhq.business.service.*; import com.hxhq.business.utils.JctUtil; +import com.hxhq.business.utils.StudyFormFillUtil; import com.hxhq.business.utils.pdf.PdfExportUtil; +import com.hxhq.business.utils.pdf.template.TemplateBaseUtil; +import com.hxhq.common.core.utils.DateUtils; import com.hxhq.common.security.annotation.Logical; import com.hxhq.common.security.annotation.RequiresPermissions; import com.hxhq.common.security.utils.SecurityUtils; @@ -40,6 +44,8 @@ public class StudyFormFillController extends BaseController { @Autowired private IStudyFormFillService studyFormFillService; @Autowired + private IStudyService studyService; + @Autowired private IStudyFormFillJcgjService studyFormFillJcgjService; @Autowired private IStudyFormFillQmxxService studyFormFillQmxxService; @@ -182,6 +188,46 @@ public class StudyFormFillController extends BaseController { return AjaxResult.success(localFilePrefix + PdfExportUtil.export(studyFormFill.getTemplateExportClass(), studyFormFill.getTemplateExportMethod(), studyFormFill, studyFormFillQmxxList, studyFormFillJcgjList, form.getLang(), form.getJcgjlx(), localFilePath)); } + + /** + * 导出 + */ + @RequiresPermissions(value = {"business:studyFormFill:xq", "business:nonTrialFormFill:xq", "business:drugFormFill:xq"}, logical = Logical.OR) + @GetMapping(value = "/exportByFileUrl") + public AjaxResult exportByFileUrl(StudyFormFillExportForm form) { + StudyFormFill studyFormFill = studyFormFillService.queryInfo(form.getStudyFormFillId()); + Study study = studyService.getById(studyFormFill.getStudyId()); + //稽查轨迹 + QueryWrapper studyFormFillJcgjQueryWrapper = Wrappers.query(); + studyFormFillJcgjQueryWrapper.eq("form_id",studyFormFill.getId()); + if(form.getJcgjlx()!=null&&form.getJcgjlx().intValue()>0){ + Integer jcgjlxExport=999; + if(form.getJcgjlx().intValue()==jcgjlxExport){ + studyFormFillJcgjQueryWrapper.notIn("jcgjlx", JcgjlxEnum.xg.getValue()); + }else{ + studyFormFillJcgjQueryWrapper.eq("jcgjlx",form.getJcgjlx()); + } + } + studyFormFillJcgjQueryWrapper.orderByDesc("create_time"); + List jcgjList=studyFormFillJcgjService.list(studyFormFillJcgjQueryWrapper); + //签名信息 + QueryWrapper studyFormFillQmxxQueryWrapper = Wrappers.query(); + studyFormFillQmxxQueryWrapper.eq("form_id",studyFormFill.getId()); + studyFormFillQmxxQueryWrapper.orderByDesc("create_time"); + List qmxxList=studyFormFillQmxxService.list(studyFormFillQmxxQueryWrapper); + + String fileUrl =form.getUrl(); + fileUrl = fileUrl.replaceFirst(localFilePrefix, ""); + int indexOf = fileUrl.lastIndexOf("/"); + String path = fileUrl.substring(0, indexOf); + String exportFileName = StudyFormFillUtil.export(form.getVersion(),form.getLang(),study.getName() + "("+study.getSn()+")"+studyFormFill.getBdmc(), + localFilePath + fileUrl, localFilePath + File.separator + path,jcgjList,qmxxList); + + + + return AjaxResult.success(localFilePrefix + path + File.separator + exportFileName); + } + /** * 加签 */ diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GspJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GspJcnrUtil.java index f313ffa..e921ade 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GspJcnrUtil.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GspJcnrUtil.java @@ -15,6 +15,9 @@ public class GspJcnrUtil { private static final Logger logger = LoggerFactory.getLogger(GspJcnrUtil.class.getName()); private static HashMap mapLang=new HashMap<>(); static { + + mapLang.put("稽查轨迹","Track Record"); + mapLang.put("签名信息","Signature information"); mapLang.put("入库","In Storage"); mapLang.put("未入库","Not in Storage"); mapLang.put("已发放","In Use"); 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 index 69185ee..c7b45f4 100644 --- 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 @@ -88,6 +88,8 @@ public class GyzjJcnrUtil { mapLang.put("备注","Comment"); mapLang.put("签名人","Signed By"); + mapLang.put("稽查轨迹","Track Record"); + mapLang.put("签名信息","Signature information"); mapLang.put("申请解档","Apply for De-archiving"); mapLang.put("申请借阅","Apply for Check-out"); mapLang.put("申请归档","Apply for Archiving"); 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 index 5b1eec2..04ed832 100644 --- 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 @@ -15,6 +15,9 @@ public class MjyJcnrUtil { private static final Logger logger = LoggerFactory.getLogger(MjyJcnrUtil.class.getName()); private static HashMap mapLang=new HashMap<>(); static { + + mapLang.put("稽查轨迹","Track Record"); + mapLang.put("签名信息","Signature information"); mapLang.put("入库","In Storage"); mapLang.put("未入库","Not in Storage"); mapLang.put("已发放","In Use"); 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 index 328fdcc..f4d7876 100644 --- 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 @@ -17,6 +17,8 @@ public class StudyFormUtil { static { + mapLang.put("稽查轨迹","Track Record"); + mapLang.put("签名信息","Signature information"); mapLang.put("存储","Storage"); mapLang.put("存储条件","Storage Condition"); mapLang.put("存储位置","Storage Location"); 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 index 7fdac5a..27862a9 100644 --- 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 @@ -22,6 +22,8 @@ public class TemplateUtil { mapLang.put("操作步骤","Operation Steps"); mapLang.put("备注","Remarks"); + mapLang.put("稽查轨迹","Track Record"); + mapLang.put("签名信息","Signature information"); mapLang.put("试验名称","Study Name"); mapLang.put("试验编号","Study Number"); mapLang.put("方法编号","Method Code"); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/ZcgJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/ZcgJcnrUtil.java index 3944cd7..c4b71df 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/ZcgJcnrUtil.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/ZcgJcnrUtil.java @@ -26,6 +26,8 @@ public class ZcgJcnrUtil { mapLang.put("钥匙1领取人","Key 1 Recipient"); mapLang.put("钥匙2领取人","Key 2 Recipient"); + mapLang.put("稽查轨迹","Track Record"); + mapLang.put("签名信息","Signature information"); } public static void main(String[] args) {