Index: ssts-web/src/main/java/com/forgon/disinfectsystem/excel/service/CommonImportManagerImpl.java =================================================================== diff -u -r21698 -r21791 --- ssts-web/src/main/java/com/forgon/disinfectsystem/excel/service/CommonImportManagerImpl.java (.../CommonImportManagerImpl.java) (revision 21698) +++ ssts-web/src/main/java/com/forgon/disinfectsystem/excel/service/CommonImportManagerImpl.java (.../CommonImportManagerImpl.java) (revision 21791) @@ -209,6 +209,11 @@ json.put("isSuccess", false); return json; } + //如果po既不是容器、也不是供应商、也不是清洗程序、也不是灭菌程序类型时 + if(!(po instanceof Container) && !(po instanceof Supplier) && (po instanceof CleanMethod) && (po instanceof Sterilisation)){ + json.put("isSuccess", false); + json.put("errorType", com.forgon.disinfectsystem.common.Constants.ERROR_TYPE_NOT_DEFINED); + } for (short i = 0; i < lastColNumber; i++) { String currentPropertyName = indexAndPoPropertyNameMap.get(i + ""); if (StringUtils.isNotBlank(currentPropertyName)) { @@ -267,10 +272,8 @@ json.put("isSuccess", true); json.put("errorType", com.forgon.disinfectsystem.common.Constants.ERROR_TYPE_SUCCESS); } - }else{ - json.put("isSuccess", false); - json.put("errorType", com.forgon.disinfectsystem.common.Constants.ERROR_TYPE_NOT_DEFINED); } + try { if (value != null && value.endsWith(".00")) { value = value.substring(0, value.length() - 3);