Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/SupplyRoomQualityQuotaHelper.java =================================================================== diff -u -r40473 -r40476 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/SupplyRoomQualityQuotaHelper.java (.../SupplyRoomQualityQuotaHelper.java) (revision 40473) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/SupplyRoomQualityQuotaHelper.java (.../SupplyRoomQualityQuotaHelper.java) (revision 40476) @@ -1203,7 +1203,6 @@ if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_MONITORCOMPLETION_RATIO)){ deviceMonitorMap = new HashMap(); Map maintenanceCycleMap = new HashMap<>(); - Map rinserMaintenanceCycleMap = new HashMap<>(); Set rinserNames = new HashSet<>(); Set sterilizerNames = null; if(daysMap == null){ @@ -1213,31 +1212,28 @@ rinserMonitorMap = new HashMap<>(); ResultSet rs = null; try { - rs = objectDao.executeSql("select name,maintenanceCycle from " + Rinser.class.getSimpleName()+" where useStatus='在用' and maintenanceCycle>0 and name not like '%手%' "); + rs = objectDao.executeSql("select name,inspectionCycle from " + Rinser.class.getSimpleName()+" where useStatus='在用' and inspectionCycle>0 and name not like '%手%' "); while (rs.next()) { String name = rs.getString("name"); rinserNames.add(name); - int maintenanceCycle = rs.getInt("maintenanceCycle"); - rinserMaintenanceCycleMap.put(name, maintenanceCycle); - maintenanceCycleMap.put(name, maintenanceCycle); + int inspectionCycle = rs.getInt("inspectionCycle"); + maintenanceCycleMap.put(name, inspectionCycle); } } catch (Exception e) { logger.error(e); } finally { DatabaseUtil.closeResultSetAndStatement(rs); } - Map sterilizerMaintenanceCycleMap = new HashMap<>(); sterilizerMonitorMap = new HashMap<>(); sterilizerNames = new HashSet<>(); ResultSet rs2 = null; try { - rs2 = objectDao.executeSql("select name,maintenanceCycle from " + Sterilizer.class.getSimpleName()+" where useStatus='在用' and maintenanceCycle>0 "); + rs2 = objectDao.executeSql("select name,inspectionCycle from " + Sterilizer.class.getSimpleName()+" where useStatus='在用' and inspectionCycle>0 "); while (rs2.next()) { String name = rs2.getString("name"); sterilizerNames.add(name); - int maintenanceCycle = rs2.getInt("maintenanceCycle"); - sterilizerMaintenanceCycleMap.put(name, maintenanceCycle); - maintenanceCycleMap.put(name, maintenanceCycle); + int inspectionCycle = rs2.getInt("inspectionCycle"); + maintenanceCycleMap.put(name, inspectionCycle); } } catch (Exception e) { logger.error(e); @@ -2102,11 +2098,17 @@ boolean isDeviceMaintenanceCus = false; if(rinserMaintenanceMap != null || sterilizerMaintenanceMap != null){ isDeviceMaintenanceCus = CssdUtils.getSystemSetConfigByNameBool("isDeviceMaintenanceCus", false); + String typeSql = ""; + if(DeviceMaintenance.MAINTENANCE_TYPE_MAINTENANCE.equals(type)){ + typeSql = " and maintenanceCycle>0 "; + }else if(DeviceMaintenance.MAINTENANCE_TYPE_PERIODIC_TESTING.equals(type)){ + typeSql = " and inspectionCycle>0 "; + } if(rinserMaintenanceMap != null && CollectionUtils.isEmpty(rinserNames)){ - rinserNames = objectDao.getStringSet("select distinct name from " + Rinser.class.getSimpleName()+" where useStatus='在用' and maintenanceCycle>0 and name not like '%手%'", "无"); + rinserNames = objectDao.getStringSet("select distinct name from " + Rinser.class.getSimpleName()+" where useStatus='在用' and name not like '%手%'" + typeSql, "无"); } if(sterilizerMaintenanceMap != null && CollectionUtils.isEmpty(sterilizerNames)){ - sterilizerNames = objectDao.getStringSet("select distinct name from " + Sterilizer.class.getSimpleName() + " where useStatus='在用' and maintenanceCycle>0 ", "无"); + sterilizerNames = objectDao.getStringSet("select distinct name from " + Sterilizer.class.getSimpleName() + " where useStatus='在用' " + typeSql, "无"); } } ResultSet rs = null; @@ -2159,17 +2161,20 @@ if(sterilizerMaintenanceMap != null){ if(sterilizerNames.contains(deviceName) || isDeviceMaintenanceCus && deviceName.contains("灭菌")){ putAmountIntoDeviceMaintenanceMap(sterilizerMaintenanceMap, monthStr, amount5, queryScope, thisYear); + if(deviceMaintenanceMap != null){ + putAmountIntoDeviceMaintenanceMap(deviceMaintenanceMap, monthStr, amount5, queryScope, thisYear); + } } } if(rinserMaintenanceMap != null){ if(rinserNames.contains(deviceName) || isDeviceMaintenanceCus && deviceName.contains("清洗")){ putAmountIntoDeviceMaintenanceMap(rinserMaintenanceMap, monthStr, amount5, queryScope, thisYear); + if(deviceMaintenanceMap != null){ + putAmountIntoDeviceMaintenanceMap(deviceMaintenanceMap, monthStr, amount5, queryScope, thisYear); + } } } } - if(deviceMaintenanceMap != null){ - putAmountIntoDeviceMaintenanceMap(deviceMaintenanceMap, monthStr, amount5, queryScope, thisYear); - } } } catch (SQLException e) { e.printStackTrace();