增加有审批权限的用户在首页间隔三分钟监听是否有待审批记录,有则请求权限系统接口发送通知,预览pdf开启关键字搜索功能

master
zengwh 6 years ago
parent 67b7ab7d64
commit baaf0fef89

@ -22,9 +22,13 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClients;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@ -72,6 +76,8 @@ public class ApproveController {
private AnnotationTemplateService annotationTemplateService;
@Autowired
private Emr_Apply_ApproveMapper applyApproveMapper;
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
/**
* @MethodName: approveListByAppleStatus
* @Description:
@ -175,6 +181,9 @@ public class ApproveController {
}
}
}
//推送给权限系统下发审批人通知
sendPowerApproveInterface(applyApprove.getApplyType(),commomtables.size());
} else {
return ResultUtil.error("该病案另一个申请还处于有效期,无须重复申请!");
}
@ -188,6 +197,24 @@ public class ApproveController {
}
}
//推送给权限系统下发审批人通知
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)){
applyTypeName = dictionary.getName();
break;
}
}
}
String url = POWER_URLHEAD+"/font/sendEmrRecordApproveNotice?applyType="+applyTypeName+"&count="+count;
// 执行请求
HttpClients.createDefault().execute(new HttpGet(url));*/
}
/**
* @MethodName: approveManageList
* @Description:
@ -630,7 +657,8 @@ public class ApproveController {
@RequiresPermissions("/approve/approveManageList174")
@OptionalLog(module = "查看",methods = "借阅审批管理页面")
@RequestMapping("approveManageList174")
public String approveManageList174(){
public String approveManageList174(Integer flag,Model model){
model.addAttribute("flag",flag);
return "approveManage/approveManageList/approveManageList174";
}
/**
@ -1054,4 +1082,34 @@ public class ApproveController {
}
}
}
/**
* @MethodName: selectNotApproveList
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020-04-24
* @UpdateUser:
* @UpdateDate: 2020-04-24
* @UpdateRemark:
* @Version: 1.0
*/
@RequestMapping("selectNotApproveList")
@ResponseBody
public void selectNotApproveList(){
try {
//查询未审批集合
List<Emr_Apply_Approve> applyApproves = applyApproveMapper.selectCountByApproveStateIsNull();
if (null != applyApproves && !applyApproves.isEmpty()) {
//调用权限系统推送通知
String applyTypeName = "申请";
String url = POWER_URLHEAD + "/font/sendEmrRecordApproveNotice?applyType=" + applyTypeName + "&count=" + applyApproves.size();
// 执行请求
HttpClients.createDefault().execute(new HttpGet(url));
}
}catch (Exception e){
e.printStackTrace();
}
}
}

@ -7,6 +7,8 @@
/************************通知操作************************************/
$(function(){
getNoticeCount();
//查询是否有审批权限,有审批权限到后台去查未审批数量,有未审批数量调用权限推送通知接口
getApproveCount();
})
//赋值未通知数量
function getNoticeCount(){
@ -28,6 +30,17 @@
}
})
}
//查询是否有审批权限,有审批权限到后台去查未审批数量,有未审批数量调用权限推送通知接口
function getApproveCount(){
var approvePower = $("#approvePower").val();
if(approvePower == 1){
setInterval(function () {
$.get(path + "/approve/selectNotApproveList", function () {
});
},3*60*1000);
}
}
//每隔1分钟轮询一次未通知数量
setInterval(function () {
getNoticeCount();
@ -49,17 +62,25 @@
}, 1000);
//跳转到通知
function noticeManage1(noticeId){
var url = powerUrlHead+"/gatewayPage?noticeId="+noticeId;
//noticeId = 'emr_record'为跳转病案管理系统的病案未审批页面
var url = '';
if(noticeId == 'emr_record'){
url = path+"/approve/approveManageList174?flag=1";
parent.$("#iFrame1").prop("src",url);
}else{
url = powerUrlHead+"/gatewayPage?noticeId="+noticeId;
window.location.href = url;
}
}
/*******************************webSocket***********************************/
var userId = $("#userId").val();
var webSocketUrl = $("#webSocketUrl").val();
var strSplit = $("#strSplit").val();
var ws = new WebSocket("ws://"+webSocketUrl);
ws.onopen = function(){
ws.send(userId);
ws.send("emr_record_"+userId);
console.log("连接...")
}

