Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/RealTimeBulletinBoardWorkloadHelper.java =================================================================== diff -u -r38942 -r38951 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/RealTimeBulletinBoardWorkloadHelper.java (.../RealTimeBulletinBoardWorkloadHelper.java) (revision 38942) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/RealTimeBulletinBoardWorkloadHelper.java (.../RealTimeBulletinBoardWorkloadHelper.java) (revision 38951) @@ -1584,8 +1584,7 @@ String invocieUrgentAmountSql = "select ti.tousseName,sum(ti.urgentAmount) tiUrgentAmount" //不回收的物品 需扣除装配数量 - + ", sum(case when t.amount>0 and ti.urgentAmount<=t.amount then 0 " - + "when t.amount>0 and ti.urgentAmount>t.amount then ti.urgentAmount-t.amount " + + ", sum(case when t.amount>0 and ti.urgentAmount>0 then ti.urgentAmount when t.amount>0 then 0 " + "when ti.recyclingAmount is null then ti.urgentAmount " + "when ti.urgentAmount<=ti.recyclingAmount then 0 else ti.urgentAmount - ti.recyclingAmount end) notRecycledUrgentAmount " + ",sum(ti.sendOutAmount) invoiceAmount from " @@ -1600,7 +1599,7 @@ + " tic group by tic.invoicePlanId,tic.tousseDefinition_id) t on td.isRecycling='否' and t.invoicePlanId=ip.id and t.tousseDefinition_id=td.id " + " where (ip.urgent='是' or ip.urgentAmount>0) and ip.applicationTime " + betweenSql - + "and ip.handleDepartCoding = '" + + " and ip.handleDepartCoding = '" + handleDepartCoding +"' group by ti.tousseName order by min(ip.applicationTime) asc"; ResultSet rs = null;