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 1df38a57..07b5e610 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/web/ArisXmlHandleWeb.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlHandleWeb.java index 03931439..122cd69f 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlHandleWeb.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlHandleWeb.java @@ -4,6 +4,7 @@ import com.actionsoft.apps.coe.pal.datamigration.aris.mapping.ModelMappingAPIMan import com.actionsoft.apps.coe.pal.datamigration.aris.model.*; import com.actionsoft.apps.coe.pal.datamigration.constant.Constant; import com.actionsoft.apps.coe.pal.datamigration.util.LogUtil; +import com.actionsoft.apps.coe.pal.datamigration.util.StrUtil; import com.actionsoft.bpms.util.UtilString; import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang.StringUtils; @@ -84,7 +85,7 @@ public class ArisXmlHandleWeb { path.add(groupMap.get(modelParent).getName()); getPath(path, groupMap.get(modelParent).getPid()); } - modelModel.setModelPath(StringUtils.join(path, "\\").replace(" ", "")); + modelModel.setModelPath(StrUtil.removeAllBlack(StringUtils.join(path, "\\"))); } } @@ -215,7 +216,7 @@ public class ArisXmlHandleWeb { String modifyUser = e.attributeValue("LastModifier"); ModelModel modelModel = new ModelModel(); modelModel.setId(id); - modelModel.setName(name.trim());// 去除两边空白 + modelModel.setName(StrUtil.removeAllBlack(name));// 去除两边空白 modelModel.setPid(pid); modelModel.setType(type); modelModel.setCreateTime(createTime); 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 da3652aa..e9bb7c76 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 @@ -811,6 +811,7 @@ public class ArisXmlImportRun { /** * 处理流程属性前后置流程 + * 测试不通过,需要梳理+重构 todo * * @param wsId * @param idRelationMap @@ -874,7 +875,7 @@ public class ArisXmlImportRun { propertyDao.insert(propertyModel); removeKey.add(key); removeKey.add(shapeId); - LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关前置流程进行处理关联,前置属性内容[" + repositoryModels.get(0).getName() + "]", fullLogFile); + LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关前置流程进行处理关联,前置属性内容[" + leadOrRearObj.getString("text") + "]", fullLogFile); break; } else if (tempShapeObj.getJSONObject("to").getString("id").equals(shapeId)) { // rear_process @@ -903,7 +904,7 @@ public class ArisXmlImportRun { propertyDao.insert(propertyModel); removeKey.add(key); removeKey.add(shapeId); - LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关后置流程进行处理关联,后置属性内容[" + repositoryModels.get(0).getName() + "]", fullLogFile); + LogUtil.appendLog(Constant.LOG_END + "PAL过程链图[" + arisModel.getName() + "]相关后置流程进行处理关联,后置属性内容[" + leadOrRearObj.getString("text") + "]", fullLogFile); break; } else { continue; diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/ProcessUtil.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/ProcessUtil.java index 3b7ac0d1..ddf0e05e 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/ProcessUtil.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/ProcessUtil.java @@ -23,6 +23,8 @@ import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang.StringUtils; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; public class ProcessUtil { @@ -241,7 +243,7 @@ public class ProcessUtil { propertyModels = propertyModels.stream().filter(item -> Constant.METHOD_ARIS_URL.equals(item.getPropertyId())).collect(Collectors.toList()); Map map = new HashMap<>(); for (PALRepositoryPropertyModel prop : propertyModels) { - map.put(prop.getPlId(), prop.getPropertyValue().replace(" ", ""));// 去除空格 + map.put(prop.getPlId(), StrUtil.removeAllBlack(prop.getPropertyValue()));// 去除空格 } for (PALRepositoryModel model : list) { if (map.containsKey(model.getId())) { diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/StrUtil.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/StrUtil.java new file mode 100644 index 00000000..cc8f3f6f --- /dev/null +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/util/StrUtil.java @@ -0,0 +1,14 @@ +package com.actionsoft.apps.coe.pal.datamigration.util; + +public class StrUtil { + + /** + * 去除字符串所有空格,增加处理特殊空格(ASCII码值为160) + * @param str + * @return + */ + public static String removeAllBlack(String str) { + return str == null ? "" : str.replaceAll("\\u00A0+", "").replace(" ", ""); + } + +}