@ -172,7 +172,7 @@
<div class="searchInputElement left">
<select class="form-control input-sm" id="searchApproveState">
<option value="">请选择</option>
<option value="待审批">待审批</option>
<option value="待审批" <c:if test="${flag == 1}">selected</c:if>>待审批</option>
<option value="审核通过">审核通过</option>
<option value="审核不通过">审核不通过</option>
<option value="已过期">已过期</option>

@ -149,7 +149,7 @@
}
.fht-cell {
width: 75px !important;
width: 85px !important;
}
.table-hover > tbody > tr:hover > td,

@ -1,4 +1,6 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ page import="com.emr.entity.Power_User" %>
<%@ page import="org.apache.commons.lang3.StringUtils" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
@ -44,6 +46,15 @@
String POWER_URLHEAD = (String) request.getParameter("POWER_URLHEAD");
String POWER_JSP = (String) request.getParameter("POWER_JSP");
String token = (String) request.getSession().getAttribute("token");
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
Set<String> menus = user.getMenus();
Integer approvePower = 0;
for(String menu : menus){
if(StringUtils.isNoneBlank(menu) && "/approve/updateApprove".equals(menu)){
approvePower = 1;
break;
}
}
// String token = (String)request.getParameter("token");
String WEBSOCKET_URLHEAD = (String) request.getParameter("WEBSOCKET_URLHEAD");
String STR_SPLIT = (String) request.getParameter("STR_SPLIT");
@ -62,6 +73,8 @@
<input type="hidden" id="POWER_JSP" value="<%=POWER_JSP%>">
<input type="hidden" id="webSocketUrl" value="<%=WEBSOCKET_URLHEAD%>">
<input type="hidden" id="strSplit" value="<%=STR_SPLIT%>">
<!--是否审批权限-->
<input type="hidden" id="approvePower" value="<%=approvePower%>">
<div class="wrapper">
<header class="main-header">
<!--logo-->

@ -12,6 +12,7 @@
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="${path}/static/css/layui.css" media="all" />
<link rel="shortcut icon" href="${path}/static/js/favicon.ico">
</head>
<body>

