模型阅览界面提交

This commit is contained in:
zhal 2023-07-30 20:31:27 +08:00
parent a209efb3d3
commit 9f41faea21
6 changed files with 4500 additions and 4515 deletions

View File

@ -39,12 +39,15 @@ import com.sini.com.spire.doc.formatting.ParagraphFormat;
import freemarker.template.Configuration; import freemarker.template.Configuration;
import freemarker.template.Template; import freemarker.template.Template;
import freemarker.template.TemplateException; import freemarker.template.TemplateException;
import org.apache.commons.lang.StringUtils;
import java.awt.*; import java.awt.*;
import java.io.*; import java.io.*;
import java.util.List; import java.util.List;
import java.util.*; import java.util.*;
import static com.sini.com.spire.doc.documents.HorizontalAlignment.*;
public class OutputWordUtil { public class OutputWordUtil {
public static final String DEPARTMENT = "department"; // 部门 public static final String DEPARTMENT = "department"; // 部门
@ -367,12 +370,6 @@ public class OutputWordUtil {
//创建 Document 类的对象并从磁盘加载 Word 文档 //创建 Document 类的对象并从磁盘加载 Word 文档
Document document = new Document(outFile.getPath()); Document document = new Document(outFile.getPath());
/*//获取最后一节
Section section = document.getLastSection();
Paragraph paragraph = section.addParagraph();
paragraph.appendBreak(BreakType.Page_Break);*/
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1); String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
@ -560,7 +557,7 @@ public class OutputWordUtil {
ParagraphFormat paragraphFormat1 = paragraph1.getFormat(); ParagraphFormat paragraphFormat1 = paragraph1.getFormat();
paragraphFormat1.setHorizontalAlignment(HorizontalAlignment.Left); paragraphFormat1.setHorizontalAlignment(Left);
TextRange tr = paragraph1.appendText("相关文件"); TextRange tr = paragraph1.appendText("相关文件");
tr.getCharacterFormat().setBold(true); tr.getCharacterFormat().setBold(true);
@ -590,19 +587,24 @@ public class OutputWordUtil {
Table table = section.addTable(true); Table table = section.addTable(true);
table.resetCells(data.length + 1, header.length); table.resetCells(data.length + 1, header.length);
//自动调整表格大小
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
TableRow row = table.getRows().get(0); TableRow row = table.getRows().get(0);
row.isHeader(true); row.isHeader(true);
row.setHeight(20); row.setHeight(20);
row.setHeightType(TableRowHeightType.Exactly); row.setHeightType(TableRowHeightType.Auto);
for (int i = 0; i < header.length; i++) { for (int i = 0; i < header.length; i++) {
row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle); row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽 //设置固定列宽
row.getCells().get(0).setWidth(150); row.getCells().get(0).setWidth(150);
row.getCells().get(1).setWidth(500); row.getCells().get(1).setWidth(500);
Paragraph p = row.getCells().get(i).addParagraph(); Paragraph p = row.getCells().get(i).addParagraph();
p.getFormat().setHorizontalAlignment(HorizontalAlignment.Center); p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]); TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true); txtRange.getCharacterFormat().setBold(true);
} }
//将数据添加到其余行 //将数据添加到其余行
@ -617,6 +619,9 @@ public class OutputWordUtil {
dataRow.getCells().get(0).setWidth(150); dataRow.getCells().get(0).setWidth(150);
dataRow.getCells().get(1).setWidth(500); dataRow.getCells().get(1).setWidth(500);
dataRow.getCells().get(c).addParagraph().appendText(data[r][c]); dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
// cell.getCellFormat().setFitText(true); // 设置内容
} }
} }
@ -649,7 +654,7 @@ public class OutputWordUtil {
//添加段落设置一级序列 //添加段落设置一级序列
Paragraph paragraph2 = section.addParagraph(); Paragraph paragraph2 = section.addParagraph();
ParagraphFormat paragraphFormat2 = paragraph2.getFormat(); ParagraphFormat paragraphFormat2 = paragraph2.getFormat();
paragraphFormat2.setHorizontalAlignment(HorizontalAlignment.Left); paragraphFormat2.setHorizontalAlignment(Left);
TextRange tr2 = paragraph2.appendText("支持文件"); TextRange tr2 = paragraph2.appendText("支持文件");
tr2.getCharacterFormat().setBold(true); tr2.getCharacterFormat().setBold(true);
tr2.getCharacterFormat().setFontName("宋体"); tr2.getCharacterFormat().setFontName("宋体");
@ -676,17 +681,21 @@ public class OutputWordUtil {
Table table = section.addTable(true); Table table = section.addTable(true);
table.resetCells(data.length + 1, header.length); table.resetCells(data.length + 1, header.length);
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
TableRow row = table.getRows().get(0); TableRow row = table.getRows().get(0);
row.isHeader(true); row.isHeader(true);
row.setHeight(20); row.setHeight(20);
row.setHeightType(TableRowHeightType.Exactly); row.setHeightType(TableRowHeightType.Auto);
for (int i = 0; i < header.length; i++) { for (int i = 0; i < header.length; i++) {
row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle); row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽 //设置固定列宽
row.getCells().get(0).setWidth(150); row.getCells().get(0).setWidth(150);
row.getCells().get(1).setWidth(500); row.getCells().get(1).setWidth(500);
Paragraph p = row.getCells().get(i).addParagraph(); Paragraph p = row.getCells().get(i).addParagraph();
p.getFormat().setHorizontalAlignment(HorizontalAlignment.Center); p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]); TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true); txtRange.getCharacterFormat().setBold(true);
} }
@ -720,7 +729,8 @@ public class OutputWordUtil {
public int compare(UpfileModel o1, UpfileModel o2) { public int compare(UpfileModel o1, UpfileModel o2) {
String p1 = o1.getFileName(); String p1 = o1.getFileName();
String p2 = o2.getFileName(); String p2 = o2.getFileName();
if (p1.substring(0, 2).equals("附件") && p2.substring(0, 2).equals("附件") && p1.contains("") && p2.contains("")) {
if (p1.substring(0, 2).equals("附件") && p2.substring(0, 2).equals("附件") && p1.contains("") && p2.contains("") && StringUtils.isNumeric(p1.substring(2, p1.indexOf(""))) && StringUtils.isNumeric(p2.substring(2, p2.indexOf("")))) {
return Integer.parseInt(p1.substring(2, p1.indexOf(""))) - Integer.parseInt(p2.substring(2, p2.indexOf(""))); return Integer.parseInt(p1.substring(2, p1.indexOf(""))) - Integer.parseInt(p2.substring(2, p2.indexOf("")));
} else { } else {
@ -742,7 +752,7 @@ public class OutputWordUtil {
Paragraph paragraph4 = section.addParagraph(); Paragraph paragraph4 = section.addParagraph();
ParagraphFormat paragraphFormat4 = paragraph4.getFormat(); ParagraphFormat paragraphFormat4 = paragraph4.getFormat();
paragraphFormat4.setHorizontalAlignment(HorizontalAlignment.Left); paragraphFormat4.setHorizontalAlignment(Left);
TextRange tr4 = paragraph4.appendText("附件"); TextRange tr4 = paragraph4.appendText("附件");
@ -843,6 +853,7 @@ public class OutputWordUtil {
} }
try { try {
System.out.println("生成附件路径是=================="+outFile.getPath());
doc.saveToFile(outFile.getPath(), FileFormat.Docx_2013); doc.saveToFile(outFile.getPath(), FileFormat.Docx_2013);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -1003,7 +1014,7 @@ public class OutputWordUtil {
ParagraphFormat paragraphFormat4 = paragraph.getFormat(); ParagraphFormat paragraphFormat4 = paragraph.getFormat();
paragraphFormat4.setHorizontalAlignment(HorizontalAlignment.Left); paragraphFormat4.setHorizontalAlignment(Left);
TextRange tr4 = paragraph.appendText("表单/模板"); TextRange tr4 = paragraph.appendText("表单/模板");

View File

@ -4225,6 +4225,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
else else
throw new AWSException("创建流程手册失败:" + uuid); throw new AWSException("创建流程手册失败:" + uuid);
} else if ("data.form".equals(model.getMethodId())) { } else if ("data.form".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, uuid); taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId); JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) if ("ok".equals(object.getString("result")))
@ -4340,10 +4341,8 @@ public class DesignerRelationShapeWeb extends ActionWeb {
if (file.exists()) { if (file.exists()) {
File[] fileList = file.listFiles(); File[] fileList = file.listFiles();
if (fileList.length > 0) { if (fileList.length > 0) {
System.out.println("fileList==========" + fileList);
File docFile = null; File docFile = null;
for (File file2 : fileList) { for (File file2 : fileList) {
System.out.println("file2==============" + file2);
if (file2.isFile() && "xlsx".equals((file2.getName().substring(file2.getName().lastIndexOf(".") + 1)))) { if (file2.isFile() && "xlsx".equals((file2.getName().substring(file2.getName().lastIndexOf(".") + 1)))) {
docFile = file2; docFile = file2;
break; break;

View File

@ -1,54 +1,71 @@
package com.actionsoft.apps.coe.pal.pal.repository.designer.web; package com.actionsoft.apps.coe.pal.pal.repository.designer.web;
import java.awt.image.BufferedImage; import com.actionsoft.apps.AppsConst;
import java.io.File; import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Map.Entry;
import javax.imageio.ImageIO;
import com.actionsoft.apps.coe.pal.cooperation.CoeCooperationAPIManager; import com.actionsoft.apps.coe.pal.cooperation.CoeCooperationAPIManager;
import com.actionsoft.apps.coe.pal.cooperation.cache.CooperationCache; import com.actionsoft.apps.coe.pal.cooperation.cache.CooperationCache;
import com.actionsoft.apps.coe.pal.cooperation.constant.CoeCooperationConst; import com.actionsoft.apps.coe.pal.cooperation.constant.CoeCooperationConst;
import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationRoleModel; import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationRoleModel;
import com.actionsoft.apps.coe.pal.log.CoEOpLogAPI; import com.actionsoft.apps.coe.pal.log.CoEOpLogAPI;
import com.actionsoft.apps.coe.pal.log.CoEOpLogConst; import com.actionsoft.apps.coe.pal.log.CoEOpLogConst;
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryAPIManager; import com.actionsoft.apps.coe.pal.pal.comment.constant.PALCommentConst;
import com.actionsoft.apps.coe.pal.pal.comment.dao.PALComment;
import com.actionsoft.apps.coe.pal.pal.comment.model.PALCommentModel;
import com.actionsoft.apps.coe.pal.pal.manage.publish.constant.PublishConst;
import com.actionsoft.apps.coe.pal.pal.method.cache.PALMethodCache;
import com.actionsoft.apps.coe.pal.pal.method.constant.PALMethodConst;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeGroupModel;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeModel;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodLinkerModel;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodModel;
import com.actionsoft.apps.coe.pal.pal.method.util.PALMethodUtil;
import com.actionsoft.apps.coe.pal.pal.output.dao.OutputTask;
import com.actionsoft.apps.coe.pal.pal.output.extend.OutputAppManager;
import com.actionsoft.apps.coe.pal.pal.output.extend.OutputAppProfile;
import com.actionsoft.apps.coe.pal.pal.output.model.OutputTaskModel;
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.*; import com.actionsoft.apps.coe.pal.pal.repository.cache.*;
import com.actionsoft.apps.coe.pal.pal.ws.dao.CoeWorkSpace; import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelCorrelateDao;
import com.actionsoft.apps.coe.pal.util.SubUtil; import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
import com.actionsoft.bpms.commons.database.RowMap; import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
import com.actionsoft.bpms.util.*; import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
import com.actionsoft.apps.coe.pal.pal.ws.model.CoeWorkSpaceModel; import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.adapter.CoeDesginerAdapter;
import com.actionsoft.apps.coe.pal.pal.repository.designer.constant.CoeDesignerConstant;
import com.actionsoft.apps.coe.pal.pal.repository.designer.io.file.helper.CoeFile;
import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BPMNModel;
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel;
import com.actionsoft.apps.coe.pal.pal.repository.designer.realtime.manage.CoeListenCacheManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.realtime.model.ListenClient;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.manager.DesignerRelationShapeCacheManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapePasteModel;
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.designer.util.Img2Pdf;
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.ShapeUtil;
import com.actionsoft.apps.coe.pal.pal.repository.model.*;
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
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.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessRecycleWeb;
import com.actionsoft.apps.coe.pal.pal.ws.web.VersionUtil;
import com.actionsoft.apps.coe.pal.system.property.CoePropertyUtil;
import com.actionsoft.apps.coe.pal.team.user.dao.CoeUserDaoFactory;
import com.actionsoft.apps.coe.pal.team.user.model.CoeUserModel;
import com.actionsoft.apps.coe.pal.util.HighSecurityUtil; import com.actionsoft.apps.coe.pal.util.HighSecurityUtil;
import com.actionsoft.bpms.bpmn.engine.cache.util.ProcessDefVersionUtil; import com.actionsoft.apps.coe.pal.util.JsonUtil;
import com.google.common.collect.Lists; import com.actionsoft.apps.coe.pal.util.StringHandleUtil;
import com.google.common.collect.Sets;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import com.actionsoft.apps.AppsConst;
import com.actionsoft.apps.lifecycle.api.AppsAPIManager; import com.actionsoft.apps.lifecycle.api.AppsAPIManager;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile; import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.bpmn.constant.ProcessDefinitionConst; import com.actionsoft.bpms.bpmn.constant.ProcessDefinitionConst;
import com.actionsoft.bpms.bpmn.engine.cache.ProcessDefCache; import com.actionsoft.bpms.bpmn.engine.cache.ProcessDefCache;
import com.actionsoft.bpms.bpmn.engine.cache.util.ProcessDefVersionUtil;
import com.actionsoft.bpms.bpmn.engine.model.def.ProcessDefinition; import com.actionsoft.bpms.bpmn.engine.model.def.ProcessDefinition;
import com.actionsoft.bpms.bpmn.modeler.constant.BPMNConstant; import com.actionsoft.bpms.bpmn.modeler.constant.BPMNConstant;
import com.actionsoft.bpms.bpmn.modeler.constant.BPMNDesignerConstant; import com.actionsoft.bpms.bpmn.modeler.constant.BPMNDesignerConstant;
@ -82,67 +99,7 @@ import com.actionsoft.bpms.server.fs.DCContext;
import com.actionsoft.bpms.server.fs.dc.DCProfileManager; import com.actionsoft.bpms.server.fs.dc.DCProfileManager;
import com.actionsoft.bpms.server.fs.dc.DCUtil; import com.actionsoft.bpms.server.fs.dc.DCUtil;
import com.actionsoft.bpms.util.Base64; import com.actionsoft.bpms.util.Base64;
import com.actionsoft.bpms.util.UUIDGener; import com.actionsoft.bpms.util.*;
import com.actionsoft.bpms.util.UtilDate;
import com.actionsoft.bpms.util.UtilFile;
import com.actionsoft.bpms.util.UtilString;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.pal.comment.constant.PALCommentConst;
import com.actionsoft.apps.coe.pal.pal.comment.dao.PALComment;
import com.actionsoft.apps.coe.pal.pal.comment.model.PALCommentModel;
import com.actionsoft.apps.coe.pal.pal.manage.publish.constant.PublishConst;
import com.actionsoft.apps.coe.pal.pal.method.cache.PALMethodCache;
import com.actionsoft.apps.coe.pal.pal.method.constant.PALMethodConst;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeGroupModel;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeModel;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodLinkerModel;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodModel;
import com.actionsoft.apps.coe.pal.pal.method.util.PALMethodUtil;
import com.actionsoft.apps.coe.pal.pal.output.dao.OutputTask;
import com.actionsoft.apps.coe.pal.pal.output.extend.OutputAppManager;
import com.actionsoft.apps.coe.pal.pal.output.extend.OutputAppProfile;
import com.actionsoft.apps.coe.pal.pal.output.model.OutputTaskModel;
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.dao.CoeProcessLevelCorrelateDao;
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.adapter.CoeDesginerAdapter;
import com.actionsoft.apps.coe.pal.pal.repository.designer.constant.CoeDesignerConstant;
import com.actionsoft.apps.coe.pal.pal.repository.designer.io.file.helper.CoeFile;
import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BPMNModel;
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel;
import com.actionsoft.apps.coe.pal.pal.repository.designer.realtime.manage.CoeListenCacheManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.realtime.model.ListenClient;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.manager.DesignerRelationShapeCacheManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapePasteModel;
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.designer.util.Img2Pdf;
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.ShapeUtil;
import com.actionsoft.apps.coe.pal.pal.repository.model.CoeProcessLevelCorrelateModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryAttributeModel;
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.model.PALRepositoryShapeAttributeModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryShapeConfigModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
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.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessRecycleWeb;
import com.actionsoft.apps.coe.pal.pal.ws.web.VersionUtil;
import com.actionsoft.apps.coe.pal.system.property.CoePropertyUtil;
import com.actionsoft.apps.coe.pal.team.user.dao.CoeUserDaoFactory;
import com.actionsoft.apps.coe.pal.team.user.model.CoeUserModel;
import com.actionsoft.apps.coe.pal.util.JsonUtil;
import com.actionsoft.apps.coe.pal.util.StringHandleUtil;
import com.actionsoft.exception.AWSException; import com.actionsoft.exception.AWSException;
import com.actionsoft.exception.BPMNDefException; import com.actionsoft.exception.BPMNDefException;
import com.actionsoft.i18n.I18nRes; import com.actionsoft.i18n.I18nRes;
@ -151,7 +108,27 @@ import com.actionsoft.sdk.local.api.AppAPI;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Map.Entry;
public class CoeDesignerWeb extends ActionWeb { public class CoeDesignerWeb extends ActionWeb {
@ -555,8 +532,6 @@ public class CoeDesignerWeb extends ActionWeb {
JSONObject relationShapeModels = new JSONObject(); JSONObject relationShapeModels = new JSONObject();
/*************************************更新当前最新的属性设置 byzhaolei*******************************************************/ /*************************************更新当前最新的属性设置 byzhaolei*******************************************************/
CoeDesignerShapeAPIManager manager = CoeDesignerShapeAPIManager.getInstance(); CoeDesignerShapeAPIManager manager = CoeDesignerShapeAPIManager.getInstance();
@ -579,12 +554,6 @@ public class CoeDesignerWeb extends ActionWeb {
List<String> sortList = manager.handleShapeAttrSortAndName(definition, plModel.getWsId(), plModel.getMethodId(), attrList); List<String> sortList = manager.handleShapeAttrSortAndName(definition, plModel.getWsId(), plModel.getMethodId(), attrList);
JSONObject elements = definition.getJSONObject("elements"); JSONObject elements = definition.getJSONObject("elements");
for (String id : elements.keySet()) { for (String id : elements.keySet()) {
JSONObject shapeObj = elements.getJSONObject(id); JSONObject shapeObj = elements.getJSONObject(id);
@ -670,6 +639,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 获取形状描述定义 * 获取形状描述定义
*
* @param macroLibraries * @param macroLibraries
*/ */
private void getMethodObjectDesc(Map<String, Object> macroLibraries) { private void getMethodObjectDesc(Map<String, Object> macroLibraries) {
@ -691,6 +661,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 帮助工具栏扩展 * 帮助工具栏扩展
*
* @param macroLibraries * @param macroLibraries
*/ */
private void getHelptoolExtUrl(Map<String, Object> macroLibraries) { private void getHelptoolExtUrl(Map<String, Object> macroLibraries) {
@ -1323,6 +1294,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 版本创建返回创建的结果 * 版本创建返回创建的结果
* 关联流程创建新版本 * 关联流程创建新版本
*
* @param uuid * @param uuid
* @param processDefId * @param processDefId
* @param correlateType 关联类型 1:PAL推送到BPMS其他:BPMS关联到PAL * @param correlateType 关联类型 1:PAL推送到BPMS其他:BPMS关联到PAL
@ -1572,6 +1544,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 创建节点关系 * 创建节点关系
*
* @param oldModel * @param oldModel
* @param createNewShapeId true 返回map中key为文件节点idvalue为新创建的id false 返回map中key为文件节点idvalue与key相同 * @param createNewShapeId true 返回map中key为文件节点idvalue为新创建的id false 返回map中key为文件节点idvalue与key相同
* @return map key:oldShapeId value:newShapeId/oldShapeId * @return map key:oldShapeId value:newShapeId/oldShapeId
@ -1618,6 +1591,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 复制出现的时候-已无出现复制功能 * 复制出现的时候-已无出现复制功能
*
* @param uuId * @param uuId
* @deprecated * @deprecated
*/ */
@ -1768,6 +1742,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 下载导出流程图片 * 下载导出流程图片
*
* @param uuid * @param uuid
* @return * @return
*/ */
@ -2028,6 +2003,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 下载图片为pdf * 下载图片为pdf
*
* @param ids 流程id逗号分隔 * @param ids 流程id逗号分隔
* @return * @return
*/ */
@ -2860,6 +2836,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 平台与PAL是否存在共享状态 * 平台与PAL是否存在共享状态
*
* @param processDefId * @param processDefId
* @return * @return
*/ */
@ -2887,6 +2864,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 门户流程详情详情 * 门户流程详情详情
*
* @param rUUID 流程ID * @param rUUID 流程ID
* @param upVisit 记录访问量+1true记录 false不记录 * @param upVisit 记录访问量+1true记录 false不记录
* @param taskId 流程手册id * @param taskId 流程手册id
@ -3064,7 +3042,6 @@ public class CoeDesignerWeb extends ActionWeb {
JSONObject relationShapeModels = new JSONObject(); JSONObject relationShapeModels = new JSONObject();
String define = PALRepositoryQueryAPIManager.getInstance().getProcessDefinition(_uc, plModel.getId()); String define = PALRepositoryQueryAPIManager.getInstance().getProcessDefinition(_uc, plModel.getId());
JSONObject definition = JSONObject.parseObject(define); JSONObject definition = JSONObject.parseObject(define);
JSONObject elements = definition.getJSONObject("elements"); JSONObject elements = definition.getJSONObject("elements");
@ -3297,7 +3274,9 @@ public class CoeDesignerWeb extends ActionWeb {
} }
} }
modelList = tempList; modelList = tempList;
modelList.sort((m1, m2) -> {return m1.getId().compareTo(m2.getId());}); modelList.sort((m1, m2) -> {
return m1.getId().compareTo(m2.getId());
});
for (DesignerShapeRelationModel model : modelList) { for (DesignerShapeRelationModel model : modelList) {
if (attrTypeMap.containsKey(model.getAttrId())) { if (attrTypeMap.containsKey(model.getAttrId())) {
if ("relation".equals(attrTypeMap.get(model.getAttrId()))) { if ("relation".equals(attrTypeMap.get(model.getAttrId()))) {
@ -3341,18 +3320,12 @@ public class CoeDesignerWeb extends ActionWeb {
} }
} }
/** /**
* 门户流程详情详情 (移动端) * 门户流程详情详情 (移动端)
*
* @param rUUID 流程ID * @param rUUID 流程ID
* @param upVisit 记录访问量+1true记录 false不记录 * @param upVisit 记录访问量+1true记录 false不记录
* @param taskId 流程手册id * @param taskId 流程手册id
@ -3530,7 +3503,6 @@ public class CoeDesignerWeb extends ActionWeb {
JSONObject relationShapeModels = new JSONObject(); JSONObject relationShapeModels = new JSONObject();
String define = PALRepositoryQueryAPIManager.getInstance().getProcessDefinition(_uc, plModel.getId()); String define = PALRepositoryQueryAPIManager.getInstance().getProcessDefinition(_uc, plModel.getId());
JSONObject definition = JSONObject.parseObject(define); JSONObject definition = JSONObject.parseObject(define);
JSONObject elements = definition.getJSONObject("elements"); JSONObject elements = definition.getJSONObject("elements");
@ -3762,7 +3734,9 @@ public class CoeDesignerWeb extends ActionWeb {
} }
} }
modelList = tempList; modelList = tempList;
modelList.sort((m1, m2) -> {return m1.getId().compareTo(m2.getId());}); modelList.sort((m1, m2) -> {
return m1.getId().compareTo(m2.getId());
});
for (DesignerShapeRelationModel model : modelList) { for (DesignerShapeRelationModel model : modelList) {
if (attrTypeMap.containsKey(model.getAttrId())) { if (attrTypeMap.containsKey(model.getAttrId())) {
if ("relation".equals(attrTypeMap.get(model.getAttrId()))) { if ("relation".equals(attrTypeMap.get(model.getAttrId()))) {
@ -3798,6 +3772,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 根据method获取当前文件所定义的自定义属性 * 根据method获取当前文件所定义的自定义属性
*
* @param model * @param model
*/ */
public List<PALMethodAttributeModel> getFileAttrListByMethod(PALRepositoryModel model) { public List<PALMethodAttributeModel> getFileAttrListByMethod(PALRepositoryModel model) {
@ -3879,6 +3854,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 门户打开之前的校验 * 门户打开之前的校验
* 对已发布的流程只能打开 * 对已发布的流程只能打开
*
* @param uuid * @param uuid
* @return * @return
*/ */
@ -3912,6 +3888,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 校验形状属性 * 校验形状属性
*
* @param uuid * @param uuid
* @param define 若为空字符串则获取系统当前保存的define进行校验 * @param define 若为空字符串则获取系统当前保存的define进行校验
* @return * @return
@ -3990,6 +3967,7 @@ public class CoeDesignerWeb extends ActionWeb {
private class ExcelData { private class ExcelData {
public String TARGET_METHOD_SCOPE = "process.bpmn2,process.epc,process.flowchart"; public String TARGET_METHOD_SCOPE = "process.bpmn2,process.epc,process.flowchart";
public String PROCESS_STEP = "userTask,serviceTask,manualTask,receiveTask,sendTask,scriptTask,businessRuleTask,callActivityCallingProcess,method,process,predefinedProcess,decision"; public String PROCESS_STEP = "userTask,serviceTask,manualTask,receiveTask,sendTask,scriptTask,businessRuleTask,callActivityCallingProcess,method,process,predefinedProcess,decision";
public JSONArray getExcelData(String uuid) { public JSONArray getExcelData(String uuid) {
PALRepositoryModel repositoryModel = PALRepositoryCache.getCache().get(uuid); PALRepositoryModel repositoryModel = PALRepositoryCache.getCache().get(uuid);
List<Map<String, Object>> repositoryFileElements = CoeDesignerUtil.getShapeMessageJson(uuid); //流程文件内容 List<Map<String, Object>> repositoryFileElements = CoeDesignerUtil.getShapeMessageJson(uuid); //流程文件内容
@ -4033,6 +4011,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 设计器-查询版本相关数据 * 设计器-查询版本相关数据
*
* @param wsId * @param wsId
* @param teamId * @param teamId
* @param id * @param id
@ -4135,6 +4114,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 设计器-创建新版本 * 设计器-创建新版本
*
* @param wsId * @param wsId
* @param teamId * @param teamId
* @param id * @param id
@ -4243,7 +4223,6 @@ public class CoeDesignerWeb extends ActionWeb {
CreateRelevancePerformanceModel(isLargeIteration, oldUUID, PALRepositoryCache.getCache().get(newUUID), mapNewUUID, tempVer); CreateRelevancePerformanceModel(isLargeIteration, oldUUID, PALRepositoryCache.getCache().get(newUUID), mapNewUUID, tempVer);
CoeProcessLevelUtil.copyRepositoryProperty(PALRepositoryCache.getCache().get(oldUUID), PALRepositoryCache.getCache().get(newUUID), mapNewUUID, _uc); CoeProcessLevelUtil.copyRepositoryProperty(PALRepositoryCache.getCache().get(oldUUID), PALRepositoryCache.getCache().get(newUUID), mapNewUUID, _uc);
ro = ResponseObject.newOkResponse("创建成功"); ro = ResponseObject.newOkResponse("创建成功");
ro.put("uuid", lastplModel.getId()); ro.put("uuid", lastplModel.getId());
@ -4263,6 +4242,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 操作升级版本/复制副本 * 操作升级版本/复制副本
*
* @param isLargeIteration * @param isLargeIteration
* @param olduuid * @param olduuid
*/ */
@ -4452,9 +4432,9 @@ public class CoeDesignerWeb extends ActionWeb {
} }
/** /**
* 同步复制文件属性绩效属性数据 * 同步复制文件属性绩效属性数据
*
* @param wsId * @param wsId
* @param teamId * @param teamId
* @param sourceIds * @param sourceIds
@ -4477,7 +4457,6 @@ public class CoeDesignerWeb extends ActionWeb {
String[] splitRelationFileId; String[] splitRelationFileId;
if (UtilString.isNotEmpty(relationFileId)) { if (UtilString.isNotEmpty(relationFileId)) {
if (relationFileId.contains(",")) { if (relationFileId.contains(",")) {
relationFileId = relationFileId.split(",")[0]; relationFileId = relationFileId.split(",")[0];
} }
@ -4549,8 +4528,6 @@ public class CoeDesignerWeb extends ActionWeb {
} }
} }
@ -4570,16 +4547,13 @@ public class CoeDesignerWeb extends ActionWeb {
} }
return ro.toString(); return ro.toString();
} }
/** /**
* 设计器-删除某版本文件(放入回收站) * 设计器-删除某版本文件(放入回收站)
*
* @param wsId * @param wsId
* @param teamId * @param teamId
* @param id 模型文件id * @param id 模型文件id
@ -4613,6 +4587,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 同步删除关联绩效角色数据模型 * 同步删除关联绩效角色数据模型
*
* @param wsId * @param wsId
* @param teamId * @param teamId
* @param id * @param id
@ -4655,6 +4630,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 设计器-切换版本状态为使用中 * 设计器-切换版本状态为使用中
*
* @param wsId * @param wsId
* @param teamId * @param teamId
* @param id * @param id
@ -4684,6 +4660,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 将关联模型(角色绩效)同步更改使用中状态 * 将关联模型(角色绩效)同步更改使用中状态
*
* @param wsId * @param wsId
* @param teamId * @param teamId
* @param id * @param id
@ -4725,6 +4702,7 @@ public class CoeDesignerWeb extends ActionWeb {
/** /**
* 将关联模型绩效同步更改使用中状态 * 将关联模型绩效同步更改使用中状态
*
* @param wsId * @param wsId
* @param teamId * @param teamId
* @param id * @param id
@ -4759,8 +4737,6 @@ public class CoeDesignerWeb extends ActionWeb {
} }
// 生成更多特性的json串 // 生成更多特性的json串
public String getMoreAttritbute(UserContext me, String type, String wsId, String uuid, String processDefId, String shapeName, String category, String defaultCategory) { public String getMoreAttritbute(UserContext me, String type, String wsId, String uuid, String processDefId, String shapeName, String category, String defaultCategory) {
if (UtilString.isEmpty(category)) { if (UtilString.isEmpty(category)) {

View File

@ -819,7 +819,6 @@
//隐藏评论div //隐藏评论div
function hideLayerSide() { function hideLayerSide() {
debugger;
$(".pinglun").animate({ "right": "-25%", "width": "25%", "height": "85%" }); $(".pinglun").animate({ "right": "-25%", "width": "25%", "height": "85%" });
$(".floatBtnDiv").animate({ "right":"-1%", "width": "69px", "height": "auto" }); $(".floatBtnDiv").animate({ "right":"-1%", "width": "69px", "height": "auto" });
} }

View File

@ -23,7 +23,7 @@ function showByType() {
if(methodId=="data.form"){ if(methodId=="data.form"){
$("#processAttr").hide(); $("#processAttr").hide();
}else if(methodId=="control.policy"){ }else if(methodId=="control.policy"){
$("#processAttr").text("条款"); $("#processAttr").hide();
} }
} }
@ -1539,7 +1539,7 @@ function initProcessDesc() {
$('#relevantDocument').append(b); $('#relevantDocument').append(b);
} }
$('#portalDescDock').find('table').append(t); $('#processFileDockg').find('table').append(t);
// $('#portalDescDock').append('<table class="awsui-table"><tr><td>&nbsp;</td></tr></table>'); // $('#portalDescDock').append('<table class="awsui-table"><tr><td>&nbsp;</td></tr></table>');
} }