作者 朱兆平

优化READER

... ... @@ -53,11 +53,15 @@ public class IMFReader extends Thread {
try {
String stype_value = XMPParse.getNodeValueFromXmlString(message, "/MSG/META/STYP");
fileName = path + stype_value + "_" + Utils.dateToStr(dt, "yyyyMMddhhmmssSSS") + ".xml";
Utils.saveFile(fileName, message);
dao.saveRecord("ALL", "FIMS", message);
logger.info("created " + fileName + " ok");
String type_value = XMPParse.getNodeValueFromXmlString(message, "/MSG/META/TYPE");
String sender_value = XMPParse.getNodeValueFromXmlString(message, "/MSG/META/SNDR");
// fileName = path + stype_value + "_" + Utils.dateToStr(dt, "yyyyMMddhhmmssSSS") + ".xml";
// Utils.saveFile(fileName, message);
dao.saveRecord("ALL", sender_value, message,type_value,stype_value);
// logger.info("created " + fileName + " ok");
} catch (Exception var7) {
//出错的报文存储到报文目录
fileName = path + Utils.dateToStr(dt, "yyyyMMddhhmmssSSS") + ".txt";
Utils.saveFile(fileName, message);
logger.warn("created " + fileName + " ok");
... ...