门诊采血查询门诊病人列表
This commit is contained in:
parent
585ec7a47f
commit
5e7149b552
@ -40,7 +40,14 @@
|
||||
<artifactId>spring-boot-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.barcode4j</groupId>
|
||||
<artifactId>barcode4j-light</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-all</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ public class LisinterfaceNameConstants {
|
||||
public static final String SETREPORT = "setreport";
|
||||
public static final String SETREQSTATUS = "setreqstatus";
|
||||
public static final String DAYMESSAGE = "daymessage";
|
||||
|
||||
//获取门诊病人信息列表
|
||||
public static final String DAYMESSAGE_GETOUTPATLIST = "222";
|
||||
public static final String DAYMESSAGE_GETPATIENT = "204";
|
||||
}
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package com.czlis.interfaceCommon.mapper;
|
||||
|
||||
import com.czlis.common.core.domain.entity.ComOpt;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ComOptMapper {
|
||||
ComOpt getComOptOne(String yq,String xxdh);
|
||||
String getComOptValue(String yq,String xxdh);
|
||||
ComOpt getComOptOne(@Param("yq") String yq,@Param("xxdh") String xxdh);
|
||||
String getComOptValue(@Param("yq") String yq,@Param("xxdh") String xxdh);
|
||||
|
||||
}
|
||||
|
||||
@ -17,4 +17,5 @@ public class GetReqInterface {
|
||||
private String etime;
|
||||
private String bz1;
|
||||
private String sqh;
|
||||
private String ip;
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@ -78,9 +79,9 @@ public class LisInterfaceUtil {
|
||||
String retMsg = String.valueOf(map.get("retmsg"));
|
||||
log.info("调用存储过程{}返回值:{},{}",type,retCode,retMsg);
|
||||
if(retCode.equals("0")){
|
||||
return new Result("0","调用接口成功!");
|
||||
return new Result("0","调用接口成功!",retMsg);
|
||||
}else{
|
||||
return new Result("-1","调用接口失败!"+retMsg);
|
||||
return new Result(retCode,"调用接口失败!",retMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,8 +110,18 @@ public class LisInterfaceUtil {
|
||||
e.printStackTrace();
|
||||
log.error("调用lis的http接口出错:",e);
|
||||
}
|
||||
|
||||
return new Result("0","调用接口成功!",retMsg);
|
||||
String message="";
|
||||
String resultCode="";
|
||||
// 检查输入是否为空
|
||||
if (JSONUtil.isJson(retMsg)) {
|
||||
JSONObject json = JSONUtil.parseObj(retMsg);
|
||||
// 使用安全的方式获取值
|
||||
message = json.getStr("message");
|
||||
resultCode= json.getStr("resultCode");
|
||||
} else {
|
||||
// 处理非JSON格式的情况
|
||||
}
|
||||
return new Result(resultCode,"调用接口成功!",message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -47,16 +47,12 @@ public class ReportUtil {
|
||||
parameters.put("barcode",mzBarCodeParam.getSqh());
|
||||
parameters.put("line1",mzBarCodeParam.getBrxm() + " " + mzBarCodeParam.getBrxb() + " " + mzBarCodeParam.getNl());
|
||||
parameters.put("line2",mzBarCodeParam.getSfxmmc());
|
||||
|
||||
|
||||
//填充数据
|
||||
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperPath, parameters, new JREmptyDataSource());
|
||||
|
||||
//输出文件
|
||||
// String pdfPath = "E:\\barcode.pdf";
|
||||
// JasperExportManager.exportReportToPdfFile(jasperPrint,pdfPath);
|
||||
// printPdfFile(pdfPath);
|
||||
|
||||
//打印条码
|
||||
//JasperPrintManager.printReport(jasperPrint, false);
|
||||
print(jasperPrint,false, RuoYiConfig.getMzPrintName());
|
||||
@ -64,8 +60,6 @@ public class ReportUtil {
|
||||
e.printStackTrace();
|
||||
log.error("打印条码报错,条码号:{}",mzBarCodeParam.getSqh(),e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -7,8 +7,8 @@ czlis:
|
||||
# 版权年份
|
||||
copyrightYear: 2025
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: D:/czlis/upload
|
||||
mzPrintName: pdfFactory Pro
|
||||
profile: E:\test
|
||||
mzPrintName: Microsoft Print to PDF
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
|
||||
@ -45,7 +45,7 @@ public class DictController extends BaseController {
|
||||
@ApiOperation("查询字典列表(不分页)")
|
||||
@GetMapping("/getComDicts")
|
||||
public Result getComDicts(String zdlb){
|
||||
log.info("调用查询字典列表不分页,{}",zdlb);
|
||||
//log.info("调用查询字典列表不分页,{}",zdlb);
|
||||
return comDictService.getComDicts(zdlb);
|
||||
}
|
||||
|
||||
|
||||
@ -56,7 +56,8 @@ public class ComDictServiceImpl implements ComDictService {
|
||||
}
|
||||
@Override
|
||||
public Result getComDicts(String zdlb) {
|
||||
return new Result("0", "成功!",getDictCache(zdlb));
|
||||
List<ComDict> comDictList = getDictCache(zdlb);
|
||||
return new Result("0", "成功!",comDictList);
|
||||
}
|
||||
//根据编号查名称
|
||||
public Result getComDictNameById(String zdlb,String zddh) {
|
||||
|
||||
@ -34,9 +34,12 @@ public class MZCXController extends BaseController {
|
||||
@ApiOperation("获取申请单信息")
|
||||
@GetMapping("/querySQD")
|
||||
public Result querySQD(String brdh,String stime,String etime,String klx,String zt){
|
||||
return mzcxService.querySQD(brdh,stime,etime,klx,zt,getUserId());
|
||||
return mzcxService.querySQD(brdh,stime,etime,klx,zt);
|
||||
}
|
||||
@GetMapping("/queryPatList")
|
||||
public Result queryPatList(){
|
||||
return mzcxService.queryPatList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印条码
|
||||
* @param sqh
|
||||
@ -46,4 +49,8 @@ public class MZCXController extends BaseController {
|
||||
public Result printSQD(String sqh){
|
||||
return mzcxService.printSQD(sqh);
|
||||
}
|
||||
@PostMapping("/printBarcode")
|
||||
public Result printAll(@RequestBody List<String> sqhs){
|
||||
return mzcxService.printAll(sqhs);
|
||||
}
|
||||
}
|
||||
|
||||
18
mzcx/src/main/java/com/czlis/mzcx/pojo/OutPatListDTO.java
Normal file
18
mzcx/src/main/java/com/czlis/mzcx/pojo/OutPatListDTO.java
Normal file
@ -0,0 +1,18 @@
|
||||
package com.czlis.mzcx.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OutPatListDTO {
|
||||
private String pid;
|
||||
private String name;
|
||||
private String xb;
|
||||
private String nl;
|
||||
private String ks;
|
||||
private String ch;
|
||||
|
||||
}
|
||||
@ -6,7 +6,8 @@ import com.czlis.mzcx.pojo.MzcxSqdDTO;
|
||||
import java.util.List;
|
||||
|
||||
public interface MZCXService {
|
||||
Result querySQD(String brdh, String stime, String etime, String klx, String zt,Long userId);
|
||||
|
||||
Result querySQD(String brdh, String stime, String etime, String klx, String zt );
|
||||
Result queryPatList();
|
||||
Result printSQD(String sqh);
|
||||
Result printAll(List<String> sqhs);
|
||||
}
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
package com.czlis.mzcx.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.XmlUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.LabReqdetail;
|
||||
import com.czlis.common.core.domain.entity.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.MZBarCodeParam;
|
||||
import com.czlis.interfaceCommon.pojo.inter.DayMessage;
|
||||
import com.czlis.interfaceCommon.pojo.inter.GetReqInterface;
|
||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||
import com.czlis.interfaceCommon.utils.LisInterfaceUtil;
|
||||
@ -14,8 +19,11 @@ import com.czlis.interfaceCommon.utils.LisUtil;
|
||||
import com.czlis.interfaceCommon.utils.ReportUtil;
|
||||
import com.czlis.mzcx.mapper.MZCXMapper;
|
||||
import com.czlis.mzcx.pojo.MzcxSqdDTO;
|
||||
import com.czlis.mzcx.pojo.OutPatListDTO;
|
||||
import com.czlis.mzcx.service.MZCXService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import nonapi.io.github.classgraph.json.JSONUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -36,7 +44,7 @@ public class MZCXServiceImpl implements MZCXService {
|
||||
private CommonUtil commonUtil;
|
||||
|
||||
@Override
|
||||
public Result querySQD(String brdh, String stime, String etime, String klx,String zt,Long userId) {
|
||||
public Result querySQD(String brdh, String stime, String etime, String klx,String zt) {
|
||||
GetReqInterface getReqInterface = new GetReqInterface();
|
||||
getReqInterface.setBrdh(brdh);
|
||||
getReqInterface.setStime(stime);
|
||||
@ -44,9 +52,10 @@ public class MZCXServiceImpl implements MZCXService {
|
||||
getReqInterface.setBrly("");
|
||||
getReqInterface.setSqh("");
|
||||
getReqInterface.setBz1("");
|
||||
getReqInterface.setUserid(userId.toString());
|
||||
getReqInterface.setYljg("1");
|
||||
getReqInterface.setDept("");
|
||||
getReqInterface.setUserid(SecurityUtils.getLoginUser().getUsername());
|
||||
getReqInterface.setIp(IpUtils.getIpAddr());
|
||||
String jsonStr = JSONUtil.toJsonStr(getReqInterface);
|
||||
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.GETREQINTERFACE, jsonStr);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
@ -56,9 +65,32 @@ public class MZCXServiceImpl implements MZCXService {
|
||||
map.put("klx", klx);
|
||||
map.put("zt",zt);
|
||||
map.put("as_yljg","1");
|
||||
return new Result("0","修改条码成功!",mzcxMapper.querySQD(map));
|
||||
return new Result("0","查询成功!",mzcxMapper.querySQD(map));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result queryPatList() {
|
||||
DayMessage dayMessage = new DayMessage();
|
||||
dayMessage.setMsgid(LisinterfaceNameConstants.DAYMESSAGE_GETOUTPATLIST);
|
||||
dayMessage.setMsg("");
|
||||
dayMessage.setIp(IpUtils.getIpAddr());
|
||||
dayMessage.setUserid(SecurityUtils.getLoginUser().getUsername());
|
||||
String jsonStr = JSONUtil.toJsonStr(dayMessage);
|
||||
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.DAYMESSAGE, jsonStr);
|
||||
if (result != null && result.getData() != null) {
|
||||
try {
|
||||
JSONObject json=JSONUtil.parseFromXml(result.getData().toString());
|
||||
String listkey=json.keySet().iterator().next();
|
||||
JSONObject response=json.getJSONObject(listkey);
|
||||
String infokey=response.keySet().iterator().next();
|
||||
List<OutPatListDTO> patientList=response.getBeanList(infokey, OutPatListDTO.class);
|
||||
return new Result("0","查询成功!",patientList);
|
||||
} catch (Exception e) {
|
||||
log.error("XML转换outPatListDTO失败: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
return new Result("0","查询成功!",new OutPatListDTO());
|
||||
}
|
||||
@Override
|
||||
public Result printSQD(String sqh) {
|
||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
|
||||
@ -86,8 +118,14 @@ public class MZCXServiceImpl implements MZCXService {
|
||||
mzBarCodeParam.setBrxb(brxb);
|
||||
mzBarCodeParam.setSfxmmc(labReqmainOne.getJymd());
|
||||
reportUtil.printBarCode(mzBarCodeParam);
|
||||
return null;
|
||||
return new Result("0","打印成功!");
|
||||
}
|
||||
@Override
|
||||
public Result printAll(List<String> sqhs) {
|
||||
for (String sqh : sqhs) {
|
||||
printSQD(sqh);
|
||||
}
|
||||
return new Result("0","打印成功!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
14
pom.xml
14
pom.xml
@ -33,7 +33,8 @@
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<velocity.version>2.3</velocity.version>
|
||||
<jwt.version>0.9.1</jwt.version>
|
||||
|
||||
<barcode4j.version>2.0</barcode4j.version>
|
||||
<batik.version>1.16</batik.version>
|
||||
<hutool.version>5.8.37</hutool.version>
|
||||
<lombok.version>1.18.26</lombok.version>
|
||||
<knife4j.version>3.0.3</knife4j.version>
|
||||
@ -312,7 +313,16 @@
|
||||
<version>${barbecue.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.barcode4j</groupId>
|
||||
<artifactId>barcode4j-light</artifactId>
|
||||
<version>${barcode4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-all</artifactId>
|
||||
<version>${batik.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user