Merge remote-tracking branch 'origin/apps_dev' into apps_dev
This commit is contained in:
commit
9cacaa0c09
Binary file not shown.
@ -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<String, String> 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<String, String> 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);
|
||||
|
||||
@ -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<String, Set<String>> entry : arisEpcPathMap.entrySet()) {
|
||||
if (entry.getValue().size() > 1) {
|
||||
Set<String> 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<String, Set<String>> entry : arisEpcPathMap.entrySet()) {
|
||||
// if (entry.getValue().size() > 1) {
|
||||
// Set<String> 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<String, Set<String>> 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;
|
||||
}
|
||||
|
||||
@ -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";
|
||||
|
||||
|
||||
@ -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<PALRepositoryPropertyModel> propertyModels = dao.queryByWsId(wsId);
|
||||
propertyModels = propertyModels.stream().filter(item -> Constant.METHOD_ARIS_URL.equals(item.getPropertyId())).collect(Collectors.toList());
|
||||
Map<String, String> map = new HashMap<>();
|
||||
// aris流程名称
|
||||
List<PALRepositoryPropertyModel> arisNameModels = dao.queryByWsId(wsId);
|
||||
arisNameModels = arisNameModels.stream().filter(item -> Constant.METHOD_ARIS_NAME.equals(item.getPropertyId())).collect(Collectors.toList());
|
||||
|
||||
Map<String, String> arisPathMap = new HashMap<>();
|
||||
for (PALRepositoryPropertyModel prop : propertyModels) {
|
||||
map.put(prop.getPlId(), StrUtil.removeAllBlack(prop.getPropertyValue()));// 去除空格
|
||||
arisPathMap.put(prop.getPlId(), StrUtil.removeAllBlack(prop.getPropertyValue()));// 去除空格
|
||||
}
|
||||
Map<String, String> 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<String> 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;
|
||||
|
||||
Binary file not shown.
@ -73,7 +73,7 @@ AWS PAL(Process Asset Library)流程资产库是AWS CoE平台的重要产品组
|
||||
<property action="edit" group="designer" name="IS_LANE_ATTR_CONFIG" title="开启泳道更多特性配置" type="combox" isSystem="false" desc="true:允许用户开启泳道更多特性,开启后,泳道特定属性值将添加至拖入形状的特定属性值<br>flase:关闭泳道更多特性" ref="false:false|true:true">false</property>
|
||||
<property action="edit" group="designer" name="IS_LANE_FORCE_REFRESH_SHAPE_ATTR" title="泳道强制刷新形状特定属性" type="combox" isSystem="false" desc="泳道与形状特定属性保持一致用户开启泳道更多特性时,对拖入泳道的形状的特定属性值<br>true:不允许更改,保持与泳道一致<br>flase:允许更改" ref="false:false|true:true">true</property>
|
||||
<property action="edit" group="designer" name="LANE_FORCE_REFRESH_SHAPE_ATTR_SCOPE" title="泳道强制刷新形状属性范围" type="input" isSystem="false" desc="泳道属性对泳道中形状属性的影响范围<br>当形状拖入泳道后,形状属性将自动填上泳道这些属性的值。请填写属性范围(填写属性key值并用逗号隔开)" ref="">duty_r</property>
|
||||
<property action="edit" group="流程资产库架构管控" name="OPEN_BUSINESS_METHOD" title="开启业务层级、业务域、流程组建模" type="combox" isSystem="false" desc="内置扩展的流程类建模方法<br>业务层级、业务域、流程组均为文件夹类型建模方法<br>开启后可以创建对应的流程架构<br>变更该参数后需要重启此应用,否则不会生效" ref="开启:true|关闭:false">false</property>
|
||||
<property action="edit" group="流程资产库架构管控" name="OPEN_BUSINESS_METHOD" title="开启业务层级、业务域、流程组建模" type="combox" isSystem="false" desc="内置扩展的流程类建模方法<br>业务层级、业务域、流程组均为文件夹类型建模方法<br>开启后可以创建对应的流程架构<br>变更该参数后需要重启此应用,否则不会生效" ref="开启:true|关闭:false">false</property>
|
||||
<property action="edit" group="流程资产库架构管控" name="OPEN_CREATE_DEFAULT_FOLDER" title="是否允许创建文件夹" type="combox" isSystem="false" desc="该参数为业务建模流程大类下控制是否可以创建文件夹开关,已经存在的文件夹类型模型不受影响" ref="开启:true|关闭:false">true</property>
|
||||
<property action="edit" group="流程资产库架构管控" name="METHOD_DEFINITION_RULES" title="建模方法定义规则" type="textarea" isSystem="false" desc="建模方法定义规则<br>可以管控建模方法的创建规则,例如流程组之下只能创建bpmn流程、epc流程等<br>示例:<br>{"process":{"createRules":{"process":"process.businessLevel","process.businessLevel":"process.businessArea,process.processGroup,process.bpmn2,process.evc,process.epc,process.flowchart","process.businessArea":"process.processGroup,process.bpmn2,process.evc,process.epc,process.flowchart","process.processGroup":"process.bpmn2,process.evc,process.epc.process.flowchart","process.bpmn2":"process.bpmn2,process.evc,process.epc.process.flowchart","process.evc":"process.bpmn2,process.evc,process.epc.process.flowchart"}}}" ref=""/>
|
||||
<property action="edit" group="流程资产库架构管控" name="SHOW_ORG_METHOD_CATEGORY" title="是否显示建模方法分类”组织“" type="combox" isSystem="false" desc="是否显示建模方法分类“组织”类<br>建议:<br>1.若PAL中RACI等属性关联的组织架构为BPM平台的组织架构,此时该“组织”类别无用,建议选择“隐藏”,避免混淆<br>2.若PAL中RACI等属性关联的组织架构为PAL组织建模,则应该选择“显示”<br>变更该参数后需要重启此应用,否则不会生效" ref="显示:true|隐藏:false">true</property>
|
||||
|
||||
@ -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("<div style='height:100%'>" + sBuilder.toString() + "</div><div style='float:right;height:100%'></div>");
|
||||
bean.setUi("<div style='height:100%'>" + sBuilder + "</div><div style='float:right;height:100%'></div>");
|
||||
list.add(bean);
|
||||
}
|
||||
if (list != null && list.size() > 0) {
|
||||
|
||||
@ -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 = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td class="tableContent">' + obj.name +':'+ obj.value + '</td>';
|
||||
constr += '</tr>';
|
||||
if ((!obj.readonly && obj.type == "string")
|
||||
|| (!obj.readonly && obj.type == "list")) {
|
||||
// 目前支持到文本的输入 ,需求定下了再改
|
||||
constr = '<tr>';
|
||||
if(obj.name=="活动序号"){
|
||||
break;
|
||||
}
|
||||
var constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ obj.value + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if(!obj.readonly && obj.type == "link") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
// constr += '<td id="' + shape.id + obj.id + '" colspan="2" class="tableContent">' + obj.value + '</td>';
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ '<a href="' + obj.value + '" target="_blank">' + obj.value + '</a>' + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (!obj.readonly && obj.type == "number") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ obj.value + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (!obj.readonly && obj.type == "boolean") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">'+ obj.name +':'+'</td>';
|
||||
constr += '</tr>';
|
||||
} else if (!obj.readonly && obj.type == "textarea") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
if (obj.value == undefined) {
|
||||
obj.value = '';
|
||||
}
|
||||
constr += '<td id="' + shape.id + obj.id + '"class="tableContent">' + obj.name +':'+ obj.value.replace(/\n/g,'<br>') + '</td>';
|
||||
constr += '</tr>';
|
||||
} 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 = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ relationValue + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (obj.type == "select" || obj.type == "select_m") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ obj.value + '</td>';
|
||||
constr += '<td class="tableContent">' + obj.name + ':' + obj.value + '</td>';
|
||||
constr += '</tr>';
|
||||
if ((!obj.readonly && obj.type == "string")
|
||||
|| (!obj.readonly && obj.type == "list")) {
|
||||
// 目前支持到文本的输入 ,需求定下了再改
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + obj.value + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (!obj.readonly && obj.type == "link") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
// constr += '<td id="' + shape.id + obj.id + '" colspan="2" class="tableContent">' + obj.value + '</td>';
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + '<a href="' + obj.value + '" target="_blank">' + obj.value + '</a>' + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (!obj.readonly && obj.type == "number") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + obj.value + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (!obj.readonly && obj.type == "boolean") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (!obj.readonly && obj.type == "textarea") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
if (obj.value == undefined) {
|
||||
obj.value = '';
|
||||
}
|
||||
constr += '<td id="' + shape.id + obj.id + '"class="tableContent">' + '【活动描述】' + obj.name + ':' + obj.value.replace(/\n/g, '<br>') + '</td>';
|
||||
constr += '</tr>';
|
||||
} 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 = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + relationValue + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (obj.type == "select" || obj.type == "select_m") {
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + obj.value + '</td>';
|
||||
constr += '</tr>';
|
||||
|
||||
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 = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + relationValue + '</td>';
|
||||
constr += '</tr>';
|
||||
} 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 = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + relationValue + '</td>';
|
||||
constr += '</tr>';
|
||||
} 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 = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + relationValue + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (obj.readonly && obj.type == "hidden") {
|
||||
constr = '<tr ' + mouseout + mouseover + ' objid="' + obj.id + '" class="tagContentTableTr" style="display:none;">'
|
||||
+ ' <td>' + obj.name + '</td>'
|
||||
+ ' <td class="tagContentTableTrTd">'
|
||||
+ ' <input objid="' + obj.id + '" class="attribute_input_css" name="attribute_name_input_' + obj.id + '" value="' + obj.value + '" scope="' + obj.groupPath + '" readonly="' + obj.readonly + '" />'
|
||||
//+ '<div objid="' + obj.id + '" onclick="removeTrAttribute(this)" id= "ico_attribute_delete_"' + obj.id + ' class="ico_attribute_delete"></div>'
|
||||
+ '</td></tr>';
|
||||
} else if (obj.type == "table") {
|
||||
let tableInput = '请输入'
|
||||
if (obj.value.table.length > 1) {
|
||||
tableInput = '请查看'
|
||||
}
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【活动描述】' + obj.name + ':' + '<span id="' + obj.id + ' " onclick="openDialog(' + JSON.stringify(obj.value).replace(/\"/g, "'") + ')"> ' + tableInput + '</span>' + '</td>';
|
||||
constr += '</tr>';
|
||||
}
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ relationValue + '</td>';
|
||||
constr += '</tr>';
|
||||
} 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 = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ relationValue + '</td>';
|
||||
constr += '</tr>';
|
||||
} 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 = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ relationValue + '</td>';
|
||||
constr += '</tr>';
|
||||
} else if (obj.readonly && obj.type == "hidden") {
|
||||
constr = '<tr ' + mouseout + mouseover + ' objid="' + obj.id + '" class="tagContentTableTr" style="display:none;">'
|
||||
+ ' <td>' + obj.name + '</td>'
|
||||
+ ' <td class="tagContentTableTrTd">'
|
||||
+ ' <input objid="' + obj.id + '" class="attribute_input_css" name="attribute_name_input_' + obj.id + '" value="'+obj.value +'" scope="' + obj.groupPath + '" readonly="'+obj.readonly+'" />'
|
||||
//+ '<div objid="' + obj.id + '" onclick="removeTrAttribute(this)" id= "ico_attribute_delete_"' + obj.id + ' class="ico_attribute_delete"></div>'
|
||||
+ '</td></tr>';
|
||||
} else if (obj.type == "table") {
|
||||
let tableInput = '请输入'
|
||||
if(obj.value.table.length > 1) {
|
||||
tableInput = '请查看'
|
||||
}
|
||||
constr = '<tr>';
|
||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + obj.name +':'+ '<span id="'+ obj.id +' " onclick="openDialog(' + JSON.stringify(obj.value).replace(/\"/g,"'") +')"> ' + tableInput + '</span>' + '</td>';
|
||||
constr += '</tr>';
|
||||
}
|
||||
$('#' + 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 += '<tr><td>';
|
||||
t += '<div class="tableContent">' + obj.name + ':</div>';
|
||||
t += '<div class="tableContent">' +'【流程属性】'+ obj.name + ':</div>';
|
||||
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 += '<div class="task-box">'
|
||||
/*t += '<button type="button" class="awsui-btn awsui-btn-blue awsui-btn-sm" onclick="searchChange(\''+shape.id+'\')">';
|
||||
t +='<i class="awsui-iconfont" id="searchChange'+shape.id+'"></i>';
|
||||
t += '</button>';*/
|
||||
t += '<i class="awsui-iconfont newadd_up" id="searchChange' + shape.id + '" onclick="searchChange(\'' + shape.id + '\')"></i>';
|
||||
t += '<div class="task-box">';
|
||||
t += '<span id="span' + shape.id + '">';
|
||||
t += '</span>';
|
||||
t += '<i class="awsui-iconfont newadd_up" id="searchChange' + shape.id + '" onclick="searchChange(\'' + shape.id + '\',\''+novalue+'\')"></i>';
|
||||
t += '<input type="hidden" name="searchChangeFlg" id="searchChangeFlg' + shape.id + '" value="0" />';
|
||||
t += '<table class="awsui-table awsui-table-bordered" name="' + shape.id + '" id="' + shape.id + 'change" >';
|
||||
t += '<tr name="trHeader">';
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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") {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -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<String, Object> 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);
|
||||
|
||||
@ -4411,6 +4411,7 @@ y7fdOgAAAABJRU5ErkJggk==
|
||||
<w:r wsp:rsidR="00692573" wsp:rsidRPr="000D620D">
|
||||
<w:rPr>
|
||||
<w:rStyle w:val="a4"/>
|
||||
<w:color w:val="2440b3"/>
|
||||
</w:rPr>
|
||||
<w:t>${table4.file_name}</w:t>
|
||||
</w:r>
|
||||
@ -4418,33 +4419,34 @@ y7fdOgAAAABJRU5ErkJggk==
|
||||
</w:p>
|
||||
</#list>
|
||||
<#list repository_shape_table as table1>
|
||||
<#list table1.shape_File_Table as table11>
|
||||
<w:p wsp:rsidR="00E54D8E" wsp:rsidRDefault="005011CF">
|
||||
<w:pPr>
|
||||
<w:pStyle w:val="p0"/>
|
||||
<w:rPr>
|
||||
<w:rFonts w:ascii="宋体" w:h-ansi="Calibri" w:cs="宋体"/>
|
||||
<wx:font wx:val="宋体"/>
|
||||
<w:color w:val="000000"/>
|
||||
<w:sz w:val="22"/>
|
||||
<w:sz-cs w:val="20"/>
|
||||
</w:rPr>
|
||||
</w:pPr>
|
||||
<w:hlink w:dest="${table11.shape_file_link}">
|
||||
<w:r wsp:rsidR="00CB55CB" wsp:rsidRPr="005011CF">
|
||||
<w:rPr>
|
||||
<w:rStyle w:val="a4"/>
|
||||
<w:rFonts w:ascii="宋体" w:h-ansi="Calibri" w:cs="宋体" w:hint="fareast"/>
|
||||
<wx:font wx:val="宋体"/>
|
||||
<w:sz w:val="22"/>
|
||||
<w:sz-cs w:val="20"/>
|
||||
</w:rPr>
|
||||
<w:t>${table11.shape_file_name}</w:t>
|
||||
</w:r>
|
||||
</w:hlink>
|
||||
</w:p>
|
||||
</#list>
|
||||
</#list>
|
||||
<#list table1.shape_File_Table as table11>
|
||||
<w:p wsp:rsidR="00E54D8E" wsp:rsidRDefault="005011CF">
|
||||
<w:pPr>
|
||||
<!-- <w:pStyle w:val="p0"/>-->
|
||||
<!-- <w:rPr>-->
|
||||
<!-- <w:rFonts w:ascii="宋体" w:h-ansi="Calibri" w:cs="宋体"/>-->
|
||||
<!-- <wx:font wx:val="宋体"/>-->
|
||||
<!-- <w:color w:val="000000"/>-->
|
||||
<!-- <w:sz w:val="22"/>-->
|
||||
<!-- <w:sz-cs w:val="20"/>-->
|
||||
<!-- </w:rPr>-->
|
||||
</w:pPr>
|
||||
<w:hlink w:dest="${table11.shape_file_link}">
|
||||
<w:r wsp:rsidR="00CB55CB" wsp:rsidRPr="005011CF">
|
||||
<w:rPr>
|
||||
<w:rStyle w:val="a4"/>
|
||||
<w:color w:val="2440b3"/>
|
||||
<!-- <w:rFonts w:ascii="宋体" w:h-ansi="Calibri" w:cs="宋体" w:hint="fareast"/>-->
|
||||
<!-- <wx:font wx:val="宋体"/>-->
|
||||
<!-- <w:sz w:val="22"/>-->
|
||||
<!-- <w:sz-cs w:val="20"/>-->
|
||||
</w:rPr>
|
||||
<w:t>${table11.shape_file_name}</w:t>
|
||||
</w:r>
|
||||
</w:hlink>
|
||||
</w:p>
|
||||
</#list>
|
||||
</#list>
|
||||
<w:p wsp:rsidR="00B739CB" wsp:rsidRDefault="00B739CB">
|
||||
<w:pPr>
|
||||
<w:rPr>
|
||||
|
||||
Binary file not shown.
@ -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<String, Object> 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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user