@ -4809,8 +4809,7 @@ body .layui-util-face .layui-layer-content {
-webkit-transition: all .3s
}
@
-webkit-keyframes layui-rotate {
@-webkit-keyframes layui-rotate {
from {-webkit-transform: rotate(0)
}
@ -4819,8 +4818,7 @@ to {
}
}
@
keyframes layui-rotate {
@keyframes layui-rotate {
from {transform: rotate(0)
}
@ -4838,8 +4836,7 @@ to {
animation-timing-function: linear
}
@
-webkit-keyframes layui-up {
@-webkit-keyframes layui-up {
from {-webkit-transform: translate3d(0, 100%, 0);
opacity: .3
}
@ -4850,8 +4847,7 @@ to {
}
}
@
keyframes layui-up {
@keyframes layui-up {
from {transform: translate3d(0, 100%, 0);
opacity: .3
}
@ -4867,8 +4863,7 @@ to {
animation-name: layui-up
}
@
-webkit-keyframes layui-upbit {
@-webkit-keyframes layui-upbit {
from {-webkit-transform: translate3d(0, 30px, 0);
opacity: .3
}
@ -4879,8 +4874,7 @@ to {
}
}
@
keyframes layui-upbit {
@keyframes layui-upbit {
from {transform: translate3d(0, 30px, 0);
opacity: .3
}
@ -4896,8 +4890,7 @@ to {
animation-name: layui-upbit
}
@
-webkit-keyframes layui-scale { 0%{
@-webkit-keyframes layui-scale { 0%{
opacity: .3;
-webkit-transform: scale(.5)
}
@ -4909,8 +4902,7 @@ opacity
:scale(1)
}
}
@
keyframes layui-scale { 0%{
@keyframes layui-scale { 0%{
opacity: .3;
-ms-transform: scale(.5);
transform: scale(.5)
@ -4930,8 +4922,7 @@ opacity
animation-name: layui-scale
}
@
-webkit-keyframes layui-scale-spring { 0%{
@-webkit-keyframes layui-scale-spring { 0%{
opacity: .5;
-webkit-transform: scale(.5)
}
@ -4941,10 +4932,7 @@ opacity
:
.8
;-webkit-transform
:scale
(1
.1
)
:scale(1.1)
}
100%{
opacity
@ -4953,8 +4941,7 @@ opacity
:scale(1)
}
}
@
keyframes layui-scale-spring { 0%{
@keyframes layui-scale-spring { 0%{
opacity: .5;
transform: scale(.5)
}
@ -4964,10 +4951,7 @@ opacity
:
.8
;transform
:scale
(1
.1
)
:scale(1.1)
}
100%{
opacity
@ -4981,8 +4965,7 @@ opacity
animation-name: layui-scale-spring
}
@
-webkit-keyframes layui-fadein { 0%{
@-webkit-keyframes layui-fadein { 0%{
opacity: 0
}
@ -4992,8 +4975,7 @@ opacity
1
}
}
@
keyframes layui-fadein { 0%{
@keyframes layui-fadein { 0%{
opacity: 0
}
@ -5008,8 +4990,7 @@ opacity
animation-name: layui-fadein
}
@
-webkit-keyframes layui-fadeout { 0%{
@-webkit-keyframes layui-fadeout { 0%{
opacity: 1
}
@ -5019,8 +5000,7 @@ opacity
0
}
}
@
keyframes layui-fadeout { 0%{
@keyframes layui-fadeout { 0%{
opacity: 1
}

@ -107,13 +107,13 @@ $("#admissTimes").change(function () {
success:function(d){
if(d != null){
$("#patientId").val(d.patientId);
$("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+d.patientId);
$("#iframe").prop("src",path+"/commom/showRecordIframe?patientId="+d.patientId);
$("#disDate").val(d.disDate);
$("#disDeptName").val(d.disDept);
$("#diagName").val(d.mainDiagName);
$("#otherDiagName").val(d.otherDiagName);
//重新加载其他诊断名称鼠标滑过显示全部文本
/*loadQtip('.otherDiagName');*/
loadQtip('.otherDiagName');
//变更收藏信息
$("#collectId").val("");
$("#collectTime").val(currentDate);

@ -39,7 +39,7 @@
margin: -1px;
padding: 1px;
background-color: rgb(180, 0, 170);
background-color: red;
border-radius: 4px;
}
@ -56,7 +56,8 @@
}
.textLayer .highlight.selected {
background-color: rgb(0, 100, 0);
/*background-color: rgb(0, 100, 0);*/
background-color:red;
}
.textLayer ::selection { background: rgb(0,0,255); }

@ -180,9 +180,9 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
</button>
<div class="toolbarButtonSpacer"></div>
<!--<button id="viewFind" class="toolbarButton group hiddenSmallView" title="Find in Document" tabindex="12" data-l10n-id="findbar">
<button id="viewFind" class="toolbarButton group hiddenSmallView" title="Find in Document" tabindex="12" data-l10n-id="findbar">
<span data-l10n-id="findbar_label">Find</span>
</button>-->
</button>
<div class="splitToolbarButton">
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
<span data-l10n-id="previous_label">Previous</span>
@ -471,6 +471,20 @@ http://sourceforge.net/adobe/cmap/wiki/License/
return false;
}
}
/*$(function() {
//PDFFindBar.prototype.open(); //optional if you want to show the search bar
var keys = ['人','心','人心'];
for (var i = 0; i < keys.length; i++) {
var event = document.createEvent('CustomEvent');
event.initCustomEvent('find' + 'again', true, true, {
query: keys[i],
highlightAll: true,
findPrevious: false
});
window.dispatchEvent(event);
}
//return window.dispatchEvent(event);
})*/
</script>
</html>

@ -927,12 +927,11 @@ var PDFFindBar = (function PDFFindBarClosure() {
throw new Error('PDFFindBar cannot be used without a ' +
'PDFFindController instance.');
}
// Add event listeners to the DOM elements.
var self = this;
/*this.toggleButton.addEventListener('click', function() {
this.toggleButton.addEventListener('click', function() {
self.toggle();
});*/
});
this.findField.addEventListener('input', function() {
self.dispatchEvent('');
@ -5742,7 +5741,7 @@ var PDFViewerApplication = {
this.findBar = new PDFFindBar({
bar: document.getElementById('findbar'),
/* toggleButton: document.getElementById('viewFind'),*/
toggleButton: document.getElementById('viewFind'),
findField: document.getElementById('findInput'),
highlightAllCheckbox: document.getElementById('findHighlightAll'),
caseSensitiveCheckbox: document.getElementById('findMatchCase'),
@ -6948,9 +6947,9 @@ function webViewerInitialized() {
classList.add('hidden');
}
/* if (PDFViewerApplication.supportsIntegratedFind) {
if (PDFViewerApplication.supportsIntegratedFind) {
document.getElementById('viewFind').classList.add('hidden');
}*/
}
// Listen for unsupported features to trigger the fallback UI.
PDFJS.UnsupportedManager.listen(

Loading…
Cancel
Save