Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r33747 -r33748 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 33747) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 33748) @@ -8753,29 +8753,29 @@ + " and sr.orgUnitCoding='" + orgUnitCoding + "' "; - //计算科室分组为【大院-门诊】和【大院-住院部】【已回收】的【器械包申请单】数量 X2 + //计算科室分组为【大院门诊】和【大院住院部】【已回收】的【器械包申请单】数量 X2 sql += " union all select 6 orderNumber,'下收、下送科室' firstColumnName ,'①器械单回收' secondColumnName, count(distinct ip.id)*2 amount from invoicePlan ip " + "join OrgUnit ou on ou.orgUnitCoding=ip.departCoding " + "join Org_OrgGroup oo on oo.orgunitid=ou.id " + "join OrgUnitGroup oug on oug.id=oo.orgGroupId " - + " where ip.type='"+ InvoicePlan.TYPE_TOUSSE_APPLICATION_FORM +"' and oug.name in('大院-住院部','大院-门诊') " + + " where ip.type='"+ InvoicePlan.TYPE_TOUSSE_APPLICATION_FORM +"' and oug.name in('大院住院部','大院门诊') " + "and ip.recyclingStatus='"+ InvoicePlan.RECYCLINGSTATUS_RECYCLED +"' " + "and ip.handleDepartCoding='"+ orgUnitCoding +"' and ip.applicationTime " + betweenSql; - //计算申请科室分组为【大院-门诊】和【大院-住院部】【已发货】的一次性物品申请单数量 X 1 + //计算申请科室分组为【大院门诊】和【大院住院部】【已发货】的一次性物品申请单数量 X 1 sql += " union all select 6 orderNumber,'下收、下送科室' firstColumnName ,'②一次性物品申领单' secondColumnName, count(distinct ip.id) amount from invoicePlan ip " + "join OrgUnit ou on ou.orgUnitCoding=ip.departCoding " + "join Org_OrgGroup oo on oo.orgunitid=ou.id " + "join OrgUnitGroup oug on oug.id=oo.orgGroupId " - + " where ip.type='"+ InvoicePlan.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM +"' and oug.name in('大院-住院部','大院-门诊') and ip.deliverStatus='"+ InvoicePlan.DELIVERSTATUS_DELIVERED +"' " + + " where ip.type='"+ InvoicePlan.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM +"' and oug.name in('大院住院部','大院门诊') and ip.deliverStatus='"+ InvoicePlan.DELIVERSTATUS_DELIVERED +"' " +" and ip.applicationTime " + betweenSql; - //计算申请科室分组为【大院-门诊】和【大院-住院部】的【已发货】的【外部器械包代理灭菌申请单】申请单数 X 2 + //计算申请科室分组为【大院门诊】和【大院住院部】的【已发货】的【外部器械包代理灭菌申请单】申请单数 X 2 sql += " union all select 6 orderNumber,'下收、下送科室' firstColumnName ,'③代消包' secondColumnName, count(distinct ip.id)*2 amount from invoicePlan ip " + "join OrgUnit ou on ou.orgUnitCoding=ip.departCoding " + "join Org_OrgGroup oo on oo.orgunitid=ou.id " + "join OrgUnitGroup oug on oug.id=oo.orgGroupId " - + " where ip.type='"+ InvoicePlan.TYPE_FOREIGNPROXYDISINFECTION +"' and oug.name in('大院-住院部','大院-门诊') and ip.deliverStatus='"+ InvoicePlan.DELIVERSTATUS_DELIVERED +"' " + + " where ip.type='"+ InvoicePlan.TYPE_FOREIGNPROXYDISINFECTION +"' and oug.name in('大院住院部','大院门诊') and ip.deliverStatus='"+ InvoicePlan.DELIVERSTATUS_DELIVERED +"' " + " and ip.handleDepartCoding='"+ orgUnitCoding +"' and ip.applicationTime " + betweenSql;