报告模板菜单

This commit is contained in:
tangw 2025-12-26 17:30:33 +08:00
parent b1bbb726cd
commit 40969ed18b
15 changed files with 165 additions and 87 deletions

View File

@ -12,7 +12,7 @@ import java.util.Date;
@AllArgsConstructor
public class ComReportDict {
private Long reportId;
private Long reportBgdh;
private String reportType;
private String reportCode;
private String reportName;

View File

@ -1,10 +1,15 @@
package com.czlis.interfaceCommon.mapper;
import com.czlis.common.core.domain.entity.lis.ComReportInstr;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
public interface LabReportvsitemMapper {
int getLabReportvsitemCount(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
int getLabReport2(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
int getLabReportCount(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
List<ComReportInstr> getComReportInstrByInstr(String reportYq);
String getreportCode(Long reportId);
}

View File

@ -9,7 +9,7 @@ import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BarCodeParam {
public class ReportParam {
private String sqh;
private String brxm;
private String brxb;

View File

@ -69,8 +69,6 @@ public class CommonUtil {
@Autowired
LabResultMedMapper labResultMedMapper;
@Autowired
LabReportvsitemMapper labReportvsitemMapper;
@Autowired
LabInputcolMapper labInputcolMapper;
@Autowired
ComLocalconfigMapper comLocalconfigMapper;
@ -475,9 +473,7 @@ public class CommonUtil {
public List<LabInstr> getLabInstrList(LabInstr labInstr) {
return labInstrMapper.getLabInstrList(labInstr);
}
public int getLabReport2(Date jyrq, String yq, String ybh) {
return labReportvsitemMapper.getLabReport2(jyrq, yq, ybh);
}
//获取流水号种子
@Transactional(rollbackFor = Exception.class)
public Long getNextSeq(String seqid) {

View File

@ -1,17 +1,15 @@
package com.czlis.interfaceCommon.utils;
import cn.hutool.core.date.DateUtil;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabReqmain;
import com.czlis.common.core.domain.entity.lis.LabReqpack;
import com.czlis.common.utils.DateUtils;
import com.czlis.interfaceCommon.pojo.entity.BarCodeParam;
import com.czlis.interfaceCommon.pojo.entity.ReportParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
@Component
@Slf4j
@ -73,12 +71,12 @@ public class PackBarcodeUtil {
}
public Result printpackid(String ksmc){
String packid=getNextPackID();
BarCodeParam barCodeParam = new BarCodeParam();
barCodeParam.setSqh(packid);
barCodeParam.setBrxm("检验样本");
barCodeParam.setSfxmmc("样本数量____");
barCodeParam.setKsmc(ksmc);
return reportUtil.printToPdf(barCodeParam, packid);
ReportParam reportParam = new ReportParam();
reportParam.setSqh(packid);
reportParam.setBrxm("检验样本");
reportParam.setSfxmmc("样本数量____");
reportParam.setKsmc(ksmc);
return reportUtil.printToPdf(reportParam, packid);
}
public Result packup(List<LabReqpack> labReqpacks){
commonUtil.batchInsertLabReqpack(labReqpacks);

View File

@ -6,6 +6,7 @@ import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.StrUtil;
import com.czlis.common.config.RuoYiConfig;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.ComReportInstr;
import com.czlis.common.core.domain.entity.lis.LabGraph;
import com.czlis.common.core.domain.entity.lis.LabPat;
import com.czlis.common.utils.file.FileUtils;
@ -13,10 +14,11 @@ import com.czlis.common.utils.file.ImageUtils;
import com.czlis.common.utils.ip.IpUtils;
import com.czlis.common.utils.uuid.UUID;
import com.czlis.interfaceCommon.mapper.BackPaperMapper;
import com.czlis.interfaceCommon.mapper.LabReportvsitemMapper;
import com.czlis.interfaceCommon.pojo.entity.BackPaperDetail;
import com.czlis.interfaceCommon.pojo.entity.BackPaperParam;
import com.czlis.interfaceCommon.pojo.entity.LabRptgetruledetailCX;
import com.czlis.interfaceCommon.pojo.entity.BarCodeParam;
import com.czlis.interfaceCommon.pojo.entity.ReportParam;
import com.itextpdf.io.source.ByteArrayOutputStream;
import com.itextpdf.kernel.geom.PageSize;
import com.itextpdf.kernel.geom.Rectangle;
@ -50,6 +52,8 @@ public class ReportUtil {
@Autowired
BackPaperMapper backPaperMapper;
@Autowired
LabReportvsitemMapper labReportvsitemMapper;
@Autowired
private DataSource dataSource;
@Value("${server.port:}")
@ -58,17 +62,17 @@ public class ReportUtil {
String printURL;
public void printBarCode(BarCodeParam mzBarCodeParam) {
public void printBarCode(ReportParam mzReportParam) {
Map<String,Object> parameters=new HashMap<>();
parameters.put("barcode", mzBarCodeParam.getSqh());
parameters.put("line1", mzBarCodeParam.getBrxm() + " " + mzBarCodeParam.getBrxb() + " " + mzBarCodeParam.getNl());
parameters.put("line2", mzBarCodeParam.getSfxmmc());
parameters.put("barcode", mzReportParam.getSqh());
parameters.put("line1", mzReportParam.getBrxm() + " " + mzReportParam.getBrxb() + " " + mzReportParam.getNl());
parameters.put("line2", mzReportParam.getSfxmmc());
try {
//构造数据
JasperReportUtil.print(RuoYiConfig.getMzPrintName(), "barcode", parameters);
} catch (Exception e) {
e.printStackTrace();
log.error("打印条码报错,条码号:{}", mzBarCodeParam.getSqh(), e);
log.error("打印条码报错,条码号:{}", mzReportParam.getSqh(), e);
}
}
@ -113,27 +117,27 @@ public class ReportUtil {
}
}
public Result printToPdf(BarCodeParam barCodeParam, String pdfName) {
public Result printToPdf(ReportParam reportParam, String pdfName) {
String templatePath = RuoYiConfig.getProfile() + "/templates/barcode_zy.jrxml"; // 模板文件路径
return printToPdf("barcode_zy", barCodeParam, pdfName, false);
return printToPdf("barcode_zy", reportParam, pdfName, false);
}
public Result printToPdf(String templatename, BarCodeParam barCodeParam, String pdfName, boolean base64) {
public Result printToPdf(String templatename, ReportParam reportParam, String pdfName, boolean base64) {
String staticpath=ImageUtils.getStaticPath()+ File.separator;
String outputPath = staticpath+ File.separator + "printPDF"+ File.separator + UUID.randomUUID() + ".pdf"; // PDF输出路径(多级目录会自动创建)
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(barCodeParam);
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(reportParam);
try {
Connection connection = dataSource.getConnection();
JasperReportUtil.exportToPdf(templatename, stringObjectMap, connection, outputPath);
} catch (Exception e) {
e.printStackTrace();
log.error("打印条码失败,参数{}", barCodeParam, e);
log.error("打印条码失败,参数{}", reportParam, e);
}
String httpPath = getPrintURL(pdfName);
log.info("传给前端的pdf地址:{}", httpPath);
if (base64) {
//删除图片文件
String[] pic = barCodeParam.getPic();
String[] pic = reportParam.getPic();
if(pic != null){
for (String s : pic) {
String picFilePath = staticpath + File.separator + "graphs" + File.separator + StrUtil.splitToArray(s, "graphs/")[1];
@ -215,7 +219,7 @@ public class ReportUtil {
}
}
//常规报告如果报告使用报告二模板,判断报告二是否A4
int bg2 = commonUtil.getLabReport2(jyrq, yq, ybh);
int bg2 = labReportvsitemMapper.getLabReport2(jyrq, yq, ybh);
if (bg2 > 0) {
if ("3".equals(NOBOTH)) {
return "A4";
@ -342,20 +346,39 @@ public class ReportUtil {
String ybh = labPat.getYbh();
String yljg=commonUtil.getLabInstr(yq).getYljg();
String hospitalName = commonUtil.getCompany(yljg);
BarCodeParam barCodeParam = new BarCodeParam();
barCodeParam.setJyrq(jyrq);
barCodeParam.setYq(yq);
barCodeParam.setYbh(ybh);
barCodeParam.setHospitalName(hospitalName);
barCodeParam.setUsernopic(getSignName(labPat.getYhdh())); //检验者
barCodeParam.setCheckerpic(getSignName(labPat.getHdys())); //审核者
barCodeParam.setCheckercbpic(getSignName(labPat.getChecker())); //初审者
ReportParam reportParam = new ReportParam();
reportParam.setJyrq(jyrq);
reportParam.setYq(yq);
reportParam.setYbh(ybh);
reportParam.setHospitalName(hospitalName);
reportParam.setUsernopic(getSignName(labPat.getYhdh())); //检验者
reportParam.setCheckerpic(getSignName(labPat.getHdys())); //审核者
reportParam.setCheckercbpic(getSignName(labPat.getChecker())); //初审者
String[] picPath = getReportpic(jyrq, yq, ybh);
barCodeParam.setPic(picPath);
return printToPdf("report_image2", barCodeParam, UUID.randomUUID().toString(), true);
reportParam.setPic(picPath);
return printToPdf("report_image2", reportParam, UUID.randomUUID().toString(), true);
}
/**
* 获取报告单模板
* @param labPat
* @return
*/
public String getReportTemplate(LabPat labPat) {
Date jyrq = labPat.getJyrq();
String yq = labPat.getYq().trim();
String ybh = labPat.getYbh();
int rows=labReportvsitemMapper.getLabReportCount(jyrq,yq,ybh);
List<ComReportInstr> info=labReportvsitemMapper.getComReportInstrByInstr(yq);
for (ComReportInstr comReportInstr : info) {
Long rid=comReportInstr.getReportBgdh();
}
return "";
}
public String[] getReportpic(Date jyrq, String yq, String ybh) {
List<LabGraph> labGraphList = commonUtil.getLabGraphAll(jyrq, yq, ybh);
String filepath = "graphs";

View File

@ -2,6 +2,32 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.czlis.interfaceCommon.mapper.LabReportvsitemMapper">
<resultMap type="com.czlis.common.core.domain.entity.lis.ComReportInstr" id="ComReportInstrResult">
<id property="reportId" column="report_id" />
<result property="reportYq" column="report_yq" />
<result property="reportBgdh" column="report_bgdh" />
<result property="reportSize" column="report_size" />
<result property="reportType" column="report_type" />
<result property="reportRows" column="report_rows" />
<result property="reportMinrows" column="report_minrows" />
<result property="reportMaxrows" column="report_maxrows" />
<result property="reportItems" column="report_items" />
<result property="reportSort" column="report_sort" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="reportName" column="report_name" />
</resultMap>
<select id="getComReportInstrByInstr" parameterType="String" resultMap="ComReportInstrResult">
select * from com_report_instr where report_yq = #{reportYq}
</select>
<select id="getreportCode" resultType="String" parameterType="Long">
select report_code from com_report_dict where report_id = #{reportId}
</select>
<select id="getLabReportvsitem" resultType="com.czlis.common.core.domain.entity.lis.LabReportvsitem" parameterType="String">
select * from lab_reportvsitem where yq = #{yq}
</select>

View File

@ -121,9 +121,9 @@ public class ComReportDictController extends BaseController {
@ApiOperation("导入模板")
@Log(title = "导入模板", businessType = BusinessType.IMPORT)
@PostMapping("/importfile")
public AjaxResult importfile(MultipartFile file, Long reportId) {
public AjaxResult importfile(MultipartFile file, Long reportBgdh) {
return comReportDictService.importfile(file,reportId);
return comReportDictService.importfile(file,reportBgdh);
}
@ApiOperation("导出模板")
@Log(title = "导出模板", businessType = BusinessType.EXPORT)

View File

@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ComReportDictMapper {
Long getCountById(Long reportId);
Long getCountById(Long reportBgdh);
List<ComReportDict> selectComReportDictByType(String reportType);
/**
@ -27,19 +27,19 @@ public interface ComReportDictMapper {
/**
* 通过报表模板ID查询报表模板信息
*
* @param reportId 报表模板ID
* @param reportBgdh 报表模板ID
* @return 角色对象信息
*/
ComReportDict selectComReportDictById(Long reportId);
ComReportDict selectComReportDictById(Long reportBgdh);
/**
* 删除报表模板信息
*
* @param reportId 报表模板ID
* @param reportBgdh 报表模板ID
* @return 结果
*/
int delComReportDictById(Long reportId);
int delComReportDictById(Long reportBgdh);
/**
* 批量删除报表模板信息

View File

@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSON;
import com.czlis.common.core.domain.entity.lis.*;
import com.czlis.common.utils.SecurityUtils;
import com.czlis.interfaceCommon.utils.CommonUtil;
import com.czlis.liswork.mapper.xtwh.ComReportDictMapper;
import com.czlis.liswork.mapper.xtwh.LocalconfigMapper;
import com.czlis.liswork.service.ComConfigDictService;
import com.czlis.liswork.service.ComLocalconfigService;
@ -28,7 +29,8 @@ public class ComLocalconfigServiceImpl implements ComLocalconfigService {
LocalconfigMapper localconfigMapper;
@Autowired
CommonUtil commonUtil;
@Autowired
ComReportDictMapper comReportDictMapper;
/**
* 获取登录客户端浏览器唯一ID
**/
@ -174,12 +176,40 @@ public class ComLocalconfigServiceImpl implements ComLocalconfigService {
@Override
public Object getComDicts(String zdlb) {
if ("INSTR".equals(zdlb)) {
if ("INSTR".equals(zdlb)||"instr".equals(zdlb)||"yq".equals(zdlb)) {
return getInstr();
}else if (zdlb.contains("item:")) {
String yq=zdlb.trim().substring(5);
return getitem(yq);
}else if ("barcode".equals(zdlb)) {
return getreportdict("2");
} else if ("reback".equals(zdlb)) {
return getreportdict("3");
}
return commonUtil.getComDictList(zdlb);
}
public List<Map<String, String>> getreportdict(String type) {
List<Map<String, String>> list = new ArrayList<>();
List<ComReportDict> xmInfolist = comReportDictMapper.selectComReportDictByType(type);
for (ComReportDict xmInfo : xmInfolist) {
Map<String, String> map = new HashMap<>();
map.put("zddh", xmInfo.getReportBgdh().toString());
map.put("zdmc", xmInfo.getReportName());
list.add(map);
}
return list;
}
public List<Map<String, String>> getitem(String yq) {
List<Map<String, String>> list = new ArrayList<>();
List<XmInfo> xmInfolist = commonUtil.getXmInfoList(yq);
for (XmInfo xmInfo : xmInfolist) {
Map<String, String> map = new HashMap<>();
map.put("zddh", xmInfo.getXmdh().trim());
map.put("zdmc", xmInfo.getXmmc().trim());
list.add(map);
}
return list;
}
public List<Map<String, String>> getInstr() {
List<Map<String, String>> list = new ArrayList<>();
String yljg = getYLJG();

View File

@ -126,9 +126,9 @@ public class ComReportDictServiceImpl implements ComReportDictService {
*/
@Override
public boolean checkDictNameUnique(ComReportDict Dict) {
Long DictId = StringUtils.isNull(Dict.getReportId()) ? -1L : Dict.getReportId();
Long DictId = StringUtils.isNull(Dict.getReportBgdh()) ? -1L : Dict.getReportBgdh();
ComReportDict info = comReportDictMapper.checkDictNameUnique(Dict.getReportName(),Dict.getReportType());
if (StringUtils.isNotNull(info) && info.getReportId().longValue() != DictId.longValue()) {
if (StringUtils.isNotNull(info) && info.getReportBgdh().longValue() != DictId.longValue()) {
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
@ -142,9 +142,9 @@ public class ComReportDictServiceImpl implements ComReportDictService {
*/
@Override
public boolean checkDictCodeUnique(ComReportDict Dict) {
Long DictId = StringUtils.isNull(Dict.getReportId()) ? -1L : Dict.getReportId();
Long DictId = StringUtils.isNull(Dict.getReportBgdh()) ? -1L : Dict.getReportBgdh();
ComReportDict info = comReportDictMapper.checkDictCodeUnique(Dict.getReportCode());
if (StringUtils.isNotNull(info) && info.getReportId().longValue() != DictId.longValue()) {
if (StringUtils.isNotNull(info) && info.getReportBgdh().longValue() != DictId.longValue()) {
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;

View File

@ -3,7 +3,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.czlis.liswork.mapper.xtwh.ComReportDictMapper">
<resultMap type="com.czlis.common.core.domain.entity.lis.ComReportDict" id="ComReportDictResult">
<id property="reportId" column="report_id" />
<id property="reportBgdh" column="report_bgdh" />
<result property="reportType" column="report_type" />
<result property="reportCode" column="report_code" />
<result property="reportName" column="report_name" />
@ -18,14 +18,14 @@
<result property="remark" column="remark" />
</resultMap>
<sql id="selectComReportDictVo">
select report_id,report_type,report_code,report_name,report_optiontype,report_defvalue,report_sort,
select report_bgdh,report_type,report_code,report_name,report_optiontype,report_defvalue,report_sort,
status,create_by,create_time,update_by,update_time,remark from com_report_dict
</sql>
<select id="selectComReportDictList" resultMap="ComReportDictResult" parameterType="com.czlis.common.core.domain.entity.lis.ComReportDict" >
<include refid="selectComReportDictVo"></include>
<where>
<if test="reportId != null and reportId != 0">
and report_id = #{reportId}
<if test="reportBgdh != null and reportBgdh != 0">
and report_bgdh = #{reportBgdh}
</if>
<if test="reportType != null and reportType != ''">
and report_type = #{reportType}
@ -46,7 +46,7 @@
order by report_sort ASC
</select>
<select id="getCountById" resultType="Long">
select count(1) from com_report_dict where report_id = #{reportId}
select count(1) from com_report_dict where report_bgdh = #{reportBgdh}
</select>
<select id="selectComReportDictAll" resultMap="ComReportDictResult">
<include refid="selectComReportDictVo"/>
@ -55,7 +55,7 @@
<select id="selectComReportDictById" parameterType="Long" resultMap="ComReportDictResult">
<include refid="selectComReportDictVo"/>
where report_id = #{reportId}
where report_bgdh = #{reportBgdh}
</select>
<select id="selectComReportDictByType" parameterType="String" resultMap="ComReportDictResult">
<include refid="selectComReportDictVo"/>
@ -65,21 +65,21 @@
<select id="checkDictNameUnique" parameterType="String" resultMap="ComReportDictResult">
select top 1 report_id,report_type,report_code,report_name,report_optiontype,report_defvalue,report_sort,
select top 1 report_bgdh,report_type,report_code,report_name,report_optiontype,report_defvalue,report_sort,
status,create_by,create_time,update_by,update_time,remark
from com_report_dict
where report_name=#{reportName} and report_type = #{reportType}
</select>
<select id="checkDictCodeUnique" parameterType="String" resultMap="ComReportDictResult">
select top 1 report_id,report_type,report_code,report_name,report_optiontype,report_defvalue,report_sort,
select top 1 report_bgdh,report_type,report_code,report_name,report_optiontype,report_defvalue,report_sort,
status,create_by,create_time,update_by,update_time,remark
from com_report_dict
where report_code=#{reportCode}
</select>
<insert id="insertComReportDict" parameterType="com.czlis.common.core.domain.entity.lis.ComReportDict" useGeneratedKeys="true" keyProperty="reportId">
<insert id="insertComReportDict" parameterType="com.czlis.common.core.domain.entity.lis.ComReportDict" useGeneratedKeys="true" keyProperty="reportBgdh">
insert into com_report_dict(
<if test="reportId != null and reportId != 0">report_id,</if>
<if test="reportBgdh != null and reportBgdh != 0">report_bgdh,</if>
<if test="reportType != null and reportType != ''">report_type,</if>
<if test="reportCode != null and reportCode != ''">report_code,</if>
<if test="reportName != null and reportName != ''">report_name,</if>
@ -91,7 +91,7 @@
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="reportId != null and reportId != 0">#{reportId},</if>
<if test="reportBgdh != null and reportBgdh != 0">#{reportBgdh},</if>
<if test="reportType != null and reportType != ''">#{reportType},</if>
<if test="reportCode != null and reportCode != ''">#{reportCode},</if>
<if test="reportName != null and reportName != ''">#{reportName},</if>
@ -106,13 +106,13 @@
</insert>
<delete id="delComReportDictById" parameterType="Long">
delete from com_report_dict where report_id = #{reportId}
delete from com_report_dict where report_bgdh = #{reportBgdh}
</delete>
<delete id="delComReportDictByIds" parameterType="Long">
delete from com_report_dict where report_id in
<foreach collection="array" item="reportId" open="(" separator="," close=")">
#{reportId}
delete from com_report_dict where report_bgdh in
<foreach collection="array" item="reportBgdh" open="(" separator="," close=")">
#{reportBgdh}
</foreach>
</delete>
@ -130,7 +130,7 @@
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = getdate()
</set>
where report_id = #{reportId}
where report_bgdh = #{reportBgdh}
</update>

View File

@ -65,7 +65,7 @@
</select>
<select id="selectComReportInstrByInstr" parameterType="String" resultMap="ComReportInstrResult">
select com_report_instr.*,com_report_dict.report_name
from com_report_instr left join com_report_dict on com_report_instr.report_bgdh=com_report_dict.report_id
from com_report_instr left join com_report_dict on com_report_instr.report_bgdh=com_report_dict.report_bgdh
where com_report_instr.report_yq = #{reportYq}
order by com_report_instr.report_sort
</select>

View File

@ -8,7 +8,7 @@ import com.czlis.common.core.domain.entity.lis.LabReqmain;
import com.czlis.common.utils.SecurityUtils;
import com.czlis.common.utils.ip.IpUtils;
import com.czlis.interfaceCommon.constants.LisinterfaceNameConstants;
import com.czlis.interfaceCommon.pojo.entity.BarCodeParam;
import com.czlis.interfaceCommon.pojo.entity.ReportParam;
import com.czlis.interfaceCommon.pojo.inter.DayMessage;
import com.czlis.interfaceCommon.pojo.inter.GetReqInterface;
import com.czlis.interfaceCommon.utils.CommonUtil;
@ -94,14 +94,14 @@ public class MZCXServiceImpl implements MZCXService {
public Result printSQD(String sqh) {
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
//List<LabReqdetail> labReqdetailList = commonUtil.getLabReqdetailList(sqh);
BarCodeParam mzBarCodeParam = new BarCodeParam();
mzBarCodeParam.setSqh(sqh);
ReportParam mzReportParam = new ReportParam();
mzReportParam.setSqh(sqh);
Map<String, String> ageFromBirthDay = LisUtil.getAgeFromBirthDay(DateUtil.format(labReqmainOne.getBrsr(), "yyyy-MM-dd HH:mm:ss"));
String age = ageFromBirthDay.get("age");
String unit = ageFromBirthDay.get("unit");
mzBarCodeParam.setNl(age + unit);
mzBarCodeParam.setBrxm(labReqmainOne.getBrxm());
mzReportParam.setNl(age + unit);
mzReportParam.setBrxm(labReqmainOne.getBrxm());
String brxb = labReqmainOne.getBrxb();
switch (brxb) {
case "1":
@ -114,9 +114,9 @@ public class MZCXServiceImpl implements MZCXService {
brxb = "";
}
mzBarCodeParam.setBrxb(brxb);
mzBarCodeParam.setSfxmmc(labReqmainOne.getJymd());
reportUtil.printBarCode(mzBarCodeParam);
mzReportParam.setBrxb(brxb);
mzReportParam.setSfxmmc(labReqmainOne.getJymd());
reportUtil.printBarCode(mzReportParam);
return new Result("0", "打印成功!");
}

View File

@ -5,7 +5,7 @@ import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabReqdetail;
import com.czlis.common.core.domain.entity.lis.LabReqmain;
import com.czlis.interfaceCommon.constants.LisinterfaceNameConstants;
import com.czlis.interfaceCommon.pojo.entity.BarCodeParam;
import com.czlis.interfaceCommon.pojo.entity.ReportParam;
import com.czlis.interfaceCommon.pojo.inter.GetReqInterface;
import com.czlis.interfaceCommon.pojo.inter.SetReqStatus;
import com.czlis.interfaceCommon.utils.CommonUtil;
@ -173,14 +173,14 @@ public class ZycxServiceImpl implements ZycxService {
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
//List<LabReqdetail> labReqdetailList = commonUtil.getLabReqdetailList(sqh);
if(labReqmainOne == null) return new Result("-1","未查到条码号:"+sqh+"的申请单数据!");
BarCodeParam barCodeParam = new BarCodeParam();
barCodeParam.setSqh(sqh);
ReportParam reportParam = new ReportParam();
reportParam.setSqh(sqh);
Map<String, String> ageFromBirthDay = LisUtil.getAgeFromBirthDay(DateUtil.format(labReqmainOne.getBrsr(), "yyyy-MM-dd HH:mm:ss"));
String age = ageFromBirthDay.get("age");
String unit = ageFromBirthDay.get("unit");
barCodeParam.setNl(age + unit);
barCodeParam.setBrxm(labReqmainOne.getBrxm());
reportParam.setNl(age + unit);
reportParam.setBrxm(labReqmainOne.getBrxm());
String brxb = labReqmainOne.getBrxb();
switch (brxb) {
case "1":
@ -193,10 +193,10 @@ public class ZycxServiceImpl implements ZycxService {
brxb = "";
}
barCodeParam.setBrxb(brxb);
barCodeParam.setSfxmmc(labReqmainOne.getJymd());
log.info("传给打印的数据为:{},{}",barCodeParam,sqh);
return reportUtil.printToPdf(barCodeParam, sqh);
reportParam.setBrxb(brxb);
reportParam.setSfxmmc(labReqmainOne.getJymd());
log.info("传给打印的数据为:{},{}", reportParam,sqh);
return reportUtil.printToPdf(reportParam, sqh);
}