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 f85fd461..153de592 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/ArisXmlImportRun.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/aris/web/ArisXmlImportRun.java index 9d67a67a..c39a1ac1 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 @@ -51,18 +51,18 @@ import java.util.stream.Collectors; public class ArisXmlImportRun { - private UserContext uc; - private String wsId; - private String logId; - private String logPath; - private File simpleLogFile; - private File fullLogFile; - private File warnLogFile; - private File successLogFile;// 客户特殊需要,记录成功日志 - private File matchErrImportFile;// 匹配失败记录 - private String filePath; - private String fileName; - private long startTime; + private final UserContext uc; + private final String wsId; + private final String logId; + private final String logPath; + private final File simpleLogFile; + private final File fullLogFile; + private final File warnLogFile; + private final File successLogFile;// 客户特殊需要,记录成功日志 + private final File matchErrImportFile;// 匹配失败记录 + private final String filePath; + private final String fileName; + private final long startTime; private long endTime; @@ -142,12 +142,12 @@ public class ArisXmlImportRun { // 获取所有PAL EPC的模型 Map palArisPropValMap = ProcessUtil.getPalRepositoryArisPathMap(wsId); - LogUtil.appendLog("\n" + Constant.LOG_START + "开始查询PAL流程清单的所有ARIS地址属性内容", fullLogFile); + LogUtil.appendLog("\n" + Constant.LOG_START + "开始查询PAL流程清单的所有ARIS地址+名称属性内容", fullLogFile); for (Map.Entry entry : palArisPropValMap.entrySet()) { - LogUtil.appendLog("名称:---" + PALRepositoryCache.getCache().get(entry.getKey()).getName() + "---,ARIS地址:----" + entry.getValue() + "----", fullLogFile); + LogUtil.appendLog("名称:---" + PALRepositoryCache.getCache().get(entry.getKey()).getName() + "---,ARIS地址+名称:----" + entry.getValue() + "----", fullLogFile); } - LogUtil.appendLog("\n" + Constant.LOG_END + "开始查询PAL流程清单的所有ARIS地址属性内容", fullLogFile); + LogUtil.appendLog("\n" + Constant.LOG_END + "开始查询PAL流程清单的所有ARIS地址+名称属性内容", fullLogFile); @@ -161,7 +161,7 @@ public class ArisXmlImportRun { int totalCount = LogRealTimeCountCache.getCache().get(logId).getTotalCount(); for (int i = 0; i < arisEpcModelList.size(); i++) { ModelModel arisModel = arisEpcModelList.get(i); - String arisPath = ArisConstant.ARIS_ROOT_PATH + arisModel.getModelPath(); + String arisPath = ArisConstant.ARIS_ROOT_PATH + arisModel.getModelPath() + "\\" + arisModel.getName(); int importingCount = i + 1;// 当前是导入的第几个 LogRealTimeCountCache.getCache().get(logId).setImportingCount(importingCount);// 当前记录缓存 // 当前正在导入的流程全部日志记录,方便对照 @@ -176,7 +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); + LogUtil.appendLog("[ARIS流程为空]ARIS流程" + "[" + arisModel.getName() + "],ARIS地址+名称[" + arisPath + "]", matchErrImportFile); LogRealTimeCountCache.getCache().get(logId).setArisBlankCount(LogRealTimeCountCache.getCache().get(logId).getArisBlankCount() + 1); continue; } @@ -200,7 +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); + LogUtil.appendLog("[未匹配到]ARIS流程" + "[" + arisModel.getName() + "],ARIS地址+名称[" + arisPath + "]", matchErrImportFile); LogRealTimeCountCache.getCache().get(logId).setMatchFieldCount(LogRealTimeCountCache.getCache().get(logId).getMatchFieldCount() + 1); continue; } @@ -221,7 +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); + LogUtil.appendLog("[PAL已存在内容]PAL流程["+ palModel.getName() + "]ARIS流程" + "[" + arisModel.getName() + "],ARIS地址+名称[" + arisPath + "]", matchErrImportFile); LogRealTimeCountCache.getCache().get(logId).setPalExistsCount(LogRealTimeCountCache.getCache().get(logId).getPalExistsCount() + 1); continue; } @@ -330,7 +330,7 @@ public class ArisXmlImportRun { LogUtil.appendLog("\n" + Constant.LOG_END + "导入ARIS流程" + "[" + arisModel.getName() + "]", simpleLogFile, fullLogFile, warnLogFile); - LogUtil.appendLog(Constant.LOG_END + "导入成功的PAL流程" + "[" + palModel.getName() + "],ARIS地址[ " + palArisPropValMap.get(palModel.getId()) + " ]", successLogFile); + LogUtil.appendLog(Constant.LOG_END + "导入成功的PAL流程" + "[" + palModel.getName() + "],ARIS地址+名称[ " + palArisPropValMap.get(palModel.getId()) + " ]", successLogFile); } endTime = System.currentTimeMillis(); Timestamp endDate = new Timestamp(endTime); 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 cc1458af..5b9852e3 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 @@ -57,7 +57,7 @@ public class ArisXmlImportWeb extends ActionWeb { private File warnLogFile; private String filePath; private String fileName; - private long startTime = System.currentTimeMillis(); + private final long startTime = System.currentTimeMillis(); // Timestamp startDate = new Timestamp(System.currentTimeMillis()); @@ -249,28 +249,28 @@ public class ArisXmlImportWeb extends ActionWeb { arisEpcPathMap.get(model.getModelPath()).add(model.getId()); } - LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][校验ARIS EPC流程路径唯一性]Aris xml EPC流程所属目录唯一性************", simpleLogFile, fullLogFile); - +// LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][校验ARIS EPC流程路径唯一性]Aris xml EPC流程所属目录唯一性************", simpleLogFile, fullLogFile); +// boolean flag = false; - for (Map.Entry> entry : arisEpcPathMap.entrySet()) { - if (entry.getValue().size() > 1) { - Set modelIds = entry.getValue(); - for (String arisModelId : modelIds) { - ModelModel model = handleWeb.modelMap.get(arisModelId); - String name = model.getName(); - String path = ArisConstant.ARIS_ROOT_PATH + model.getModelPath(); - LogUtil.appendLog(Constant.LOG_ERROR + "ARIS XML中流程[" + name + "]所属目录重复,所属目录[" + path + "]", simpleLogFile, fullLogFile, warnLogFile); - } - flag = true; - } - } - if (flag) { - msg = "Aris xml文件中存在多个流程同属于一个架构路径,详情查看日志"; - updateErrLog(msg, msg); - ro.err(msg); - return ro.toString(); - } - LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验Aris EPC流程路径唯一性]", simpleLogFile, fullLogFile); +// for (Map.Entry> entry : arisEpcPathMap.entrySet()) { +// if (entry.getValue().size() > 1) { +// Set modelIds = entry.getValue(); +// for (String arisModelId : modelIds) { +// ModelModel model = handleWeb.modelMap.get(arisModelId); +// String name = model.getName(); +// String path = ArisConstant.ARIS_ROOT_PATH + model.getModelPath(); +// LogUtil.appendLog(Constant.LOG_ERROR + "ARIS XML中流程[" + name + "]所属目录重复,所属目录[" + path + "]", simpleLogFile, fullLogFile, warnLogFile); +// } +// flag = true; +// } +// } +// if (flag) { +// msg = "Aris xml文件中存在多个流程同属于一个架构路径,详情查看日志"; +// updateErrLog(msg, msg); +// ro.err(msg); +// return ro.toString(); +// } +// LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验Aris EPC流程路径唯一性]", simpleLogFile, fullLogFile); // 校验pal aris地址属性路径是否存在重复问题 // 获取所有PAL EPC的模型 @@ -284,7 +284,7 @@ public class ArisXmlImportWeb extends ActionWeb { palEpcArisPathMap.get(entry.getValue()).add(entry.getKey()); } - LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][校验PAL EPC文件属性ARIS地址唯一性]PAL EPC流程文件属性ARIS地址唯一性************", simpleLogFile, fullLogFile); + LogUtil.appendLog("\n" + Constant.LOG_START + "************[执行阶段][校验PAL EPC文件属性ARIS地址+名称唯一性]PAL EPC流程文件属性ARIS地址+名称唯一性************", simpleLogFile, fullLogFile); flag = false; for (Map.Entry> entry : palEpcArisPathMap.entrySet()) { @@ -294,18 +294,18 @@ public class ArisXmlImportWeb extends ActionWeb { PALRepositoryModel plModel = PALRepositoryCache.getCache().get(id); String name = plModel.getName(); String path = ProcessUtil.getRepositoryPath(id); - LogUtil.appendLog(Constant.LOG_ERROR + "PAL中流程[" + name + "][V" + plModel.getVersion() + "]文件属性ARIS地址属性内容重复,属性内容[" + path + "]", simpleLogFile, fullLogFile, warnLogFile); + LogUtil.appendLog(Constant.LOG_ERROR + "PAL中流程[" + name + "][V" + plModel.getVersion() + "]文件属性ARIS地址+名称属性内容重复,属性内容[" + path + "]", simpleLogFile, fullLogFile, warnLogFile); } flag = true; } } if (flag) { - msg = "PAL 文件属性ARIS地址内容存在重复,详情查看日志"; + msg = "PAL 文件属性ARIS地址+名称内容存在重复,详情查看日志"; updateErrLog(msg, msg); ro.err(msg); return ro.toString(); } - LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验PAL EPC文件属性ARIS地址唯一性]", simpleLogFile, fullLogFile); + LogUtil.appendLog(Constant.LOG_END + "[执行阶段][校验PAL EPC文件属性ARIS地址+名称唯一性]", simpleLogFile, fullLogFile); // 存储缓存,导入计数 @@ -374,7 +374,7 @@ public class ArisXmlImportWeb extends ActionWeb { private ResponseObject checkMethodConfig(String wsId) { // 校验EPC图的文件属性 // 校验前置流程、后置流程 - ResponseObject checkRo = checkMethodAttrExist(wsId, Constant.PROCESS_EPC, null, Constant.METHOD_PRE_PROCESS, Constant.METHOD_NEXT_PROCESS, Constant.METHOD_ARIS_URL); + ResponseObject checkRo = checkMethodAttrExist(wsId, Constant.PROCESS_EPC, null, Constant.METHOD_PRE_PROCESS, Constant.METHOD_NEXT_PROCESS, Constant.METHOD_ARIS_URL, Constant.METHOD_ARIS_NAME); if (checkRo.isErr()) { return checkRo; } diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/constant/Constant.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/constant/Constant.java index 64c0fa19..e9223311 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/constant/Constant.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/constant/Constant.java @@ -56,6 +56,8 @@ public class Constant { // public static final String METHOD_ARIS_URL = "ARISURL"; public static final String METHOD_ARIS_URL = "ARIS"; + public static final String METHOD_ARIS_NAME = "ARIS_process_name"; + // 建模属性代码--IT系统别名 public static final String METHOD_OTHER_NAME = "otherName"; 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 9e696363..6a493c02 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 @@ -17,6 +17,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil; import com.actionsoft.apps.lifecycle.api.AppsAPIManager; import com.actionsoft.apps.resource.AppContext; import com.actionsoft.bpms.server.UserContext; +import com.actionsoft.bpms.util.UtilString; import com.actionsoft.i18n.I18nRes; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -239,15 +240,31 @@ public class ProcessUtil { } } PALRepositoryPropertyDao dao = new PALRepositoryPropertyDao(); + // aris地址 List propertyModels = dao.queryByWsId(wsId); propertyModels = propertyModels.stream().filter(item -> Constant.METHOD_ARIS_URL.equals(item.getPropertyId())).collect(Collectors.toList()); - Map map = new HashMap<>(); + // aris流程名称 + List arisNameModels = dao.queryByWsId(wsId); + arisNameModels = arisNameModels.stream().filter(item -> Constant.METHOD_ARIS_NAME.equals(item.getPropertyId())).collect(Collectors.toList()); + + Map arisPathMap = new HashMap<>(); for (PALRepositoryPropertyModel prop : propertyModels) { - map.put(prop.getPlId(), StrUtil.removeAllBlack(prop.getPropertyValue()));// 去除空格 + arisPathMap.put(prop.getPlId(), StrUtil.removeAllBlack(prop.getPropertyValue()));// 去除空格 + } + Map arisNameMap = new HashMap<>(); + for (PALRepositoryPropertyModel prop : arisNameModels) { + arisNameMap.put(prop.getPlId(), StrUtil.removeAllBlack(prop.getPropertyValue()));// 去除空格 } for (PALRepositoryModel model : list) { - if (map.containsKey(model.getId())) { - propValMap.put(model.getId(), map.get(model.getId())); + if (arisPathMap.containsKey(model.getId()) && arisNameMap.containsKey(model.getId())) { + List pathList = new ArrayList<>(); + if (UtilString.isNotEmpty(arisPathMap.get(model.getId()))) { + pathList.add(arisPathMap.get(model.getId())); + } + if (UtilString.isNotEmpty(arisNameMap.get(model.getId()))) { + pathList.add(arisNameMap.get(model.getId())); + } + propValMap.put(model.getId(), StringUtils.join(pathList, "\\")); } } return propValMap; diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index d1c792c3..8e12f271 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/manifest.xml b/com.actionsoft.apps.coe.pal/manifest.xml index 428447bc..cf1a9a63 100755 --- a/com.actionsoft.apps.coe.pal/manifest.xml +++ b/com.actionsoft.apps.coe.pal/manifest.xml @@ -73,7 +73,7 @@ AWS PAL(Process Asset Library)流程资产库是AWS CoE平台的重要产品组 false true duty_r - false + false true true diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index 44286eb5..64c83f41 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -7,10 +7,6 @@ import com.actionsoft.apps.coe.pal.cooperation.cache.CooperationCache; import com.actionsoft.apps.coe.pal.cooperation.constant.CoeCooperationConst; import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationMemberModel; import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationTeamModel; -import com.actionsoft.apps.coe.pal.datamigration.aris.model.ObjDefModel; -import com.actionsoft.apps.coe.pal.datamigration.aris.model.ObjOccModel; -import com.actionsoft.apps.coe.pal.datamigration.constant.Constant; -import com.actionsoft.apps.coe.pal.datamigration.util.LogUtil; import com.actionsoft.apps.coe.pal.log.CoEOpLogAPI; import com.actionsoft.apps.coe.pal.log.CoEOpLogConst; import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil; @@ -135,7 +131,7 @@ import java.util.*; import java.util.stream.Collectors; public class CoeProcessLevelWeb extends ActionWeb { - private UserContext _uc; + private final UserContext _uc; private String sysAppPlatform; private String value; @@ -4665,7 +4661,7 @@ public class CoeProcessLevelWeb extends ActionWeb { sBuilder.append(bean.getName()); idSets.add(coeProcessLevelModel.getId()); getFilePath(coeProcessLevelModel, sBuilder,idSets);// 递归获取当前文件名称路径 - bean.setUi("
" + sBuilder.toString() + "
"); + bean.setUi("
" + sBuilder + "
"); list.add(bean); } if (list != null && list.size() > 0) { diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js index be10c482..840103d8 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js @@ -293,113 +293,118 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { for (var index = 0; index < attributesJsonArray.length; index++) { var obj = attributesJsonArray[index]; if (obj != null && obj != undefined && obj.value != undefined) { - var constr = ''; - /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ obj.value + ''; - constr += ''; - if ((!obj.readonly && obj.type == "string") - || (!obj.readonly && obj.type == "list")) { - // 目前支持到文本的输入 ,需求定下了再改 - constr = ''; + if(obj.name=="活动序号"){ + break; + } + var constr = ''; /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ obj.value + ''; - constr += ''; - } else if(!obj.readonly && obj.type == "link") { - constr = ''; - /*constr += '' + obj.name + '';*/ - // constr += '' + obj.value + ''; - constr += '' + obj.name +':'+ '' + obj.value + '' + ''; - constr += ''; - } else if (!obj.readonly && obj.type == "number") { - constr = ''; - /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ obj.value + ''; - constr += ''; - } else if (!obj.readonly && obj.type == "boolean") { - constr = ''; - /*constr += '' + obj.name + '';*/ - constr += ''+ obj.name +':'+''; - constr += ''; - } else if (!obj.readonly && obj.type == "textarea") { - constr = ''; - /*constr += '' + obj.name + '';*/ - if (obj.value == undefined) { - obj.value = ''; - } - constr += '' + obj.name +':'+ obj.value.replace(/\n/g,'
') + ''; - constr += ''; - } else if (obj.readonly && obj.type == "relation") { - var relationValue = ""; - if(relationShapesData[shape.id] !==null && relationShapesData[shape.id][obj.id] != null) { - relationValue = relationShapesData[shape.id][obj.id]; - } - constr = ''; - /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ relationValue + ''; - constr += ''; - } else if (obj.type == "select" || obj.type == "select_m") { - constr = ''; - /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ obj.value + ''; + constr += '' + obj.name + ':' + obj.value + ''; constr += ''; + if ((!obj.readonly && obj.type == "string") + || (!obj.readonly && obj.type == "list")) { + // 目前支持到文本的输入 ,需求定下了再改 + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + obj.value + ''; + constr += ''; + } else if (!obj.readonly && obj.type == "link") { + constr = ''; + /*constr += '' + obj.name + '';*/ + // constr += '' + obj.value + ''; + constr += '' + '【活动描述】' + obj.name + ':' + '' + obj.value + '' + ''; + constr += ''; + } else if (!obj.readonly && obj.type == "number") { + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + obj.value + ''; + constr += ''; + } else if (!obj.readonly && obj.type == "boolean") { + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + ''; + constr += ''; + } else if (!obj.readonly && obj.type == "textarea") { + constr = ''; + /*constr += '' + obj.name + '';*/ + if (obj.value == undefined) { + obj.value = ''; + } + constr += '' + '【活动描述】' + obj.name + ':' + obj.value.replace(/\n/g, '
') + ''; + constr += ''; + } else if (obj.readonly && obj.type == "relation") { + var relationValue = ""; + if (relationShapesData[shape.id] !== null && relationShapesData[shape.id][obj.id] != null) { + relationValue = relationShapesData[shape.id][obj.id]; + } + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + relationValue + ''; + constr += ''; + } else if (obj.type == "select" || obj.type == "select_m") { + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + obj.value + ''; + constr += ''; - selectFlag = true; - var selectValue = { "objId" : obj.id, - "objValue" : obj.value, - "objType": obj.type}; - selectValues.push(selectValue); - }else if (obj.readonly && obj.type == "userAddress") { - userAddress = true; - userObjIds.push(obj.id); - var relationValue = ""; - if(relationShapesData[shape.id] !==null && relationShapesData[shape.id][obj.id] != null) { - relationValue = relationShapesData[shape.id][obj.id]; + selectFlag = true; + var selectValue = { + "objId": obj.id, + "objValue": obj.value, + "objType": obj.type + }; + selectValues.push(selectValue); + } else if (obj.readonly && obj.type == "userAddress") { + userAddress = true; + userObjIds.push(obj.id); + var relationValue = ""; + if (relationShapesData[shape.id] !== null && relationShapesData[shape.id][obj.id] != null) { + relationValue = relationShapesData[shape.id][obj.id]; + } + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + relationValue + ''; + constr += ''; + } else if (obj.readonly && obj.type == "deptAddress") { + deptAddress = true; + deptObjIds.push(obj.id); + deptIds += "," + obj.value; + var relationValue = ""; + if (relationShapesData[shape.id] !== null && relationShapesData[shape.id][obj.id] != null) { + relationValue = relationShapesData[shape.id][obj.id]; + } + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + relationValue + ''; + constr += ''; + } else if (obj.readonly && obj.type == "awsorg") { + var relationValue = ""; + if (relationShapesData[shape.id] !== null && relationShapesData[shape.id][obj.id] != null) { + relationValue = relationShapesData[shape.id][obj.id]; + } + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + relationValue + ''; + constr += ''; + } else if (obj.readonly && obj.type == "hidden") { + constr = '' + + ' ' + obj.name + '' + + ' ' + + ' ' + //+ '
' + + ''; + } else if (obj.type == "table") { + let tableInput = '请输入' + if (obj.value.table.length > 1) { + tableInput = '请查看' + } + constr = ''; + /*constr += '' + obj.name + '';*/ + constr += '' + '【活动描述】' + obj.name + ':' + ' ' + tableInput + '' + ''; + constr += ''; } - constr = ''; - /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ relationValue + ''; - constr += ''; - } else if (obj.readonly && obj.type == "deptAddress") { - deptAddress = true; - deptObjIds.push(obj.id); - deptIds += "," + obj.value; - var relationValue = ""; - if(relationShapesData[shape.id] !==null && relationShapesData[shape.id][obj.id] != null) { - relationValue = relationShapesData[shape.id][obj.id]; - } - constr = ''; - /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ relationValue + ''; - constr += ''; - } else if (obj.readonly && obj.type == "awsorg") { - var relationValue = ""; - if(relationShapesData[shape.id] !==null && relationShapesData[shape.id][obj.id] != null) { - relationValue = relationShapesData[shape.id][obj.id]; - } - constr = ''; - /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ relationValue + ''; - constr += ''; - } else if (obj.readonly && obj.type == "hidden") { - constr = '' - + ' ' + obj.name + '' - + ' ' - + ' ' - //+ '
' - + ''; - } else if (obj.type == "table") { - let tableInput = '请输入' - if(obj.value.table.length > 1) { - tableInput = '请查看' - } - constr = ''; - /*constr += '' + obj.name + '';*/ - constr += '' + obj.name +':'+ ' ' + tableInput + '' + ''; - constr += ''; } $('#' + tbodyId + ' table[name=' + shape.id + ']').append(constr); } - } if (selectFlag) { getSelectOptions(shape.category, selectValues); //处理select类型 } @@ -1452,7 +1457,7 @@ function initProcessDesc() { for(var i = 1; i <= length; i++) { var obj = processDesc[i]; t += ''; - t += '
' + obj.name + ':
'; + t += '
' +'【流程属性】'+ obj.name + ':
'; var value = obj.value; if (value == undefined) { value = ''; @@ -1485,6 +1490,7 @@ function initProcessDesc() { } function autoClickAttr() { + // 属性自动切换 if ($('#openTab').is(':hidden')) { var name = ''; @@ -1657,14 +1663,14 @@ function sortModelByNumber() { // 序号升序,无序号在后面 var recordId = []; var hasNumArr = []; - for (var shapeId in Model.define.elements) { + /*for (var shapeId in Model.define.elements) { var shape = Model.define.elements[shapeId]; for (var i = 0; i < shape.dataAttributes.length; i++) { var attrArr = shape.dataAttributes[i]; if (attrArr.attributesJsonArray && attrArr.attributesJsonArray.length > 0) { for (var j = 0; j < attrArr.attributesJsonArray.length; j++) { var attr = attrArr.attributesJsonArray[j]; - /*if (attr != null && attr.id && attr.id == 'number') { + if (attr != null && attr.id && attr.id == 'number') { var number = attr.value; if(typeof number == 'string') { number = number.replace(/^\s+|\s+$/g,"") @@ -1678,33 +1684,52 @@ function sortModelByNumber() { recordId.push(shapeId); } break; - }*/ - - - //根据活动序号排序 - if (attr != null && attr.id) { - var number = attr.value; - if(attr.id=="activity_number"){ - if(typeof number == 'string') { - number = number.replace(/^\s+|\s+$/g,"") - }; - if(number != undefined && number != null && number != "") { - var obj = {}; - obj.text = shape.text; - obj.id = shapeId; - obj.orderIndex = number; - hasNumArr.push(obj); - recordId.push(shapeId); - } - } - break; } + + } break; } } + }*/ + + /*******************************排序方法重构***by zhaolei**********************************************/ + for (var shapeId in Model.define.elements) { + var shape = Model.define.elements[shapeId]; + for (var i = 0; i < shape.dataAttributes.length; i++) { + var attrArr = shape.dataAttributes[i]; + if (attrArr.attributesJsonArray && attrArr.attributesJsonArray.length > 0) { + for (var j = 0; j < attrArr.attributesJsonArray.length; j++) { + var attr = attrArr.attributesJsonArray[j]; + + //根据活动序号排序 + if (attr != null && attr.id) { + if(attr.id=="activity_number"){ + var number = attr.value; + var subNumer=number< 10 ? number.substr(1,1) : number; + + if(typeof subNumer == 'string') { + subNumer = subNumer.replace(/^\s+|\s+$/g,"") + }; + if(subNumer != undefined && subNumer != null && subNumer != "") { + var obj = {}; + obj.text = shape.text; + obj.id = shapeId; + obj.orderIndex = subNumer; + hasNumArr.push(obj); + recordId.push(shapeId); + } + } + } + + + + } + } + } } + // 有序号的元素升序排序 var compare = function (obj1, obj2) { var val1 = obj1.orderIndex; @@ -1717,14 +1742,17 @@ function sortModelByNumber() { return 0; } } + + hasNumArr.sort(compare); - for (var shapeId in Model.define.elements) { + /*for (var shapeId in Model.define.elements) { if($.inArray(shapeId, recordId) == -1) { var obj = {}; obj.id = shapeId; hasNumArr.push(obj); } - } + }*/ + return hasNumArr; } @@ -1780,7 +1808,7 @@ function initShapeAttribute(obj) { } //流程阅览只显示线上审批、线下审批、系统任务、人工审批 - if(shape.title=="线上审批" || shape.title=="线下审批" || shape.title=="系统任务" ||shape.title=="人工审批") { + if(shape.title=="线上审批" || shape.title=="线下审批" || shape.title=="系统任务" ||shape.title=="人工任务") { var no = ""; for (var i = 0; i < attributesJsonArrayT.length; i++) { @@ -1791,16 +1819,14 @@ function initShapeAttribute(obj) { no = numberValue; } } - - } + var novalue=no+"."+shape.text; var t = ''; - t += '
' - /*t += '';*/ - t += ''; + t += '
'; + t += ''; + t += ''; + t += ''; t += ''; t += ''; t += ''; @@ -1837,16 +1863,19 @@ function initShapeAttribute(obj) { } } -function searchChange(id) { +function searchChange(id,text) { if (document.getElementById("searchChangeFlg"+id).value == "1") { document.getElementById(id+"change").style.display=""; document.getElementById("searchChange"+id).innerHTML = ""; document.getElementById("searchChangeFlg"+id).value = "0"; + document.getElementById("span"+id).innerHTML=""; + } else { document.getElementById(id+"change").style.display="none"; document.getElementById("searchChange"+id).innerHTML = ""; document.getElementById("searchChangeFlg"+id).value = "1"; + document.getElementById("span"+id).innerHTML=text; } } diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js index 1e599eef..438ca53b 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.core.js @@ -4530,8 +4530,9 @@ var Designer = { l = j.name + ": " } if (jjj.showType == "text" || jjj.showType == "attr") { + l += jjj.value; //判断如果岗位多个数据,...显示 by zhaolei - if (jjj.value != "") { + /* if (jjj.value != "") { debugger; var lenth = jjj.value.match(/,/g).length; if (lenth >= 2) { @@ -4544,7 +4545,7 @@ var Designer = { }else{ l += jjj.value; - } + }*/ } else { if (jjj.showType == "icon") { diff --git a/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.apps.coe.pal.output.bd.jar b/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.apps.coe.pal.output.bd.jar deleted file mode 100644 index 324276ee..00000000 Binary files a/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.apps.coe.pal.output.bd.jar and /dev/null differ diff --git a/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.user.apps.coe.pal.output.bd.jar b/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.user.apps.coe.pal.output.bd.jar index b809a49d..2c9766ac 100644 Binary files a/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.user.apps.coe.pal.output.bd.jar and b/com.awspaas.user.apps.coe.pal.output.bd/lib/com.awspaas.user.apps.coe.pal.output.bd.jar differ diff --git a/com.awspaas.user.apps.coe.pal.output.bd/src/com/awspaas/apps/coe/pal/output/bd/report1/Report1Gener.java b/com.awspaas.user.apps.coe.pal.output.bd/src/com/awspaas/apps/coe/pal/output/bd/report1/Report1Gener.java index 21eb0350..344e4cc3 100644 --- a/com.awspaas.user.apps.coe.pal.output.bd/src/com/awspaas/apps/coe/pal/output/bd/report1/Report1Gener.java +++ b/com.awspaas.user.apps.coe.pal.output.bd/src/com/awspaas/apps/coe/pal/output/bd/report1/Report1Gener.java @@ -221,15 +221,47 @@ public class Report1Gener { file.mkdir(); } } + + //文件属性附件 + int fileIndex = 1; + if (search != null && search.size() > 0) { + // 复制附件 + for (UpfileModel upfileModel : search) { + if (!"f".equals(upfileModel.getType())) {// 文件 + continue; + } + // 复制doccenter下的文件 + DCContext dcContext = null; + DCPluginProfile dcProfile = DCProfileManager.getDCProfile(CoEConstant.APP_ID, CoeFileConstant.COE_UPFILE); + if (dcProfile != null) { + dcContext = new DCContext(userContext, dcProfile, CoEConstant.APP_ID, "file", upfileModel.getPl_uuid(), upfileModel.getFileName()); + } + File sourceFile = new UtilFile(dcContext.getFilePath()); + File targetFile = new UtilFile(file.toString() + File.separator + dcContext.getFileName()); + try { + UtilFile.copyFile(sourceFile, targetFile); + } catch (Exception e) { + System.out.println(e); + e.printStackTrace(); + } + JSONObject object = new JSONObject(); + object.put("file_name", fileIndex + "." + upfileModel.getFileName()); + String link = fileName + File.separator + upfileModel.getFileName(); + object.put("link", link); + fileTable.add(object); + fileIndex++; + } + } + if (repositoryFileElements != null) { int index = 1;// 流程步骤序号 int dangerIndex = 1;// 风险序号 int regulateIndex = 1;// 控制序号 for (Map shape : repositoryFileElements) { //如果图形元素不是流程步骤,不导出该元素 - if (PrReportComment.PROCESS_STEP.indexOf((String)shape.get("type")) == -1) { - continue; - } +// if (PrReportComment.PROCESS_STEP.indexOf((String)shape.get("type")) == -1) { +// continue; +// } JSONObject _tr = new JSONObject(); OutputWordUtil.setShapeDefaultValue2(repositoryId, _tr); //设置默认值 _tr.put(OutputWordUtil.SERIAL_NUMBER, index); //序号 @@ -269,10 +301,11 @@ public class Report1Gener { e.printStackTrace(); } JSONObject object = new JSONObject(); - object.put("shape_file_name", upfileModel.getFileName()); + object.put("shape_file_name", fileIndex+"."+upfileModel.getFileName()); String link = fileName + File.separator + upfileModel.getFileName(); object.put("shape_file_link", link); shapeFileTable.add(object); + fileIndex++; } } if(shapeFileTable.size() == 0) {// 没有附件时给空值,不然使用office打开会解析错误 @@ -320,36 +353,6 @@ public class Report1Gener { // 流程步骤的指标表格 setTableValueOfKPI("kpi", repositoryId, KPITable, relationFileMap); - - if (search != null && search.size() > 0) { - // 复制附件 - int index = 1; - for (UpfileModel upfileModel : search) { - if (!"f".equals(upfileModel.getType())) {// 文件 - continue; - } - // 复制doccenter下的文件 - DCContext dcContext = null; - DCPluginProfile dcProfile = DCProfileManager.getDCProfile(CoEConstant.APP_ID, CoeFileConstant.COE_UPFILE); - if (dcProfile != null) { - dcContext = new DCContext(userContext, dcProfile, CoEConstant.APP_ID, "file", upfileModel.getPl_uuid(), upfileModel.getFileName()); - } - File sourceFile = new UtilFile(dcContext.getFilePath()); - File targetFile = new UtilFile(file.toString() + File.separator + dcContext.getFileName()); - try { - UtilFile.copyFile(sourceFile, targetFile); - } catch (Exception e) { - System.out.println(e); - e.printStackTrace(); - } - JSONObject object = new JSONObject(); - object.put("file_name", index + "." + upfileModel.getFileName()); - String link = fileName + File.separator + upfileModel.getFileName(); - object.put("link", link); - fileTable.add(object); - index++; - } - } dataMap.put(OutputWordUtil.TABLE_REPOSITORY_SHAPE, repositoryShapeTable); dataMap.put("file_table", fileTable); diff --git a/com.awspaas.user.apps.coe.pal.output.bd/表单-手册(修订版).xml b/com.awspaas.user.apps.coe.pal.output.bd/表单-手册(修订版).xml index 60c63b83..dfc9475e 100644 --- a/com.awspaas.user.apps.coe.pal.output.bd/表单-手册(修订版).xml +++ b/com.awspaas.user.apps.coe.pal.output.bd/表单-手册(修订版).xml @@ -4411,6 +4411,7 @@ y7fdOgAAAABJRU5ErkJggk== + ${table4.file_name} @@ -4418,33 +4419,34 @@ y7fdOgAAAABJRU5ErkJggk== <#list repository_shape_table as table1> - <#list table1.shape_File_Table as table11> - - - - - - - - - - - - - - - - - - - - - ${table11.shape_file_name} - - - - - + <#list table1.shape_File_Table as table11> + + + + + + + + + + + + + + + + + + + + + + ${table11.shape_file_name} + + + + + diff --git a/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.apps.coe.pal.output.zd.jar b/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.apps.coe.pal.output.zd.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar b/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar index b5082814..7eb657d7 100644 Binary files a/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar and b/com.awspaas.user.apps.coe.pal.output.zd/lib/com.awspaas.user.apps.coe.pal.output.zd.jar differ diff --git a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java index 911012d8..018991c1 100644 --- a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java +++ b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/report1/Report1Gener.java @@ -160,7 +160,7 @@ public class Report1Gener { } JSONObject dataMap = getData(repositoryId, wizardJsonData, docPath, fileName); if (dataMap != null) { - OutputWordUtil.createDoc2(dataMap, tempPath, tempName, docName); +// OutputWordUtil.createDoc2(dataMap, tempPath, tempName, docName); } } } @@ -228,9 +228,9 @@ public class Report1Gener { int regulateIndex = 1;// 控制序号 for (Map shape : repositoryFileElements) { //如果图形元素不是流程步骤,不导出该元素 - if (PrReportComment.PROCESS_STEP.indexOf((String)shape.get("type")) == -1) { - continue; - } +// if (PrReportComment.PROCESS_STEP.indexOf((String)shape.get("type")) == -1) { +// continue; +// } JSONObject _tr = new JSONObject(); OutputWordUtil.setShapeDefaultValue2(repositoryId, _tr); //设置默认值 _tr.put(OutputWordUtil.SERIAL_NUMBER, index); //序号 @@ -448,12 +448,18 @@ public class Report1Gener { //术语 dataMap.put("term_table", termTable);//table4 + //如果termTable.size()==0 则显示无 + dataMap.put("term_table_count", termTable.size());//table4 + //组织和职责 dataMap.put("organization_table", organizationTable);//table5 + dataMap.put("organization_table_count",organizationTable.size());//table5 //支持文件 dataMap.put("supports_table", support_files);//table6 + dataMap.put("supports_table_count", support_files.size());//table6 //相关文件 dataMap.put("relevant_table", related_files);//table7 + dataMap.put("relevant_table_count", related_files.size());//table7 dataMap.put(OutputWordUtil.TABLE_REPOSITORY_SHAPE, repositoryShapeTable);