潮州人医根据身份证查询

master
linjj 3 years ago
parent f57440fc7c
commit 935d2ef16b

@ -93,17 +93,17 @@ public class FontShowRecordController {
* @Version: 1.0 * @Version: 1.0
*/ */
@RequestMapping(value = "recordList") @RequestMapping(value = "recordList")
public String showRecord(String inpatientNo,String idCard,Model model, HttpServletRequest request) { public String showRecord(String inpatientNo, String idCard, Model model, HttpServletRequest request) {
try{ try {
//根据病案号查看病案是否存在 //根据病案号查看病案是否存在
if(StringUtils.isNotBlank(inpatientNo)||StringUtils.isNotBlank(idCard)){ if (StringUtils.isNotBlank(inpatientNo) || StringUtils.isNotBlank(idCard)) {
int commom = commomMapper.isExistInpatientOrAdmissIdOridCard(inpatientNo,idCard, null, null); int commom = commomMapper.isExistInpatientOrAdmissIdOridCard(inpatientNo, idCard, null, null);
if(commom == 0){ if (commom == 0) {
model.addAttribute("msg","病案不存在!"); model.addAttribute("msg", "病案不存在!");
return "font/msg"; return "font/msg";
} }
}else{ } else {
model.addAttribute("msg","参数病案号与参数身份证号不能全部为空!"); model.addAttribute("msg", "参数病案号与参数身份证号不能全部为空!");
return "font/msg"; return "font/msg";
} }
//虚假登陆 //虚假登陆
@ -118,9 +118,52 @@ public class FontShowRecordController {
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
subject.login(userToken); subject.login(userToken);
request.getSession().setAttribute("CURRENT_USER", user); request.getSession().setAttribute("CURRENT_USER", user);
model.addAttribute("inpatientNo",inpatientNo); model.addAttribute("inpatientNo", inpatientNo);
model.addAttribute("idCard",idCard); model.addAttribute("idCard", idCard);
}catch (Exception e){ } catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return "font/recordList";
}
/**
* @description:
* @params:
* @return:
* @author linjj
* @date: 2023/7/31 8:53
*/
@RequestMapping(value = "showRecordList")
public String showRecordList(String inpatientNo, String idCard, Model model, HttpServletRequest request) {
try {
//根据病案号查看病案是否存在
if (StringUtils.isNotBlank(inpatientNo) || StringUtils.isNotBlank(idCard)) {
int commomMaster = commomMapper.selectAllMaster(inpatientNo, idCard);
int commom = commomMapper.isExistInpatientOrAdmissIdOridCard(inpatientNo, idCard, null, null);
if (commom == 0 && commomMaster==0) {
model.addAttribute("msg", "病案不存在!");
return "font/msg";
}
} else {
model.addAttribute("msg", "参数病案号与参数身份证号不能全部为空!");
return "font/msg";
}
//虚假登陆
//验证shiro(有shiro才此操作)
Power_User user = new Power_User();
user.setUserName("第三方");
user.setUserId(-999);
user.setRoleId(-999);
Set<String> menu = new TreeSet<>();
user.setMenus(menu);
UsernamePasswordToken userToken = new UsernamePasswordToken(user.getUserName(), "123456");
Subject subject = SecurityUtils.getSubject();
subject.login(userToken);
request.getSession().setAttribute("CURRENT_USER", user);
model.addAttribute("inpatientNo", inpatientNo);
model.addAttribute("idCard", idCard);
} catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);
e.printStackTrace(); e.printStackTrace();
} }
@ -129,6 +172,7 @@ public class FontShowRecordController {
/** /**
* *
*
* @param inpatientNo * @param inpatientNo
* @param userName * @param userName
* @param model * @param model
@ -137,16 +181,16 @@ public class FontShowRecordController {
*/ */
@RequestMapping(value = "recordListSouth") @RequestMapping(value = "recordListSouth")
public String showRecordSouth(String inpatientNo, String userName, String deptName, Model model, HttpServletRequest request) { public String showRecordSouth(String inpatientNo, String userName, String deptName, Model model, HttpServletRequest request) {
try{ try {
//根据病案号查看病案是否存在 //根据病案号查看病案是否存在
if(StringUtils.isNotBlank(inpatientNo)){ if (StringUtils.isNotBlank(inpatientNo)) {
int commom = commomMapper.isExistInpatientOrAdmissId(inpatientNo, null, null); int commom = commomMapper.isExistInpatientOrAdmissId(inpatientNo, null, null);
if(commom == 0){ if (commom == 0) {
model.addAttribute("msg","病案不存在!"); model.addAttribute("msg", "病案不存在!");
return "font/msg"; return "font/msg";
} }
}else{ } else {
model.addAttribute("msg","参数病案号不能为空!"); model.addAttribute("msg", "参数病案号不能为空!");
return "font/msg"; return "font/msg";
} }
//虚假登陆 //虚假登陆
@ -164,12 +208,12 @@ public class FontShowRecordController {
request.getSession().setAttribute("CURRENT_USER", user); request.getSession().setAttribute("CURRENT_USER", user);
request.getSession().setAttribute("userName", userName); request.getSession().setAttribute("userName", userName);
request.getSession().setAttribute("deptName", deptName); request.getSession().setAttribute("deptName", deptName);
model.addAttribute("inpatientNo",inpatientNo); model.addAttribute("inpatientNo", inpatientNo);
Emr_Log emrLog = new Emr_Log(); Emr_Log emrLog = new Emr_Log();
emrLog.setLogTitle("接口查看"); emrLog.setLogTitle("接口查看");
emrLog.setLogContent("接口查询页面"); emrLog.setLogContent("接口查询页面");
logService.insertInterface(emrLog, userName); logService.insertInterface(emrLog, userName);
}catch (Exception e){ } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);
e.printStackTrace(); e.printStackTrace();
} }
@ -178,6 +222,7 @@ public class FontShowRecordController {
/** /**
* *
*
* @param page * @param page
* @param limit * @param limit
* @param inpatientNo * @param inpatientNo
@ -186,15 +231,15 @@ public class FontShowRecordController {
*/ */
@RequestMapping("getRecordListByInpatientNoSouth") @RequestMapping("getRecordListByInpatientNoSouth")
@ResponseBody @ResponseBody
public String getRecordListByInpatientNoSouth(Integer page, Integer limit,String inpatientNo, HttpServletRequest request){ public String getRecordListByInpatientNoSouth(Integer page, Integer limit, String inpatientNo, HttpServletRequest request) {
if(null != page && null != limit){ if (null != page && null != limit) {
PageHelper.startPage(page, limit); PageHelper.startPage(page, limit);
} }
try{ try {
List<CommomVo> list = commomMapper.selectCommomByInpatientNo(inpatientNo); List<CommomVo> list = commomMapper.selectCommomByInpatientNo(inpatientNo);
PageInfo pageInfo = new PageInfo<>(list); PageInfo pageInfo = new PageInfo<>(list);
return JSON.toJSONString(pageInfo); return JSON.toJSONString(pageInfo);
}catch (Exception e){ } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);
e.printStackTrace(); e.printStackTrace();
return null; return null;
@ -203,13 +248,14 @@ public class FontShowRecordController {
/** /**
* 访 * 访
*
* @param userName * @param userName
* @param deptName * @param deptName
* @param request * @param request
* @return * @return
*/ */
@RequestMapping(value = "commomListSouth") @RequestMapping(value = "commomListSouth")
public String commomListSouth(String userName, String deptName, Model model, HttpServletRequest request){ public String commomListSouth(String userName, String deptName, Model model, HttpServletRequest request) {
//验证shiro(有shiro才此操作) //验证shiro(有shiro才此操作)
UsernamePasswordToken userToken = new UsernamePasswordToken(userName, "123456"); UsernamePasswordToken userToken = new UsernamePasswordToken(userName, "123456");
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
@ -225,6 +271,7 @@ public class FontShowRecordController {
/** /**
* *
*
* @param applyApprove * @param applyApprove
* @param patientIds * @param patientIds
* @param request * @param request
@ -233,39 +280,39 @@ public class FontShowRecordController {
*/ */
@RequestMapping("addApplyApprove") @RequestMapping("addApplyApprove")
@ResponseBody @ResponseBody
@OptionalLog(module = "接口保存",methods = "接口查询页面保存借阅申请") @OptionalLog(module = "接口保存", methods = "接口查询页面保存借阅申请")
public ResultUtil addApplyApprove(Emr_Apply_Approve applyApprove, String patientIds,HttpServletRequest request) throws Exception { public ResultUtil addApplyApprove(Emr_Apply_Approve applyApprove, String patientIds, HttpServletRequest request) throws Exception {
boolean flag = FormTokenFlagUtil.isFlag(request); boolean flag = FormTokenFlagUtil.isFlag(request);
if (!flag) { if (!flag) {
return ResultUtil.error("请不要重复提交!"); return ResultUtil.error("请不要重复提交!");
} }
List<CommomVo> commomtables = commomMapper.selectAllByPatients(patientIds.substring(0, patientIds.length()-1)); List<CommomVo> commomtables = commomMapper.selectAllByPatients(patientIds.substring(0, patientIds.length() - 1));
if(null != commomtables && !commomtables.isEmpty()) { if (null != commomtables && !commomtables.isEmpty()) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String userName = (String)request.getSession().getAttribute("cuserName"); String userName = (String) request.getSession().getAttribute("cuserName");
applyApprove.setApplyer(userName); applyApprove.setApplyer(userName);
applyApprove.setApplyTime(fmt.format(new Date())); applyApprove.setApplyTime(fmt.format(new Date()));
List<Emr_Apply_Approve> list = new ArrayList<>(); List<Emr_Apply_Approve> list = new ArrayList<>();
///查询表列数 ///查询表列数
int colCount = commomMapper.selectColByTableName("emr_apply_approve"); int colCount = commomMapper.selectColByTableName("emr_apply_approve");
int simpleInsertCount = 2100/colCount; int simpleInsertCount = 2100 / colCount;
for (int i = 0; i < commomtables.size(); i++) { for (int i = 0; i < commomtables.size(); i++) {
//处理批量添加sql太长问题设定个数为180 //处理批量添加sql太长问题设定个数为180
if(i > 0 && list.size()%simpleInsertCount == 0){ if (i > 0 && list.size() % simpleInsertCount == 0) {
list.clear(); list.clear();
} }
Emr_Apply_Approve applyApproveInsert = new Emr_Apply_Approve(); Emr_Apply_Approve applyApproveInsert = new Emr_Apply_Approve();
BeanUtils.copyProperties(applyApprove, applyApproveInsert); BeanUtils.copyProperties(applyApprove, applyApproveInsert);
BeanUtils.copyProperties(commomtables.get(i), applyApproveInsert); BeanUtils.copyProperties(commomtables.get(i), applyApproveInsert);
if(StringUtils.isNotBlank(commomtables.get(i).getDisDate())){ if (StringUtils.isNotBlank(commomtables.get(i).getDisDate())) {
applyApproveInsert.setDisDate(DateUtils.strToDateLong(commomtables.get(i).getDisDate())); applyApproveInsert.setDisDate(DateUtils.strToDateLong(commomtables.get(i).getDisDate()));
} }
list.add(applyApproveInsert); list.add(applyApproveInsert);
if(list.size() == 1 && list.get(0).getId() != null){ if (list.size() == 1 && list.get(0).getId() != null) {
applyApproveService.updateEmrApplyApprove(list.get(0)); applyApproveService.updateEmrApplyApprove(list.get(0));
}else{ } else {
//是180的倍数或最后一个 //是180的倍数或最后一个
if((list.size()%simpleInsertCount == 0 || i == commomtables.size() - 1)){ if ((list.size() % simpleInsertCount == 0 || i == commomtables.size() - 1)) {
applyApproveService.SimpleInsert(list); applyApproveService.SimpleInsert(list);
} }
} }
@ -277,33 +324,38 @@ public class FontShowRecordController {
} }
//推送给权限系统下发审批人通知 //推送给权限系统下发审批人通知
private void sendPowerApproveInterface(String applyType,Integer count) throws Exception{ private void sendPowerApproveInterface(String applyType, Integer count) throws Exception {
//查询申请类型 //查询申请类型
List<Emr_Dictionary> dictionaryList = dictionaryMapper.selectDictionaryByTypeCode("apply_type"); List<Emr_Dictionary> dictionaryList = dictionaryMapper.selectDictionaryByTypeCode("apply_type");
String applyTypeName = ""; String applyTypeName = "";
if(null != dictionaryList && !dictionaryList.isEmpty()){ if (null != dictionaryList && !dictionaryList.isEmpty()) {
for(Emr_Dictionary dictionary : dictionaryList){ for (Emr_Dictionary dictionary : dictionaryList) {
if(dictionary.getCode().equals(applyType)){ if (dictionary.getCode().equals(applyType)) {
applyTypeName = dictionary.getName(); applyTypeName = dictionary.getName();
break; break;
} }
} }
} }
//发送通知 //发送通知
applyApproveService.sendNotice(applyTypeName,count); applyApproveService.sendNotice(applyTypeName, count);
} }
@RequestMapping("getRecordListByInpatientNo") @RequestMapping("getRecordListByInpatientNo")
@ResponseBody @ResponseBody
public String getRecordListByInpatientNo(Integer page, Integer limit,String inpatientNo,String idCard){ public String getRecordListByInpatientNo(Integer page, Integer limit, String inpatientNo, String idCard) {
if(null != page && null != limit){ if (null != page && null != limit) {
PageHelper.startPage(page, limit); PageHelper.startPage(page, limit);
} }
try{ PageInfo pageInfo;
List<CommomVo> list = commomMapper.selectCommomByInpatientNo2(inpatientNo,idCard); try {
PageInfo pageInfo = new PageInfo<>(list); List<CommomVo> list = commomMapper.selectCommomByInpatientNo2(inpatientNo, idCard);
pageInfo = new PageInfo<>(list);
if (list.size() == 0) {
List<CommomVo> commomVos = commomMapper.selectMasterByInpatientNo(inpatientNo, idCard);
pageInfo = new PageInfo<>(commomVos);
}
return JSON.toJSONString(pageInfo); return JSON.toJSONString(pageInfo);
}catch (Exception e){ } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);
e.printStackTrace(); e.printStackTrace();
return null; return null;
@ -312,20 +364,21 @@ public class FontShowRecordController {
/** /**
* *
*
* @param patientId * @param patientId
* @param inpatientNo * @param inpatientNo
* @param admissTimes * @param admissTimes
* @return * @return
*/ */
private String getPatientIdByInpatientNoAndAdmissTimes(String patientId,String inpatientNo,Short admissTimes,Model model){ private String getPatientIdByInpatientNoAndAdmissTimes(String patientId, String inpatientNo, Short admissTimes, Model model) {
if(StringUtils.isBlank(patientId)){ if (StringUtils.isBlank(patientId)) {
List<String> patientIdList = commomMapper.selectPatientIdByAdmissTimesAndInpatientNoAndName(admissTimes, inpatientNo, null, null, null); List<String> patientIdList = commomMapper.selectPatientIdByAdmissTimesAndInpatientNoAndName(admissTimes, inpatientNo, null, null, null);
if(!CollectionUtils.isEmpty(patientIdList)){ if (!CollectionUtils.isEmpty(patientIdList)) {
if(patientIdList.size() > 1){ if (patientIdList.size() > 1) {
return "查询到数据不只一个"; return "查询到数据不只一个";
} }
patientId = patientIdList.get(0); patientId = patientIdList.get(0);
}else{ } else {
return "查询不到该数据"; return "查询不到该数据";
} }
} }
@ -333,7 +386,9 @@ public class FontShowRecordController {
return null; return null;
} }
/** /**
*
*
* @MethodName: showRecordFont * @MethodName: showRecordFont
* @Description: * @Description:
* @Param String patientId:patientId * @Param String patientId:patientId
@ -346,10 +401,10 @@ public class FontShowRecordController {
* @Version: 1.0 * @Version: 1.0
*/ */
@RequestMapping("showRecordFont") @RequestMapping("showRecordFont")
public String showRecordFont(String patientId,String inpatientNo,Short admissTimes, Model model, HttpServletRequest request) { public String showRecordFont(String patientId, String inpatientNo, Short admissTimes, Model model, HttpServletRequest request) {
//病案主键为空,通过病案号或与住院次数组合查询对应的病案主键 //病案主键为空,通过病案号或与住院次数组合查询对应的病案主键
String msg = getPatientIdByInpatientNoAndAdmissTimes(patientId, inpatientNo, admissTimes,model); String msg = getPatientIdByInpatientNoAndAdmissTimes(patientId, inpatientNo, admissTimes, model);
if(StringUtils.isNotBlank(msg)){ if (StringUtils.isNotBlank(msg)) {
return msg; return msg;
} }
//加载登陆者 //加载登陆者
@ -372,16 +427,17 @@ public class FontShowRecordController {
/** /**
* *
*
* @param patientId * @param patientId
* @param model * @param model
* @param request * @param request
* @return * @return
*/ */
@RequestMapping("showRecordFontSouth") @RequestMapping("showRecordFontSouth")
public String showRecordFontSouth(String patientId,String inpatientNo,Short admissTimes, Model model, HttpServletRequest request) { public String showRecordFontSouth(String patientId, String inpatientNo, Short admissTimes, Model model, HttpServletRequest request) {
//病案主键为空,通过病案号或与住院次数组合查询对应的病案主键 //病案主键为空,通过病案号或与住院次数组合查询对应的病案主键
String msg = getPatientIdByInpatientNoAndAdmissTimes(patientId, inpatientNo, admissTimes,model); String msg = getPatientIdByInpatientNoAndAdmissTimes(patientId, inpatientNo, admissTimes, model);
if(StringUtils.isNotBlank(msg)){ if (StringUtils.isNotBlank(msg)) {
return msg; return msg;
} }
try { try {
@ -389,7 +445,7 @@ public class FontShowRecordController {
if (null != printCount && !printCount.isEmpty()) { if (null != printCount && !printCount.isEmpty()) {
model.addAttribute("printCount", 1); model.addAttribute("printCount", 1);
} }
String userName = (String)request.getSession().getAttribute("userName"); String userName = (String) request.getSession().getAttribute("userName");
Emr_Log emrLog = new Emr_Log(); Emr_Log emrLog = new Emr_Log();
emrLog.setLogTitle("接口查看"); emrLog.setLogTitle("接口查看");
emrLog.setLogContent("接口预览页面"); emrLog.setLogContent("接口预览页面");
@ -630,7 +686,6 @@ public class FontShowRecordController {
} }
@RequestMapping(value = "selectPrintPic", method = RequestMethod.POST) @RequestMapping(value = "selectPrintPic", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public ResultUtil selectPrintPic(HttpServletResponse response, String patientId, String rootPaths, String names, String sources, HttpServletRequest request) throws Exception { public ResultUtil selectPrintPic(HttpServletResponse response, String patientId, String rootPaths, String names, String sources, HttpServletRequest request) throws Exception {
@ -655,7 +710,7 @@ public class FontShowRecordController {
EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1); EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1);
//UserEffective为1是开启用户信息水印 //UserEffective为1是开启用户信息水印
Short userEffective = emrPdfWaterSet.getUserEffective(); Short userEffective = emrPdfWaterSet.getUserEffective();
if (userEffective==1) { if (userEffective == 1) {
img2PdfUtil.imageToPdfUserEffective(response, scanPages, pdfName, emrPdfWaterSet); img2PdfUtil.imageToPdfUserEffective(response, scanPages, pdfName, emrPdfWaterSet);
} }
//移除缓存 //移除缓存
@ -674,7 +729,7 @@ public class FontShowRecordController {
if (!CollectionUtils.isEmpty(filePaths)) { if (!CollectionUtils.isEmpty(filePaths)) {
//根据图片路径转换pdf //根据图片路径转换pdf
EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1); EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1);
Jpg2PdfUtil.mulFile2One2(response, filePaths, pdfWater,emrPdfWaterSet); Jpg2PdfUtil.mulFile2One2(response, filePaths, pdfWater, emrPdfWaterSet);
//移除缓存 //移除缓存
commomService.CACHE_MAP.clear(); commomService.CACHE_MAP.clear();
} }
@ -704,12 +759,13 @@ public class FontShowRecordController {
/** /**
* pdfiframe * pdfiframe
*
* @param patientId * @param patientId
* @param model * @param model
* @return * @return
*/ */
@RequestMapping("showRecordIframeBloodFont") @RequestMapping("showRecordIframeBloodFont")
public String showRecordIframeBloodFont(String patientId,String flag,Model model) { public String showRecordIframeBloodFont(String patientId, String flag, Model model) {
model.addAttribute("patientId", patientId); model.addAttribute("patientId", patientId);
//查询是否有打印权限 //查询是否有打印权限
int printFlag = 0; int printFlag = 0;
@ -720,27 +776,28 @@ public class FontShowRecordController {
@RequestMapping("showRecordIframeFontSouth") @RequestMapping("showRecordIframeFontSouth")
public String showRecordIframeFontSouth(String patientId, String flag,Model model, HttpServletRequest request) { public String showRecordIframeFontSouth(String patientId, String flag, Model model, HttpServletRequest request) {
model.addAttribute("patientId", patientId); model.addAttribute("patientId", patientId);
//查询是否有打印权限 //查询是否有打印权限
int printFlag = 0; int printFlag = 0;
model.addAttribute("printFlag", printFlag); model.addAttribute("printFlag", printFlag);
model.addAttribute("flag", flag); model.addAttribute("flag", flag);
model.addAttribute("userName", (String)request.getSession().getAttribute("userName")); model.addAttribute("userName", (String) request.getSession().getAttribute("userName"));
model.addAttribute("deptName", (String)request.getSession().getAttribute("deptName")); model.addAttribute("deptName", (String) request.getSession().getAttribute("deptName"));
return "font/showRecordIframeFontSouth"; return "font/showRecordIframeFontSouth";
} }
/** /**
* *
*
* @param patientId * @param patientId
* @param request * @param request
* @return * @return
*/ */
@RequestMapping(value = "getFontBloodRecordTree", produces = {"text/json;charset=UTF-8"}) @RequestMapping(value = "getFontBloodRecordTree", produces = {"text/json;charset=UTF-8"})
@ResponseBody @ResponseBody
public String getFontBloodRecordTree(String patientId,HttpServletRequest request) { public String getFontBloodRecordTree(String patientId, HttpServletRequest request) {
List<Map<String,Object>> treeList = new ArrayList<>(); List<Map<String, Object>> treeList = new ArrayList<>();
//查询该有的权限分类 //查询该有的权限分类
try { try {
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
@ -752,13 +809,13 @@ public class FontShowRecordController {
} }
//按打印分类id查询归属分类集合 //按打印分类id查询归属分类集合
//第一级:全部影像资料 //第一级:全部影像资料
Map<String,Object> map1 = new HashMap<>(); Map<String, Object> map1 = new HashMap<>();
map1.put("text","全部影像资料"); map1.put("text", "全部影像资料");
Map<String,Object> tempMap = new HashMap<>(); Map<String, Object> tempMap = new HashMap<>();
tempMap.put("opened",true); tempMap.put("opened", true);
tempMap.put("checked",true); tempMap.put("checked", true);
map1.put("state",tempMap); map1.put("state", tempMap);
List<Map<String,Object>> children1 = new LinkedList<>(); List<Map<String, Object>> children1 = new LinkedList<>();
if (null != commomVos && !commomVos.isEmpty()) { if (null != commomVos && !commomVos.isEmpty()) {
//去重,取出不重复的分类集合 //去重,取出不重复的分类集合
Map<String, CommomTree> assortMap = new LinkedHashMap<>(); Map<String, CommomTree> assortMap = new LinkedHashMap<>();
@ -767,12 +824,12 @@ public class FontShowRecordController {
} }
for (Map.Entry<String, CommomTree> map : assortMap.entrySet()) { for (Map.Entry<String, CommomTree> map : assortMap.entrySet()) {
String assortId = map.getValue().getAssortId(); String assortId = map.getValue().getAssortId();
Map<String,Object> children1Map = new HashMap<>(); Map<String, Object> children1Map = new HashMap<>();
children1Map.put("assortId",map.getValue().getAssortId()); children1Map.put("assortId", map.getValue().getAssortId());
Map<String,Object> tempMapChildren1 = new HashMap<>(); Map<String, Object> tempMapChildren1 = new HashMap<>();
tempMapChildren1.put("checked",true); tempMapChildren1.put("checked", true);
children1Map.put("state",tempMapChildren1); children1Map.put("state", tempMapChildren1);
List<Map<String,Object>> children2 = new LinkedList<>(); List<Map<String, Object>> children2 = new LinkedList<>();
//定义该类影像图片数量 //定义该类影像图片数量
int scanPathCount = 0; int scanPathCount = 0;
//第二层 图片 //第二层 图片
@ -796,12 +853,12 @@ public class FontShowRecordController {
children2.add(children2Map); children2.add(children2Map);
} }
} }
children1Map.put("text",map.getValue().getAssortName() + "(" + scanPathCount + ")"); children1Map.put("text", map.getValue().getAssortName() + "(" + scanPathCount + ")");
children1Map.put("children",children2); children1Map.put("children", children2);
children1.add(children1Map); children1.add(children1Map);
} }
} }
map1.put("children",children1); map1.put("children", children1);
//判断分类是否全选,全选,父类跟着全选 //判断分类是否全选,全选,父类跟着全选
treeList.add(map1); treeList.add(map1);
return JSON.toJSONString(treeList); return JSON.toJSONString(treeList);
@ -814,18 +871,19 @@ public class FontShowRecordController {
/** /**
* pdf * pdf
*
* @param patientId * @param patientId
* @param scanPages * @param scanPages
* @param sources * @param sources
* @param flag * @param flag
*/ */
@RequestMapping(value = "showRecordContentBloodFont") @RequestMapping(value = "showRecordContentBloodFont")
public String showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag,Model model){ public String showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag, Model model) {
String pdfTempRoot = "pdfTemp"; String pdfTempRoot = "pdfTemp";
//临时保存pdf的文件目录 //临时保存pdf的文件目录
String fileOutRoot = WATERPICPATH + pdfTempRoot; String fileOutRoot = WATERPICPATH + pdfTempRoot;
//目录不存在则创建 //目录不存在则创建
if(!new File(fileOutRoot).isDirectory()){ if (!new File(fileOutRoot).isDirectory()) {
new File(fileOutRoot).mkdirs(); new File(fileOutRoot).mkdirs();
} }
//文件相对路径 //文件相对路径
@ -835,17 +893,18 @@ public class FontShowRecordController {
//组织前台访问临时pdf路径 //组织前台访问临时pdf路径
String httpFilePath = EMRRECORDJSP + "\\reload\\" + filePath; String httpFilePath = EMRRECORDJSP + "\\reload\\" + filePath;
try { try {
commomService.showRecordContentBloodFont(patientId,scanPages,sources,flag,fileOutPath); commomService.showRecordContentBloodFont(patientId, scanPages, sources, flag, fileOutPath);
} catch (Exception e) { } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);
e.printStackTrace(); e.printStackTrace();
} }
model.addAttribute("httpFilePath",httpFilePath); model.addAttribute("httpFilePath", httpFilePath);
return "font/showPdfFrameFont"; return "font/showPdfFrameFont";
} }
/** /**
* PDF * PDF
*
* @param patientId * @param patientId
* @param scanPages * @param scanPages
* @param sources * @param sources
@ -855,12 +914,12 @@ public class FontShowRecordController {
* @return * @return
*/ */
@RequestMapping(value = "showRecordContentSouthFont") @RequestMapping(value = "showRecordContentSouthFont")
public String showRecordContentSouthFont(String patientId, String scanPages, String sources, String flag,Model model, HttpServletRequest request){ public String showRecordContentSouthFont(String patientId, String scanPages, String sources, String flag, Model model, HttpServletRequest request) {
String pdfTempRoot = "pdfTemp"; String pdfTempRoot = "pdfTemp";
//临时保存pdf的文件目录 //临时保存pdf的文件目录
String fileOutRoot = WATERPICPATH + pdfTempRoot; String fileOutRoot = WATERPICPATH + pdfTempRoot;
//目录不存在则创建 //目录不存在则创建
if(!new File(fileOutRoot).isDirectory()){ if (!new File(fileOutRoot).isDirectory()) {
new File(fileOutRoot).mkdirs(); new File(fileOutRoot).mkdirs();
} }
//文件相对路径 //文件相对路径
@ -869,15 +928,15 @@ public class FontShowRecordController {
String fileOutPath = WATERPICPATH + filePath; String fileOutPath = WATERPICPATH + filePath;
//组织前台访问临时pdf路径 //组织前台访问临时pdf路径
String httpFilePath = EMRRECORDJSP + "\\reload\\" + filePath; String httpFilePath = EMRRECORDJSP + "\\reload\\" + filePath;
String userName = (String)request.getSession().getAttribute("userName"); String userName = (String) request.getSession().getAttribute("userName");
String deptName = (String)request.getSession().getAttribute("deptName"); String deptName = (String) request.getSession().getAttribute("deptName");
try { try {
commomService.showRecordContentSouthFont(patientId,userName,deptName,scanPages,sources,flag,fileOutPath); commomService.showRecordContentSouthFont(patientId, userName, deptName, scanPages, sources, flag, fileOutPath);
} catch (Exception e) { } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);
e.printStackTrace(); e.printStackTrace();
} }
model.addAttribute("httpFilePath",httpFilePath); model.addAttribute("httpFilePath", httpFilePath);
return "font/showPdfFrameFont"; return "font/showPdfFrameFont";
} }
@ -895,9 +954,9 @@ public class FontShowRecordController {
* @UpdateRemark: * @UpdateRemark:
* @Version: 1.0 * @Version: 1.0
*/ */
@RequestMapping(value="emrReordLoginByToken",method = RequestMethod.POST) @RequestMapping(value = "emrReordLoginByToken", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public ResultUtil emrReordLoginByToken(String token,String userName, HttpServletRequest request) throws Exception{ public ResultUtil emrReordLoginByToken(String token, String userName, HttpServletRequest request) throws Exception {
if (StringUtils.isNoneBlank(token)) { if (StringUtils.isNoneBlank(token)) {
//创建连接工厂 //创建连接工厂
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance(); JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
@ -954,9 +1013,9 @@ public class FontShowRecordController {
* @UpdateRemark: * @UpdateRemark:
* @Version: 1.0 * @Version: 1.0
*/ */
@RequestMapping(value="emrReordLogin") @RequestMapping(value = "emrReordLogin")
@ResponseBody @ResponseBody
public ResultUtil emrReordLogin(String userName, HttpServletRequest request) throws Exception{ public ResultUtil emrReordLogin(String userName, HttpServletRequest request) throws Exception {
ResultUtil resultUtil = powerLogin(userName); ResultUtil resultUtil = powerLogin(userName);
String token = resultUtil.getMsg(); String token = resultUtil.getMsg();
return emrReordLoginByToken(token, userName, request); return emrReordLoginByToken(token, userName, request);
@ -976,19 +1035,19 @@ public class FontShowRecordController {
* @UpdateRemark: * @UpdateRemark:
* @Version: 1.0 * @Version: 1.0
*/ */
@RequestMapping(value="powerLogin",method = RequestMethod.POST) @RequestMapping(value = "powerLogin", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public ResultUtil powerLogin(String userName) throws Exception{ public ResultUtil powerLogin(String userName) throws Exception {
if(StringUtils.isBlank(userName)){ if (StringUtils.isBlank(userName)) {
return ResultUtil.error("用户名不能为空"); return ResultUtil.error("用户名不能为空");
} }
//请求权限系统登录 //请求权限系统登录
Map<String,String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
String url = POWER_URLHEAD + "/font/getToken1"; String url = POWER_URLHEAD + "/font/getToken1";
map.put("userName",userName); map.put("userName", userName);
String resultString = HttpClientUtils.doPost(url, map); String resultString = HttpClientUtils.doPost(url, map);
// 判断返回状态是否为200 // 判断返回状态是否为200
if(StringUtils.isNoneBlank(resultString)) { if (StringUtils.isNoneBlank(resultString)) {
JSONObject jsonObject = JSON.parseObject(resultString); JSONObject jsonObject = JSON.parseObject(resultString);
String extend = jsonObject.getString("extend"); String extend = jsonObject.getString("extend");
JSONObject extendObject = JSONObject.parseObject(extend); JSONObject extendObject = JSONObject.parseObject(extend);
@ -1013,18 +1072,18 @@ public class FontShowRecordController {
* @Version: 1.0 * @Version: 1.0
*/ */
@RequestMapping("showRecord") @RequestMapping("showRecord")
public String showRecord174(String patientId,String userName, Model model, HttpServletRequest request) throws Exception{ public String showRecord174(String patientId, String userName, Model model, HttpServletRequest request) throws Exception {
model.addAttribute("patientId", patientId); model.addAttribute("patientId", patientId);
//加载登陆者 //加载登陆者
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
if (null == user) { if (null == user) {
emrReordLogin(userName,request); emrReordLogin(userName, request);
} }
return "font/showRecord3To2"; return "font/showRecord3To2";
} }
@RequestMapping("showRecordPage") @RequestMapping("showRecordPage")
public String showRecordPage(String patientId,Model model, HttpServletRequest request) throws Exception{ public String showRecordPage(String patientId, Model model, HttpServletRequest request) throws Exception {
model.addAttribute("patientId", patientId); model.addAttribute("patientId", patientId);
//加载登陆者 //加载登陆者
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");

@ -367,10 +367,14 @@ public class CommomSearchController {
@RequestMapping("getRecord") @RequestMapping("getRecord")
@ResponseBody @ResponseBody
public String getRecord(String patientId, String flag) { public String getRecord(String patientId, String flag) {
List<CommomVo> commomVos;
if (StringUtils.isNoneBlank(patientId)) { if (StringUtils.isNoneBlank(patientId)) {
try { try {
//根据patientId查询包含其他诊断的基本信息 //根据patientId查询包含其他诊断的基本信息
List<CommomVo> commomVos = commomMapper.selectOtherDiagByPatientId(patientId, flag); commomVos = commomMapper.selectOtherDiagByPatientId(patientId, flag);
if (commomVos.size()==0){
commomVos = commomMapper.selectMasterByPatientId(patientId);
}
return JSON.toJSONString(commomVos.get(0)); return JSON.toJSONString(commomVos.get(0));
} catch (Exception e) { } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);

@ -1322,6 +1322,7 @@ public class TemplateSearchController {
} }
} }
/**
/** /**
* @MethodName: getPatientIdsBySql * @MethodName: getPatientIdsBySql
* @Description: patientIdPDF * @Description: patientIdPDF
@ -1340,10 +1341,7 @@ public class TemplateSearchController {
if (StringUtils.isNoneBlank(sql)) { if (StringUtils.isNoneBlank(sql)) {
try { try {
StringBuilder json = new StringBuilder(); StringBuilder json = new StringBuilder();
long start = System.currentTimeMillis();
List<CommomVo> list = commomMapper.selectAll(sql); List<CommomVo> list = commomMapper.selectAll(sql);
long end = System.currentTimeMillis();
//System.out.println("查询patiendId集合时间"+(end - start)/1000.0+"s");
if (null != list && !list.isEmpty()) { if (null != list && !list.isEmpty()) {
for (CommomVo commomVo : list) { for (CommomVo commomVo : list) {
json.append("'").append(commomVo.getPatientId()).append("',"); json.append("'").append(commomVo.getPatientId()).append("',");

@ -98,6 +98,10 @@ public interface CommomMapper {
* */ * */
List<CommomVo> selectCommomByInpatientNo2(@Param("inpatientNo")String inpatientNo,@Param("idCard")String idCard); List<CommomVo> selectCommomByInpatientNo2(@Param("inpatientNo")String inpatientNo,@Param("idCard")String idCard);
List<CommomVo> selectMasterByInpatientNo(@Param("inpatientNo")String inpatientNo,@Param("idCard")String idCard);
List<CommomVo> selectMasterByPatientId(@Param("patientId")String patientId);
/** /**
* *
* @return * @return
@ -132,4 +136,8 @@ public interface CommomMapper {
* @date: 2023/7/5 17:42 * @date: 2023/7/5 17:42
*/ */
List<String> selectPathLIst(@Param("patientId")String patientId); List<String> selectPathLIst(@Param("patientId")String patientId);
int selectAllMaster(@Param("inpatientNo")String inpatientNo,@Param("idCard")String idCar);
} }

@ -79,7 +79,7 @@ public class CommomService {
private EmrPdfWaterSetMapper pdfWaterSetMapper; private EmrPdfWaterSetMapper pdfWaterSetMapper;
@Autowired @Autowired
private Archive_DetailMapper archiveDetailMapper; private Archive_DetailMapper archiveDetailMapper;
public static final Map<String,Object> CACHE_MAP =new ConcurrentHashMap<>(); public static final Map<String, Object> CACHE_MAP = new ConcurrentHashMap<>();
//获取所属医院用户名集合 //获取所属医院用户名集合
public static StringBuilder creaters(HttpServletRequest request) { public static StringBuilder creaters(HttpServletRequest request) {
@ -211,8 +211,6 @@ public class CommomService {
} }
//脐血库显示pdf //脐血库显示pdf
public void showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag, HttpServletResponse response, HttpServletRequest request) throws Exception { public void showRecordContentBloodFont(String patientId, String scanPages, String sources, String flag, HttpServletResponse response, HttpServletRequest request) throws Exception {
if (StringUtils.isNotBlank(patientId)) { if (StringUtils.isNotBlank(patientId)) {
@ -220,6 +218,7 @@ public class CommomService {
//查询 //查询
if (StringUtils.isNotBlank(flag)) { if (StringUtils.isNotBlank(flag)) {
CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId); CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId);
if (commomVo != null) {
if (StringUtils.isNotBlank(commomVo.getFilePath())) { if (StringUtils.isNotBlank(commomVo.getFilePath())) {
//flag = home_addr取home_addr字段path_file取home_addr字段 //flag = home_addr取home_addr字段path_file取home_addr字段
String root1 = ""; String root1 = "";
@ -251,14 +250,15 @@ public class CommomService {
String mapKey = "admin" + "_" + patientId; String mapKey = "admin" + "_" + patientId;
CACHE_MAP.put(mapKey, filePaths); CACHE_MAP.put(mapKey, filePaths);
} }
}
} else { } else {
List<String> commomTrees = archiveDetailMapper.getPDFRATH(patientId,scanPages); List<String> commomTrees = archiveDetailMapper.getPDFRATH(patientId, scanPages);
if (!commomTrees.isEmpty()) { if (!commomTrees.isEmpty()) {
String mapKey = "admin" + "_" + patientId; String mapKey = "admin" + "_" + patientId;
CACHE_MAP.put(mapKey, commomTrees); CACHE_MAP.put(mapKey, commomTrees);
} }
} }
} }
} }
} }
@ -279,11 +279,9 @@ public class CommomService {
} else if ("file_path".equals(flag)) { } else if ("file_path".equals(flag)) {
root1 = commomVo.getFilePath(); root1 = commomVo.getFilePath();
} }
String root2 = commomVo.getNewPath();
//组织src //组织src
List<String> src = new LinkedList<>(); List<String> src = new LinkedList<>();
String[] scanPageArr = scanPages.split(","); String[] scanPageArr = scanPages.split(",");
String[] sourceArr = sources.split(",");
for (int i = 0; i < scanPageArr.length; i++) { for (int i = 0; i < scanPageArr.length; i++) {
String srcStr = ""; String srcStr = "";
if (StringUtils.isNotBlank(scanPageArr[i])) { if (StringUtils.isNotBlank(scanPageArr[i])) {
@ -304,7 +302,7 @@ public class CommomService {
request.getSession().setAttribute(mapKey, filePaths); request.getSession().setAttribute(mapKey, filePaths);
} }
} else { } else {
List<String> commomTrees = archiveDetailMapper.getPDFRATH(patientId,scanPages); List<String> commomTrees = archiveDetailMapper.getPDFRATH(patientId, scanPages);
if (!commomTrees.isEmpty()) { if (!commomTrees.isEmpty()) {
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String mapKey = user.getUserName() + "_" + patientId; String mapKey = user.getUserName() + "_" + patientId;
@ -651,15 +649,15 @@ public class CommomService {
if (!new File(waterPicPath).exists()) { if (!new File(waterPicPath).exists()) {
//定义第二文本水印 姓名 + 科室 + ip //定义第二文本水印 姓名 + 科室 + ip
EmrPdfWaterSet emrPdfWaterSet1 = getEmrPdfWaterSet(emrPdfWaterSet); EmrPdfWaterSet emrPdfWaterSet1 = getEmrPdfWaterSet(emrPdfWaterSet);
if (userEffective==1){ if (userEffective == 1) {
img2PdfUtil.addWatermarkPic1(new File(srcPath), emrPdfWaterSet, waterPicPath, emrPdfWaterSet1); img2PdfUtil.addWatermarkPic1(new File(srcPath), emrPdfWaterSet, waterPicPath, emrPdfWaterSet1);
}else { } else {
img2PdfUtil.addWatermarkPic2(new File(srcPath), emrPdfWaterSet, waterPicPath); img2PdfUtil.addWatermarkPic2(new File(srcPath), emrPdfWaterSet, waterPicPath);
} }
} }
//组织输出地址 //组织输出地址
String root = selectRootByNotWater(WATERPICPATH); String root = selectRootByNotWater(WATERPICPATH);
outSrc = EMRRECORDJSP + File.separator + root+ "/jiashi/reload/"+ patientId + File.separator + sourceList[i] + File.separator + nameList[i]; outSrc = EMRRECORDJSP + File.separator + root + "/jiashi/reload/" + patientId + File.separator + sourceList[i] + File.separator + nameList[i];
} }
} else { } else {
//不需要水印 //不需要水印

@ -1,12 +1,12 @@
#power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934 #power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
POWER_IP =localhost POWER_IP =172.16.11.90
POWER_URLHEAD = http://localhost:8081/power POWER_URLHEAD = http://172.16.11.90:8081/power
POWER_JSPHEAD = localhost POWER_JSPHEAD = 172.16.11.90
POWER_JSP = http://localhost:8081/power POWER_JSP = http://172.16.11.90:8081/power
#\u672C\u8EAB\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934 #\u672C\u8EAB\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934
EMR_RECORD_JSP = http://localhost:8083/emr_record EMR_RECORD_JSP = http://172.16.11.90:8081/emr_record
#webSocket\u670D\u52A1\u5668\u5730\u5740 #webSocket\u670D\u52A1\u5668\u5730\u5740
@ -17,6 +17,8 @@ STR_SPLIT = *^:|,.
#\u65E5\u5FD7\u4FDD\u7559\u5929\u6570 #\u65E5\u5FD7\u4FDD\u7559\u5929\u6570
log.days = 180 log.days = 180
pdfWater = \u6F6E\u5DDE\u5E02\u4EBA\u6C11\u533B\u9662
#session\u8FC7\u671F\u65F6\u95F4ms #session\u8FC7\u671F\u65F6\u95F4ms
TOKEN_EXPIRE_TIME = 3600000 TOKEN_EXPIRE_TIME = 3600000
@ -40,3 +42,12 @@ applyApproveFlag =0
#//????? #//?????
initialization =0 initialization =0
#\u67E5\u8BE2\u5168\u6587\u68C0\u7D22\u7684\u5730\u5740
fullTextSearchUrl = http://172.16.11.90:57777/AppEngine3?wsdl
#fullTextSearchUrl = http://localhost:57777/AppEngine3?wsdl
#\u67E5\u8BE2\u5168\u6587\u68C0\u7D22\u7684\u65B9\u6CD5\u540D
fullTextSearchMethod = SearchFulltext
#\u5168\u6587\u68C0\u7D22\u5173\u952E\u5B57\u4FDD\u7559\u5929\u6570
fullTextDays = 90

@ -3,9 +3,9 @@ jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#jdbc.username=sa #jdbc.username=sa
#jdbc.password=docus@702 #jdbc.password=docus@702
jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=qf_record jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=emr_record
jdbc.username=sa jdbc.username=sa
jdbc.password=admin123 jdbc.password=docus@702
#dataSource2 #dataSource2
jdbc.url2=jdbc\:sqlserver\://localhost:1433;databaseName=blgd_java jdbc.url2=jdbc\:sqlserver\://localhost:1433;databaseName=blgd_java

@ -1296,7 +1296,7 @@
<select id="selectCommomByInpatientNo2" resultMap="BaseResultMap"> <select id="selectCommomByInpatientNo2" resultMap="BaseResultMap">
select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept
from commomtable from commomtable
<where> <where> 1=1
<if test="inpatientNo != null and inpatientNo != ''"> <if test="inpatientNo != null and inpatientNo != ''">
AND inpatient_no like '%${inpatientNo}%' AND inpatient_no like '%${inpatientNo}%'
</if> </if>
@ -1306,6 +1306,28 @@
</where> </where>
order by admiss_times desc order by admiss_times desc
</select> </select>
<select id="selectMasterByInpatientNo" resultType="com.emr.vo.commomSearch.CommomVo">
SELECT
m.id AS patient_id,
m.inp_no AS inpatient_no,
m.name,
m.visit_id AS admiss_times,
m.discharge_date_time AS dis_date,
emr_dictionary.name AS dis_dept
FROM
archive_master m
LEFT JOIN emr_dictionary ON m.dept_name = emr_dictionary.CODE
AND emr_dictionary.parent_id = 'dept_code'
<where>
<if test="inpatientNo != null and inpatientNo != ''">
AND inp_no like '%${inpatientNo}%'
</if>
<if test="idCard != null and idCard != ''">
AND id_no = #{idCard}
</if>
</where>
order by visit_id desc
</select>
<select id="selectCommomCount" resultType="java.lang.Integer"> <select id="selectCommomCount" resultType="java.lang.Integer">
SELECT SELECT
COUNT(1) COUNT(1)
@ -1324,6 +1346,39 @@
LEFT JOIN t_scan_assort t on c.patient_id=t.patient_id LEFT JOIN t_scan_assort t on c.patient_id=t.patient_id
where t.is_del!=1 and c.patient_id=#{patientId} where t.is_del!=1 and c.patient_id=#{patientId}
</select> </select>
<select id="selectAllMaster" resultType="java.lang.Integer">
SELECT
count(1)
FROM
archive_master
<where>
<if test="inpatientNo != null and inpatientNo != ''">
AND inp_no = #{inpatientNo}
</if>
<if test="idCard != null and idCard != ''">
AND id_no = #{idCard}
</if>
</where>
</select>
<select id="selectMasterByPatientId" resultType="com.emr.vo.commomSearch.CommomVo">
SELECT
m.id AS patient_id,
m.inp_no AS inpatient_no,
m.name,
m.visit_id AS admiss_times,
m.discharge_date_time AS dis_date,
emr_dictionary.name AS dis_dept
FROM
archive_master m
LEFT JOIN emr_dictionary ON m.dept_name = emr_dictionary.CODE
AND emr_dictionary.parent_id = 'dept_code'
<where>
<if test="patientId != null and patientId != ''">
m.id =#{patientId}
</if>
</where>
order by visit_id desc
</select>
<!--修改病案备注--> <!--修改病案备注-->
<update id="updateRecordReMark" parameterType="com.emr.vo.commomSearch.CommomVo"> <update id="updateRecordReMark" parameterType="com.emr.vo.commomSearch.CommomVo">
update commomtable update commomtable

@ -1,6 +1,5 @@
//加载数据表格 //加载数据表格
$('#mytab').bootstrapTable({ $('#mytab').bootstrapTable({
height:7000,
toolbar: '#toolbar', //工具按钮用哪个容器 toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色 striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性* cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
@ -11,7 +10,6 @@ $('#mytab').bootstrapTable({
pageNumber: 1, //初始化加载第一页,默认第一页 pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 10, //每页的记录行数(* pageSize: 10, //每页的记录行数(*
pageList: [10,15,20,30,50],//可供选择的每页的行数(* pageList: [10,15,20,30,50],//可供选择的每页的行数(*
height: 320, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns:[ columns:[
{ {
title:'全选', title:'全选',
@ -50,22 +48,11 @@ $('#mytab').bootstrapTable({
{ {
title:'出院日期', title:'出院日期',
field:'disDate', field:'disDate',
formatter: function (value) {
if(value != '' && value.length == 21) {
return value.substring(0, value.length - 2);
}
}
}, },
{ {
title:'出院科室', title:'出院科室',
field:'disDept', field:'disDept',
}, },
{
title:'扫描状态',
formatter: function(){
return '已扫描'
}
},
{ {
title:'操作', title:'操作',
formatter: function(value,row){ formatter: function(value,row){

@ -449,7 +449,7 @@ function search() {
if (null != admissTimes && "" != admissTimes) { if (null != admissTimes && "" != admissTimes) {
sql += " and admiss_times like '%" + admissTimes + "%'"; sql += " and admiss_times like '%" + admissTimes + "%'";
} }
if (null != name && "" != name) {4 if (null != name && "" != name) {
sql += " and name like '%" + name + "%'"; sql += " and name like '%" + name + "%'";
} }
$("#mytab").bootstrapTable('destroy'); $("#mytab").bootstrapTable('destroy');

@ -189,9 +189,6 @@ function freshTable(){
locale:'zh-CN',//中文支持, locale:'zh-CN',//中文支持,
url:path+'/template/cutomSearchTable',//排序方式 url:path+'/template/cutomSearchTable',//排序方式
queryParams: function (params) { queryParams: function (params) {
debugger
console.log(params)
const param = { const param = {
selectSql:$("#englishFields").val(), selectSql:$("#englishFields").val(),
fromTableSql:$("#fromTableSql").val(), fromTableSql:$("#fromTableSql").val(),

Loading…
Cancel
Save