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> repositoryFileElements = CoeDesignerUtil.getShapeMessageJson4(repositoryId); //流程文件内容 + if (wizardJsonData.getBoolean("orderNuberFirst")) { // 根据页面选择进行排序 + OutputWordUtil.orderByNumber(repositoryFileElements); + } + + // 流程附件列表 + String shpId = ""; + UpFileDao upFileDao = new UpFileDao(); + StringBuffer sqlWhere = new StringBuffer(); + sqlWhere.append(" and PALREPOSITORYID ='").append(repositoryModel.getId()).append("'").append(" ORDER BY FILENAME ASC"); + List search = upFileDao.search(sqlWhere.toString()); + File file = null; + //三员管理下,用户密级与文件密级过滤显示 + if (HighSecurityUtil.isON()) { + PALRepositoryQueryAPIManager.getInstance().upFileSecurityFilter(this._uc, search); + } + if (search != null && search.size() > 0) { + //创建附件目录及复制附件 + fileName = fileName + "_file"; + file = new File(docPath, fileName); + if (!file.exists()) { + log.info("创建附件"); + file.mkdir(); + } + } + + //文件属性附件 + int fileIndex = 1; + ArrayList isNumberAscArray = new ArrayList(); + 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(_uc, 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(); + //按照附件编号排序 + /* String fileNamel = upfileModel.getFileName(); + if (UtilString.isNotEmpty(fileNamel) && fileNamel.contains("附件") && fileNamel.length() > 2 && (fileNamel.contains(":") || fileNamel.contains(":"))) { + if (fileNamel.indexOf("附件") == 0) { + int indexOf2 = 3; + if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } else if (fileNamel.contains(":")) { + indexOf2 = fileNamel.indexOf(":"); + } + String numberStr = fileNamel.substring(2, indexOf2); + if (isNumeric(numberStr) && !"".equals(numberStr)) { + isNumberAscArray.add("true"); + int fileNumber = Integer.parseInt(numberStr); + object.put("file_number", fileNumber); + } else { + isNumberAscArray.add("false"); + } + } else { + isNumberAscArray.add("false"); + } + + } else { + + }*/ + isNumberAscArray.add("false"); + object.put("file_name", upfileModel.getFileName()); + String link = fileName + File.separator + upfileModel.getFileName(); + object.put("link", link); + fileTable.add(object); + fileIndex++; + } + } + + + String controlShapeId = ""; + if (repositoryFileElements != null) { + int index = 1;// 流程步骤序号 + int dangerIndex = 1;// 风险序号 + int regulateIndex = 1;// 控制序号 + for (Map shape : repositoryFileElements) { + String type = shape.get("type").toString(); + if ("regulation".equals(type)) { + controlShapeId = shape.get("id").toString(); + } else if ("I/O_L4".equals(type)) { + controlShapeId = shape.get("id").toString(); + } + //如果图形元素不是流程步骤,不导出该元素 +// 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); //序号 + _tr.put(OutputWordUtil.REPOSITORY_NAME, specialCharTransfer(repositoryModel.getName().replace("\n", ""))); //流程名称 + _tr.put(OutputWordUtil.SHAPE_NAME, specialCharTransfer(shape.get("text").toString()).replace("\n", WRAPSTRING)); //步骤名称 + + /**序号改为流程编号**/ + /*_tr.put(OutputWordUtil.SERIAL_NUMBER, ""); //序号置空 + if (shape.containsKey("number")) { + _tr.put(OutputWordUtil.SERIAL_NUMBER, shape.get("number")); + }*/ + /**序号改为流程编号**/ + + // 节点的附件处理 + JSONArray shapeFileTable = new JSONArray(); //流程节点附件Table + if (search != null && search.size() > 0) { + // 复制附件 + for (UpfileModel upfileModel : search) { + /* + * if ("f".equals(upfileModel.getType())) { continue; } if + * (!shape.get("id").equals(upfileModel.getShape_uuid())) { 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, upfileModel.getPl_uuid(), upfileModel.getShape_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", + * upfileModel.getFileName()); String link = fileName + File.separator + + * upfileModel.getFileName(); object.put("link", link); fileTable.add(object); + */ + } + } + fileTable.sort(Comparator.comparing(obj -> ((JSONObject) obj).getString("file_name"))); + if (shapeFileTable.size() == 0) {// 没有附件时给空值,不然使用office打开会解析错误 + JSONObject object = new JSONObject(); + object.put("shape_file_name", ""); + object.put("shape_file_link", ""); + shapeFileTable.add(object); + } + _tr.put("shape_File_Table", shapeFileTable); + + JSONArray dataAttributes = (JSONArray) shape.get("attributes"); + if (!dataAttributes.isEmpty()) { + for (int i = 0; i < dataAttributes.size(); i++) { + JSONObject obj = dataAttributes.getJSONObject(i); + String attrId = obj.getString("key"); + String attrValue = obj.getString("value"); + _tr.put("shape_" + attrId, attrValue.replace("\n", WRAPSTRING)); + if (raciRelationType) {// 涉及部门、岗位/角色关联的是bpm组织部门、岗位、角色 + if ("bpm_duty_r".equals(attrId)) { + _tr.put("shape_duty_r", attrValue.replace("\n", WRAPSTRING)); + } + if ("bpm_approval_a".equals(attrId)) { + _tr.put("shape_approval_a", attrValue.replace("\n", WRAPSTRING)); + } + if ("bpm_counselor_c".equals(attrId)) { + _tr.put("shape_counselor_c", attrValue.replace("\n", WRAPSTRING)); + } + if ("bpm_notify_i".equals(attrId)) { + _tr.put("shape_notify_i", attrValue.replace("\n", WRAPSTRING)); + } + } + if ("danger".equals(attrId)) { + dangerIndex = setTableValueOfControlAndRisk(attrId, repositoryId, shape.get("id").toString(), dangerTable, dangerIndex, _tr.getString(OutputWordUtil.SHAPE_NAME), relationFileMap); + dangerSet.clear(); + } else if ("regulate".equals(attrId)) { + regulateIndex = setTableValueOfControlAndRisk(attrId, repositoryId, shape.get("id").toString(), regulateTable, regulateIndex, _tr.getString(OutputWordUtil.SHAPE_NAME), relationFileMap); + regulateSet.clear(); + } + } + } + repositoryShapeTable.add(_tr); + index++; + } + } + + // 条款内容xml + Map contentMap = getContentData(repositoryId, controlShapeId); + String listDef = contentMap.get("listDef"); + String contentXml = contentMap.get("content"); + // 流程步骤的指标表格 + 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); + * System.err.println("==1==>"+object); fileTable.add(object); + * System.err.println("==2==>"+fileTable); index++; + */ + } + } + JSONArray termTable = new JSONArray(); //术语定义Table + // 属性特征 属性代码KEY + try { + PALRepositoryPropertyModel term = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(), "term"); + String termVal = term.getPropertyValue(); + JSONObject termObj = JSONObject.parseObject(termVal); + if (termObj != null && !termObj.isEmpty()) { + JSONArray tableArr = termObj.getJSONArray("table"); + if (tableArr != null && !tableArr.isEmpty()) { + for (Object obj : tableArr) { + JSONObject obj2 = (JSONObject) obj; + if (!"table_head".equals(obj2.getString("id"))) { + String name = obj2.getString("name"); + String desc = obj2.getString("desc"); + JSONObject tmp = new JSONObject(); + tmp.put("name", specialCharTransfer(name).replace("\n", WRAPSTRING)); + tmp.put("desc", specialCharTransfer(desc).replace("\n", WRAPSTRING)); + termTable.add(tmp); + } + } + } + } + } catch (Exception e) { + // TODO: handle exception + } + + JSONArray organizationTable = new JSONArray(); //组织职责Table + // 属性特征 属性代码KEY + try { + PALRepositoryPropertyModel Organizational = PALRepositoryPropertyCache.getPropertyByPropertyId(repositoryModel.getId(), "Organizational_role"); + String OrganizationalVal = Organizational.getPropertyValue(); + JSONObject OrganizationalObj = JSONObject.parseObject(OrganizationalVal); + if (OrganizationalObj != null && !OrganizationalObj.isEmpty()) { + JSONArray tableArr = OrganizationalObj.getJSONArray("table"); + if (tableArr != null && !tableArr.isEmpty()) { + for (Object obj : tableArr) { + JSONObject obj2 = (JSONObject) obj; + if (!"table_head".equals(obj2.getString("id"))) { + String name = obj2.getString("name"); + String desc = obj2.getString("desc"); + JSONObject tmp = new JSONObject(); + tmp.put("name", specialCharTransfer(name).replace("\n", WRAPSTRING)); + tmp.put("desc", specialCharTransfer(desc).replace("\n", WRAPSTRING)); + organizationTable.add(tmp); + } + } + } + } + } catch (Exception e) { + // TODO: handle exception + } + + + //支持文件 + JSONArray support_files = new JSONArray(); + try { + int count = 0; + String sql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '" + repositoryModel.getId() + "' and PROPERTYID = 'support_files'"; + String relatFileJson = DBSql.getString(sql); + if (UtilString.isNotEmpty(relatFileJson)) { + JSONObject parseObject = JSONObject.parseObject(relatFileJson); + String fileNames = parseObject.getString("relationShapeText"); + if (UtilString.isNotEmpty(fileNames)) { + String[] names = fileNames.split(","); + for (String name : names) { + count++; + JSONObject tmp = new JSONObject(); + tmp.put("name", name); + tmp.put("desc", count); + support_files.add(tmp); + } + } + + } + } catch (Exception e) { + // TODO: handle exception + } + + /* + * JSONArray support_files = new JSONArray(); //组织职责Table + * List relationList = + * DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", + * "support_files"); + * + * relationList.sort(Comparator.comparing(DesignerShapeRelationModel:: + * getShapeText)); + * + * int index = 0; for (DesignerShapeRelationModel relation : relationList) { + * String relationFileId = relation.getRelationFileId();// 支持或相关文件的ID + * PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId); + * if (model != null) { index++; String name = model.getName(); JSONObject tmp = + * new JSONObject(); tmp.put("name", name); tmp.put("desc", index); + * support_files.add(tmp); } } + */ + + //相关文件 related_files + JSONArray related_files = new JSONArray(); + try { + int count = 0; + String sql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '" + repositoryModel.getId() + "' and PROPERTYID = 'related_files'"; + String relatFileJson = DBSql.getString(sql); + if (UtilString.isNotEmpty(relatFileJson)) { + JSONObject parseObject = JSONObject.parseObject(relatFileJson); + String fileNames = parseObject.getString("relationShapeText"); + if (UtilString.isNotEmpty(fileNames)) { + String[] names = fileNames.split(","); + for (String name : names) { + count++; + JSONObject tmp = new JSONObject(); + tmp.put("name", name); + tmp.put("desc", count); + related_files.add(tmp); + } + } + + } + + //外部相关文件 + String sqlOut = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID = '" + repositoryModel.getId() + "' and PROPERTYID = 'Out_related_files'"; + String outRelatFileJson = DBSql.getString(sqlOut); + if (UtilString.isNotEmpty(outRelatFileJson)) { + if (outRelatFileJson.contains(",")) { + String[] split = outRelatFileJson.split(","); + for (String str : split) { + count++; + JSONObject tmp = new JSONObject(); + tmp.put("name", str + "【外部】"); + tmp.put("desc", count); + related_files.add(tmp); + } + } else if (outRelatFileJson.contains(",")) { + String[] split = outRelatFileJson.split(","); + for (String str : split) { + count++; + JSONObject tmp = new JSONObject(); + tmp.put("name", str + "【外部】"); + tmp.put("desc", count); + related_files.add(tmp); + } + } else { + count++; + JSONObject tmp = new JSONObject(); + tmp.put("name", outRelatFileJson + "【外部】"); + tmp.put("desc", count); + related_files.add(tmp); + } + } + } catch (Exception e) { + // TODO: handle exception + } + + + /* + * JSONArray related_files = new JSONArray(); //组织职责Table + * List relationList2 = + * DesignerShapeRelationCache.getListByAttrId(repositoryModel.getId(), "", + * "related_files"); + * relationList2.sort(Comparator.comparing(DesignerShapeRelationModel:: + * getShapeText)); int count = 0; for (DesignerShapeRelationModel relation : + * relationList2) { String relationFileId = relation.getRelationFileId();// + * 支持或相关文件的ID //System.err.println("生成手册时相关文件id=======>"+relationFileId); + * PALRepositoryModel model = PALRepositoryCache.getCache().get(relationFileId); + * if (model != null) { count++; String name = model.getName(); JSONObject tmp = + * new JSONObject(); tmp.put("name", name); tmp.put("desc", count); + * related_files.add(tmp); } } + */ + + //术语 + 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); + boolean contains = isNumberAscArray.contains("false"); + if (contains) { + fileTable.sort(Comparator.comparing(obj -> ((JSONObject) obj).getString("file_name"))); + } else { + try { + fileTable.sort(Comparator.comparing(obj -> ((JSONObject) obj).getInteger("file_number"))); + } catch (Exception e) { + throw new AWSQuotaException("附件格式请以:《附件1:XXXXXX》格式命名"); + } + } + dataMap.put("file_table", fileTable); + dataMap.put("file_table_count", fileTable.size()); + //dataMap.put("file_table_count", 0);// 暂时置空 + dataMap.put(OutputWordUtil.TABLE_DANGER, dangerTable); + dataMap.put(OutputWordUtil.TABLE_REGULATE, regulateTable); + dataMap.put(OutputWordUtil.TABLE_KPI, KPITable); + ReportRepositoryCompare compare = new ReportRepositoryCompare(); + JSONArray historyVersionModify = compare.getModifyVersionHistory(repositoryId); + dataMap.put("history_table", historyVersionModify); + + // 修订记录 + dataMap.put("version_history_table", getVersionHistoryTable(repositoryModel)); + // 附则处理 + List T_supplementary_articles_table = new ArrayList<>(); + String[] tmp = dataMap.getString("pl_T_supplementary_articles").split("\n"); + for (int i = 0; i < tmp.length; i++) { + if (UtilString.isNotEmpty(tmp[i])) { + T_supplementary_articles_table.add(tmp[i]); + } + } + dataMap.put("T_supplementary_articles_table", T_supplementary_articles_table);// 换行 + dataMap.put("T_supplementary_articles_count", T_supplementary_articles_table.size()); + + // 目的处理 + List Purpose_table = new ArrayList<>(); + String[] tmp2 = dataMap.getString("pl_Purpose").split("\n"); + for (int i = 0; i < tmp2.length; i++) { + if (UtilString.isNotEmpty(tmp2[i])) { + Purpose_table.add(tmp2[i]); + } + } + dataMap.put("Purpose_count", Purpose_table.size()); + dataMap.put("Purpose_table", Purpose_table); + + // 条款word xml内容处理 + dataMap.put("control_content_count", contentXml.length()); + dataMap.put("control_content", contentXml); + dataMap.put("listDef", listDef);// 列表编号 + 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); + + versionHistoryTable.add(obj); + } + return versionHistoryTable; + } + + + /** + * 设置风险控制表格 + * + * @param attrId + * @param fileId + * @param shapeId + * @param table + * @param index + * @param relationFileMap + * @return + */ + public int setTableValueOfControlAndRisk(String attrId, String fileId, String shapeId, JSONArray table, int index, String processShapeName, Map> relationFileMap) { + JSONArray result = new JSONArray(); + DesignerShapeRelationDao dao = new DesignerShapeRelationDao(); + List list = dao.query(fileId, shapeId, attrId, null, null); + for (DesignerShapeRelationModel model : list) { + String relationFileId = model.getRelationFileId(); + if (!relationFileMap.containsKey(relationFileId) && PALRepositoryCache.getCache().get(relationFileId) != null) { + Map shapes = new HashMap<>(); + List> fileElements = CoeDesignerUtil.getShapeMessageJson4(relationFileId); + for (Map shape : fileElements) { + String tempShapeId = shape.get("id").toString(); + shapes.put(tempShapeId, shape); + } + relationFileMap.put(relationFileId, shapes); + } + } + + Set relationShapeIdSet = new HashSet<>(); // 去重 + String filterShapeName = ""; + if ("danger".equals(attrId)) {// 风险 + filterShapeName = "risk"; + } else if ("regulate".equals(attrId)) {// 控制 + filterShapeName = "control"; + } + for (DesignerShapeRelationModel model : list) { + String relationFileId = model.getRelationFileId(); + String relationShapeId = model.getRelationShapeId(); + if (relationFileMap.containsKey(relationFileId)) { + Map elements = relationFileMap.get(relationFileId); + if (elements != null && elements.containsKey(relationShapeId)) { + Map shape = (Map) elements.get(relationShapeId); + if (!relationShapeIdSet.contains(shape.get("id").toString()) && filterShapeName.equals(shape.get("type"))) { + relationShapeIdSet.add(shape.get("id").toString()); + result.add(shape); + } + } + } + } + + for (int i = 0; i < result.size(); i++) { + Map shape = result.getJSONObject(i); + JSONObject _tr = new JSONObject(); + OutputWordUtil.setShapeDefaultValue2(shape.get("uuid").toString(), _tr); //设置默认值 + String name = specialCharTransfer(shape.get("text").toString()); + _tr.put("related_" + OutputWordUtil.SHAPE_NAME, processShapeName); + _tr.put(OutputWordUtil.SHAPE_NAME, name.replace("\n", WRAPSTRING)); + _tr.put(OutputWordUtil.SERIAL_NUMBER, index); + JSONArray dataAttributes = (JSONArray) shape.get("attributes"); + for (int j = 0; j < dataAttributes.size(); j++) { + _tr.put("shape_" + dataAttributes.getJSONObject(j).getString("key"), specialCharTransfer(dataAttributes.getJSONObject(j).getString("value")).replace("\n", " ")); + } + table.add(_tr); + index++; + } + return index; + + } + + /** + * 设置流程步骤的KPI表格 + * + * @param attrId + * @param fileId + * @param table + * @param relationFileMap + * @return + */ + public int setTableValueOfKPI(String attrId, String fileId, JSONArray table, Map> relationFileMap) { + int index = 1; + JSONArray result = new JSONArray(); + DesignerShapeRelationDao dao = new DesignerShapeRelationDao(); + List list = dao.query(fileId, null, attrId, null, null); + for (DesignerShapeRelationModel model : list) { + String relationFileId = model.getRelationFileId(); + if (!relationFileMap.containsKey(relationFileId) && !UtilString.isEmpty(model.getShapeId())) { + Map shapes = new HashMap<>(); + List> fileElements = CoeDesignerUtil.getShapeMessageJson4(relationFileId); + for (Map shape : fileElements) { + String tempShapeId = shape.get("id").toString(); + shapes.put(tempShapeId, shape); + } + relationFileMap.put(relationFileId, shapes); + } + } + + Set relationShapeIdSet = new HashSet<>(); // 去重 + for (DesignerShapeRelationModel model : list) { + String relationFileId = model.getRelationFileId(); + String relationShapeId = model.getRelationShapeId(); + if (relationFileMap.containsKey(relationFileId)) { + Map elements = relationFileMap.get(relationFileId); + if (elements != null && elements.containsKey(relationShapeId)) { + Map shape = (Map) elements.get(relationShapeId); + if (!relationShapeIdSet.contains(shape.get("id").toString())) { + relationShapeIdSet.add(shape.get("id").toString()); + result.add(shape); + } + } + } + } + + for (int i = 0; i < result.size(); i++) { + Map shape = result.getJSONObject(i); + JSONObject _tr = new JSONObject(); + OutputWordUtil.setShapeDefaultValue2(shape.get("uuid").toString(), _tr); //设置默认值 + String name = specialCharTransfer(shape.get("text").toString()); + _tr.put(OutputWordUtil.SHAPE_NAME, name.replace("\n", WRAPSTRING)); + _tr.put(OutputWordUtil.SERIAL_NUMBER, index); + JSONArray dataAttributes = (JSONArray) shape.get("attributes"); + for (int j = 0; j < dataAttributes.size(); j++) { + _tr.put("shape_" + dataAttributes.getJSONObject(j).getString("key"), specialCharTransfer(dataAttributes.getJSONObject(j).getString("value")).replace("\n", " ")); + } + table.add(_tr); + index++; + } + return index; + + } + +} diff --git a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/ReportPrController.java b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/ReportPrController.java index 8de90368..5087b3bc 100644 --- a/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/ReportPrController.java +++ b/com.awspaas.user.apps.coe.pal.output.zd/src/com/awspaas/apps/coe/pal/output/zd/ReportPrController.java @@ -22,146 +22,171 @@ import com.alibaba.fastjson.JSONObject; */ @Controller public class ReportPrController { - /** - * 报告下载 - * - * @param me - * @param id - * @return - */ - @Mapping("com.awspaas.user.apps.coe.pal.output.zd_downloadreport") - public String downloadReport(UserContext me, String id) { - OutputTaskModel model = new OutputTask().getTaskReportById(id); - ResponseObject ro = null; - JSONObject json = new JSONObject(); - if (model != null) { - //三员管理,步骤横表下载重新生成手册 - if (HighSecurityUtil.isON()){ - //流程文件密级switch开启,密级权限校验 - if (HighSecurityUtil.fileSecuritySwitch()){ - ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model); - if (securityPermission.isErr()){ - return securityPermission.toString(); - } - } - String taskName = model.getTaskName(); - if ("步骤横表".equals(taskName)){ - // 重新设置生成id,与用户id - String uuid = UUIDGener.getUUID(); - model.setUserId(me.getUID()); + /** + * 报告下载 + * + * @param me + * @param id + * @return + */ + @Mapping("com.awspaas.user.apps.coe.pal.output.zd_downloadreport") + public String downloadReport(UserContext me, String id) { + OutputTaskModel model = new OutputTask().getTaskReportById(id); + ResponseObject ro = null; + JSONObject json = new JSONObject(); + if (model != null) { + //三员管理,步骤横表下载重新生成手册 + if (HighSecurityUtil.isON()) { + //流程文件密级switch开启,密级权限校验 + if (HighSecurityUtil.fileSecuritySwitch()) { + ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model); + if (securityPermission.isErr()) { + return securityPermission.toString(); + } + } + String taskName = model.getTaskName(); + if ("步骤横表".equals(taskName)) { + // 重新设置生成id,与用户id + String uuid = UUIDGener.getUUID(); + model.setUserId(me.getUID()); - // 重新生成手册文件 - OutputAPIManager.getInstance().reGennerReport(me,model,uuid); + // 重新生成手册文件 + OutputAPIManager.getInstance().reGennerReport(me, model, uuid); - // 重新构建手册下载URL - id = uuid; - } - } - try { - ro = ResponseObject.newOkResponse(); - json.put("url", OutputDCFileProcessor.getReportDownloadURL(model.getWsId(), id, model.getProfileId(), me, model.getTaskName())); - ro.setData(json); - } catch (Exception e) { - ro = ResponseObject.newErrResponse(); - e.printStackTrace(); - } - } - return ro.toString(); - } + // 重新构建手册下载URL + id = uuid; + } + } + try { + ro = ResponseObject.newOkResponse(); + json.put("url", OutputDCFileProcessor.getReportDownloadURL(model.getWsId(), id, model.getProfileId(), me, model.getTaskName())); + ro.setData(json); + } catch (Exception e) { + ro = ResponseObject.newErrResponse(); + e.printStackTrace(); + } + } + return ro.toString(); + } - /* - * 预览报告 - * @param me - * @param wsid - * */ - @Mapping("com.awspaas.user.apps.coe.pal.output.zd_previewreport") - public String previewReport(UserContext me, String id) { - OutputTaskModel model = new OutputTask().getTaskReportById(id); - ResponseObject rs = ResponseObject.newOkResponse(); - if (model != null) { - //三员管理,流程文件密级switch开启,密级权限校验 - if (HighSecurityUtil.isON() && HighSecurityUtil.fileSecuritySwitch()){ - ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model); - if (securityPermission.isErr()){ - return securityPermission.toString(); - } - } - try { - return OutputDCFileProcessor.doPreviewReport(model.getWsId(), id, model.getProfileId(), me); - } catch (Exception e) { - rs = ResponseObject.newErrResponse(); - e.printStackTrace(); - } - } - return rs.toString(); - } + /* + * 预览报告 + * @param me + * @param wsid + * */ + @Mapping("com.awspaas.user.apps.coe.pal.output.zd_previewreport") + public String previewReport(UserContext me, String id) { + OutputTaskModel model = new OutputTask().getTaskReportById(id); + ResponseObject rs = ResponseObject.newOkResponse(); + if (model != null) { + //三员管理,流程文件密级switch开启,密级权限校验 + if (HighSecurityUtil.isON() && HighSecurityUtil.fileSecuritySwitch()) { + ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model); + if (securityPermission.isErr()) { + return securityPermission.toString(); + } + } + try { + return OutputDCFileProcessor.doPreviewReport(model.getWsId(), id, model.getProfileId(), me); + } catch (Exception e) { + rs = ResponseObject.newErrResponse(); + e.printStackTrace(); + } + } + return rs.toString(); + } - /** - * 日志下载 - * - * @param me - * @param id - * @return - */ - @Mapping("com.awspaas.user.apps.coe.pal.output.zd_downloadlog") - public String downloadLog(UserContext me, String id) { - OutputTaskModel model = new OutputTask().getTaskReportById(id); - ResponseObject ro = null; - JSONObject json = new JSONObject(); - if (model != null) { - //三员管理,流程文件密级switch开启,密级权限校验 - if (HighSecurityUtil.isON() && HighSecurityUtil.fileSecuritySwitch()){ - ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model); - if (securityPermission.isErr()){ - return securityPermission.toString(); - } - } - try { - ro = ResponseObject.newOkResponse(); - json.put("url", OutputDCFileProcessor.getReportLogDownloadURL(model.getWsId(), id, model.getProfileId(), me, model.getTaskName())); - ro.setData(json); - } catch (Exception e) { - ro = ResponseObject.newErrResponse(); - e.printStackTrace(); - } - } - return ro.toString(); - } + /** + * 日志下载 + * + * @param me + * @param id + * @return + */ + @Mapping("com.awspaas.user.apps.coe.pal.output.zd_downloadlog") + public String downloadLog(UserContext me, String id) { + OutputTaskModel model = new OutputTask().getTaskReportById(id); + ResponseObject ro = null; + JSONObject json = new JSONObject(); + if (model != null) { + //三员管理,流程文件密级switch开启,密级权限校验 + if (HighSecurityUtil.isON() && HighSecurityUtil.fileSecuritySwitch()) { + ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model); + if (securityPermission.isErr()) { + return securityPermission.toString(); + } + } + try { + ro = ResponseObject.newOkResponse(); + json.put("url", OutputDCFileProcessor.getReportLogDownloadURL(model.getWsId(), id, model.getProfileId(), me, model.getTaskName())); + ro.setData(json); + } catch (Exception e) { + ro = ResponseObject.newErrResponse(); + e.printStackTrace(); + } + } + return ro.toString(); + } + + + /** + * 报告克隆 + * + * @param me + * @param teamId + * @param wsid + * @return + */ + @Mapping("com.awspaas.user.apps.coe.pal.output.zd_clonetask") + public String cloneTask(UserContext me, String id, String teamId, String wsid) { + ResponseObject ro = null; + //三员管理,流程文件密级switch开启,密级权限校验 + if (HighSecurityUtil.isON() && HighSecurityUtil.fileSecuritySwitch()) { + OutputTaskModel model = new OutputTask().getTaskReportById(id); + if (null != model) { + ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model); + if (securityPermission.isErr()) { + return securityPermission.toString(); + } + } + } + try { + OutputAPIManager.getInstance().cloneTask(me.getUID(), id); + OutPutReportWeb outPutReport = new OutPutReportWeb(me); + int total = outPutReport.getCountTotal(wsid, teamId); + JSONObject json = new JSONObject(); + json.put("totalPage", total); + ro = ResponseObject.newOkResponse(); + ro.setData(json); + } catch (Exception e) { + ro = ResponseObject.newErrResponse(); + e.printStackTrace(); + } + return ro.toString(); + } + + + /** + * 制度手册正文导出 + * + * @param me + * @param teamId + * @param wsid + * @return + */ + @Mapping("com.awspaas.user.apps.coe.pal.output.zd_systemManualTextExport") + public String systemManualTextExport(UserContext me, String id, String teamId, String wsid) { + ResponseObject ro = null; + try { + ro = ResponseObject.newOkResponse(); + InstitutionalTextWeb institutionalTextWeb = new InstitutionalTextWeb(me); + institutionalTextWeb.systemManualTextExport(); + } catch (Exception e) { + ro = ResponseObject.newErrResponse(); + e.printStackTrace(); + } + return ro.toString(); + } - /** - * 报告克隆 - * - * @param me - * @param teamId - * @param wsid - * @return - */ - @Mapping("com.awspaas.user.apps.coe.pal.output.zd_clonetask") - public String cloneTask(UserContext me, String id, String teamId, String wsid) { - ResponseObject ro = null; - //三员管理,流程文件密级switch开启,密级权限校验 - if (HighSecurityUtil.isON() && HighSecurityUtil.fileSecuritySwitch()){ - OutputTaskModel model = new OutputTask().getTaskReportById(id); - if (null != model){ - ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model); - if (securityPermission.isErr()){ - return securityPermission.toString(); - } - } - } - try { - OutputAPIManager.getInstance().cloneTask(me.getUID(), id); - OutPutReportWeb outPutReport = new OutPutReportWeb(me); - int total = outPutReport.getCountTotal(wsid, teamId); - JSONObject json = new JSONObject(); - json.put("totalPage", total); - ro = ResponseObject.newOkResponse(); - ro.setData(json); - } catch (Exception e) { - ro = ResponseObject.newErrResponse(); - e.printStackTrace(); - } - return ro.toString(); - } } 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 02795953..fa3b7e42 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 @@ -1,28 +1,5 @@ package com.awspaas.apps.coe.pal.output.zd.report1; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.commons.lang.StringUtils; -import org.dom4j.Document; -import org.dom4j.DocumentException; -import org.dom4j.Element; - -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.extend.OutputAppProfile; @@ -32,35 +9,25 @@ 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.mvc.view.ResponseObject; import com.actionsoft.bpms.server.DispatcherRequest; 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.DBSql; import com.actionsoft.bpms.util.UtilDate; -import com.actionsoft.bpms.util.UtilFile; import com.actionsoft.bpms.util.UtilString; -import com.actionsoft.exception.AWSQuotaException; import com.actionsoft.sdk.local.SDK; import com.actionsoft.sdk.local.api.internal.PlatformAPIImpl; 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 java.io.FileNotFoundException; +import java.sql.Timestamp; +import java.util.*; import static com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil.specialCharTransfer; @@ -70,252 +37,256 @@ import static com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil.special * @author zhangming */ public class Report1Gener { - // 防止生成过程中,停用或卸载该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 = ""; + // 防止生成过程中,停用或卸载该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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 目的 + + + + + <#if (Purpose_count ==0 )> + + + + + + + + + + + + + + + + + <#else><#list Purpose_table as table1> + + + + + + + + + + + + + + + + + + ${table1} + + + + + + + + + + + + + + + + + + + + 术语 + + + + + <#if (term_table_count ==0 )> + + + + + + + + + + + + + + + + + + <#else> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 名称 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 定义 + + + + + <#list term_table as table4> + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table4.name} + + + + + + + + + + + + + + + + + + + + + + + + + + ${table4.desc} + + + + + + +undefinedundefined + + + + + + + + + + + + + + + + + 组织/ + + + 角色与职责 + + + + +<#if (organization_table_count ==0 )> + + + + + + + + + + + + + + + + + + +<#else> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 组织/角色 + + + + + + + + + + 名称 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 职责 + + + + + <#list organization_table as table5> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table5.name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $ + + + + + + + + + {table5.desc} + + + + +undefined +undefinedundefinedundefinedundefined +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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 +y7fdOgAAAABJRU5ErkJggk== + + + + + + + + + + + undefined + + undefined + + + + + + ────────────────────────────────────────────────── + + undefined + + undefined + +undefined +undefined + + + + + + ─────────────────────────────────────────────────── + + undefined + + undefined + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 以上信息为伊利公司所有,未经允许不得外传 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PAGE + + + + + + + + + + + + + + + + + + + + + + 10 + + + + + + + + + + + + + + + + undefined + + undefinedundefined + +undefinedundefinedundefinedundefined +undefinedundefinedundefined \ No newline at end of file