Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r24499 -r24580 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 24499) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 24580) @@ -12464,13 +12464,14 @@ + "select td.name as tousseName,ci.amount * ms.count as tousseAmount,td.tousseType as tousseType," + "case when (cb.personInCharge is null or cb.personInCharge = '') then wdr.operator else cb.personInCharge end userName " + "from WashAndDisinfectRecord wdr,ClassifyBasket_WashRecord cw,ClassifyBasket cb,ClassifiedItem ci,tousseDefinition td,materialInstance ms " - + "where wdr.id = cw.WashAndDisinfectRecord_ID and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.toussedefinition_id = td.id and td.id = ms.tousse_id " + + "where wdr.id = cw.WashAndDisinfectRecord_ID and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.toussedefinition_id=ms.tousse_id " + + " and ci.materialdefinition_id=ms.materialDefinition_id and td.id = ms.tousse_id and ci.itemType = '"+ MaterialDefinition.TYPE_NAME +"' " + " %s %s %s and wdr.orgUnitCoding = '%s' and wdr.endDate between %s and %s and wdr.washMaterialAmount<>0 " + " union all " + "select ci.tousseNameForMaterial as tousseName,ci.amount as tousseAmount,td.tousseType as tousseType," + "case when (cb.personInCharge is null or cb.personInCharge = '') then wdr.operator else cb.personInCharge end userName " + "from WashAndDisinfectRecord wdr,ClassifyBasket_WashRecord cw,ClassifyBasket cb,ClassifiedItem ci,tousseDefinition td " - + "where wdr.id = cw.WashAndDisinfectRecord_ID and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.tousseDefinitionID=td.id and ci.itemType = '材料' " + + "where wdr.id = cw.WashAndDisinfectRecord_ID and cw.ClassifyBasket_ID = cb.id and cb.id = ci.classifybasket_id and ci.tousseDefinitionID=td.id and ci.itemType = '"+ TousseDefinition.PACKAGE_TYPE_INSIDE +"' " + " %s %s %s and wdr.orgUnitCoding = '%s' and wdr.endDate between %s and %s and wdr.washMaterialAmount<>0 " + ") ti where 1=1 %s %s group by ti.tousseType,ti.tousseName ", isDisableIDCardSql,taskGroupSql,tousseGroupSql,departCoding,startDateSql,endDateSql,