Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r32936 -r32937 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 32936) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 32937) @@ -14940,7 +14940,7 @@ goodsSearchSql = String.format(" and t1.goodsName='%s' ", goodsSearch); } - String sql = String.format("select t1.departCode,min(t1.departName) departName,t1.patientArea,min(t1.goodsName) goodsName,t1.price,sum(t1.amount) amount,sum(t1.amount*t1.price) total from (" + String sql = String.format("select t1.departCode,min(t1.departName) departName,t1.patientArea,t1.goodsName goodsName,t1.price,sum(t1.amount) amount,sum(t1.amount*t1.price) total from (" + "select 'tousse' type,ur.depart departName,ur.departCoding departCode,ti.tousseName goodsName,1 amount,%s patientArea,ti.fluctuationPrice price " + "from UseRecord ur inner join TousseInstance ti on ti.useRecord_id=ur.id where 1=1 %s %s" + "union all " @@ -14949,7 +14949,7 @@ + "inner join barcodeDevice bd on bd.barcode=udgi.barcode " + "left join DisposableGoodsBatch dgb on dgb.id=bd.id left join ExpensiveDisposablegoods edg on edg.id=bd.id where 1=1 %s %s" + ") t1 where 1=1 %s %s %s" - + "group by t1.departCode,t1.patientArea,t1.type,t1.price", + + "group by t1.departCode,t1.patientArea,t1.type,t1.goodsName,t1.price", departSql, betweenSql,departLimitSql, departSql, betweenSql,departLimitSql, departSearchSql, goodsSearchSql, departOfpatientSearchSql); ResultSet result = objectDao.executeSql(sql);