Browse Source

feat:[麻精药表单]申请单导出

master
15881625488@163.com 3 months ago
parent
commit
709b9b289e
9 changed files with 324 additions and 14 deletions
  1. +27
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormApplyController.java
  2. +48
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java
  3. +13
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyJcgj.java
  4. +12
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java
  5. +105
    -5
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/TemplateBaseUtil.java
  6. +112
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/gsp/MBMJYLQSQD.java
  7. +3
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/gsp/SYWZPZJHB.java
  8. +2
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/sp/SP001.java
  9. +2
    -2
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyMapper.xml

+ 27
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormApplyController.java View File

@ -2,18 +2,18 @@ package com.hxhq.business.controller;
import java.util.List; import java.util.List;
import com.hxhq.business.domain.StudyFormApplyJcgj;
import com.hxhq.business.domain.StudyFormApplyQmxx;
import com.hxhq.business.domain.*;
import com.hxhq.business.dto.study.StudyFormApplyListDto; import com.hxhq.business.dto.study.StudyFormApplyListDto;
import com.hxhq.business.form.study.StudyFormApplyGcForm; import com.hxhq.business.form.study.StudyFormApplyGcForm;
import com.hxhq.business.form.study.StudyFormApplyShfzForm; import com.hxhq.business.form.study.StudyFormApplyShfzForm;
import com.hxhq.business.form.study.StudyFormApplySearchForm; import com.hxhq.business.form.study.StudyFormApplySearchForm;
import com.hxhq.business.form.study.StudyFormUpdateForm; import com.hxhq.business.form.study.StudyFormUpdateForm;
import com.hxhq.business.service.*; import com.hxhq.business.service.*;
import com.hxhq.business.utils.pdf.PdfExportUtil;
import com.hxhq.common.security.annotation.RequiresPermissions; import com.hxhq.common.security.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.hxhq.business.domain.StudyFormApply;
import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.controller.BaseController;
import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.core.web.domain.AjaxResult;
import com.hxhq.common.core.web.page.TableDataInfo; import com.hxhq.common.core.web.page.TableDataInfo;
@ -34,6 +34,16 @@ public class StudyFormApplyController extends BaseController {
private IStudyFormApplyJcgjService studyFormApplyJcgjService; private IStudyFormApplyJcgjService studyFormApplyJcgjService;
@Autowired @Autowired
private IStudyFormApplyQmxxService studyFormApplyQmxxService; private IStudyFormApplyQmxxService studyFormApplyQmxxService;
/**
* 上传文件存储在本地的根路径
*/
@Value("${file.path}")
private String localFilePath;
/**
* 资源映射路径 前缀
*/
@Value("${file.prefix}")
public String localFilePrefix;
/** /**
* 列表 * 列表
@ -47,6 +57,20 @@ public class StudyFormApplyController extends BaseController {
} }
/** /**
* 导出
*/
@RequiresPermissions({"business:drugFormApply:xq"})
@GetMapping(value = "/exportDetail")
public AjaxResult exportDetail(StudyFormApplyJcgj form) {
List<StudyFormApplyJcgj> studyFormApplyJcgjList = studyFormApplyJcgjService.queryList(form);
StudyFormApplyQmxx studyFormApplyQmxx = new StudyFormApplyQmxx();
studyFormApplyQmxx.setFormId(form.getFormId());
List<StudyFormApplyQmxx> studyFormApplyQmxxList = studyFormApplyQmxxService.queryList(studyFormApplyQmxx);
StudyFormApply studyFormApply=studyFormApplyService.queryInfo(form.getFormId());
return AjaxResult.success(localFilePrefix + PdfExportUtil.export(studyFormApply.getTemplateExportClass(), studyFormApply.getTemplateExportMethod(),studyFormApply,studyFormApplyQmxxList,studyFormApplyJcgjList,form.getLang(),form.getJcgjlx(),localFilePath));
}
/**
* 稽查轨迹列表 * 稽查轨迹列表
*/ */
@GetMapping("/jcgjList") @GetMapping("/jcgjList")

+ 48
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java View File

@ -85,10 +85,26 @@ public class StudyFormApply extends MpBaseEntity
@Compare(name = "模板名称") @Compare(name = "模板名称")
private String templateMc; private String templateMc;
/** 模板名称-英文 */
@TableField(exist = false)
private String templateMcEn;
/** 模板编号 */ /** 模板编号 */
@TableField(exist = false) @TableField(exist = false)
private String templateSn; private String templateSn;
/** 模板编号 */
@TableField(exist = false)
private String templateShowSn;
/** 模板导出类 */
@TableField(exist = false)
private String templateExportClass;
/** 模板导出方法 */
@TableField(exist = false)
private String templateExportMethod;
/** 模板所属部门/学科 */ /** 模板所属部门/学科 */
@TableField(exist = false) @TableField(exist = false)
private Long templateDeptId; private Long templateDeptId;
@ -101,6 +117,38 @@ public class StudyFormApply extends MpBaseEntity
@TableField(exist = false) @TableField(exist = false)
private String studyMc; private String studyMc;
public String getTemplateMcEn() {
return templateMcEn;
}
public void setTemplateMcEn(String templateMcEn) {
this.templateMcEn = templateMcEn;
}
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 getUserMcEn() { public String getUserMcEn() {
return userMcEn; return userMcEn;
} }

+ 13
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyJcgj.java View File

@ -1,5 +1,6 @@
package com.hxhq.business.domain; package com.hxhq.business.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.hxhq.common.core.domain.MpBaseEntity; import com.hxhq.common.core.domain.MpBaseEntity;
@ -45,6 +46,18 @@ public class StudyFormApplyJcgj extends MpBaseEntity
/** 签名人名称-英文 */ /** 签名人名称-英文 */
private String qmrMcEn; private String qmrMcEn;
/** 语言 */
@TableField(exist = false)
private String lang;
public String getLang() {
return lang;
}
public void setLang(String lang) {
this.lang = lang;
}
public String getJcmcEn() { public String getJcmcEn() {
return jcmcEn; return jcmcEn;
} }

+ 12
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java View File

@ -109,6 +109,10 @@ public class StudyFormPlan extends MpBaseEntity
@TableField(exist = false) @TableField(exist = false)
private String templateExportMethod; private String templateExportMethod;
/** 模板所属部门/学科 */
@TableField(exist = false)
private Long templateDeptId;
/** 试验编号 */ /** 试验编号 */
@TableField(exist = false) @TableField(exist = false)
private String studySn; private String studySn;
@ -117,6 +121,14 @@ public class StudyFormPlan extends MpBaseEntity
@TableField(exist = false) @TableField(exist = false)
private String studyMc; private String studyMc;
public Long getTemplateDeptId() {
return templateDeptId;
}
public void setTemplateDeptId(Long templateDeptId) {
this.templateDeptId = templateDeptId;
}
public String getTemplateMcEn() { public String getTemplateMcEn() {
return templateMcEn; return templateMcEn;
} }

+ 105
- 5
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/TemplateBaseUtil.java View File

@ -130,14 +130,15 @@ public class TemplateBaseUtil {
/** /**
* 签名信息 * 签名信息
*
* 填报表单
* @param document * @param document
* @param studyFormFillQmxxList * @param studyFormFillQmxxList
* @throws IOException * @throws IOException
* @throws DocumentException * @throws DocumentException
*/ */
public static void addQmxxFill(Document document, List<StudyFormFillQmxx> studyFormFillQmxxList, String lang) throws IOException, DocumentException {
public static void addQmxxFill(Document document, List<StudyFormFillQmxx> studyFormFillQmxxList, String lang, JSONObject bdnr,JSONObject zdgxjl, JSONArray fhyjjl) throws IOException, DocumentException {
language = lang; language = lang;
PdfBaseUtil.addUnderlinedTitle(document, getName("备注") + ":" +(StringUtils.isNoneBlank(bdnr.getString("remark")) ? bdnr.getString("remark") : "")+(getCheck("_remark",zdgxjl)+getFh("_remark",fhyjjl)), 10, false);
PdfBaseUtil.addUnderlinedTitle(document, getName("签名信息"), 10, true); PdfBaseUtil.addUnderlinedTitle(document, getName("签名信息"), 10, true);
// 9. 表头 // 9. 表头
BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
@ -174,7 +175,7 @@ public class TemplateBaseUtil {
/** /**
* 稽查轨迹 * 稽查轨迹
*
* 填报表单
* @param document * @param document
* @param studyFormFillJcgjList * @param studyFormFillJcgjList
* @throws IOException * @throws IOException
@ -229,7 +230,7 @@ public class TemplateBaseUtil {
/** /**
* 签名信息 * 签名信息
*
* 计划表单
* @param document * @param document
* @param studyFormPlanQmxxList * @param studyFormPlanQmxxList
* @throws IOException * @throws IOException
@ -273,7 +274,7 @@ public class TemplateBaseUtil {
/** /**
* 稽查轨迹 * 稽查轨迹
*
* 计划表单
* @param document * @param document
* @param studyFormPlanJcgjList * @param studyFormPlanJcgjList
* @throws IOException * @throws IOException
@ -326,6 +327,105 @@ public class TemplateBaseUtil {
} }
/** /**
* 签名信息
* 申请表单
* @param document
* @param studyFormApplyQmxxList
* @throws IOException
* @throws DocumentException
*/
public static void addQmxxApply(Document document, List<StudyFormApplyQmxx> studyFormApplyQmxxList, String lang) throws IOException, DocumentException {
language = lang;
PdfBaseUtil.addUnderlinedTitle(document, getName("签名信息"), 10, true);
// 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 (studyFormApplyQmxxList.size() > 0) {
int rowNum = 0;
for (StudyFormApplyQmxx studyFormApplyQmxx : studyFormApplyQmxxList) {
// 交替行颜色
if (rowNum % 2 == 0) {
table.getDefaultCell().setBackgroundColor(BaseColor.WHITE);
} else {
table.getDefaultCell().setBackgroundColor(BaseColor.WHITE);
}
table.addCell(PdfBaseUtil.createCell(studyFormApplyQmxx.getQmrMc(), contentFont));
table.addCell(PdfBaseUtil.createCell("en".equals(language) ? studyFormApplyQmxx.getQmyyEn() : studyFormApplyQmxx.getQmyy(), contentFont));
table.addCell(PdfBaseUtil.createCell(PdfExportUtil.parseDateToStr(studyFormApplyQmxx.getCreateTime()), contentFont));
table.addCell(PdfBaseUtil.createCell(studyFormApplyQmxx.getRemark(), contentFont));
rowNum++;
}
}
document.add(table);
}
/**
* 稽查轨迹
* 申请表单
* @param document
* @param studyFormApplyJcgjList
* @throws IOException
* @throws DocumentException
*/
public static void addJcgjApply(Document document, List<StudyFormApplyJcgj> studyFormApplyJcgjList, Integer jcgjlx, String lang) throws IOException, DocumentException {
language = lang;
Integer jcgjlxMark = 999;
if (!jcgjlx.equals(jcgjlxMark)) {
PdfBaseUtil.addUnderlinedTitle(document, getName("稽查轨迹"), 10, true);
for (StudyFormApplyJcgj jcgj : studyFormApplyJcgjList) {
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.getQmrMc())) {
result.add(getName("签名人") + ":" + jcgj.getQmrMc());
}
PdfBaseUtil.addUnderlinedTitle(document, result.toString(), 10, false);
}
}
}
/**
* 获取名称 * 获取名称
* *
* @param name * @param name

+ 112
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/gsp/MBMJYLQSQD.java View File

@ -0,0 +1,112 @@
package com.hxhq.business.utils.pdf.template.gsp;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.hxhq.business.domain.StudyFormApply;
import com.hxhq.business.domain.StudyFormApplyJcgj;
import com.hxhq.business.domain.StudyFormApplyQmxx;
import com.hxhq.business.utils.pdf.PdfBaseUtil;
import com.hxhq.business.utils.pdf.PdfExportUtil;
import com.hxhq.business.utils.pdf.template.TemplateBaseUtil;
import com.hxhq.common.core.utils.StringUtils;
import com.hxhq.common.security.utils.SecurityUtils;
import com.hxhq.system.api.model.LoginUser;
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.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* 供试品-麻醉/精神药品配制/领取申请单
*
* @author tanfei
*/
public class MBMJYLQSQD {
private static final Logger logger = LoggerFactory.getLogger(MBMJYLQSQD.class.getName());
public String language = "zh";
/**
* 导出
*
* @param studyFormApply
* @return
*/
public String exportDetail(StudyFormApply studyFormApply, List<StudyFormApplyQmxx> studyFormApplyQmxxList, List<StudyFormApplyJcgj> studyFormApplyJcgjList, String lang, Integer jcgjlx, String localFilePath) {
language = lang;
Document document = null;
FileOutputStream fos = null;
String filePath = PdfBaseUtil.getFilePath(localFilePath, "Template");
try {
String sign = "hxhq";
LoginUser loginUser = SecurityUtils.getLoginUser();
if (loginUser != null) {
sign = loginUser.getSysUser().getNickName();
}
document = PdfBaseUtil.init(document, fos, filePath, sign + PdfExportUtil.parseDateToStr(new Date()), studyFormApply.getBdmc(), false);
JSONObject bdnr = JSONObject.parseObject(studyFormApply.getBdnr());
JSONObject zdgxjl = JSONObject.parseObject(StringUtils.isNoneBlank(studyFormApply.getZdgxjl()) ? studyFormApply.getZdgxjl() : "{}");
JSONArray fhyjjl = JSONArray.parseArray(StringUtils.isNoneBlank(studyFormApply.getFhyjjl()) ? studyFormApply.getFhyjjl() : "[]");
//region 表单信息
//基本信息
PdfBaseUtil.addUnderlinedTitle(document, getName("基本信息"), 10, true);
Map<String, String> formData2 = new LinkedHashMap<>();
formData2.put(getName("试验编号或部门名称"), (StringUtils.isNoneBlank(bdnr.getString("syNo")) ? bdnr.getString("syNo") : "") + TemplateBaseUtil.getCheck("_syNo", zdgxjl) + TemplateBaseUtil.getFh("_syNo", fhyjjl));
formData2.put(getName("SD/部长"), (StringUtils.isNoneBlank(bdnr.getString("SD")) ? bdnr.getString("SD") : "") + TemplateBaseUtil.getCheck("_SD", zdgxjl) + TemplateBaseUtil.getFh("_SD", fhyjjl));
formData2.put(getName("试验物质名称"), (StringUtils.isNoneBlank(bdnr.getString("sywzmc")) ? bdnr.getString("sywzmc") : "") + TemplateBaseUtil.getCheck("_sywzmc", zdgxjl) + TemplateBaseUtil.getFh("_sywzmc", fhyjjl));
formData2.put(getName("给药剂量"), (StringUtils.isNoneBlank(bdnr.getString("gyjl")) ? bdnr.getString("gyjl") : "") + TemplateBaseUtil.getCheck("_gyjl", zdgxjl) + TemplateBaseUtil.getFh("_gyjl", fhyjjl));
formData2.put(getName("需要浓度"), (StringUtils.isNoneBlank(bdnr.getString("xynd")) ? bdnr.getString("xynd") : "") + TemplateBaseUtil.getCheck("_xynd", zdgxjl) + TemplateBaseUtil.getFh("_xynd", fhyjjl));
formData2.put(getName("需要量"), (StringUtils.isNoneBlank(bdnr.getString("xyl")) ? bdnr.getString("xyl") : "") + TemplateBaseUtil.getCheck("_xyl", zdgxjl) + TemplateBaseUtil.getFh("_xyl", fhyjjl));
formData2.put(getName("需要时间"), (StringUtils.isNoneBlank(bdnr.getString("xysj")) ? bdnr.getString("xysj") : "") + TemplateBaseUtil.getCheck("_xysj", zdgxjl) + TemplateBaseUtil.getFh("_xysj", fhyjjl));
formData2.put(getName("预计归还时间"), (StringUtils.isNoneBlank(bdnr.getString("yjghsj")) ? bdnr.getString("yjghsj") : "") + TemplateBaseUtil.getCheck("_yjghsj", zdgxjl) + TemplateBaseUtil.getFh("_yjghsj", fhyjjl));
formData2.put(getName("动物种属"), (StringUtils.isNoneBlank(bdnr.getString("dwzs")) ? bdnr.getString("dwzs") : "") + TemplateBaseUtil.getCheck("_dwzs", zdgxjl) + TemplateBaseUtil.getFh("_dwzs", fhyjjl));
formData2.put(getName("动物平均体重"), (StringUtils.isNoneBlank(bdnr.getString("dwpjtz")) ? bdnr.getString("dwpjtz") : "") + TemplateBaseUtil.getCheck("_dwpjtz", zdgxjl) + TemplateBaseUtil.getFh("_dwpjtz", fhyjjl));
formData2.put(getName("动物数量"), (StringUtils.isNoneBlank(bdnr.getString("dwsl")) ? bdnr.getString("dwsl") : "") + TemplateBaseUtil.getCheck("_dwsl", zdgxjl) + TemplateBaseUtil.getFh("_dwsl", fhyjjl));
PdfBaseUtil.addFormTableColumns(document, formData2, 2);
PdfBaseUtil.addUnderlinedTitle(document, getName("备注") + ":" +(StringUtils.isNoneBlank(bdnr.getString("remark")) ? bdnr.getString("remark") : "")+(TemplateBaseUtil.getCheck("_remark",zdgxjl)+TemplateBaseUtil.getFh("_remark",fhyjjl)), 10, false);
//签名信息
TemplateBaseUtil.addQmxxApply(document, studyFormApplyQmxxList, language);
//稽查轨迹
TemplateBaseUtil.addJcgjApply(document,studyFormApplyJcgjList, jcgjlx, language);
logger.info("生成成功:{}", filePath);
} catch (Exception e) {
logger.error("生成失败", e);
throw new RuntimeException("生成失败: " + e.getMessage());
} finally {
if (document != null) {
document.close();
}
if (fos != null) {
try {
fos.close();
} catch (IOException e) {
logger.error("关闭文件流失败", e);
}
}
}
return filePath;
}
/**
* 获取名称
*
* @param name
* @return
*/
public String getName(String name) {
return TemplateBaseUtil.getNameByLanguage(name, language);
}
}

+ 3
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/gsp/SYWZPZJHB.java View File

@ -26,7 +26,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 色谱-生物样品分析溶液配制
* 供试品-试验物质配制计划
* *
* @author tanfei * @author tanfei
*/ */
@ -109,6 +109,8 @@ public class SYWZPZJHB {
} }
} }
document.add(table); document.add(table);
PdfBaseUtil.addUnderlinedTitle(document, getName("备注") + ":" +(StringUtils.isNoneBlank(bdnr.getString("remark")) ? bdnr.getString("remark") : "")+(TemplateBaseUtil.getCheck("_remark",zdgxjl)+TemplateBaseUtil.getFh("_remark",fhyjjl)), 10, false);
//签名信息 //签名信息
TemplateBaseUtil.addQmxxPlan(document, studyFormPlanQmxxList, language); TemplateBaseUtil.addQmxxPlan(document, studyFormPlanQmxxList, language);
//稽查轨迹 //稽查轨迹

