diff --git a/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar b/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar index f331ff51..80c08677 100644 Binary files a/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar and b/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar differ diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/constant/ArisConstant.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/constant/ArisConstant.java index 70dc70e5..6e7b431d 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/constant/ArisConstant.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/constant/ArisConstant.java @@ -16,6 +16,7 @@ public class ArisConstant { public final static String IMPORT_LOG_FILE_SUCCESS = "successImport.log";// 导入成功日志单独记录,只记录pal流程名称与对应的Aris地址,客户需要 + public final static String IMPORT_LOG_FILE_MATCH_ERR = "matchErrImport.log";// 导入aris流程匹配失败的 public final static String ARIS_ROOT_PATH = "\\伊利集团业务流程管理平台"; diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportRun.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportRun.java index f9a41574..9d67a67a 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportRun.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportRun.java @@ -59,6 +59,7 @@ public class ArisXmlImportRun { private File fullLogFile; private File warnLogFile; private File successLogFile;// 客户特殊需要,记录成功日志 + private File matchErrImportFile;// 匹配失败记录 private String filePath; private String fileName; private long startTime; @@ -78,8 +79,10 @@ public class ArisXmlImportRun { this.startTime = startTime; // 单独创建一个成功日志 successLogFile = new File(fullLogFile.getParentFile().getPath() + File.separator + ArisConstant.IMPORT_LOG_FILE_SUCCESS); + matchErrImportFile = new File(fullLogFile.getParentFile().getPath() + File.separator + ArisConstant.IMPORT_LOG_FILE_MATCH_ERR); try { successLogFile.createNewFile(); + matchErrImportFile.createNewFile(); } catch (IOException e) { e.printStackTrace(); } @@ -173,6 +176,7 @@ public class ArisXmlImportRun { // 空模型当作警告处理,全部记录 LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程" + "[" + arisModel.getName() + "]内容为空,忽略导入", simpleLogFile, fullLogFile, warnLogFile); LogUtil.appendLog(Constant.LOG_DESC + "该流程所属路径:" + arisPath); + LogUtil.appendLog("[ARIS流程为空]ARIS流程" + "[" + arisModel.getName() + "],ARIS地址[" + arisPath + "]", matchErrImportFile); LogRealTimeCountCache.getCache().get(logId).setArisBlankCount(LogRealTimeCountCache.getCache().get(logId).getArisBlankCount() + 1); continue; } @@ -185,7 +189,7 @@ public class ArisXmlImportRun { String palId = entry.getKey(); palModel = PALRepositoryCache.getCache().get(palId); flag = true; - // 匹配成功不记录到警告日志中 + // 匹配成功 LogUtil.appendLog(Constant.LOG_END + "ARIS流程" + "[" + arisModel.getName() + "]与PAL过程链图" + "[" + palModel.getName() + "]匹配", simpleLogFile, fullLogFile); LogUtil.appendLog(Constant.LOG_DESC + "ARIS流程所属路径:" + arisPath, simpleLogFile, fullLogFile); LogUtil.appendLog(Constant.LOG_DESC + "PAL过程链图所属路径:" + ProcessUtil.getRepositoryPath(palModel.getId()), simpleLogFile, fullLogFile); @@ -196,6 +200,7 @@ public class ArisXmlImportRun { if (!flag) { LogUtil.appendLog(Constant.LOG_WARNING + "ARIS流程" + "[" + arisModel.getName() + "]未匹配到PAL过程链图", simpleLogFile, fullLogFile, warnLogFile); LogUtil.appendLog(Constant.LOG_DESC + "ARIS流程所属路径:" + arisPath, simpleLogFile, fullLogFile, warnLogFile); + LogUtil.appendLog("[未匹配到]ARIS流程" + "[" + arisModel.getName() + "],ARIS地址[" + arisPath + "]", matchErrImportFile); LogRealTimeCountCache.getCache().get(logId).setMatchFieldCount(LogRealTimeCountCache.getCache().get(logId).getMatchFieldCount() + 1); continue; } @@ -216,6 +221,7 @@ public class ArisXmlImportRun { LogUtil.appendLog(Constant.LOG_WARNING + "匹配到的PAL过程链图模型已存在数据,不允许导入,忽略", simpleLogFile, fullLogFile, warnLogFile); LogUtil.appendLog(Constant.LOG_DESC + "ARIS流程所属路径:" + arisPath, simpleLogFile, fullLogFile); LogUtil.appendLog(Constant.LOG_DESC + "PAL过程链图所属路径:" + ProcessUtil.getRepositoryPath(palModel.getId()), simpleLogFile, fullLogFile); + LogUtil.appendLog("[PAL已存在内容]PAL流程["+ palModel.getName() + "]ARIS流程" + "[" + arisModel.getName() + "],ARIS地址[" + arisPath + "]", matchErrImportFile); LogRealTimeCountCache.getCache().get(logId).setPalExistsCount(LogRealTimeCountCache.getCache().get(logId).getPalExistsCount() + 1); continue; } diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportWeb.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportWeb.java index 94171e12..cc1458af 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportWeb.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportWeb.java @@ -265,7 +265,9 @@ public class ArisXmlImportWeb extends ActionWeb { } } if (flag) { - ro.err("Aris xml文件中存在多个流程同属于一个架构路径,详情查看日志"); + msg = "Aris xml文件中存在多个流程同属于一个架构路径,详情查看日志"; + updateErrLog(msg, msg); + ro.err(msg); return ro.toString(); } LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验Aris EPC流程路径唯一性]", simpleLogFile, fullLogFile); @@ -298,7 +300,9 @@ public class ArisXmlImportWeb extends ActionWeb { } } if (flag) { - ro.err("PAL 文件属性ARIS地址内容存在重复,详情查看日志"); + msg = "PAL 文件属性ARIS地址内容存在重复,详情查看日志"; + updateErrLog(msg, msg); + ro.err(msg); return ro.toString(); } LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验PAL EPC文件属性ARIS地址唯一性]", simpleLogFile, fullLogFile);