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