+ 2
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/pdf/template/sp/SP001.java View File

@ -94,11 +94,10 @@ public class SP001 {
formData5.put(getName("有效周期"), bdnr.getString("effectivePeriod") + bdnr.getString("effectivePeriodUnit")); formData5.put(getName("有效周期"), bdnr.getString("effectivePeriod") + bdnr.getString("effectivePeriodUnit"));
formData5.put(getName("失效日"), bdnr.getString("expireDate")); formData5.put(getName("失效日"), bdnr.getString("expireDate"));
PdfBaseUtil.addFormTableColumns(document, formData5, 2); PdfBaseUtil.addFormTableColumns(document, formData5, 2);
PdfBaseUtil.addUnderlinedTitle(document, getName("备注") + ":" +(StringUtils.isNoneBlank(bdnr.getString("remark")) ? bdnr.getString("remark") : "")+(TemplateBaseUtil.getCheck("_remark",zdgxjl)+TemplateBaseUtil.getFh("_remark",fhyjjl)), 10, false);
//endregion //endregion
//签名信息
TemplateBaseUtil.addQmxxFill(document, studyFormFillQmxxList,language);
//备注签名信息
TemplateBaseUtil.addQmxxFill(document, studyFormFillQmxxList,language,bdnr,zdgxjl,fhyjjl);
//稽查轨迹 //稽查轨迹
TemplateBaseUtil.addJcgjFill(document, studyFormFillJcgjList,jcgjlx,language); TemplateBaseUtil.addJcgjFill(document, studyFormFillJcgjList,jcgjlx,language);
logger.info("生成成功:{}", filePath); logger.info("生成成功:{}", filePath);

+ 2
- 2
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyMapper.xml View File

@ -16,8 +16,8 @@
</select> </select>
<select id="queryInfo" resultType="com.hxhq.business.domain.StudyFormApply"> <select id="queryInfo" resultType="com.hxhq.business.domain.StudyFormApply">
select t.*,tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId
,ts.sn as studySn,ts.name as studyMc
select t.*,tm.name as templateMc,tm.name_en as templateMcEn,tm.sn as templateSn,tm.show_sn as templateShowSn,tm.dept_id as templateDeptId
,ts.sn as studySn,ts.name as studyMc,tm.export_class as templateExportClass,tm.export_method as templateExportMethod
FROM `t_study_form_apply` t FROM `t_study_form_apply` t
join t_template tm on tm.id=t.template_id join t_template tm on tm.id=t.template_id
join t_study ts on ts.id=t.study_id join t_study ts on ts.id=t.study_id

Loading…
Cancel
Save