Index: ssts-web/src/main/webapp/homepage/portalPage.js =================================================================== diff -u -r23160 -r23176 --- ssts-web/src/main/webapp/homepage/portalPage.js (.../portalPage.js) (revision 23160) +++ ssts-web/src/main/webapp/homepage/portalPage.js (.../portalPage.js) (revision 23176) @@ -89,7 +89,16 @@ function addIconTips(amount,domObj,tipId,showTipsFn,domIsDisplay) { if (!isUndefinedOrNullOrEmpty(amount)){ amount = amount > 0 && amount < 11 ? amount : '10+'; - insertHtml('
'); + //如果存在此id的tip元素时,修改即可 + if(document.getElementById(tipId)){ + var imgElements = document.getElementById(tipId).getElementsByTagName("img"); + if(imgElements && imgElements.length > 0){ + imgElements[0].src = WWWROOT + '/images/rednumbertip/'+amount+'.gif'; + } + }else{ + insertHtml('
'); + tipsEle.push(tipId); + } if (showTipsFn){ showTipsFn(); } @@ -99,8 +108,12 @@ //否则隐藏 domObj.style.display = "none"; } + //如果数量为0时则移除掉提醒数字 + if(document.getElementById(tipId)){ + var imgElements = document.getElementById(tipId).getElementsByTagName("img"); + document.getElementById(tipId).remove(imgElements); + } } - tipsEle.push(tipId); } var biologicalMonitoringWarningWindow = null; @@ -332,6 +345,30 @@ }); }); } + + //外来器械包申请单 + var foreignTousseApplicationObj = document.getElementById('foreignTousseApplication'); + if(foreignTousseApplicationObj){ + sendDWRAsync(function () { + ForeignTousseApplicationTableManager.getUnFinishedForeignTousseApplicationCountForSelfDepart(function(amount){ + if (amount == -1){ + alert("外来器械包申请单查询未完成数量发生异常!"); + } + else { + addIconTips(amount,foreignTousseApplicationObj,'foreignTousseApplicationTip'); + } + }); + }); + } + + setInterval(function(){ + sendDWRAsync(function () { + ForeignTousseApplicationTableManager.getUnFinishedForeignTousseApplicationCountForSelfDepart(function(amount){ + addIconTips(amount,foreignTousseApplicationObj,'foreignTousseApplicationTip'); + }); + }); + },2*1000); + var store = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : WWWROOT + '/disinfectSystem/recallRecordAction!getRecallRecord.do', Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/dwr/table/ForeignTousseApplicationTableManager.java =================================================================== diff -u -r22903 -r23176 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/dwr/table/ForeignTousseApplicationTableManager.java (.../ForeignTousseApplicationTableManager.java) (revision 22903) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/dwr/table/ForeignTousseApplicationTableManager.java (.../ForeignTousseApplicationTableManager.java) (revision 23176) @@ -254,4 +254,17 @@ } return null; } + + /** + * 获取当前科室未第一次回收且未终止的外来器械申请单数量(只给处理科室(供应室)的用户看到) + * @return + */ + public int getUnFinishedForeignTousseApplicationCountForSelfDepart(){ + String sql = "select count(0) from "+ ForeignTousseApplication.class.getSimpleName() +" fta join "+ InvoicePlan.class.getSimpleName() +" ip on fta.id=ip.id" + + " where (ip.endStatus is null or ip.endStatus <> '"+ InvoicePlan.STATUS_END +"')" + + " and ip.recyclingstatus = '"+ InvoicePlan.RECYCLINGSTATUS_AWAITRECEIVE +"'" + + " and ip.handleDepartCoding='"+ AcegiHelper.getCurrentOrgUnitCode() +"'"; + return objectDao.countBySql(sql); + } + } Index: ssts-web/src/main/webapp/homepage/portalPage.jsp =================================================================== diff -u -r22783 -r23176 --- ssts-web/src/main/webapp/homepage/portalPage.jsp (.../portalPage.jsp) (revision 22783) +++ ssts-web/src/main/webapp/homepage/portalPage.jsp (.../portalPage.jsp) (revision 23176) @@ -88,6 +88,7 @@ +