Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r31155 -r31173 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 31155) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 31173) @@ -22316,7 +22316,7 @@ workloadScoreStatisticReportVo.setOrderNumber(orderNumber); packageSizeAmountMap.put(size, workloadScoreStatisticReportVo); orderNumber++; - } + } ResultSet rs = null; try { //“科室分组”的过滤 @@ -22340,12 +22340,10 @@ .append(Invoice.class.getSimpleName()) .append(" i on i.id=ti.invoice_id join ") .append(TousseDefinition.class.getSimpleName()) - .append(" td on td.id=ti.tousseDefinition_id where invoice2_id is null ") - .append("and i.sendtime ") + .append(" td on td.id=ti.tousseDefinition_id where i.sendtime ") .append(betweenSql) .append(querySupplyRoomSql) .append(departCodingSql) - .append("and td.packageSize is not null ") //聚合包不算 .append("and ti.comboTousseDefinitionId is null and ti.comboTousseInstanceId is null ") .append("group by td.packageSize,td.tousseType,proxyDisinfection_id ") @@ -22360,15 +22358,23 @@ .append(betweenSql) .append(querySupplyRoomSql) .append(departCodingSql) - .append("and td.packageSize is not null ") //聚合包不算 .append("and ti.comboTousseDefinitionId is null and ti.comboTousseInstanceId is null ") .append("group by td.packageSize,td.tousseType,proxyDisinfection_id "); rs = objectDao.executeSql(sbrSql.toString()); + String otherStr = "其它"; + boolean showOther = false; while (rs.next()) { String packageSize = rs.getString("packageSize"); - if(StringUtils.isBlank(packageSize) || !packageSizes.contains(packageSize)){//只显示指定包大小类型,空值除外 - continue; + if(!packageSizes.contains(packageSize)){ + if(packageSizes.contains(otherStr)){ + packageSize = otherStr; + if(!showOther){ + showOther = true; + } + }else{ + continue; + } } WorkloadScoreStatisticReportVo workloadScoreStatisticReportVo = null; int amount = rs.getInt("amount"); @@ -22394,6 +22400,9 @@ workloadScoreStatisticReportVo.setDressingAmount(MathTools.add(amount, workloadScoreStatisticReportVo.getDressingAmount()).intValue()); } } + if(!showOther && packageSizeAmountMap.containsKey(otherStr)){ + packageSizeAmountMap.remove(otherStr, packageSizeAmountMap.get(otherStr)); + } } catch (Exception e) { e.printStackTrace(); }finally{