|
|
|
|
@ -10,6 +10,7 @@ import com.emr.dao.commomSearch.ScanPathMapper;
|
|
|
|
|
import com.emr.dao.emrPdfWaterSet.EmrPdfWaterSetMapper;
|
|
|
|
|
import com.emr.dao.recordLock.Emr_LockMapper;
|
|
|
|
|
import com.emr.dao.tScanAssort.T_Scan_AssortMapper;
|
|
|
|
|
import com.emr.dto.PatInfoEmrTypeDto;
|
|
|
|
|
import com.emr.entity.Power_User;
|
|
|
|
|
import com.emr.entity.Zd_Assort;
|
|
|
|
|
import com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet;
|
|
|
|
|
@ -26,9 +27,11 @@ import com.emr.util.HttpClientUtils;
|
|
|
|
|
import com.emr.util.Jpg2PdfUtil;
|
|
|
|
|
import com.emr.vo.*;
|
|
|
|
|
import com.emr.vo.FontVo.*;
|
|
|
|
|
import com.emr.vo.FontVo.ScanAssortVo;
|
|
|
|
|
import com.emr.vo.commomSearch.CommomTree;
|
|
|
|
|
import com.emr.vo.commomSearch.CommomVo;
|
|
|
|
|
import com.emr.vo.commomSearch.ScanPathVo;
|
|
|
|
|
import com.emr.vo.emrType.EmrTypeFeVo;
|
|
|
|
|
import com.lowagie.text.Document;
|
|
|
|
|
import com.lowagie.text.Image;
|
|
|
|
|
import com.lowagie.text.Utilities;
|
|
|
|
|
@ -320,12 +323,12 @@ public class FontController {
|
|
|
|
|
for (ArchiveMasterVo archiveMaster : list) {
|
|
|
|
|
String masterId = archiveMaster.getId();
|
|
|
|
|
List<String> pdfPaths = archiveDetailMapper.selectPDFRATH2(masterId, "7A9C621E3F4F4C9CA95292141C5E15E8");
|
|
|
|
|
if (pdfPaths!=null||pdfPaths.isEmpty()){
|
|
|
|
|
String newPath = "D:\\jiashi\\copy" + File.separator + archiveMaster.getName() + "-" + archiveMaster.getInpNo()+"-知情同意书";
|
|
|
|
|
if (pdfPaths != null || pdfPaths.isEmpty()) {
|
|
|
|
|
String newPath = "D:\\jiashi\\copy" + File.separator + archiveMaster.getName() + "-" + archiveMaster.getInpNo() + "-知情同意书";
|
|
|
|
|
if (!new File(newPath).isDirectory()) {
|
|
|
|
|
new File(newPath).mkdirs();
|
|
|
|
|
}
|
|
|
|
|
for (String pdfPath:pdfPaths){
|
|
|
|
|
for (String pdfPath : pdfPaths) {
|
|
|
|
|
String newSrc = newPath + File.separator + new File(pdfPath).getName();
|
|
|
|
|
try (InputStream inputStream = new FileInputStream(pdfPath);
|
|
|
|
|
OutputStream outputStream = new FileOutputStream(newSrc)) {
|
|
|
|
|
@ -598,6 +601,7 @@ public class FontController {
|
|
|
|
|
}
|
|
|
|
|
return Msg.fail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @description: 批量导出国家病历
|
|
|
|
|
* @params: taskid
|
|
|
|
|
@ -613,17 +617,19 @@ public class FontController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 下载pdf病例到本地
|
|
|
|
|
*
|
|
|
|
|
* @param taskId
|
|
|
|
|
* @param response
|
|
|
|
|
*/
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "downloadPdfZip", produces = {"text/json;charset=UTF-8"}, method = RequestMethod.POST)
|
|
|
|
|
public String downloadPdfZip(int taskId,HttpServletResponse response) throws IOException {
|
|
|
|
|
return batchExportService.downloadPdfZip(taskId,response);
|
|
|
|
|
public String downloadPdfZip(int taskId, HttpServletResponse response) throws IOException {
|
|
|
|
|
return batchExportService.downloadPdfZip(taskId, response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 湘雅二医院根据病案号返回患者病案信息
|
|
|
|
|
*
|
|
|
|
|
* @param patientId 病案号
|
|
|
|
|
* @return Msg
|
|
|
|
|
*/
|
|
|
|
|
@ -639,58 +645,59 @@ public class FontController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 广总血透接口
|
|
|
|
|
*
|
|
|
|
|
* @param // hemodialysisId 血透ID
|
|
|
|
|
* @return String
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "commomListqf", method = RequestMethod.GET)
|
|
|
|
|
public String commomListqf(Model model, HttpServletRequest request,
|
|
|
|
|
@RequestParam("dataSource") String dataSource,
|
|
|
|
|
@RequestParam(value="hemodialysisId",required = false) String hemodialysisId,
|
|
|
|
|
@RequestParam(value="admissId",required = false) String admissId,
|
|
|
|
|
@RequestParam(value="outpatientNo",required = false) String outpatientNo) {
|
|
|
|
|
@RequestParam(value = "hemodialysisId", required = false) String hemodialysisId,
|
|
|
|
|
@RequestParam(value = "admissId", required = false) String admissId,
|
|
|
|
|
@RequestParam(value = "outpatientNo", required = false) String outpatientNo) {
|
|
|
|
|
|
|
|
|
|
String userName = ObjectUtils.isEmpty(request.getParameter("userName")) ? "admin" : request.getParameter("userName");
|
|
|
|
|
Map<String,String> params = new HashMap<>();
|
|
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
|
|
params.put("userName", userName);
|
|
|
|
|
params.put("userPwd", "123456");
|
|
|
|
|
String result = HttpClientUtils.doPost(POWER_URLHEAD + "/login", params);
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
|
|
String token = jsonObject.getString("token");
|
|
|
|
|
if(!ObjectUtils.isEmpty(token)){
|
|
|
|
|
if (!ObjectUtils.isEmpty(token)) {
|
|
|
|
|
this.getUserInfo(request, token, userName);
|
|
|
|
|
//查询表格配置表的数据,根据配置动态显示表格字段
|
|
|
|
|
Map<String,Object> tableConfigMap = commomMapper.queryTableConfig(dataSource);
|
|
|
|
|
if(!ObjectUtils.isEmpty(tableConfigMap)){
|
|
|
|
|
Map<String, Object> tableConfigMap = commomMapper.queryTableConfig(dataSource);
|
|
|
|
|
if (!ObjectUtils.isEmpty(tableConfigMap)) {
|
|
|
|
|
//血透ID 广总血透接口的参数
|
|
|
|
|
model.addAttribute("hemodialysisId",hemodialysisId);
|
|
|
|
|
model.addAttribute("hemodialysisId", hemodialysisId);
|
|
|
|
|
//住院号
|
|
|
|
|
model.addAttribute("admissId",admissId);
|
|
|
|
|
model.addAttribute("admissId", admissId);
|
|
|
|
|
//门诊号
|
|
|
|
|
model.addAttribute("outpatientNo",outpatientNo);
|
|
|
|
|
model.addAttribute("outpatientNo", outpatientNo);
|
|
|
|
|
//获取数据来源
|
|
|
|
|
model.addAttribute("dataSource",dataSource);
|
|
|
|
|
model.addAttribute("dataSource", dataSource);
|
|
|
|
|
//获取需要查询字段
|
|
|
|
|
model.addAttribute("tableQueryField",tableConfigMap.get("tableField"));
|
|
|
|
|
model.addAttribute("tableQueryField", tableConfigMap.get("tableField"));
|
|
|
|
|
//显示查询字段,并转为驼峰格式
|
|
|
|
|
model.addAttribute("tableField", ObjectUtils.isEmpty(tableConfigMap.get("tableField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("tableField").toString()));
|
|
|
|
|
//获取查询字段中文名称
|
|
|
|
|
model.addAttribute("tableFieldName",tableConfigMap.get("tableFieldName"));
|
|
|
|
|
model.addAttribute("tableFieldName", tableConfigMap.get("tableFieldName"));
|
|
|
|
|
//获取排序字段,可点击表头列实现排序
|
|
|
|
|
model.addAttribute("sortField",ObjectUtils.isEmpty(tableConfigMap.get("sortField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("sortField").toString()));
|
|
|
|
|
model.addAttribute("sortField", ObjectUtils.isEmpty(tableConfigMap.get("sortField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("sortField").toString()));
|
|
|
|
|
//获取默认排序字段
|
|
|
|
|
request.getSession().setAttribute("defaultSortField",tableConfigMap.get("defaultSortField"));
|
|
|
|
|
request.getSession().setAttribute("defaultSortField", tableConfigMap.get("defaultSortField"));
|
|
|
|
|
//获取默认排序字段方式
|
|
|
|
|
request.getSession().setAttribute("defaultSortFieldType",tableConfigMap.get("defaultSortFieldType"));
|
|
|
|
|
request.getSession().setAttribute("defaultSortFieldType", tableConfigMap.get("defaultSortFieldType"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return "recordManage/commomSearch/commomListqf";
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
model.addAttribute("msg", "模拟登录失败");
|
|
|
|
|
return "font/msg";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void getUserInfo(HttpServletRequest request, String token, String userName){
|
|
|
|
|
public void getUserInfo(HttpServletRequest request, String token, String userName) {
|
|
|
|
|
//创建连接工厂
|
|
|
|
|
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
|
|
|
|
|
//创建客户端
|
|
|
|
|
@ -703,7 +710,7 @@ public class FontController {
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
} finally {
|
|
|
|
|
if(null != client) {
|
|
|
|
|
if (null != client) {
|
|
|
|
|
client.destroy();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -722,4 +729,34 @@ public class FontController {
|
|
|
|
|
Subject subject = SecurityUtils.getSubject();
|
|
|
|
|
subject.login(userToken);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询打印用途类别信息(湘雅二医院)
|
|
|
|
|
*
|
|
|
|
|
* @param
|
|
|
|
|
* @return Msg
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "getEmrTypeList", method = RequestMethod.GET)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Msg getEmrTypeList() {
|
|
|
|
|
List<EmrTypeFeVo> list = emrTypeService.getEmrTypeList();
|
|
|
|
|
return Msg.successData(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据病案打印用途分类对象查询病案分类页码数(湘雅二医院)
|
|
|
|
|
*
|
|
|
|
|
* @param patInfoEmrTypeDto
|
|
|
|
|
* @return Msg
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "getScanAssortPageByPatEmrType", method = RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Msg getScanAssortByPatInfoEmrType(@RequestBody PatInfoEmrTypeDto patInfoEmrTypeDto) {
|
|
|
|
|
if (ObjectUtils.isEmpty(patInfoEmrTypeDto) && StringUtils.isNotBlank(patInfoEmrTypeDto.getInpatientNo())
|
|
|
|
|
&& StringUtils.isNotBlank(patInfoEmrTypeDto.getDisDate()) && StringUtils.isNotBlank(patInfoEmrTypeDto.getName()) && ObjectUtils.isEmpty(patInfoEmrTypeDto.getEmrTypeIds())) {
|
|
|
|
|
return Msg.fail("传参不能为空");
|
|
|
|
|
}
|
|
|
|
|
List<PatInfoEmrTypeVo> patInfoEmrTypeVos = tScanAssortService.getScanAssortPageByPatEmrType(patInfoEmrTypeDto);
|
|
|
|
|
return Msg.successData(patInfoEmrTypeVos);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|