Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r26921 -r26953 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 26921) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 26953) @@ -14668,7 +14668,7 @@ + " group by " + packingDateSql + ", ti.depart "; // 器械包分组数量 String recycleTousseGroupSql = " select " + dataSql + " ,tdi.tousseGroupName,sum(tItem.amount) from recyclingRecord rr,RecyclingItem tItem,TousseDefinition tdi " - + " where rr.id = tItem.recyclingRecord_id and tItem.tousseName = tdi.name and tdi.forDisplay = 1 " + + " where rr.id = tItem.recyclingRecord_id and tItem.tousseDefinitionId=tdi.id " + " and ( " + dateQueryAdapter.dateAreaSql("rr.recyclingTime", startDay, endDay, false) + ")" + " and tdi.tousseGroupName in (" + whereTousseGroup + " )" + " group by " + dataSql + " , tdi.tousseGroupName"; @@ -14683,7 +14683,7 @@ // 器械包分组和科室数量 String recycleAmountSql = " select " + dataSql + ",sum(tItem.amount) from recyclingRecord rr,RecyclingItem tItem,TousseDefinition tdi " - + " where rr.id = tItem.recyclingRecord_id and tItem.tousseName = tdi.name and tdi.forDisplay = 1 " + + " where rr.id = tItem.recyclingRecord_id and tItem.tousseDefinitionId=tdi.id " + " and ( " + dateQueryAdapter.dateAreaSql("rr.recyclingTime", startDay, endDay, false) + ")" + " and ( tdi.tousseGroupName in (" + whereTousseGroup + ")" + " or rr.depart in (" + whereDepart + ") )" + " group by " + dataSql ;