Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r33833 -r33840 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 33833) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 33840) @@ -13058,12 +13058,22 @@ List scList = new ArrayList(); Map keyResultMap = new HashMap(); try{ + boolean enableTheSterilizationResultJudgmentFunction = CssdUtils.getSystemSetConfigByNameBool("enableTheSterilizationResultJudgmentFunction", false); + String statusSql = ""; + if(enableTheSterilizationResultJudgmentFunction){ + statusSql = " and po.status = '"+SterilizationRecord.STERILIZATION_STATUS_END + + "' and po.sterilizationResult in('" + + SterilizationRecord.STERILIZATIONRESULT_QUALIFIED + +"','"+ SterilizationRecord.STERILIZATIONRESULT_UNQUALIFIED + +"' "; + } String sql = " where po.endDate between " + dateQueryAdapter.dateConverAdapter2( startTime , "yyyy-mm-dd HH24:MI") + " and " + "" + dateQueryAdapter.dateConverAdapter2( endTime , "yyyy-mm-dd HH24:MI") + + statusSql + (StringUtils.isNotBlank(departCoding) ? (" and po.sterilizer.orgUnitCoding = '"+departCoding+"'") : (" and po.sterilizer.department = '"+depart+"'")); if(StringUtils.isNotBlank(sterilizationPurpose) && !"全部".equals(sterilizationPurpose)) { Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/reportforms/service/ReportManagerImpl.java =================================================================== diff -u -r33526 -r33840 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/reportforms/service/ReportManagerImpl.java (.../ReportManagerImpl.java) (revision 33526) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/reportforms/service/ReportManagerImpl.java (.../ReportManagerImpl.java) (revision 33840) @@ -614,6 +614,15 @@ if(StringUtils.isNotBlank(sterilizationPurpose) && !"全部".equals(sterilizationPurpose)){ sqlOfSterilizationPurpose = " and sr.sterilizationPurpose = '" + sterilizationPurpose + "' "; } + boolean enableTheSterilizationResultJudgmentFunction = CssdUtils.getSystemSetConfigByNameBool("enableTheSterilizationResultJudgmentFunction", false); + String statusSql = ""; + if(enableTheSterilizationResultJudgmentFunction){ + statusSql = " and sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_END + + "' and sr.sterilizationResult in('" + + SterilizationRecord.STERILIZATIONRESULT_QUALIFIED + +"','"+ SterilizationRecord.STERILIZATIONRESULT_UNQUALIFIED + +"' "; + } String sterilizerNameGroupSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("s.ownGroup", sterilizerNameGroup, ","); String sterilizerNameSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("s.name", sterilizerName, ","); String sterilisationSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("sr.sterilizationType", sterilisation, ","); @@ -623,6 +632,7 @@ + sterilizerNameGroupSql + sterilizerNameSql + sterilisationSql + + statusSql + " and sr.endDate between " + dateQueryAdapter.dateConverAdapter2(startTime, "yyyy-mm-dd HH24:MI:SS") + " and "+dateQueryAdapter.dateConverAdapter2(endTime, "yyyy-mm-dd HH24:MI:SS") + " group by s.name"; @@ -684,6 +694,15 @@ if(StringUtils.isNotBlank(sterilizationPurpose) && !"全部".equals(sterilizationPurpose)){ sqlOfSterilizationPurpose = " and sr.sterilizationPurpose = '" + sterilizationPurpose + "' "; } + boolean enableTheSterilizationResultJudgmentFunction = CssdUtils.getSystemSetConfigByNameBool("enableTheSterilizationResultJudgmentFunction", false); + String statusSql = ""; + if(enableTheSterilizationResultJudgmentFunction){ + statusSql = " and sr.status = '"+SterilizationRecord.STERILIZATION_STATUS_END + + "' and sr.sterilizationResult in('" + + SterilizationRecord.STERILIZATIONRESULT_QUALIFIED + +"','"+ SterilizationRecord.STERILIZATIONRESULT_UNQUALIFIED + +"' "; + } String sterilizerNameGroupSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("s.ownGroup", sterilizerNameGroup, ","); String sterilizerNameSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("s.name", sterilizerName, ","); String sterilisationSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("sr.sterilizationType", sterilisation, ","); @@ -694,6 +713,7 @@ +" where sr.sterilizer_id = s.id " //+ " and s.id=" + sterilizerId +" and s.orgUnitCoding = '"+departCoding+"'" + + statusSql +" and sr.endDate between "+dateQueryAdapter.dateConverAdapter2( startTime , "yyyy-mm-dd HH24:MI:SS") +" and "+dateQueryAdapter.dateConverAdapter2( endTime