Index: forgon-core/src/main/java/com/forgon/oa/onlineusers/service/OnlineUserManager.java =================================================================== diff -u -r21533 -r35030 --- forgon-core/src/main/java/com/forgon/oa/onlineusers/service/OnlineUserManager.java (.../OnlineUserManager.java) (revision 21533) +++ forgon-core/src/main/java/com/forgon/oa/onlineusers/service/OnlineUserManager.java (.../OnlineUserManager.java) (revision 35030) @@ -5,6 +5,8 @@ import java.util.List; import java.util.Set; +import net.sf.json.JSONObject; + import org.springframework.security.core.session.SessionRegistry; import com.forgon.directory.acegi.tools.AcegiHelper; @@ -14,6 +16,7 @@ import com.forgon.directory.vo.LoginUserData; import com.forgon.security.model.User; import com.forgon.security.userdetails.UserContainsSessionUser; +import com.forgon.tools.hibernate.ObjectDao; import com.forgon.treenode.service.THTreeNodeManager; /** @@ -25,7 +28,11 @@ private SessionRegistry sessionRegistry; private SysUserManager sysUserManager; private THTreeNodeManager thTreeNodeManager; - + private ObjectDao objectDao; + + public void setObjectDao(ObjectDao objectDao) { + this.objectDao = objectDao; + } public void setThTreeNodeManager(THTreeNodeManager thTreeNodeManager) { this.thTreeNodeManager = thTreeNodeManager; } @@ -92,8 +99,28 @@ } return userIdList; } - - private List getUserByOrgIdsInOrder(String orgUnitIds) { + /** + * 获取某科室在线人数 + * @param orgUnitIds + * @return + */ + public int getOnlineUserIdsByDepartmentAmount(String orgUnitIds) { + List users = getUserByOrgIdsInOrder(orgUnitIds); + List objArray = sessionRegistry.getAllPrincipals(); + Set onlineUserNames = new HashSet(); + for (User user : users) { + String userName = user.getName(); + for (Object obj : objArray) { + UserContainsSessionUser userObj = (UserContainsSessionUser)obj; + String userNameOfObj = userObj.getSessionUser().getUserName(); + if (userNameOfObj.equals(userName)) { + onlineUserNames.add(userName); + } + } + } + return onlineUserNames.size(); + } + public List getUserByOrgIdsInOrder(String orgUnitIds) { List users = new ArrayList(); String[] orgUnitIdsArr = orgUnitIds.split(";"); for (String orgId : orgUnitIdsArr) { @@ -131,5 +158,32 @@ } return currentUserDepartmentIds; } - + /** + * 获取一级供应室的在线用户数量和总人数 + * @return + */ + public JSONObject getFirstSupplyRoomConfigOnlineUserDate(){ + Long orgUnitId = objectDao.getALongNum("select max(ou.id) id from OrgUnit ou " + + "join SupplyRoomConfig sr on sr.orgUnitCoding=ou.orgUnitCoding " + + "where supplyRoomType=1", "id"); + String orgUnitIdStr = ""; + if(orgUnitId != null){ + orgUnitIdStr = orgUnitId + ""; + } + List users = getUserByOrgIdsInOrder(orgUnitIdStr); + Set userNames = getAllOnlineUserIds(); + Set onlineUserNames = new HashSet(); + for (User user : users) { + String userName = user.getName(); + for (String onlineUserName : userNames) { + if (onlineUserName.equals(userName)) { + onlineUserNames.add(userName); + } + } + } + JSONObject resultObj = new JSONObject(); + resultObj.put("userAmount", users.size()); + resultObj.put("onlineUserAmount", onlineUserNames.size()); + return resultObj; + } } Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r35021 -r35030 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 35021) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 35030) @@ -88,6 +88,7 @@ import com.forgon.disinfectsystem.entity.assestmanagement.ExpensiveGoodsInstance; import com.forgon.disinfectsystem.entity.assestmanagement.GodownEntry; import com.forgon.disinfectsystem.entity.assestmanagement.GodownEntryItem; +import com.forgon.disinfectsystem.entity.basedatamanager.container.Container; import com.forgon.disinfectsystem.entity.basedatamanager.materialdefinition.MaterialDefinition; import com.forgon.disinfectsystem.entity.basedatamanager.materialinstance.MaterialInstance; import com.forgon.disinfectsystem.entity.basedatamanager.reportoption.GoodsOption; @@ -137,6 +138,8 @@ import com.forgon.disinfectsystem.entity.materialmanager.MaterialEntryItem; import com.forgon.disinfectsystem.entity.packing.PackingRecord; import com.forgon.disinfectsystem.entity.packing.PackingRecordOutItem; +import com.forgon.disinfectsystem.entity.packing.PackingTask; +import com.forgon.disinfectsystem.entity.packing.ReviewedBasket; import com.forgon.disinfectsystem.entity.qualitymonitoringmanager.qualitymonitoring.QualityMonitoringGoods; import com.forgon.disinfectsystem.entity.qualitymonitoringmanager.qualitymonitoring.QualityMonitoringInstance; import com.forgon.disinfectsystem.entity.qualitymonitoringmanager.qualitymonitoringconfig.QualityMonitoringDefinition; @@ -154,6 +157,7 @@ import com.forgon.disinfectsystem.entity.satisfactionsurvey.SatisfactionSurveyTable; import com.forgon.disinfectsystem.entity.satisfactionsurvey.SatisfactionSurveyTableItem; import com.forgon.disinfectsystem.entity.satisfactionsurvey.SatisfactionSurveyTemplate; +import com.forgon.disinfectsystem.entity.sterilizationmanager.proxydisinfection.ProxyDisinfection; import com.forgon.disinfectsystem.entity.sterilizationmanager.sterilizationrecord.SterilizationRecord; import com.forgon.disinfectsystem.entity.sterilizationmanager.sterilizerrecord.SterilizerRecord; import com.forgon.disinfectsystem.entity.stocktakerecordmanager.MaterialStockVo; @@ -172,6 +176,8 @@ import com.forgon.disinfectsystem.jasperreports.service.dataindex.WorkQualityCollectionDataIndex; import com.forgon.disinfectsystem.packing.service.PackingManager; import com.forgon.disinfectsystem.qualitymonitoring.definition.service.QualityMonitoringDefinitionManager; +import com.forgon.disinfectsystem.recyclingapplication.service.InvoicePlanManager; +import com.forgon.disinfectsystem.recyclingapplication.vo.ApplicationGoodsVo; import com.forgon.disinfectsystem.report.dao.ReportDao; import com.forgon.disinfectsystem.report.entity.ReportDataWriteRecord; import com.forgon.disinfectsystem.reportforms.vo.ReportQueryParams; @@ -186,6 +192,7 @@ import com.forgon.exception.SystemException; import com.forgon.log.model.Log; import com.forgon.log.service.LogManager; +import com.forgon.oa.onlineusers.service.OnlineUserManager; import com.forgon.security.model.User; import com.forgon.security.service.OperationManager; import com.forgon.systemsetting.model.HttpOption; @@ -271,6 +278,8 @@ @Autowired private DataIndex dataIndex; @Autowired + private OnlineUserManager onlineUserManager; + @Autowired private WorkQualityCollectionDataIndex workQualityCollectionDataIndex; @Autowired private SterilisationManager sterilisationManager; @@ -28807,18 +28816,711 @@ vo.setSmallAmount(amount); } } - private String getDisposableGoodsInvoiceSql(ReportQueryParams params){ - String orgUnitCodingSql = ""; - if(StringUtils.isNotBlank(params.querySupplyRoom)){ - orgUnitCodingSql = " and i.orgUnitCoding='"+ params.querySupplyRoom +"' "; + /** + * 获取当天待发货的总包数sql + * @param handleDepartCoding 一级供应室编码 + * @return + */ + private String getToBeInvoiceAmountSql(String handleDepartCoding, String departCoding, String tousseTypesql){ + String amountSql = "((case when (po.type='" + + InvoicePlan.TYPE_BORROWINGSINGLE + +"' or po.type='" + + InvoicePlan.TYPE_PROXYDISINFECTION + +"' or po.type='" + + InvoicePlan.TYPE_GOODS_RESERVATION_FORM + + "') then ti.amount else case when ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_INSIDE + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_DISINFECTION + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_CUSTOM + +"' or ti.tousseType = '" + +TousseDefinition.PACKAGE_TYPE_FOREIGN + +"' then case when ti.invoiceAmountMode is not null and ti.invoiceAmountMode <> 0 " + + " then case when ti.invoiceAmountMode = 1 then case when ti.recyclingAmount is null then case when ti.isRecycling='否' then ti.amount else 0 end else ti.recyclingAmount " + + " end when ti.invoiceAmountMode = 2 then case when ti.recyclingAmount is null then ti.amount else ti.recyclingAmount end when ti.invoiceAmountMode = 3 " + + " then case when ti.recyclingAmount is null then case when ti.isRecycling='是' then 0 else ti.amount end else ti.amount end else ti.amount end " + + " else (case when ti.recyclingAmount is not null then ti.recyclingAmount when ti.prepareRecycleAmount is not null then ti.prepareRecycleAmount else ti.amount end ) " + + " end else ti.amount end end) - ti.sendoutAmount) "; + String handleDepartCodingSql = " and po.handleDepartCoding = '"+ handleDepartCoding +"' "; + String commonFilterSql = " and ((po.deliverStatus='" + + InvoicePlan.DELIVERSTATUS_AWAITDELIVER + +"' or po.deliverStatus='" + + InvoicePlan.DELIVERSTATUS_PARTDELIVERED +"') and (po.endStatus is null or po.endStatus!='" + + InvoicePlan.STATUS_END +"')) and (po.committedStatus = 1) and po.handleDepartCoding = '" + + handleDepartCoding + +"' "; + if(StringUtils.isNotBlank(departCoding)){ + commonFilterSql += " and po.departCoding='"+ departCoding +"' "; } - String sql = " select sum(d.amount) as amount " - + params.extraSelectColumns - + " from invoice i join DiposableGoodsItem d on d.invoice_id=i.id " - + " where i.sendtime " - + params.betweenSql - + orgUnitCodingSql - + params.groupBySql; + commonFilterSql += tousseTypesql; + //外来器械申请单 + String sql = " select (amount - sendOutAmount) amount" + + ",(case when (ti.urgentAmount is null or ti.urgentAmount <= ti.sendoutAmount) then 0 else (ti.urgentAmount - ti.sendoutAmount) end) urgentAmount from " + + TousseItem.class.getSimpleName() + +" ti left join " + + TousseDefinition.class.getSimpleName() + +" td on ti.tousseDefinitionId=td.id join " + + InvoicePlan.class.getSimpleName() + +" po on ti.recyclingApplication_ID=po.id where ti.isInvoice = '是' and (ti.isTerminated is null or ti.isTerminated <> 1) and " + + amountSql + + " > 0 and (( ti.tousseType IN ('" + + TousseDefinition.PACKAGE_TYPE_SPLIT + +"','" + + TousseDefinition.PACKAGE_TYPE_FOREIGN + +"') )) " + + commonFilterSql + + "and po.type='" + + InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION + +"' and po.id not in (select foreignTousseApp_id from TousseInstance where foreignTousseApp_id is not null) " + + "and (amount - sendOutAmount) > 0 union all select 1 amount,(case when tis.urgentLevel_id is null then 0 else 1 end) urgentAmount from " + + TousseInstance.class.getSimpleName() + +" tis join " + + InvoicePlan.class.getSimpleName() + +" po on tis.foreignTousseApp_id=po.id left join " + + TousseDefinition.class.getSimpleName() + +" td on tis.tousseDefinition_id=td.id where 1=1 " + + commonFilterSql + + "and po.type='" + + InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION + + "' and (( tis.status IN ('" + + TousseInstance.STATUS_PACKED + +"','" + + TousseInstance.STATUS_REVIEWED + +"','" + + TousseInstance.STATUS_STERILING + +"','" + + TousseInstance.STATUS_DELAY_CONFIRM + +"','" + + TousseInstance.STATUS_STERILED + +"') )) "; + //外部器械包代理灭菌申请单','自定义器械包申请单 , 代理灭菌单 + sql += " union all select " + +amountSql + + " amount ,(case when (ti.urgentAmount is null or ti.urgentAmount <= ti.sendoutAmount) then 0 else (ti.urgentAmount - ti.sendoutAmount) end) urgentAmount from " + + TousseItem.class.getSimpleName() + +" ti left join " + + TousseDefinition.class.getSimpleName() + +" td on ti.tousseDefinitionId=td.id join " + + InvoicePlan.class.getSimpleName() + +" po on ti.recyclingApplication_ID=po.id where 1=1" + + commonFilterSql + + "and (( po.type IN ('" + + InvoicePlan.TYPE_FOREIGNPROXYDISINFECTION + +"','"+ InvoicePlan.TYPE_CUSTOM_TOUSSE_APPLIACTION_FORM + +"') )) and ti.isInvoice = '是' and (ti.isTerminated is null or ti.isTerminated <> 1) and " + + amountSql + + "> 0 and (( ti.tousseType IN ('" + + TousseDefinition.PACKAGE_TYPE_FOREIGNPROXY + +"','" + + TousseDefinition.PACKAGE_TYPE_SPLIT + +"','" + + TousseDefinition.PACKAGE_TYPE_CUSTOM + +"','" + + TousseDefinition.PACKAGE_TYPE_DRESSING + +"','" + + TousseDefinition.PACKAGE_TYPE_INSIDE + +"','" + + DisposableGoods.TYPE_NAME + +"','" + + TousseDefinition.PACKAGE_TYPE_FOREIGN + +"','" + + TousseDefinition.PACKAGE_TYPE_DISINFECTION + +"') )) and (case when (po.type='" + + InvoicePlan.TYPE_BORROWINGSINGLE + +"' or po.type='" + + InvoicePlan.TYPE_PROXYDISINFECTION + +"' or po.type='" + + InvoicePlan.TYPE_GOODS_RESERVATION_FORM + +"') then ti.amount else case when ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_INSIDE + + "' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_DISINFECTION + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_CUSTOM + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_FOREIGN + +"' then case when ti.invoiceAmountMode is not null and ti.invoiceAmountMode <> 0 then case when ti.invoiceAmountMode = 1 " + + "then case when ti.recyclingAmount is null then case when ti.isRecycling='否' then ti.amount else 0 end else ti.recyclingAmount end when ti.invoiceAmountMode = 2 " + + "then case when ti.recyclingAmount is null then ti.amount else ti.recyclingAmount end when ti.invoiceAmountMode = 3 then case when ti.recyclingAmount is null " + + "then case when ti.isRecycling='是' then 0 else ti.amount end else ti.amount end else ti.amount end else (case when ti.recyclingAmount is not null then ti.recyclingAmount " + + "when ti.prepareRecycleAmount is not null then ti.prepareRecycleAmount else ti.amount end )" + + " end else ti.amount end end) > 0 "; + //'敷料包','器械包' + sql += " union all select sum((case when ti.tousseType='" + + DisposableGoods.TYPE_NAME + +"' then case when (ti.transferScale is not null and ti.transferScale > 0) then ti.amount/ti.transferScale else ti.amount " + + "end else (case when (po.type='" + + InvoicePlan.TYPE_BORROWINGSINGLE + +"' or po.type='" + + InvoicePlan.TYPE_PROXYDISINFECTION + +"' or po.type='" + + InvoicePlan.TYPE_GOODS_RESERVATION_FORM + +"') then ti.amount else case when ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_INSIDE + +"' " + + "or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_DISINFECTION + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_CUSTOM + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_FOREIGN + +"' then case when ti.invoiceAmountMode is not null and ti.invoiceAmountMode <> 0 then case when ti.invoiceAmountMode = 1 then case when ti.recyclingAmount is null then case when ti.isRecycling='否' " + + "then ti.amount else 0 end else ti.recyclingAmount end when ti.invoiceAmountMode = 2 then case when ti.recyclingAmount is null then ti.amount else ti.recyclingAmount " + + "end when ti.invoiceAmountMode = 3 then case when ti.recyclingAmount is null then case when ti.isRecycling='是' then 0 else ti.amount end else ti.amount end else ti.amount " + + "end else (case when ti.recyclingAmount is not null then ti.recyclingAmount when ti.prepareRecycleAmount is not null then ti.prepareRecycleAmount else ti.amount end ) " + + "end else ti.amount end end) end) - (case when (ti.transferScale is not null and ti.transferScale > 0) then ti.sendOutAmount/ti.transferScale else ti.sendOutAmount end)) " + + "amount ,sum(case when (ti.urgentAmount is null) then 0 else (ti.urgentAmount) end) urgentAmount from " + + TousseItem.class.getSimpleName() + +" ti join " + + InvoicePlan.class.getSimpleName() + +" po on ti.recyclingApplication_ID=po.id join " + + TousseDefinition.class.getSimpleName() + +" td on td.id=ti.tousseDefinitionId where ((po.type <> '" + + InvoicePlan.TYPE_BORROWINGSINGLE + +"' or (po.type = '" + + InvoicePlan.TYPE_BORROWINGSINGLE + +"' and (po.borrowConfirmStatus is null or po.borrowConfirmStatus <> '待审核')))) " + + commonFilterSql + + " and ( po.type NOT IN ('" + + InvoicePlan.TYPE_QUALITY_MONITOR_RECYCLE_APPLICATION + +"','" + + InvoicePlan.TYPE_SECOND_SUPPLY_ROOM + +"','" + + InvoicePlan.TYPE_EXPENSIVEGOODS_FORM + +"','" + + InvoicePlan.TYPE_OPERATION_RESERVATION_APPLICATION + +"','" + + InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION + +"','" + + InvoicePlan.TYPE_PROXYDISINFECTION + +"','" + + InvoicePlan.TYPE_FOREIGNPROXYDISINFECTION + +"','" + + InvoicePlan.TYPE_CUSTOM_TOUSSE_APPLIACTION_FORM + +"') ) and (1=1) and ti.isInvoice = '是' and (ti.isTerminated is null or ti.isTerminated <> 1) " + + "and ((case when (po.type='" + + InvoicePlan.TYPE_BORROWINGSINGLE + +"' or po.type='" + + InvoicePlan.TYPE_PROXYDISINFECTION + +"' or po.type='" + + InvoicePlan.TYPE_GOODS_RESERVATION_FORM + +"') then ti.amount else case when ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_INSIDE + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_DISINFECTION + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_CUSTOM + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_FOREIGN + +"' then case when ti.invoiceAmountMode is not null and ti.invoiceAmountMode <> 0 then case when ti.invoiceAmountMode = 1 then case when ti.recyclingAmount is null then case when " + + "ti.isRecycling='否' then ti.amount else 0 end else ti.recyclingAmount end when ti.invoiceAmountMode = 2 then case when ti.recyclingAmount is null then ti.amount " + + "else ti.recyclingAmount end when ti.invoiceAmountMode = 3 then case when ti.recyclingAmount is null then case when ti.isRecycling='是' then 0 else ti.amount end else " + + "ti.amount end else ti.amount end else (case when ti.recyclingAmount is not null then ti.recyclingAmount when ti.prepareRecycleAmount is not null then ti.prepareRecycleAmount " + + "else ti.amount end ) end else ti.amount end end) - ti.sendOutAmount) > 0 " + + "and (( ti.tousseType IN ('" + + TousseDefinition.PACKAGE_TYPE_DRESSING + +"','" + + TousseDefinition.PACKAGE_TYPE_INSIDE + +"') )) and ((case when ti.tousseType='" + + DisposableGoods.TYPE_NAME + +"' then case when (ti.transferScale is not null and ti.transferScale > 0) then ti.amount/ti.transferScale else ti.amount" + + " end else (case when (po.type='" + + InvoicePlan.TYPE_BORROWINGSINGLE + +"' or po.type='" + + InvoicePlan.TYPE_PROXYDISINFECTION + +"' or po.type='" + + InvoicePlan.TYPE_GOODS_RESERVATION_FORM + +"') then ti.amount else case when ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_INSIDE + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_DISINFECTION + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_CUSTOM + +"' or ti.tousseType = '" + + TousseDefinition.PACKAGE_TYPE_FOREIGN + +"' then case when ti.invoiceAmountMode is not null and ti.invoiceAmountMode <> 0 " + + "then case when ti.invoiceAmountMode = 1 then case when ti.recyclingAmount is null then case when ti.isRecycling='否' then ti.amount else 0 end else " + + "ti.recyclingAmount end when ti.invoiceAmountMode = 2 then case when ti.recyclingAmount is null then ti.amount else ti.recyclingAmount end when ti.invoiceAmountMode = " + + "3 then case when ti.recyclingAmount is null then case when ti.isRecycling='是' then 0 else ti.amount end else ti.amount end else ti.amount end else " + + "(case when ti.recyclingAmount is not null then ti.recyclingAmount when ti.prepareRecycleAmount is not null then ti.prepareRecycleAmount else ti.amount end ) " + + "end else ti.amount end end) end) - (case when (ti.transferScale is not null and ti.transferScale > 0) then ti.sendOutAmount/ti.transferScale else ti.sendOutAmount end)) " + + "> 0 group by tousseName,td.tousseType "; return sql; } + /** + * 获取当天待审核的总包数sql + * @param handleDepartCoding 一级供应室编码 + * @return + */ + private String getToBeReviewAmountSql(String handleDepartCoding, String tousseTypesql){ + String sql = "select 'toBeReviewAmount' type, count(*) amount from " + + TousseInstance.class.getSimpleName() + +" po join " + + TousseDefinition.class.getSimpleName() + +" td on td.id=po.tousseDefinition_id WHERE po.status = '" + + TousseInstance.STATUS_PACKED + +"' AND po.orgUnitCoding = '" + + handleDepartCoding + +"' and comboTousseInstanceId is null " + + tousseTypesql + + "and (td.tousseType in ('" + + TousseDefinition.PACKAGE_TYPE_INSIDE + +"','" + + TousseDefinition.PACKAGE_TYPE_DISINFECTION + +"','" + + TousseDefinition.PACKAGE_TYPE_DRESSING + +"','" + + TousseDefinition.PACKAGE_TYPE_COMBO + +"','" + + TousseDefinition.PACKAGE_TYPE_FOREIGNPROXY + +"') ) and td.isReview='是' "; + return sql; + } + /** + * 获取当天待灭菌的总包数sql + * @param handleDepartCoding 一级供应室编码 + * @return + */ + private String getToBeSterilizationAmountSql(String handleDepartCoding, String tousseTypesql){ + String sql = "select 1 amount from " + + ReviewedBasket.class.getSimpleName() + +" po join " + + TousseInstance.class.getSimpleName() + +" ti on ti.reviewBasket_id=po.id join " + + TousseDefinition.class.getSimpleName() + +" td on ti.tousseDefinition_id=td.id join " + + Container.class.getSimpleName() + +" c on c.id=po.container_id left join sterilization_reviewed sr on sr.reviewedBasket_id=po.id left join " + + SterilizationRecord.class.getSimpleName() + +" s on s.id=sr.sterilizationRecord_id where s.id is null " + + tousseTypesql + + " and (c.purpose='" + + Container.CONTAINER_PURPOSE_DISINFECTION + +"'and c.status = '" + + Container.CONTAINER_STATUS_STERILIZELOADING + +"' or c.purpose='" + + Container.CONTAINER_PURPOSE_VIRTUAL + +"' and c.status = '" + + Container.CONTAINER_STATUS_PACKING + +"' and ti.status='" + + TousseInstance.STATUS_REVIEWED + +"' and not exists (select reviewBasket_id from TousseInstance where reviewBasket_id=ti.reviewBasket_id and status<>'" + + TousseInstance.STATUS_REVIEWED + +"' ) ) and (c.departCode = '" + + handleDepartCoding + +"' or po.id in ( select rbs.id from " + + ProxyDisinfection.class.getSimpleName() + +" pd join " + + InvoicePlan.class.getSimpleName() + +" ip on ip.id=pd.id join proxyDis_rBasket pr on pr.proxyDisinfection_id=pd.id join " + + ReviewedBasket.class.getSimpleName() + +" rbs on rbs.id=pr.reviewedBasket_id where ip.handleDepartCoding='" + + handleDepartCoding + +"')) union all select 1 amount from " + + TousseInstance.class.getSimpleName() + +" ti join " + + TousseDefinition.class.getSimpleName() + +" td on ti.tousseDefinition_id=td.id join " + + TousseDefinition.class.getSimpleName() + +" tdancestor on td.ancestorID=tdancestor.id left join " + + InvoicePlan.class.getSimpleName() + +" pd on pd.id=ti.proxyDisinfection_id where tdancestor.isTraceable='是' and ti.status='" + + TousseInstance.STATUS_REVIEWED + +"' " + + tousseTypesql + + "and ti.comboTousseInstanceId is null and ti.reviewBasket_id is null and (pd.id is null and ti.orgunitcoding='" + +handleDepartCoding + +"' or pd.id is not null and pd.handleDepartCoding='" + + handleDepartCoding + +"') and (ti.hasReceived is null or ti.hasReceived='是') "; + return sql; + } + /** + * 获取待装配的器械包数量sql + * @param handleDepartCoding 一级供应室编码 + * @return + */ + private String getToBePackAmountSql(String handleDepartCoding, String tousseTypesql){ + String packingSql = " select po.unPackAmount amount from " + + PackingTask.class.getSimpleName() + +" po join " + + TousseDefinition.class.getSimpleName() + +" td on td.id=po.tousseDefinition_id join " + + TousseDefinition.class.getSimpleName() + +" tdc on tdc.id=td.ancestorID where po.orgUnitCoding = '" + + handleDepartCoding + +"' " + + tousseTypesql + + "and (tdc.hidePackingTask is null or tdc.hidePackingTask<>'是') "; + return packingSql; + } + /** + * 获取待清洗的器械包数量sql + * @param handleDepartCoding 一级供应室编码 + * @return + */ + private String getToBeWashAmountSql(String handleDepartCoding, String tousseTypeSql){ + String sql = " select min(ci.tousseAmountForMaterial) amount from " + + ClassifyBasket.class.getSimpleName() + +" cb," + + ClassifiedItem.class.getSimpleName() + +" ci," + + TousseDefinition.class.getSimpleName() + +" td," + + TousseDefinition.class.getSimpleName() + +" tdc ," + + RecyclingRecord.class.getSimpleName() + +" rr, " + + Container.class.getSimpleName() + +" c, " + + BarcodeDevice.class.getSimpleName() + +" bd " + + " where ci.classifybasket_id = cb.id and td.id=ci.tousseDefinitionID and bd.id=c.id and bd.barcode=cb.containerBarcode and rr.id=ci.recyclingRecordId " + + " and rr.orgUnitCoding='"+ handleDepartCoding +"' " + + tousseTypeSql + + " and tdc.id=td.ancestorID and ci.itemType = '" + + ClassifiedItem.TYPE_MATERIAL + +"' and c.status='"+ Container.CONTAINER_STATUS_WASHLOADING +"' " + + " and cb.id not in (select cw.ClassifyBasket_ID from ClassifyBasket_WashRecord cw ) " + + " and cb.id not in (select classifyBasketId from PackingRecord_ClassifyBasket) " + + " group by ci.tousseDefinitionID,ci.recyclingRecordId " + + " union all " + + " select (ci.amount-case when numOfUnwashedStops is null then 0 else numOfUnwashedStops end) amount from " + + ClassifyBasket.class.getSimpleName() + +" cb," + + ClassifiedItem.class.getSimpleName() + +" ci," + + TousseDefinition.class.getSimpleName() + +" td," + + TousseDefinition.class.getSimpleName() + +" tdc," + + RecyclingRecord.class.getSimpleName() + +" rr," + + Container.class.getSimpleName() + +" c," + + BarcodeDevice.class.getSimpleName() + +" bd where ci.classifybasket_id = cb.id and td.id=ci.tousseDefinitionID and bd.id=c.id and bd.barcode=cb.containerBarcode and rr.id=ci.recyclingRecordId " + + tousseTypeSql + + " and c.status='"+ Container.CONTAINER_STATUS_WASHLOADING +"' and rr.orgUnitCoding='"+ handleDepartCoding +"' " + + " and cb.id not in (select cw.ClassifyBasket_ID from ClassifyBasket_WashRecord cw ) " + + " and cb.id not in (select classifyBasketId from PackingRecord_ClassifyBasket) " + + " and tdc.id=td.ancestorID and ci.itemtype != '" + + ClassifiedItem.TYPE_MATERIAL + +"' "; + return sql; + } + /** + * 获取待回收的器械包数量sql + * @param handleDepartCoding 一级供应室编码 + * @return + */ + private String getToBeRecycledAmountSql(String handleDepartCoding, String tousseTypesql){ + String sql = " select sum(ti.amount-case when ti.recyclingAmount is null then 0 else ti.recyclingAmount end) amount from " + + InvoicePlan.class.getSimpleName() + + " po join "+ + TousseItem.class.getSimpleName() + +" ti on ti.recyclingApplication_ID=po.id " + + "left join TousseDefinition td on td.id=ti.tousseDefinitionId " + + "where po.committedStatus=1 " + + tousseTypesql; + String [] recycleStatus = { + InvoicePlan.RECYCLINGSTATUS_AWAITRECYCLE, + InvoicePlan.RECYCLINGSTATUS_PARTRECYCLE, + InvoicePlan.RECYCLINGSTATUS_AWAITRECEIVE, + InvoicePlan.RECYCLINGSTATUS_PARTAWAITRECEIVE, + InvoicePlan.RECYCLINGSTATUS_TALLIED + }; + sql += " and po.recyclingStatus in('" + StringUtils.join(recycleStatus, "','") + "')"; + //外来器械申请单需要细到单里的包,有待接收和待二次回收时才显示 + sql += " and (po.type<>'" + + InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION + +"' or po.type='" + + InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION + +"' and exists (select 1 from "+ + TousseItem.class.getSimpleName() + +" where packageStatus in('"+ + InvoicePlan.RECYCLINGSTATUS_AWAITRECEIVE + +"','"+ + InvoicePlan.RECYCLINGSTATUS_AWAIT_SECOND_RECEIVE + +"') and recyclingApplication_ID=po.id)) "; + sql += "and po.handleDepartCoding='"+ handleDepartCoding +"' and (po.includeRecyclingItems is null or po.includeRecyclingItems =1) "; + sql += "and (ti.hideRecycling is null or ti.hideRecycling <> '是') and ti.amount>0 and (ti.amount>ti.recyclingAmount or ti.recyclingAmount is null) "; + return sql; + } + /** + * 获取待签收的器械包数量sql + * @param handleDepartCoding 一级供应室编码 + * @return + */ + private String getToBeSignAmountSql(String handleDepartCoding, String tousseTypesql){ + String sql = " select 1 amount from " + + TousseInstance.class.getSimpleName() + +" ti join " + + TousseDefinition.class.getSimpleName() + +" td on td.id=ti.tousseDefinition_id " + + "where ti.status='" + + TousseInstance.STATUS_SHIPPED + +"' " + + tousseTypesql; + return sql; + } + @Override + public JSONObject getRealTimeBulletinBoardWorkloadData() { + //获取当天开始时间 + SupplyRoomConfig systemParamsObj = supplyRoomConfigManager.getSystemParamsObj(); + String dateStr = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); + String startDate = ""; + if(systemParamsObj != null && StringUtils.isNotBlank(systemParamsObj.getDayStartTime())){ + startDate += dateStr + " " + systemParamsObj.getDayStartTime() + ":00"; + }else{ + startDate += dateStr + " 00:00:00"; + } + String endDate = dateStr + " 23:59:59"; + String betweenSql = " between "+ dateQueryAdapter.dateAdapter(startDate) + " and " + + dateQueryAdapter.dateAdapter(endDate); + String handleDepartCoding = supplyRoomConfigManager.getFirstSupplyRoomConfig().getOrgUnitCoding(); + String tousseType = "外来器械包,外来器械拆分小包"; + String tousseTypesql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("td.tousseType", tousseType, ","); + ReportQueryParams foreignParams = new ReportQueryParams(objectDao); + foreignParams.betweenSql = betweenSql; + foreignParams.querySupplyRoom = handleDepartCoding; + foreignParams.tousseTypes = tousseType; + foreignParams.tousseTypeAndPackageSizeSql = tousseTypesql; + + ReportQueryParams params = new ReportQueryParams(objectDao); + params.betweenSql = betweenSql; + params.querySupplyRoom = handleDepartCoding; + String sql = ""; + //外来器械申请数量 + String foreignApplyAmountSql = String.format("select 'foreignApplyAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("申请数量", foreignParams) + + ") tl"); + sql += foreignApplyAmountSql; + //申请数量 + String applyAmountSql = String.format("select 'applyAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("申请数量", params) + + ") tl"); + sql += " union all " + applyAmountSql; + //外来器械当天待回收的包数量 + String foreignToBeRecycledAmountSql = "select 'foreignToBeRecycledAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBeRecycledAmountSql(handleDepartCoding, tousseTypesql) + ") tb "; + sql += " union all " + foreignToBeRecycledAmountSql; + //外来器械当天已回收包数量 + String foreignRecycledAmountSql = String.format("select 'foreignRecycledAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("回收数量", foreignParams) + + ") tl"); + sql += " union all " + foreignRecycledAmountSql; + //当天待回收的包数量 + String toBeRecycledAmountSql = "select 'toBeRecycledAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBeRecycledAmountSql(handleDepartCoding, "") + ") tb "; + sql += " union all " + toBeRecycledAmountSql; + //当天已回收包数量 + String recycledAmountSql = String.format("select 'recycledAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("回收数量", params) + + ") tl"); + sql += " union all " + recycledAmountSql; + //当天已清点器械总包数 + String inventoryEdAmountSql = String.format("select 'inventoryEdAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("清点数量", params) + + ") tl "); + sql += " union all " + inventoryEdAmountSql; + //外来器械当天待清洗器械总包数 + String foreignToBeWashAmountSql = " select 'foreignTobeWashAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBeWashAmountSql(handleDepartCoding, tousseTypesql) + ") tb "; + sql += " union all " + foreignToBeWashAmountSql; + //外来器械当天已清洗器械总包数 + String foreignWashedAmountSql = String.format("select 'foreignWashedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("清洗数量", foreignParams) + + ") tl "); + sql += " union all " + foreignWashedAmountSql; + + //当天待清洗器械总包数 + String toBeWashAmountSql = " select 'tobeWashAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBeWashAmountSql(handleDepartCoding, "") + ") tb "; + sql += " union all " + toBeWashAmountSql; + //当天已清洗器械总包数 + String washedAmountSql = String.format("select 'washedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("清洗数量", params) + + ") tl "); + sql += " union all " + washedAmountSql; + //外来器械当天待装配的总包数 + String foreignToBePackAmountSql = " select 'foreignToBePackAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBePackAmountSql(handleDepartCoding, tousseTypesql) + ") tb "; + sql += " union all " + foreignToBePackAmountSql; + //外来器械当天已装配总包数 + String foreignPackedAmountSql = String.format("select 'foreignPackedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("配包数量", foreignParams) + + ") tl "); + sql += " union all " + foreignPackedAmountSql; + //当天待装配的总包数 + String toBePackAmountSql = " select 'toBePackAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBePackAmountSql(handleDepartCoding, "") + ") tb "; + sql += " union all " + toBePackAmountSql; + //当天已装配总包数 + String packedAmountSql = String.format("select 'packedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("配包数量", params) + + ") tl "); + sql += " union all " + packedAmountSql; + //当天已审核的总包数 + String reviewedAmountSql = String.format("select 'reviewedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("审核数量", params) + + ") tl "); + sql += " union all " + reviewedAmountSql; + //外来器械当天待灭菌的总包数 + String foreignToBeSterilizationAmountSql = " select 'foreignToBeSterilizationAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBeSterilizationAmountSql(handleDepartCoding, tousseTypesql) + ") tb "; + sql += " union all " + foreignToBeSterilizationAmountSql; + //外来器械当天已灭菌的总包数 + String foreignSterilizationedAmountSql = String.format("select 'foreignSterilizationedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("灭菌数量", foreignParams) + + ") tl "); + sql += " union all " + foreignSterilizationedAmountSql; + //当天待灭菌的总包数 + String toBeSterilizationAmountSql = " select 'toBeSterilizationAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBeSterilizationAmountSql(handleDepartCoding, "") + ") tb "; + sql += " union all " + toBeSterilizationAmountSql; + //当天已灭菌的总包数 + String sterilizationedAmountSql = String.format("select 'sterilizationedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("灭菌数量", params) + + ") tl "); + sql += " union all " + sterilizationedAmountSql; + //外来器械当天待发货的总包数 + String foreignToBeInvoiceAmountSql = " select 'foreignToBeInvoiceAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBeInvoiceAmountSql(handleDepartCoding, null, tousseTypesql) + ") tb "; + sql += " union all " + foreignToBeInvoiceAmountSql; + //外来器械当天已发货的总包数 + String foreignInvoicedAmountSql = String.format("select 'foreignInvoicedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("发货数量", foreignParams) + + ") tl "); + sql += " union all " + foreignInvoicedAmountSql; + //当天待发货的总包数 + String toBeInvoiceAmountSql = " select 'toBeInvoiceAmount' type,sum(amount) amount,sum(urgentAmount) urgentAmount from ( " + + getToBeInvoiceAmountSql(handleDepartCoding, null, "") + ") tb "; + sql += " union all " + toBeInvoiceAmountSql; + //当天已发货的总包数 + String invoicedAmountSql = String.format("select 'invoicedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("发货数量", params) + + ") tl "); + sql += " union all " + invoicedAmountSql; + //外来器械当天待签收的包数 + String foreignToBeSignAmountSql = " select 'foreignToBeSignAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getToBeSignAmountSql(handleDepartCoding, tousseTypesql) + ") tb "; + sql += " union all " + foreignToBeSignAmountSql; + //外来器械当天已签收的包数 + String foreignSignedAmountSql = String.format("select 'foreignSignedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("签收数量", foreignParams) + + ") tl "); + sql += " union all " + foreignSignedAmountSql; + //当天已签收的包数 + String signedAmountSql = String.format("select 'signedAmount' type,sum(amount) amount,0 urgentAmount from (" + +dataIndex.getWorkAmountByPackageSQL("签收数量", params) + + ") tl "); + sql += " union all " + signedAmountSql; + //当天已处理加急物品的总包数 + String invoicedUrgentAmountSql = " select 'invoicedUrgentAmount' type,sum(amount) amount,0 urgentAmount from ( " + + getInvoicedUrgentAmountSql(handleDepartCoding, betweenSql) + ") tb "; + sql += " union all " + invoicedUrgentAmountSql; + ResultSet rs = null; + JSONObject obj = new JSONObject(); + try { + rs = objectDao.executeSql(sql); + while (rs.next()) { + String type = rs.getString("type"); + if("toBeInvoiceAmount".equals(type)){ + obj.put("toBeInvoiceUrgentAmount", rs.getInt("urgentAmount"));//待处理加急数量 + } + obj.put(type, rs.getInt("amount")); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + DatabaseUtil.closeResultSetAndStatement(rs); + } + return obj; + } + /** + * 获取当天已处理加急物品的总包数sql + * @param handleDepartCoding 一级供应室编码 + * @param betweenSql 时间过滤 + * @return + */ + private String getInvoicedUrgentAmountSql(String handleDepartCoding, String betweenSql){ + String sql = "select count(*) amount from " + + TousseInstance.class.getSimpleName() + + " ti join " + + Invoice.class.getSimpleName() + +" i on i.id=ti.invoice_id where ti.urgentLevel_id is not null and i.orgUnitCoding='" + + handleDepartCoding + +"' and i.sendTime " + + betweenSql; + return sql; + } + @Override + public List getEquipmentData() { + String handleDepartCoding = supplyRoomConfigManager.getFirstSupplyRoomConfig().getOrgUnitCoding(); + if(StringUtils.isBlank(handleDepartCoding)){ + return new ArrayList(); + } + String rinserSql = " select case when exists (select wr.id from " + + WashAndDisinfectRecord.class.getSimpleName() + +" wr where wr.rinserId=r.id and wr.washStatus='" + + WashAndDisinfectRecord.STATUS_WASHING + +"' ) then '使用中' else '空闲' end status,(select max(wr.endDate) from " + + WashAndDisinfectRecord.class.getSimpleName() + + " wr where wr.rinserId=r.id and wr.washStatus='" + + WashAndDisinfectRecord.STATUS_WASHING + +"') dateStr,r.name from " + + Rinser.class.getSimpleName() + +" r where r.orgUnitCoding='" + + handleDepartCoding + +"' and r.useStatus='" + + Rinser.USESTATUS_IN_USE + +"' order by r.name "; + String sterilizerSql = " select case when exists (select id from " + + SterilizationRecord.class.getSimpleName() + +" sr where sr.sterilizer_id=s.id and sr.status='" + + SterilizationRecord.STERILIZATION_STATUS_BEGIN + +"' ) then '使用中' else '空闲' end status , (select max(sr.endDate) from " + + SterilizationRecord.class.getSimpleName() + +" sr where sr.sterilizer_id=s.id and sr.status='" + + SterilizationRecord.STERILIZATION_STATUS_BEGIN + +"') dateStr,s.name from " + + Sterilizer.class.getSimpleName() + +" s where s.orgUnitCoding='" + + handleDepartCoding + +"' and s.useStatus='" + + Sterilizer.USESTATUS_IN_USE + +"' order by s.name"; + List arr = new ArrayList(); + setEquipmentData(arr, rinserSql); + setEquipmentData(arr, sterilizerSql); + return arr; + } + /** + * 查询设置设备使用情况数据 + * @param arr 设备数据 + * @param sql 查询语句 + */ + private void setEquipmentData(List arr, String sql){ + ResultSet rs = null; + try { + rs = objectDao.executeSql(sql); + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); + while (rs.next()) { + JSONObject obj = new JSONObject(); + Date date = rs.getTimestamp("dateStr"); + if(date != null){ + obj.put("dateStr", sdf.format(date)); + } + obj.put("name", rs.getString("name")); + obj.put("status", rs.getString("status")); + arr.add(obj); + } + } catch (SQLException e) { + e.printStackTrace(); + }finally { + DatabaseUtil.closeResultSetAndStatement(rs); + } + } } Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java =================================================================== diff -u -r35015 -r35030 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 35015) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 35030) @@ -77,7 +77,6 @@ import com.forgon.disinfectsystem.entity.stocktakerecordmanager.StockTakeRecord; import com.forgon.disinfectsystem.entity.useRecord.UseDiposableGoodsItem; import com.forgon.disinfectsystem.entity.useRecord.UseRecord; -import com.forgon.disinfectsystem.jasperreports.javabeansource.DepartmentMonthDetail; import com.forgon.disinfectsystem.jasperreports.javabeansource.EighteenQuotaBean; import com.forgon.disinfectsystem.jasperreports.javabeansource.FirstColumnVo; import com.forgon.disinfectsystem.jasperreports.javabeansource.ForeignTousseAfterUseDeliveryVO; @@ -106,6 +105,7 @@ import com.forgon.disinfectsystem.jasperreports.service.WorkQualityCollectionReport; import com.forgon.disinfectsystem.recyclingrecord.service.RecyclingItemManager; import com.forgon.disinfectsystem.tousse.toussedefinition.service.TousseDefinitionManager; +import com.forgon.oa.onlineusers.service.OnlineUserManager; import com.forgon.systemsetting.model.HttpOption; import com.forgon.systemsetting.service.HttpOptionManager; import com.forgon.tools.MathTools; @@ -159,7 +159,11 @@ private CustomReports customReports; private BrancheOfHospitalManager brancheOfHospitalManager; + private OnlineUserManager onlineUserManager; + public void setOnlineUserManager(OnlineUserManager onlineUserManager) { + this.onlineUserManager = onlineUserManager; + } public void setCustomReports(CustomReports customReports) { this.customReports = customReports; } @@ -4868,4 +4872,43 @@ StrutsResponseUtils.output(obj); } } + /** + * 获取数据看板工作量 + */ + public void getRealTimeBulletinBoardWorkloadData(){ + JSONObject obj = new JSONObject(); + try { + JSONObject data = jasperReportManager.getRealTimeBulletinBoardWorkloadData(); + obj.put("data", data); + } catch (Exception e) { + e.printStackTrace(); + }finally{ + StrutsResponseUtils.output(obj); + } + } + /** + * 获取设备使用情况 + */ + public void getEquipmentData(){ + JSONObject obj = new JSONObject(); + try { + List data = jasperReportManager.getEquipmentData(); + obj.put("data", data); + } catch (Exception e) { + e.printStackTrace(); + }finally{ + StrutsResponseUtils.output(obj); + } + } + /** + * 获取一级供应室的在线用户数量 + */ + public void getFirstSupplyRoomConfigOnlineUserDate(){ + try { + StrutsResponseUtils.output(true, onlineUserManager.getFirstSupplyRoomConfigOnlineUserDate()); + } catch (Exception e) { + e.printStackTrace(); + StrutsResponseUtils.output(false, e.getMessage()); + } + } } Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java =================================================================== diff -u -r35015 -r35030 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 35015) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManager.java (.../JasperReportManager.java) (revision 35030) @@ -1306,5 +1306,15 @@ * @return */ public List getCssdWorkloadReportForTangshanWorkersHospital(String tousseTypes, String taskGroup, String departGroupStr, String querySupplyRoom, String startDate, String endDate); + /** + * 获取数据看板工作量 + * @return + */ + public JSONObject getRealTimeBulletinBoardWorkloadData(); + /** + * 获取设备使用情况 + * @return + */ + public List getEquipmentData(); }