Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r34891 -r34940 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 34891) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 34940) @@ -7547,12 +7547,19 @@ + " is null then 1 else " + columnSql + " end "; - String tousseAmount = " case td.toussetype when '"+TousseDefinition.PACKAGE_TYPE_CUSTOM+"' then " + cumstomTousseAmount - + " when '"+TousseDefinition.PACKAGE_TYPE_DISINFECTION+"' then case when " - + columnSql - + " is null then 1 else " - + columnSql - + " end else 1 end "; + boolean isStatisticDisinfectionGoodsAmountByPackage = CssdUtils.getSystemSetConfigByNameBool("isStatisticDisinfectionGoodsAmountByPackage", false); + String tousseAmount = null; + if(isStatisticDisinfectionGoodsAmountByPackage){ + tousseAmount = " case td.toussetype when '"+TousseDefinition.PACKAGE_TYPE_CUSTOM+"' then " + cumstomTousseAmount + + " else 1 end "; + }else{ + tousseAmount = " case td.toussetype when '"+TousseDefinition.PACKAGE_TYPE_CUSTOM+"' then " + cumstomTousseAmount + + " when '"+TousseDefinition.PACKAGE_TYPE_DISINFECTION+"' then case when " + + columnSql + + " is null then 1 else " + + columnSql + + " end else 1 end "; + } String sql = " "; String remarkSql = null; if(!"summary".equals(type)){