Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r33813 -r33820 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 33813) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 33820) @@ -22766,6 +22766,7 @@ */ private List getSupplyRoomQualityQuotaByMonth(String departmentCode, String year, JSONArray dataConfigArr, Set dataIndexSources) { List list = new ArrayList(); + List definitionList = null; /** * 1、灭菌物品的统计 */ @@ -22807,7 +22808,7 @@ Map washSumAmountForQualified = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_QUALIFIED) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_TOTAL) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_QUALIFIEDRATIO)){ washSumAmount = getWashSumAmount(departmentCode, year, SupplyRoomQualityQuota.MONTH, null, null, null, null); - String[] washSumUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_WASHUNQUALIFIEDSOURCE, ""); //器械清洗不合格数据来源 + String[] washSumUnqualifiedSource = getModelSources(GoodsOption.MODEL_WASHUNQUALIFIEDSOURCE, definitionList); washSumAmountForUnqualified = getUnqualified(false, departmentCode, washSumUnqualifiedSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); washSumAmountForQualified = getQualifiedAmountMap(washSumAmount, washSumAmountForUnqualified); //得到合格率 @@ -22846,7 +22847,7 @@ //每个月的不合格的灭菌包数 Map wetPacketAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WETPACKETS_TOTAL) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WETPACKETS_RATIO)){ - String[] wetPacketUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_WETPACKETSUNQUALIFIEDSOURCE, ""); //湿包数据来源 + String[] wetPacketUnqualifiedSource = getModelSources(GoodsOption.MODEL_WETPACKETSUNQUALIFIEDSOURCE, definitionList); wetPacketAmount = getUnqualified(true, departmentCode, wetPacketUnqualifiedSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WETPACKETS_RATIO)){ //得到湿包率 @@ -22867,7 +22868,7 @@ // 装配总数的Map packingSumAmount = getPackingAmount(reportParams,"mm", 12, null,null); //每个月的不合格的灭菌包数 - String[] packingUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_ONLY_PACKINGUNQUALIFIEDSOURCE, ""); //包装不合格数据来源 + String[] packingUnqualifiedSource = getModelSources(GoodsOption.MODEL_ONLY_PACKINGUNQUALIFIEDSOURCE, definitionList); packingForUnqualified = getUnqualified(true, departmentCode, packingUnqualifiedSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); //每个月的合格的灭菌包数 packingForQualified = getQualifiedAmountMap(packingSumAmount, packingForUnqualified); @@ -22881,71 +22882,71 @@ */ Map disposablegoodsUnqualifiedAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_DISPOSABLEGOODS_UNQUALIFIED)){ - String[] disposablegoodsUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_DISPOSABLEGOODS, ""); + String[] disposablegoodsUnqualifiedSource = getModelSources(GoodsOption.MODEL_DISPOSABLEGOODS, definitionList); disposablegoodsUnqualifiedAmount = getUnqualified(true, departmentCode, disposablegoodsUnqualifiedSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** * 7 回收器械丢失件数 */ Map recyclingTousseErrorAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_RECYCLING_TOUSSEERROR)){ - String[] recyclingTousseErrorSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_RECYCLINGTOUSSEERROR, ""); + String[] recyclingTousseErrorSource = getModelSources(GoodsOption.MODEL_RECYCLINGTOUSSEERROR, definitionList); recyclingTousseErrorAmount = getUnqualified(false, departmentCode, recyclingTousseErrorSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** * 8 包内器械缺失件数 */ Map missingInTousseAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_MISSING_IN_TOUSSE)){ - String[] missingInTousseSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_MISSING_INTOUSSE, ""); + String[] missingInTousseSource = getModelSources(GoodsOption.MODEL_MISSING_INTOUSSE, definitionList); missingInTousseAmount = getUnqualified(false, departmentCode, missingInTousseSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** * 9 包内器械功能不全 */ Map insufficiencyInTousseAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_INSUFFICIENCY_IN_TOUSSE)){ - String[] insufficiencyInTousseSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_INSUFFICIENCY_INTOUSSE, ""); + String[] insufficiencyInTousseSource = getModelSources(GoodsOption.MODEL_INSUFFICIENCY_INTOUSSE, definitionList); insufficiencyInTousseAmount = getUnqualified(false, departmentCode, insufficiencyInTousseSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** * 10 包内器械种类错误 */ Map typEerrorInTousseAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_TYPE_ERROR_IN_TOUSSE)){ - String[] typEerrorInTousseSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_TYPEERROR_INTOUSSE, ""); + String[] typEerrorInTousseSource = getModelSources(GoodsOption.MODEL_TYPEERROR_INTOUSSE, definitionList); typEerrorInTousseAmount = getUnqualified(false, departmentCode, typEerrorInTousseSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** * 11 包内化学指示卡不合格 */ Map model_chemicalindicatorcard_intousse_unqualifiedAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_CHEMICALINDICATORCARD_INTOUSSE_UNQUALIFIED)){ - String[] model_chemicalindicatorcard_intousse_unqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_CHEMICALINDICATORCARD_INTOUSSE_UNQUALIFIED, ""); + String[] model_chemicalindicatorcard_intousse_unqualifiedSource = getModelSources(GoodsOption.MODEL_CHEMICALINDICATORCARD_INTOUSSE_UNQUALIFIED, definitionList); model_chemicalindicatorcard_intousse_unqualifiedAmount = getUnqualified(false, departmentCode, model_chemicalindicatorcard_intousse_unqualifiedSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** * 12 物品标识不正确 */ Map item_id_is_incorrectAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_ITEM_ID_IS_INCORRECT)){ - String[] item_id_is_incorrectSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_ITEM_ID_IS_INCORRECT, ""); + String[] item_id_is_incorrectSource = getModelSources(GoodsOption.MODEL_ITEM_ID_IS_INCORRECT, definitionList); item_id_is_incorrectAmount = getUnqualified(true, departmentCode, item_id_is_incorrectSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** * 13 灭菌失败 */ Map sterilization_failureAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILIZATION_FAILURE)){ - String[] sterilization_failureSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_STERILIZATION_FAILURE, ""); + String[] sterilization_failureSource = getModelSources(GoodsOption.MODEL_STERILIZATION_FAILURE, definitionList); sterilization_failureAmount = getUnqualified(true, departmentCode, sterilization_failureSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** * 14 物品发放错误 */ Map item_invoice_errorAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_ITEM_INVOICE_ERROR)){ - String[] item_invoice_errorSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_ITEM_INVOICE_ERROR, ""); + String[] item_invoice_errorSource = getModelSources(GoodsOption.MODEL_ITEM_INVOICE_ERROR, definitionList); item_invoice_errorAmount = getUnqualified(true, departmentCode, item_invoice_errorSource, year, SupplyRoomQualityQuota.MONTH, null, null , null); } /** @@ -23063,6 +23064,7 @@ public List getSupplyRoomQualityQuotaByDay(String departmentCode, String month, JSONArray dataConfigArr, Set dataIndexSources ,String startTime, String endTime) { List list = new ArrayList(); + List definitionList = null; List firstDayToLastDay = null; Date start = null; Date end = null; @@ -23101,7 +23103,6 @@ if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_REUSABLEGOODS_TOTAL) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_REUSABLEGOODS_QUALIFIED) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_REUSABLEGOODS_QUALIFIEDRATIO)){ sterileArticles = getSterileArticles(reportParams, departmentCode, month, SupplyRoomQualityQuota.DAY, startTime, endTime, firstDayToLastDay); String[] sterileArticlesUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_STERILEUNQUALIFIEDSOURCE, ""); //无菌物品不合格数据来源 - sterileArticlesUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_STERILEUNQUALIFIEDSOURCE, ""); //无菌物品不合格数据来源 sterileArticlesForUnqualified = getUnqualified(true, departmentCode, sterileArticlesUnqualifiedSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime, firstDayToLastDay); sterileArticlesForQualified = getQualifiedAmountMap(sterileArticles, sterileArticlesForUnqualified); @@ -23120,9 +23121,9 @@ Map washSumAmountForUnqualified = null; //每天的合格的器械清洗数 Map washSumAmountForQualified = null; - if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_QUALIFIED) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_TOTAL) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILE_QUALIFIEDRATIO)){ + if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_QUALIFIED) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_TOTAL) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_QUALIFIEDRATIO)){ washSumAmount = getWashSumAmount(departmentCode, month, SupplyRoomQualityQuota.DAY, startTime, endTime, firstDayToLastDay, null); - String[] washSumUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_WASHUNQUALIFIEDSOURCE, ""); //器械清洗不合格数据来源 + String[] washSumUnqualifiedSource = getModelSources(GoodsOption.MODEL_WASHUNQUALIFIEDSOURCE, definitionList); //器械清洗不合格数据来源 washSumAmountForUnqualified = getUnqualified(false, departmentCode, washSumUnqualifiedSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); washSumAmountForQualified = getQualifiedAmountMap(washSumAmount, washSumAmountForUnqualified); if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_QUALIFIEDRATIO)){ @@ -23140,11 +23141,11 @@ //每天的合格的器械清洗数 Map sterilizationForQualified = null; - if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WASH_QUALIFIED) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WETPACKETS_RATIO) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILE_TOTAL) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILE_QUALIFIED) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILE_QUALIFIEDRATIO)){ + if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WETPACKETS_RATIO) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILE_TOTAL) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILE_QUALIFIED) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILE_QUALIFIEDRATIO)){ //每个月的灭菌包数 sterilizationSumAmount = dataIndex.getSterilizationAmount(reportParams, departmentCode, month, SupplyRoomQualityQuota.DAY, startTime, endTime, firstDayToLastDay); //每个月的不合格的灭菌包数 - String[] sterilizationUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_PACKINGUNQUALIFIEDSOURCE, ""); //包装不合格数据来源 + String[] sterilizationUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_PACKINGUNQUALIFIEDSOURCE, "");//包装不合格数据来源 sterilizationForUnqualified = getUnqualified(true, departmentCode, sterilizationUnqualifiedSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); //每个月的合格的灭菌包数 sterilizationForQualified = getQualifiedAmountMap(sterilizationSumAmount, sterilizationForUnqualified); @@ -23161,7 +23162,7 @@ if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WETPACKETS_TOTAL) || dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WETPACKETS_RATIO)){ - String[] wetPacketUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_WETPACKETSUNQUALIFIEDSOURCE, ""); //湿包数据来源 + String[] wetPacketUnqualifiedSource = getModelSources(GoodsOption.MODEL_WETPACKETSUNQUALIFIEDSOURCE, definitionList); //湿包数据来源 wetPacketAmount = getUnqualified(true, departmentCode, wetPacketUnqualifiedSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_WETPACKETS_RATIO)){ //得到湿包率 @@ -23183,7 +23184,7 @@ // 装配总数的Map packingSumAmount = getPackingAmount(reportParams,"yyyy-MM-dd", null, firstDayToLastDay,null); //每个月的不合格的灭菌包数 - String[] packingUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_ONLY_PACKINGUNQUALIFIEDSOURCE, ""); //包装不合格数据来源 + String[] packingUnqualifiedSource = getModelSources(GoodsOption.MODEL_ONLY_PACKINGUNQUALIFIEDSOURCE, definitionList); //包装不合格数据来源 packingForUnqualified = getUnqualified(true, departmentCode, packingUnqualifiedSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); //每个月的合格的灭菌包数 packingForQualified = getQualifiedAmountMap(packingSumAmount, packingForUnqualified); @@ -23197,71 +23198,71 @@ */ Map disposablegoodsUnqualifiedAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_DISPOSABLEGOODS_UNQUALIFIED)){ - String[] disposablegoodsUnqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_DISPOSABLEGOODS, ""); + String[] disposablegoodsUnqualifiedSource = getModelSources(GoodsOption.MODEL_DISPOSABLEGOODS, definitionList); disposablegoodsUnqualifiedAmount = getUnqualified(true, departmentCode, disposablegoodsUnqualifiedSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** * 7 回收器械丢失件数 */ Map recyclingTousseErrorAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_RECYCLING_TOUSSEERROR)){ - String[] recyclingTousseErrorSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_RECYCLINGTOUSSEERROR, ""); + String[] recyclingTousseErrorSource = getModelSources(GoodsOption.MODEL_RECYCLINGTOUSSEERROR, definitionList); recyclingTousseErrorAmount = getUnqualified(false, departmentCode, recyclingTousseErrorSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** * 8 包内器械缺失件数 */ Map missingInTousseAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_MISSING_IN_TOUSSE)){ - String[] missingInTousseSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_MISSING_INTOUSSE, ""); + String[] missingInTousseSource = getModelSources(GoodsOption.MODEL_MISSING_INTOUSSE, definitionList); missingInTousseAmount = getUnqualified(false, departmentCode, missingInTousseSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** * 9 包内器械功能不全 */ Map insufficiencyInTousseAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_INSUFFICIENCY_IN_TOUSSE)){ - String[] insufficiencyInTousseSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_INSUFFICIENCY_INTOUSSE, ""); + String[] insufficiencyInTousseSource = getModelSources(GoodsOption.MODEL_INSUFFICIENCY_INTOUSSE, definitionList); insufficiencyInTousseAmount = getUnqualified(false, departmentCode, insufficiencyInTousseSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** * 10 包内器械种类错误 */ Map typEerrorInTousseAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_TYPE_ERROR_IN_TOUSSE)){ - String[] typEerrorInTousseSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_TYPEERROR_INTOUSSE, ""); + String[] typEerrorInTousseSource = getModelSources(GoodsOption.MODEL_TYPEERROR_INTOUSSE, definitionList); typEerrorInTousseAmount = getUnqualified(false, departmentCode, typEerrorInTousseSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** * 11 包内化学指示卡不合格 */ Map model_chemicalindicatorcard_intousse_unqualifiedAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_CHEMICALINDICATORCARD_INTOUSSE_UNQUALIFIED)){ - String[] model_chemicalindicatorcard_intousse_unqualifiedSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_CHEMICALINDICATORCARD_INTOUSSE_UNQUALIFIED, ""); + String[] model_chemicalindicatorcard_intousse_unqualifiedSource = getModelSources(GoodsOption.MODEL_CHEMICALINDICATORCARD_INTOUSSE_UNQUALIFIED, definitionList); model_chemicalindicatorcard_intousse_unqualifiedAmount = getUnqualified(false, departmentCode, model_chemicalindicatorcard_intousse_unqualifiedSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** * 12 物品标识不正确 */ Map item_id_is_incorrectAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_ITEM_ID_IS_INCORRECT)){ - String[] item_id_is_incorrectSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_ITEM_ID_IS_INCORRECT, ""); + String[] item_id_is_incorrectSource = getModelSources(GoodsOption.MODEL_ITEM_ID_IS_INCORRECT, definitionList); item_id_is_incorrectAmount = getUnqualified(true, departmentCode, item_id_is_incorrectSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** * 13 灭菌失败 */ Map sterilization_failureAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_STERILIZATION_FAILURE)){ - String[] sterilization_failureSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_STERILIZATION_FAILURE, ""); + String[] sterilization_failureSource = getModelSources(GoodsOption.MODEL_STERILIZATION_FAILURE, definitionList); sterilization_failureAmount = getUnqualified(true, departmentCode, sterilization_failureSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** * 14 物品发放错误 */ Map item_invoice_errorAmount = null; if(dataIndexSources.contains(SupplyRoomQualityQuota.DATAINDEXSOURCE_ITEM_INVOICE_ERROR)){ - String[] item_invoice_errorSource = goodsOptionManager.getGoodsOptionValue(GoodsOption.MODEL_ITEM_INVOICE_ERROR, ""); + String[] item_invoice_errorSource = getModelSources(GoodsOption.MODEL_ITEM_INVOICE_ERROR, definitionList); item_invoice_errorAmount = getUnqualified(true, departmentCode, item_invoice_errorSource, month, SupplyRoomQualityQuota.DAY, startTime, endTime , firstDayToLastDay); } /** @@ -23418,6 +23419,74 @@ } return sterilizerUseAmountMap; } + /** + * 获取数据源对应的质量监测 为空就获取默认的质量监测 + * @param model 配置的数据源 + * @param list 质量监测 + * @return + */ + private String[] getModelSources(String model, List list){ + String[] source = goodsOptionManager.getGoodsOptionValue(model, ""); + if(source != null && source.length > 0){ + return source; + }//如果没设置 就找默认值 + if(list == null){ + list = qualityMonitoringDefinitionManager + .loadLastDeployFormDefinitionGroupByFormName("", FormDefinition.FOMRTYPE_QUALITYMONITORING, "",false); + if(CollectionUtils.isEmpty(list)){ + return source; + } + } + Set sourceNames = new HashSet(); + for (QualityMonitoringDefinition formDefinition : list) { + if(isDefaultValueOfGoodsOptionModel(model, formDefinition.getFormName())){ + sourceNames.add(formDefinition.getFormName()); + } + } + if(sourceNames.size() > 0){ + source = new String[sourceNames.size()]; + int i = 0; + for (String sourceName : sourceNames) { + source[i] = sourceName; + i++; + } + } + return source; + } + /** + * 判断质量监测是否是数据源的默认值 + * @param model 数据源 + * @param formName 质量监测名 + * @return + */ + private boolean isDefaultValueOfGoodsOptionModel(String model, String formName){ + if(GoodsOption.MODEL_WASHUNQUALIFIEDSOURCE.equals(model)){ + return formName.contains("清洗不合格") || formName.contains("清洗不合格"); + }else if(GoodsOption.MODEL_RECYCLINGTOUSSEERROR.equals(model)){ + return formName.contains("回收器械丢失"); + }else if(GoodsOption.MODEL_WETPACKETSUNQUALIFIEDSOURCE.equals(model)){ + return formName.contains("湿包"); + }else if(GoodsOption.MODEL_ONLY_PACKINGUNQUALIFIEDSOURCE.equals(model)){ + return formName.contains("包装密闭不合格"); + }else if(GoodsOption.MODEL_DISPOSABLEGOODS.equals(model)){ + return formName.contains("消毒物品不合格"); + }else if(GoodsOption.MODEL_MISSING_INTOUSSE.equals(model)){ + return formName.contains("包内器械缺失"); + }else if(GoodsOption.MODEL_INSUFFICIENCY_INTOUSSE.equals(model)){ + return formName.contains("包内器械功能不全"); + }else if(GoodsOption.MODEL_TYPEERROR_INTOUSSE.equals(model)){ + return formName.contains("包内器械种类错误"); + }else if(GoodsOption.MODEL_CHEMICALINDICATORCARD_INTOUSSE_UNQUALIFIED.equals(model)){ + return formName.contains("包内化学指示卡不合格"); + }else if(GoodsOption.MODEL_ITEM_ID_IS_INCORRECT.equals(model)){ + return formName.contains("包标识不正确"); + }else if(GoodsOption.MODEL_STERILIZATION_FAILURE.equals(model)){ + return formName.contains("灭菌失败"); + }else if(GoodsOption.MODEL_ITEM_INVOICE_ERROR.equals(model)){ + return formName.contains("物品发放错误"); + } + return false; + } @Override public List getSupplyRoomQualityQuota( String departmentCode, String queryScope, String queryTime, JSONArray dataConfigArr, Integer beginDateOfMonth, Set dataIndexSources