Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r34368 -r34373 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 34368) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 34373) @@ -27609,8 +27609,9 @@ + "join instrumentSetType ist on ist.id=istt.instrumentSetTypeId where ist.name='口腔聚合包') group by ti.depart "; sql += ") t group by t.depart "; //口腔班-②口腔自由装配 统计处理科室为【大院供应室】装配任务组为【口腔班】器械包类型为【聚合包】器械包种类为【口腔自由装配包】复用物品【装配】的【包数】 + //聚合包来的来源科室取小包的来源科室 如果小包来源于多个科室 目前也只会取max(depart)的科室 sql += " union all "; - sql += "select ti.depart,count(*) amount " + sql += "select depart,sum(amount) amount from (select (select max(depart) from tousseinstance where combotousseinstanceid=ti.id) depart ,1 amount " + " from TousseInstance ti inner join TousseDefinition td on ti.comboTousseDefinitionId = td.id " + "join TousseDefinition tdc on tdc.id=td.ancestorid " + "join CssdHandleTousses ch on ch.toussedefinitionid=tdc.id " @@ -27620,7 +27621,7 @@ + "' and ti.operationTime " + betweenSql + " and tdc.id in (select istt.tousseDefinitionId from InstrumentSetType_TD istt " - + "join instrumentSetType ist on ist.id=istt.instrumentSetTypeId where ist.name='口腔自由装配包') group by ti.depart "; + + "join instrumentSetType ist on ist.id=istt.instrumentSetTypeId where ist.name='口腔自由装配包') )t3 group by depart "; //呼吸球囊-呼吸球囊清点数目 统计处理科室为【大院供应室】装配任务组为【剪刀班】器械包种类为【呼吸球囊】的复用物品【回收】的【包数】X 1 sql += " union all "; sql += "select rr.depart,sum(ri.amount) amount from RecyclingRecord rr "