diff --git a/com.awspaas.user.apps.coe.pal.output.zd/lib/Spire.Doc.jar b/com.awspaas.user.apps.coe.pal.output.zd/lib/Spire.Doc.jar
new file mode 100644
index 00000000..a0c4d895
Binary files /dev/null and b/com.awspaas.user.apps.coe.pal.output.zd/lib/Spire.Doc.jar differ
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 4217e359..351a2500 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/InstitutionalTextWeb.java b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/InstitutionalTextWeb.java
new file mode 100644
index 00000000..26db4957
--- /dev/null
+++ b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/InstitutionalTextWeb.java
@@ -0,0 +1,1125 @@
+package com.awspaas.apps.coe.pal.output.zd;
+
+import com.actionsoft.apps.coe.pal.constant.CoEConstant;
+import com.actionsoft.apps.coe.pal.pal.output.extend.GenerLogExd;
+import com.actionsoft.apps.coe.pal.pal.output.extend.OutputAppManager;
+import com.actionsoft.apps.coe.pal.pal.output.util.OutputExcelUtil;
+import com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil;
+import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
+import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
+import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
+import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
+import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
+import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
+import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
+import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
+import com.actionsoft.apps.coe.pal.pal.repository.upfile.constant.CoeFileConstant;
+import com.actionsoft.apps.coe.pal.pal.repository.upfile.dao.UpFileDao;
+import com.actionsoft.apps.coe.pal.pal.repository.upfile.model.UpfileModel;
+import com.actionsoft.apps.coe.pal.system.property.CoePropertyUtil;
+import com.actionsoft.apps.coe.pal.util.HighSecurityUtil;
+import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
+import com.actionsoft.bpms.commons.database.RowMap;
+import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
+import com.actionsoft.bpms.server.Quota;
+import com.actionsoft.bpms.server.UserContext;
+import com.actionsoft.bpms.server.fs.DCContext;
+import com.actionsoft.bpms.server.fs.dc.DCProfileManager;
+import com.actionsoft.bpms.util.*;
+import com.actionsoft.exception.AWSQuotaException;
+import com.actionsoft.sdk.local.SDK;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.awspaas.apps.coe.pal.output.zd.util.PrReportComment;
+import com.awspaas.apps.coe.pal.output.zd.util.ReportRepositoryCompare;
+import com.awspaas.apps.coe.pal.output.zd.util.XMLUtil;
+import com.spire.doc.FileFormat;
+import org.apache.commons.lang.StringUtils;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.Element;
+
+import java.io.*;
+import java.nio.charset.StandardCharsets;
+import java.sql.Timestamp;
+import java.util.*;
+
+import static com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil.specialCharTransfer;
+
+/**
+ * 生成流程手册-步骤横表横表的入口
+ *
+ * @author zhangming
+ */
+public class InstitutionalTextWeb extends ActionWeb {
+ UserContext _uc;
+ GenerLogExd log = new GenerLogExd();
+
+ public InstitutionalTextWeb(UserContext uc) {
+ super(uc);
+ _uc = uc;
+ }
+
+ //word换行符
+ private final String WRAPSTRING = "";
+
+
+ /**
+ * 制度批量导出正文
+ *
+ * @param wsId
+ * @param teamId
+ * @return
+ */
+ public void systemManualTextExport() {
+ List listIds = OutputAppManager.getProfileName("");
+
+ String tempName = "制度-手册6.xml";
+ String tempPath = "../apps/install/com.awspaas.user.apps.coe.pal.output.zd/";
+ String wsId = "";
+ boolean dev = Quota.isDEV();
+ if (dev) {
+ wsId = "0285ff6a-e418-4d8b-a5b1-22240296f769";
+ }
+ boolean prd = Quota.isPRD();
+ if (prd) {
+ wsId = "7d3ca852-a0bd-42e6-80b1-3dcea6f55083";
+ }
+ boolean qas = Quota.isQAS();
+ if (qas) {
+ wsId = "7d3ca852-a0bd-42e6-80b1-3dcea6f55083";
+ }
+
+
+ //查询制度流程文件
+ List policyMap = DBSql.getMaps("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLMETHODID='control.policy' AND ID='ca45dc6a-0f77-44ee-adfe-f36b014586f3' ");
+
+
+ for (int i = 0; i < policyMap.size(); i++) {
+
+ //
+ String targetFileId = policyMap.get(i).getString("ID");
+
+ String fileValue = UUIDGener.getUUID() + "_outputText";
+ String sourceAppId = "com.awspaas.user.apps.coe.pal.output.zd";
+ String filename = policyMap.get(i).getString("PLNAME");
+ DCContext sourceDc = new DCContext(_uc, DCProfileManager.getDCProfile(sourceAppId, "output"), sourceAppId, wsId, fileValue, filename);
+ String docPath = sourceDc.getPath();
+ UtilFile upfileDir = new UtilFile(docPath);
+ if (!upfileDir.exists()) {
+ upfileDir.mkdirs();
+ }
+
+
+ //{"orderNuberFirst":true,"targetShape":"","targetFileId":"ca45dc6a-0f77-44ee-adfe-f36b014586f3",
+ // "orderNametwo":false,"reportNameIsItName":"%fileName%_%fileVersion%","relationFileId":"","isItReport":true}
+
+ JSONObject wizardJsonData = new JSONObject();
+ wizardJsonData.put("orderNuberFirst", true);
+ wizardJsonData.put("targetShape", "");
+ wizardJsonData.put("targetFileId", targetFileId);
+ wizardJsonData.put("orderNametwo", false);
+ wizardJsonData.put("reportNameIsItName", "%fileName%_%fileVersion%");
+ wizardJsonData.put("relationFileId", "");
+ wizardJsonData.put("isItReport", true);
+
+
+ String reportName = wizardJsonData.getString("reportNameIsItName"); //页面上设计的文件命名规则
+ Map indexMap = new HashMap();
+
+ PALRepositoryModel model = PALRepositoryQueryAPIManager.getInstance().queryPalRepositoryModelByPalId(targetFileId);
+ if (model != null) {
+ //获取文件扩展属性
+ String json = CoePropertyUtil.getPropertyValue(model.getId() + "_attr");
+ JSONObject extendAttr = new JSONObject();
+ if (json != null && !"".equals(json) && !"null".equals(json)) {
+ JSONArray jsonArray = JSONArray.parseArray(json);
+ for (int j = 0; j < jsonArray.size(); j++) {
+ JSONObject object = jsonArray.getJSONObject(j);
+ extendAttr.put(object.getString("id"), object.get("value"));
+ }
+ }
+ //文件的扩展属性
+ List repositoryPropertyList = PALRepositoryPropertyCache.getPropertyByPlId(model.getId());
+ if (repositoryPropertyList != null && repositoryPropertyList.size() > 0) {
+ for (PALRepositoryPropertyModel repositoryPropertyModel : repositoryPropertyList) {
+ if ("P_versions".equals(repositoryPropertyModel.getPropertyId())) {
+ String plvers = model.getVersion() + "";
+ String plver = "";
+ if (!"".equals(plvers)) {
+ if (plvers.length() > 1) {
+ plver = plvers.substring(0, 1) + "."
+ + plvers.substring(plvers.length() - 1, plvers.length());
+ } else {
+ plver = plvers.substring(0, 1) + ".0";
+ }
+ }
+ extendAttr.put(repositoryPropertyModel.getPropertyId(), "V" + plver);
+ } else {
+ extendAttr.put(repositoryPropertyModel.getPropertyId(), repositoryPropertyModel.getPropertyValue());
+ }
+ }
+ }
+ List reportNameLabels = OutputExcelUtil.string2label(reportName);
+ String reportNameValue = reportName;
+ if (reportNameLabels.size() > 0) {
+ reportNameValue = OutputExcelUtil.label2value(model, extendAttr, null, reportName);
+
+ }
+ reportNameValue = reportNameValue.replaceAll(OutputExcelUtil.FILENAMEREGX, "");
+ if (reportNameValue.length() > 255) {
+ reportNameValue = reportNameValue.substring(0, 255);
+ }
+ String docName = "";
+ String fileName = "";
+ if (indexMap.containsKey(reportNameValue)) {
+ int index = indexMap.get(reportNameValue);
+ index++;
+ fileName = reportNameValue + "(" + index + ")";
+ log.info("得到word名称为:" + fileName);
+ docName = docPath + fileName + ".doc";
+ indexMap.put(reportNameValue, index);
+ } else {
+ fileName = reportNameValue;
+ log.info("得到word名称为:" + fileName);
+ docName = docPath + fileName + ".doc";
+ indexMap.put(fileName, 1);
+ }
+
+ JSONObject dataMap = getData2(targetFileId, wizardJsonData, docPath, fileName);
+ System.out.println("dpcpath=======" + docPath);
+ if (dataMap != null) {
+ OutputWordUtil.createDoc2(dataMap, tempPath, tempName, docName);
+ }
+ }
+
+
+ }
+ }
+
+
+ /**
+ * 获取条款内容xml
+ *
+ * @param repositoryId
+ * @param controlShapeId
+ * @return
+ */
+ private Map getContentData(String repositoryId, String controlShapeId) {
+ Map result = new HashMap<>();
+ result.put("listDef", "");
+ result.put("content", "");
+ if (UtilString.isEmpty(controlShapeId)) {
+ return result;
+ }
+ PALRepositoryModel repositoryModel = PALRepositoryQueryAPIManager.getInstance().queryPalRepositoryModelByPalId(repositoryId);
+ if (repositoryModel == null) {
+ return result;
+ }
+ String content = "";
+ StringBuilder listStr = new StringBuilder();
+ // 读取附件
+ // 流程附件列表
+ UpFileDao upFileDao = new UpFileDao();
+ List search = upFileDao.search(repositoryModel.getId(), controlShapeId, null);
+
+ DCContext dcContextpdf = null;
+ File file = null;
+ if (search != null && search.size() > 0) {
+ // 复制附件
+ for (UpfileModel upfileModel : search) {
+ DCPluginProfile dcProfile = DCProfileManager.getDCProfile(CoEConstant.APP_ID, CoeFileConstant.COE_UPFILE);
+ if (upfileModel.getFileName().contains(".xml")) {
+ if (dcProfile != null) {
+ dcContextpdf = new DCContext(_uc, dcProfile, CoEConstant.APP_ID, upfileModel.getPl_uuid(), upfileModel.getShape_uuid(), upfileModel.getFileName());
+ /*
+ * String path = dcContextpdf.getPath(); String fileName =
+ * dcContextpdf.getFileName(); com.spire.doc.Document docs = new
+ * com.spire.doc.Document(); docs.loadFromFile("/"+path+fileName); String
+ * substring = fileName.substring(0, fileName.lastIndexOf(".xml"));
+ * docs.saveToFile("/"+path+substring+".xml",FileFormat.Word_ML); dcContextpdf =
+ * new DCContext(userContext, dcProfile, CoEConstant.APP_ID,
+ * upfileModel.getPl_uuid(), upfileModel.getShape_uuid(), substring+".xml");
+ */
+ break;
+ }
+ }
+ if (upfileModel.getFileName().contains(".doc") || upfileModel.getFileName().contains(".docx")) {
+ if (dcProfile != null) {
+ dcContextpdf = new DCContext(_uc, dcProfile, CoEConstant.APP_ID, upfileModel.getPl_uuid(), upfileModel.getShape_uuid(), upfileModel.getFileName());
+ String path = dcContextpdf.getPath();
+ String fileName = dcContextpdf.getFileName();
+ //创建实例,加载doc测试文档
+ String s = path + fileName;
+ com.spire.doc.Document docs = new com.spire.doc.Document();
+ docs.loadFromFile(path + fileName);
+ //保存为xml格式
+ String substring = fileName.substring(0, fileName.lastIndexOf(".doc"));
+ docs.saveToFile(path + substring + ".xml", FileFormat.Word_ML);
+ dcContextpdf = new DCContext(_uc, dcProfile, CoEConstant.APP_ID, upfileModel.getPl_uuid(), upfileModel.getShape_uuid(), substring + ".xml");
+ break;
+ }
+ }
+
+ }
+ }
+ if (dcContextpdf != null) {
+ file = new File(dcContextpdf.getFilePath());
+ }
+ if (file != null) {
+ // 解析xml文件
+ // 校验xml文档是否能够正常解析
+ Document doc = analysisXMLFile(file.getPath(), true);
+ if (doc == null) {
+ System.out.println("解析xml失败");
+ return null;
+ }
+ int step = 20;// 以20为步长进行批量调整
+ // 解析根节点
+ Element root = doc.getRootElement();
+
+ // System.out.println(root.getName());
+ Element lists = root.element("lists");
+ if (lists != null) {
+ for (Object obj : lists.elements()) {
+ Element e = (Element) obj;
+ String name = e.getName();
+ if ("listDef".equals(name)) {
+ e.setAttributeValue("listDefId", Integer.parseInt(e.attributeValue("listDefId")) + step + "");
+ listStr.append(e.asXML());
+ }
+ if ("list".equals(name)) {
+ e.setAttributeValue("ilfo", Integer.parseInt(e.attributeValue("ilfo")) + step + "");
+ Element ilst = e.element("ilst");
+ ilst.setAttributeValue("val", Integer.parseInt(ilst.attributeValue("val")) + step + "");
+ listStr.append(e.asXML());
+ }
+ }
+ }
+
+// if (listStr.length() > 0) {
+// System.out.println(listStr);
+// }
+// Element body = root.element("body");
+// if (body != null) {
+// // System.out.println(body.getName());
+// //System.out.println(body.asXML());
+// List childList = body.elements();
+// if (childList != null) {
+// for (Element e : childList) {
+// //System.out.println(e.getName());
+// // str += e.asXML();
+// }
+// }
+//
+// }
+
+ // 获取字符串
+ content = getFileContent(file);
+ // content = content.substring(content.indexOf("") + 9, content.indexOf("") + 8, content.indexOf(""));
+ String[] arr = content.split("");
+ StringBuilder tmp = new StringBuilder();
+ for (int i = 0; i < arr.length; i++) {
+ tmp.append(arr[i].substring(arr[i].indexOf("") + 9));
+ }
+ content = tmp.toString();
+// System.out.println(content);
+// System.out.println("以上的是替换前文本,以下是替换后文本");
+ String[] contentArr = content.split(" list = Arrays.asList(contentArr);
+ content = StringUtils.join(list, " relationFileIds = new HashSet<>();
+ Map> relationFileMap = new HashMap<>();
+
+ PrReportComment prReportComment = new PrReportComment();
+ PALRepositoryModel repositoryModel = PALRepositoryQueryAPIManager.getInstance().queryPalRepositoryModelByPalId(repositoryId);
+ if (repositoryModel == null) {
+ return null;
+ }
+
+ prReportComment.getCommentContent(dataMap, repositoryModel); // 获取一些公共的数据(手册首页的手册岗位名称、部门、时间等)
+
+ JSONArray repositoryShapeTable = new JSONArray(); //流程步骤Table
+ JSONArray fileTable = new JSONArray(); //流程附件Table
+ JSONArray dangerTable = new JSONArray(); //风险Table
+ JSONArray regulateTable = new JSONArray(); //控制Table
+ JSONArray KPITable = new JSONArray(); //相关绩效考核Table
+
+ Set dangerSet = new HashSet();// 风险
+ Set regulateSet = new HashSet();// 控制
+ Set KPISet = new HashSet();// kpi
+
+ List";
+ // 防止生成过程中,停用或卸载该app
+ public static boolean isRunning = false;
+ public static final Object _lock = new Object();
+ private UserContext userContext = null;
+ GenerLogExd log = new GenerLogExd();
+ //word换行符
+ private final String WRAPSTRING = "";
- public Report1Gener() {
- }
+ public Report1Gener() {
+ }
- /**
- * 生成文件
- *
- * @param model OutputTaskModel对象
- * @param wizardJsonData 向导收集的Json参数(targetFiles、relationFiles、options...)
- * @param dcContext 要生成报告的DC目录对象,已准备好
- * @return 将文件生成到output目录下,返回状态
- *
- * @see PlatformAPIImpl#getDefaultLanguage()
- * @see PlatformAPIImpl#getlanguages()
- */
- public ResponseObject execute(OutputTaskModel model, String wizardJsonData, DCContext dcContext) throws FileNotFoundException {
- try {
- // synchronized (_lock) {
- // isRunning = true;
- // userContext = UserContext.fromUID(model.getUserId());
- userContext = DispatcherRequest.getUserContext();
- String teamId = model.getTeamId();
- String wsId = model.getWsId();
- log.info("execute ready...");
- log.info("-------------------");
- log.info("TeamId=" + teamId);
- log.info("wsId=" + wsId);
- JSONObject jsonObj = JSONObject.parseObject(wizardJsonData);
- log.info("dcPath=" + dcContext.getPath());
- // ----预处理、校验----
- OutputAppProfile appModel = OutputAppManager.getProfile(model.getProfileId());
- String tempPath = appModel.getAppContext().getPath();
- String tempName = "制度-手册5.xml";
- log.info("begin...");
- log.info("-------------------");
- // ----文件处理-----
- genarateWord(tempPath, tempName, dcContext.getPath(), jsonObj);
- log.info("end");
- // }
- } finally {
- // isRunning = false;
- }
- return ResponseObject.newOkResponse().put("logs", log.logs());
- }
+ /**
+ * 生成文件
+ *
+ * @param model OutputTaskModel对象
+ * @param wizardJsonData 向导收集的Json参数(targetFiles、relationFiles、options...)
+ * @param dcContext 要生成报告的DC目录对象,已准备好
+ * @return 将文件生成到output目录下,返回状态
+ * @see PlatformAPIImpl#getDefaultLanguage()
+ * @see PlatformAPIImpl#getlanguages()
+ */
+ public ResponseObject execute(OutputTaskModel model, String wizardJsonData, DCContext dcContext) throws FileNotFoundException {
+ try {
+ // synchronized (_lock) {
+ // isRunning = true;
+ // userContext = UserContext.fromUID(model.getUserId());
+ userContext = DispatcherRequest.getUserContext();
+ String teamId = model.getTeamId();
+ String wsId = model.getWsId();
+ log.info("execute ready...");
+ log.info("-------------------");
+ log.info("TeamId=" + teamId);
+ log.info("wsId=" + wsId);
+ JSONObject jsonObj = JSONObject.parseObject(wizardJsonData);
+ log.info("dcPath=" + dcContext.getPath());
+ // ----预处理、校验----
+ OutputAppProfile appModel = OutputAppManager.getProfile(model.getProfileId());
+ String tempPath = appModel.getAppContext().getPath();
+ String tempName = "制度-手册5.xml";
+ log.info("begin...");
+ log.info("-------------------");
+ // ----文件处理-----
+ genarateWord(tempPath, tempName, dcContext.getPath(), jsonObj);
+ log.info("end");
+ // }
+ } finally {
+ // isRunning = false;
+ }
+ return ResponseObject.newOkResponse().put("logs", log.logs());
+ }
- /**
- * 创建word
- * @param tempPath
- * @param tempName
- * @param docPath
- * @param wizardJsonData
- */
- private void genarateWord(String tempPath, String tempName, String docPath, JSONObject wizardJsonData) throws FileNotFoundException {
- String[] repositoryIds = wizardJsonData.getString("targetFileId").split(",");
+ /**
+ * 创建word
+ *
+ * @param tempPath
+ * @param tempName
+ * @param docPath
+ * @param wizardJsonData
+ */
+ private void genarateWord(String tempPath, String tempName, String docPath, JSONObject wizardJsonData) throws FileNotFoundException {
+ String[] repositoryIds = wizardJsonData.getString("targetFileId").split(",");
- String reportName = wizardJsonData.getString("reportNameIsItName"); //页面上设计的文件命名规则
- Map indexMap = new HashMap();
- for (String repositoryId : repositoryIds) {
- if (repositoryId == null || "".equals(repositoryId)) {
- continue;
- }
- PALRepositoryModel model = PALRepositoryQueryAPIManager.getInstance().queryPalRepositoryModelByPalId(repositoryId);
- if (model != null) {
- //获取文件扩展属性
- String json = CoePropertyUtil.getPropertyValue(model.getId() + "_attr");
- JSONObject extendAttr = new JSONObject();
- if (json != null && !"".equals(json) && !"null".equals(json)) {
- JSONArray jsonArray = JSONArray.parseArray(json);
- for (int i = 0; i < jsonArray.size(); i++) {
- JSONObject object = jsonArray.getJSONObject(i);
- extendAttr.put(object.getString("id"), object.get("value"));
- }
- }
- //文件的扩展属性
- List repositoryPropertyList = PALRepositoryPropertyCache.getPropertyByPlId(model.getId());
- if (repositoryPropertyList != null && repositoryPropertyList.size() > 0) {
- for (PALRepositoryPropertyModel repositoryPropertyModel : repositoryPropertyList) {
- if ("P_versions".equals(repositoryPropertyModel.getPropertyId())){
- String plvers = model.getVersion()+"";
- String plver = "";
- if (!"".equals(plvers)) {
- if (plvers.length() > 1) {
- plver = plvers.substring(0, 1) + "."
- + plvers.substring(plvers.length() - 1, plvers.length());
- } else {
- plver = plvers.substring(0, 1) + ".0";
- }
- }
- extendAttr.put(repositoryPropertyModel.getPropertyId(), "V"+plver);
- }else {
- extendAttr.put(repositoryPropertyModel.getPropertyId(), repositoryPropertyModel.getPropertyValue());
- }
- }
- }
- List reportNameLabels = OutputExcelUtil.string2label(reportName);
- String reportNameValue = reportName;
- if (reportNameLabels.size() > 0) {
- reportNameValue = OutputExcelUtil.label2value(model, extendAttr, null, reportName);
+ String reportName = wizardJsonData.getString("reportNameIsItName"); //页面上设计的文件命名规则
+ Map indexMap = new HashMap();
+ for (String repositoryId : repositoryIds) {
+ if (repositoryId == null || "".equals(repositoryId)) {
+ continue;
+ }
+ PALRepositoryModel model = PALRepositoryQueryAPIManager.getInstance().queryPalRepositoryModelByPalId(repositoryId);
+ if (model != null) {
+ //获取文件扩展属性
+ String json = CoePropertyUtil.getPropertyValue(model.getId() + "_attr");
+ JSONObject extendAttr = new JSONObject();
+ if (json != null && !"".equals(json) && !"null".equals(json)) {
+ JSONArray jsonArray = JSONArray.parseArray(json);
+ for (int i = 0; i < jsonArray.size(); i++) {
+ JSONObject object = jsonArray.getJSONObject(i);
+ extendAttr.put(object.getString("id"), object.get("value"));
+ }
+ }
+ //文件的扩展属性
+ List repositoryPropertyList = PALRepositoryPropertyCache.getPropertyByPlId(model.getId());
+ if (repositoryPropertyList != null && repositoryPropertyList.size() > 0) {
+ for (PALRepositoryPropertyModel repositoryPropertyModel : repositoryPropertyList) {
+ if ("P_versions".equals(repositoryPropertyModel.getPropertyId())) {
+ String plvers = model.getVersion() + "";
+ String plver = "";
+ if (!"".equals(plvers)) {
+ if (plvers.length() > 1) {
+ plver = plvers.substring(0, 1) + "."
+ + plvers.substring(plvers.length() - 1, plvers.length());
+ } else {
+ plver = plvers.substring(0, 1) + ".0";
+ }
+ }
+ extendAttr.put(repositoryPropertyModel.getPropertyId(), "V" + plver);
+ } else {
+ extendAttr.put(repositoryPropertyModel.getPropertyId(), repositoryPropertyModel.getPropertyValue());
+ }
+ }
+ }
+ List reportNameLabels = OutputExcelUtil.string2label(reportName);
+ String reportNameValue = reportName;
+ if (reportNameLabels.size() > 0) {
+ reportNameValue = OutputExcelUtil.label2value(model, extendAttr, null, reportName);
- }
- reportNameValue = reportNameValue.replaceAll(OutputExcelUtil.FILENAMEREGX, "");
- if (reportNameValue.length() > 255) {
- reportNameValue = reportNameValue.substring(0, 255);
- }
- String docName = "";
- String fileName = "";
- if (indexMap.containsKey(reportNameValue)) {
- int index = indexMap.get(reportNameValue);
- index++;
- fileName = reportNameValue + "(" + index + ")";
- log.info("得到word名称为:" + fileName);
- docName = docPath + fileName + ".doc";
- indexMap.put(reportNameValue, index);
- } else {
- fileName = reportNameValue;
- log.info("得到word名称为:" + fileName);
- docName = docPath + fileName + ".doc";
- indexMap.put(fileName, 1);
- }
- JSONObject dataMap = getData2(repositoryId, wizardJsonData, docPath, fileName);
- if (dataMap != null) {
- OutputWordUtil.createZdDoc2(dataMap, tempPath, tempName, docName,wizardJsonData, repositoryId);
- }
- }
- }
- }
+ }
+ reportNameValue = reportNameValue.replaceAll(OutputExcelUtil.FILENAMEREGX, "");
+ if (reportNameValue.length() > 255) {
+ reportNameValue = reportNameValue.substring(0, 255);
+ }
+ String docName = "";
+ String fileName = "";
+ if (indexMap.containsKey(reportNameValue)) {
+ int index = indexMap.get(reportNameValue);
+ index++;
+ fileName = reportNameValue + "(" + index + ")";
+ log.info("得到word名称为:" + fileName);
+ docName = docPath + fileName + ".doc";
+ indexMap.put(reportNameValue, index);
+ } else {
+ fileName = reportNameValue;
+ log.info("得到word名称为:" + fileName);
+ docName = docPath + fileName + ".doc";
+ indexMap.put(fileName, 1);
+ }
+ JSONObject dataMap = getData2(repositoryId, wizardJsonData, docPath, fileName);
+ if (dataMap != null) {
+ OutputWordUtil.createDoc2(dataMap, tempPath, tempName, docName);
+ }
+ }
+ }
+ }
- /**
- * 获取文档数据
- * @param repositoryId
- * @param wizardJsonData
- * @return
- */
- private JSONObject getData2(String repositoryId, JSONObject wizardJsonData, String docPath, String fileName) {
- JSONObject dataMap = new JSONObject();
- dataMap.put("organizationType", "涉及部门及岗位\\角色");
- boolean raciRelationType = SDK.getAppAPI().getPropertyBooleanValue("com.awspaas.user.apps.coe.pal.output.zd", "DETY_POSITION_ROLE_RELATION_TYPE", false);
+ /**
+ * 获取文档数据
+ *
+ * @param repositoryId
+ * @param wizardJsonData
+ * @return
+ */
+ private JSONObject getData2(String repositoryId, JSONObject wizardJsonData, String docPath, String fileName) {
+ JSONObject dataMap = new JSONObject();
+ dataMap.put("organizationType", "涉及部门及岗位\\角色");
+ boolean raciRelationType = SDK.getAppAPI().getPropertyBooleanValue("com.awspaas.user.apps.coe.pal.output.zd", "DETY_POSITION_ROLE_RELATION_TYPE", false);
- // 记录关联属性的流程节点,防止多次查询重复文件信息耗费时间
- Set relationFileIds = new HashSet<>();
- Map> relationFileMap = new HashMap<>();
+ // 记录关联属性的流程节点,防止多次查询重复文件信息耗费时间
+ Set relationFileIds = new HashSet<>();
+ Map> relationFileMap = new HashMap<>();
- PrReportComment prReportComment = new PrReportComment();
- PALRepositoryModel repositoryModel = PALRepositoryQueryAPIManager.getInstance().queryPalRepositoryModelByPalId(repositoryId);
- if (repositoryModel == null) {
- return null;
- }
+ PrReportComment prReportComment = new PrReportComment();
+ PALRepositoryModel repositoryModel = PALRepositoryQueryAPIManager.getInstance().queryPalRepositoryModelByPalId(repositoryId);
+ if (repositoryModel == null) {
+ return null;
+ }
- prReportComment.getCommentContent(dataMap, repositoryModel); // 获取一些公共的数据(手册首页的手册岗位名称、部门、时间等)
+ prReportComment.getCommentContent(dataMap, repositoryModel); // 获取一些公共的数据(手册首页的手册岗位名称、部门、时间等)
- ReportRepositoryCompare compare = new ReportRepositoryCompare();
- JSONArray historyVersionModify = compare.getModifyVersionHistory(repositoryId);
- dataMap.put("history_table", historyVersionModify);
+ ReportRepositoryCompare compare = new ReportRepositoryCompare();
+ JSONArray historyVersionModify = compare.getModifyVersionHistory(repositoryId);
+ dataMap.put("history_table", historyVersionModify);
- // 修订记录
- dataMap.put("version_history_table", getVersionHistoryTable(repositoryModel));
+ // 修订记录
+ dataMap.put("version_history_table", getVersionHistoryTable(repositoryModel));
- return dataMap;
- }
- public static boolean isNumeric(String str) {
- for (int i = str.length(); --i >= 0;) {
- int chr = str.charAt(i);
- if (chr < 48 || chr > 57)
- return false;
- }
- return true;
- }
- /**
- * 修订记录
- * @param repositoryModel
- * @return
- */
- private JSONArray getVersionHistoryTable(PALRepositoryModel repositoryModel) {
- JSONArray versionHistoryTable = new JSONArray();// 修订记录
- List list = PALRepositoryCache.getByVersionId(repositoryModel.getVersionId());
- list.sort((m1, m2)-> {
- return m1.getVersion() - m2.getVersion() > 0 ? 1 : -1;
- });
- for (PALRepositoryModel model : list) {
- if(model.getVersion()>repositoryModel.getVersion()) {
- continue;
- }
- JSONObject obj = new JSONObject();
- Map map = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(model.getId());
- // 版本P_versions,制度用的是versions
- String attr = "versions";
- String val = "";
- String plvers = model.getVersion()+"";
- String plver = "";
- if (!"".equals(plvers)) {
- if (plvers.length() > 1) {
- plver = plvers.substring(0, 1) + "."
- + plvers.substring(plvers.length() - 1, plvers.length());
- } else {
- plver = plvers.substring(0, 1) + ".0";
- }
- }
- //val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
- obj.put(attr, "V"+plver);
- // 拟制/修订单位Issuing_department
- attr = "Issuing_department";
- val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
- obj.put(attr, val);
- // 拟制/修订人Drafted_and_revised_by
- attr = "Drafted_and_revised_by";
- val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
- obj.put(attr, val);
- // 拟制/修订日期Drafted_and_revised_date
- attr = "Drafted_and_revised_date";
- val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
- if (UtilString.isNotEmpty(val)) {
- try {
- Timestamp timestamp = UtilDate.parseTsFromDateTime(val);
- val = UtilDate.yearFormat(timestamp) + "年" + Integer.parseInt(UtilDate.monthFormat(timestamp)) + "月" + UtilDate.dayFormat(timestamp) + "日";
- } catch (Exception e) {
- //e.printStackTrace();
- }
- }
- obj.put(attr, val);
- // 审核人auditor
- attr = "auditor";
- val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
- obj.put(attr, val);
- // 复核人reviewer
- attr = "reviewer";
- val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
- obj.put(attr, val);
- // 审批人approver
- attr = "approver";
- val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
- obj.put(attr, val);
- // 修订内容及理由Contents_and_reasons_for_revision
- attr = "Contents_and_reasons_for_revision";
- val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
- obj.put(attr, val);
+ return dataMap;
+ }
- versionHistoryTable.add(obj);
- }
- return versionHistoryTable;
- }
+ public static boolean isNumeric(String str) {
+ for (int i = str.length(); --i >= 0; ) {
+ int chr = str.charAt(i);
+ if (chr < 48 || chr > 57)
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * 修订记录
+ *
+ * @param repositoryModel
+ * @return
+ */
+ private JSONArray getVersionHistoryTable(PALRepositoryModel repositoryModel) {
+ JSONArray versionHistoryTable = new JSONArray();// 修订记录
+ List list = PALRepositoryCache.getByVersionId(repositoryModel.getVersionId());
+ list.sort((m1, m2) -> {
+ return m1.getVersion() - m2.getVersion() > 0 ? 1 : -1;
+ });
+ for (PALRepositoryModel model : list) {
+ if (model.getVersion() > repositoryModel.getVersion()) {
+ continue;
+ }
+ JSONObject obj = new JSONObject();
+ Map map = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(model.getId());
+ // 版本P_versions,制度用的是versions
+ String attr = "versions";
+ String val = "";
+ String plvers = model.getVersion() + "";
+ String plver = "";
+ if (!"".equals(plvers)) {
+ if (plvers.length() > 1) {
+ plver = plvers.substring(0, 1) + "."
+ + plvers.substring(plvers.length() - 1, plvers.length());
+ } else {
+ plver = plvers.substring(0, 1) + ".0";
+ }
+ }
+ //val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
+ obj.put(attr, "V" + plver);
+ // 拟制/修订单位Issuing_department
+ attr = "Issuing_department";
+ val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
+ obj.put(attr, val);
+ // 拟制/修订人Drafted_and_revised_by
+ attr = "Drafted_and_revised_by";
+ val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
+ obj.put(attr, val);
+ // 拟制/修订日期Drafted_and_revised_date
+ attr = "Drafted_and_revised_date";
+ val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
+ if (UtilString.isNotEmpty(val)) {
+ try {
+ Timestamp timestamp = UtilDate.parseTsFromDateTime(val);
+ val = UtilDate.yearFormat(timestamp) + "年" + Integer.parseInt(UtilDate.monthFormat(timestamp)) + "月" + UtilDate.dayFormat(timestamp) + "日";
+ } catch (Exception e) {
+ //e.printStackTrace();
+ }
+ }
+ obj.put(attr, val);
+ // 审核人auditor
+ attr = "auditor";
+ val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
+ obj.put(attr, val);
+ // 复核人reviewer
+ attr = "reviewer";
+ val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
+ obj.put(attr, val);
+ // 审批人approver
+ attr = "approver";
+ val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
+ obj.put(attr, val);
+ // 修订内容及理由Contents_and_reasons_for_revision
+ attr = "Contents_and_reasons_for_revision";
+ val = specialCharTransfer(map.containsKey(attr) ? (map.get(attr).getString("text")) : "").replace("\n", WRAPSTRING);
+ obj.put(attr, val);
+
+ versionHistoryTable.add(obj);
+ }
+ return versionHistoryTable;
+ }
}
diff --git a/com.awspaas.user.apps.coe.pal.output.zd/制度-手册6.doc b/com.awspaas.user.apps.coe.pal.output.zd/制度-手册6.doc
new file mode 100644
index 00000000..010bc790
Binary files /dev/null and b/com.awspaas.user.apps.coe.pal.output.zd/制度-手册6.doc differ
diff --git a/com.awspaas.user.apps.coe.pal.output.zd/制度-手册6.xml b/com.awspaas.user.apps.coe.pal.output.zd/制度-手册6.xml
new file mode 100644
index 00000000..0f3487df
--- /dev/null
+++ b/com.awspaas.user.apps.coe.pal.output.zd/制度-手册6.xml
@@ -0,0 +1,3361 @@
+
+
+
+
+
+ Administrator
+ zhao lei
+ 2
+ 0
+ 2023-07-11T14:23:00Z
+ 2023-07-11T14:23:00Z
+ 1
+ 57
+ 325
+ 2
+ 1
+ 381
+ 16
+
+
+ 2052-3.6.2.5883
+ 1895E579887D400B9B8988E063B2161A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${table4.desc}
+
+
+
+
+ #list>
+
+#if>undefinedundefined
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 组织/
+
+
+ 角色与职责
+
+
+
+
+<#if (organization_table_count ==0 )>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+
+
+<#else>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 组织/角色
+
+
+
+
+
+
+
+
+
+ 名称
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 职责
+
+
+
+
+ <#list organization_table as table5>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${table5.name}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $
+
+
+
+
+
+
+
+
+ {table5.desc}
+
+
+
+
+#list>undefined
+undefined#if>undefinedundefinedundefined
+undefined
+
+
+
+
+
+
+
+
+ undefined
+
+ undefinedundefinedundefined
+
+ 内容undefined
+
+ undefinedundefined
+ undefined
+
+undefined
+undefined
+
+
+
+
+
+
+ undefined
+
+ undefined
+
+
+
+
+
+
+ 无undefined
+
+ undefined
+
+undefined
+undefined
+
+
+
+
+
+
+ undefined
+
+ undefined
+
+
+
+
+
+
+ $undefined
+
+ undefined
+
+
+
+
+
+ {undefined
+
+ undefinedundefined
+
+
+
+
+
+ control_contentundefined
+
+ undefinedundefined
+
+
+
+
+
+ }undefined
+
+ undefined
+
+undefined
+undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefined
+undefined
+undefined
+
+
+
+
+
+
+
+
+
+
+
+ undefined
+
+ undefinedundefined
+
+
+
+
+
+ 附则undefined
+
+ undefinedundefined
+
+undefined
+undefined
+
+
+
+
+
+
+
+ undefined
+
+ undefined
+
+
+
+
+
+ 无undefined
+
+ undefined
+
+undefined
+undefined
+
+
+
+
+
+
+
+
+ undefined
+
+ undefined
+
+
+
+
+
+ ${pl_T_supplementary_articles}undefined
+
+ undefined
+
+undefined
+undefinedundefinedundefined
+undefined
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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eRUz8cobH+WET0xP5u/Xw1OE9kxcq
+wgoAept7R0uNegPiTFxqjru9XNa5rpY7Z/c6lpWGpc4rqOehWbYT+bs01PwE8LZodlvVWKFQq5cI
+YtgpfS1iEi/qrdvH0aAmcSPesXbeYMQZdA98NYCKh3roMzEAlu118JI2Mcvrg3rqM1Nc2s1gqJ6V
+PcGsBtTDkGongOg/IlSlzTGDoTaoN0JmVQnbLzNqozTDjIVEUlrIX7cPugYRtYuZCamvq2utCxfa
+f421MBQd7L3Ys5TWjDlCHtniYh0M5Rk0cy1gIXC0gKeiDM3tkksaY1ZBFsDeQncuLw0xeyDrcG+C
+UwN9tCDIYmQc8EKQXcC3AS0ElQs4bQSZWYWWOrngLkGQDPjjU8j2Th8CXWN7aYwROYY4+j8O5ulX
+y7fdOgAAAABJRU5ErkJggk==
+
+
+
+
+
+
+
+
+
+
+ undefined
+
+ undefined
+
+
+
+
+
+ ──────────────────────────────────────────────────
+
+ undefined
+
+ undefined
+
+undefined
+undefined
+
+
+
+
+
+ ───────────────────────────────────────────────────
+
+ undefined
+
+ undefined
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 以上信息为伊利公司所有,未经允许不得外传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PAGE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ undefined
+
+ undefinedundefined
+
+undefinedundefinedundefinedundefined
+undefinedundefinedundefined
\ No newline at end of file