|
|
|
@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
|
import org.apache.shiro.authc.UsernamePasswordToken;
|
|
|
|
import org.apache.shiro.authc.UsernamePasswordToken;
|
|
|
|
import org.apache.shiro.subject.Subject;
|
|
|
|
import org.apache.shiro.subject.Subject;
|
|
|
|
|
|
|
|
import org.apache.shiro.util.CollectionUtils;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
@ -287,6 +288,29 @@ 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)){
|
|
|
|
|
|
|
|
List<String> patientIdList = commomMapper.selectPatientIdByAdmissTimesAndInpatientNoAndName(admissTimes, inpatientNo, null, null, null);
|
|
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(patientIdList)){
|
|
|
|
|
|
|
|
if(patientIdList.size() > 1){
|
|
|
|
|
|
|
|
return "查询到数据不只一个";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
patientId = patientIdList.get(0);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
return "查询不到该数据";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
model.addAttribute("patientId", patientId);
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**接口
|
|
|
|
/**接口
|
|
|
|
* @MethodName: showRecordFont
|
|
|
|
* @MethodName: showRecordFont
|
|
|
|
* @Description: 跳转到档案预览
|
|
|
|
* @Description: 跳转到档案预览
|
|
|
|
@ -300,8 +324,12 @@ public class FontShowRecordController {
|
|
|
|
* @Version: 1.0
|
|
|
|
* @Version: 1.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequestMapping("showRecordFont")
|
|
|
|
@RequestMapping("showRecordFont")
|
|
|
|
public String showRecordFont(String patientId, Model model, HttpServletRequest request) {
|
|
|
|
public String showRecordFont(String patientId,String inpatientNo,Short admissTimes, Model model, HttpServletRequest request) {
|
|
|
|
model.addAttribute("patientId", patientId);
|
|
|
|
//病案主键为空,通过病案号或与住院次数组合查询对应的病案主键
|
|
|
|
|
|
|
|
String msg = getPatientIdByInpatientNoAndAdmissTimes(patientId, inpatientNo, admissTimes,model);
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(msg)){
|
|
|
|
|
|
|
|
return msg;
|
|
|
|
|
|
|
|
}
|
|
|
|
//加载登陆者
|
|
|
|
//加载登陆者
|
|
|
|
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) {
|
|
|
|
@ -328,8 +356,12 @@ public class FontShowRecordController {
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequestMapping("showRecordFontSouth")
|
|
|
|
@RequestMapping("showRecordFontSouth")
|
|
|
|
public String showRecordFontSouth(String patientId, Model model, HttpServletRequest request) {
|
|
|
|
public String showRecordFontSouth(String patientId,String inpatientNo,Short admissTimes, Model model, HttpServletRequest request) {
|
|
|
|
model.addAttribute("patientId", patientId);
|
|
|
|
//病案主键为空,通过病案号或与住院次数组合查询对应的病案主键
|
|
|
|
|
|
|
|
String msg = getPatientIdByInpatientNoAndAdmissTimes(patientId, inpatientNo, admissTimes,model);
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(msg)){
|
|
|
|
|
|
|
|
return msg;
|
|
|
|
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
List<EmrPrintOrDownLoadInfoVo> printCount = printOrDownLoadInfoService.getPrintCount(patientId);
|
|
|
|
List<EmrPrintOrDownLoadInfoVo> printCount = printOrDownLoadInfoService.getPrintCount(patientId);
|
|
|
|
if (null != printCount && !printCount.isEmpty()) {
|
|
|
|
if (null != printCount && !printCount.isEmpty()) {
|
|
|
|
|