Index: ssts-maintain/src/main/java/com/forgon/disinfectsystem/maintain/device/service/Melag43BPlusManagerImpl.java =================================================================== diff -u -r37833 -r37843 --- ssts-maintain/src/main/java/com/forgon/disinfectsystem/maintain/device/service/Melag43BPlusManagerImpl.java (.../Melag43BPlusManagerImpl.java) (revision 37833) +++ ssts-maintain/src/main/java/com/forgon/disinfectsystem/maintain/device/service/Melag43BPlusManagerImpl.java (.../Melag43BPlusManagerImpl.java) (revision 37843) @@ -203,8 +203,8 @@ objectDao.save(record); objectDao.excuteSQL(" update " + SterilizationRecord.class.getSimpleName() + " set sterilizationParaType=" + SterilizationRecord.STERILIZATIONPARATYPE_MELAG_43B_PLUS + " where id="+record.getSterilizationRecordId()); commonFileManager.moveFile(remoteType, name, ftp, ftpFileManager.getCurrentPath(ftp), backUpPath, session, smbForm,false); + readedFileAmount++; } - readedFileAmount++; } } } catch (Exception e) { @@ -365,7 +365,7 @@ BufferedReader br = null; String fileName = null; Long sterilizationRecordId = null; - Melag43BPlusSterilizerRecord record = null; + Melag43BPlusSterilizerRecord record = new Melag43BPlusSterilizerRecord(); String line = ""; try { if(DeviceInterface.INTERFACETYPE_FTP.equals(remoteType)){ @@ -393,7 +393,6 @@ line = line.trim(); if(line.startsWith("!0 ")){ //标识号 - record = new Melag43BPlusSterilizerRecord(); String identification = line.replace("!0 ", "").trim(); record.setIdentification(identification ); }else if(line.startsWith("!1 ")){ @@ -645,6 +644,10 @@ Melag43BPlusStageDetails detail = buildMelag43BPlusStageDetails(line, record); record.getDetails().add(detail); } + if(line.startsWith(SP_E)){ + //到达完成阶段,不需要再读取后续内容 + break; + } }else{ usefulLine = false; } @@ -677,9 +680,11 @@ } } } catch (FileNotFoundException e) { + record = null; logger.warn(e.getMessage()); e.printStackTrace(); } catch (IOException e) { + record = null; logger.warn(e.getMessage()); e.printStackTrace(); if(enableDetailedDeviceInformation){ @@ -688,6 +693,7 @@ devInterface.getName() + "设备接口连接异常," + e.getMessage()); } } catch(Exception e){ + record = null; logger.warn(e.getMessage()); e.printStackTrace(); if(enableDetailedDeviceInformation){