diff --git a/com.actionsoft.apps.coe.method.process.epc/method/process.epc/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.method.process.epc/method/process.epc/diagram.attribute.custom.xml
index d1158095..d1aa55af 100644
--- a/com.actionsoft.apps.coe.method.process.epc/method/process.epc/diagram.attribute.custom.xml
+++ b/com.actionsoft.apps.coe.method.process.epc/method/process.epc/diagram.attribute.custom.xml
@@ -4,27 +4,26 @@
-
+
-
-
+
+
-
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
@@ -34,5 +33,8 @@
-
+
+
+
+
diff --git a/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册2.doc b/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册2.doc
index 6bfec52d..35be6c6c 100644
Binary files a/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册2.doc and b/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册2.doc differ
diff --git a/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册2.xml b/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册2.xml
index 0921f9de..5b9d3d71 100644
--- a/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册2.xml
+++ b/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册2.xml
@@ -1923,7 +1923,7 @@ jM/of07/BWuyjU4AAAvwBAAAABI0Vng=
- 流程文件
+
@@ -5280,8 +5280,6 @@ y7fdOgAAAABJRU5ErkJggk==
<#else>
-
-
diff --git a/com.actionsoft.apps.coe.pal.output.pr/步骤竖表-流程手册2.doc b/com.actionsoft.apps.coe.pal.output.pr/步骤竖表-流程手册2.doc
index 41550e87..ffcd2add 100644
Binary files a/com.actionsoft.apps.coe.pal.output.pr/步骤竖表-流程手册2.doc and b/com.actionsoft.apps.coe.pal.output.pr/步骤竖表-流程手册2.doc differ
diff --git a/com.actionsoft.apps.coe.pal.output.pr/步骤竖表-流程手册2.xml b/com.actionsoft.apps.coe.pal.output.pr/步骤竖表-流程手册2.xml
index f7a5e526..5d6124be 100644
--- a/com.actionsoft.apps.coe.pal.output.pr/步骤竖表-流程手册2.xml
+++ b/com.actionsoft.apps.coe.pal.output.pr/步骤竖表-流程手册2.xml
@@ -1948,7 +1948,7 @@ qXElbvnPjM/of07/BTwAi9oAAAvwBAAAABI0Vng=
- 流程文件
+
@@ -6760,8 +6760,7 @@ y7fdOgAAAABJRU5ErkJggk==
<#else>
<#list file_table as table4>
-
-
+
@@ -6776,25 +6775,13 @@ y7fdOgAAAABJRU5ErkJggk==
<#list repository_shape_table as table1>
<#list table1.shape_File_Table as table11>
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
${table11.shape_file_name}
@@ -6802,13 +6789,7 @@ y7fdOgAAAABJRU5ErkJggk==
#list>
#list>
-
-
-
-
-
-
-
+
#if>
diff --git a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar
index deddcc4c..e437ef24 100644
Binary files a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar and b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar differ
diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java
index 617f5950..2f7d2bf7 100644
--- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java
+++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java
@@ -693,4 +693,16 @@ public class PublisherController {
ProcessPublishWeb publishWeb = new ProcessPublishWeb(me);
return publishWeb.getOrgInfo(me);
}
+
+ /**
+ * 下载日志
+ * @param me
+ * @param taskId
+ * @return
+ */
+ @Mapping("com.actionsoft.apps.coe.pal.publisher_output_download")
+ public String downloadOutput(UserContext me, String taskId, String uuid) {
+ ProcessPublishWeb publishWeb = new ProcessPublishWeb(me);
+ return publishWeb.downloadOutput(taskId, uuid);
+ }
}
\ No newline at end of file
diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java
index f4786d29..1a335127 100644
--- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java
+++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java
@@ -2892,7 +2892,7 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk
}
object2.put("user", userName);
object2.put("departmentPath", getDeptPath(userId));
- object2.put("publishDate", UtilDate.datetimeFormat(object.getTimestamp("date")));
+ object2.put("publishDate", UtilDate.datetimeFormat((Timestamp) object.getTimestamp("date")));
object2.put("publishDesc", object.getString("desc"));
} else {
object2.put("user", "");
@@ -3156,7 +3156,7 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk
}
object2.put("name", palModel.getName() + "[" + intro + "]");
object2.put("user", userName);
- object2.put("publishDate", UtilDate.datetimeFormat(object.getTimestamp("publishDate")));
+ object2.put("publishDate", UtilDate.datetimeFormat((Timestamp) object.getTimestamp("publishDate")));
object2.put("publishDesc", object.getString("publishDesc"));
object2.put("isPublish", palModel.isPublish() ? "1" : "0");
object2.put("method", palModel.getMethodId());
@@ -3299,7 +3299,7 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk
object2.put("name", palModel.getName() + "[" + intro + "]");
object2.put("user", userName);
object2.put("departmentPath", getDeptPath(object.getString("userId")));
- object2.put("publishDate", UtilDate.datetimeFormat(object.getTimestamp("publishDate")));
+ object2.put("publishDate", UtilDate.datetimeFormat((Timestamp) object.getTimestamp("publishDate")));
object2.put("publishDesc", object.getString("publishDesc"));
object2.put("isPublish", palModel.isPublish() ? "1" : "0");
object2.put("method", palModel.getMethodId());
diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java
index 6facb4c7..37c2aca4 100644
--- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java
+++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java
@@ -1,5 +1,6 @@
package com.actionsoft.apps.coe.pal.publisher.client.web;
+import java.io.File;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@@ -19,6 +20,8 @@ import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.cooperation.cache.CooperationCache;
import com.actionsoft.apps.coe.pal.cooperation.CoeCooperationAPIManager;
import com.actionsoft.apps.coe.pal.cooperation.model.CoeCooperationTeamModel;
+import com.actionsoft.apps.coe.pal.log.CoEOpLogAPI;
+import com.actionsoft.apps.coe.pal.log.CoEOpLogConst;
import com.actionsoft.apps.coe.pal.pal.manage.publish.PublishAPIManager;
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishHistoryCache;
import com.actionsoft.apps.coe.pal.pal.manage.publish.constant.PublishConst;
@@ -27,6 +30,9 @@ import com.actionsoft.apps.coe.pal.pal.manage.publish.model.PublishHistoryModel;
import com.actionsoft.apps.coe.pal.pal.manage.publish.model.PublishListHistoryModel;
import com.actionsoft.apps.coe.pal.pal.method.PALMethodManager;
import com.actionsoft.apps.coe.pal.pal.method.cache.PALMethodCache;
+import com.actionsoft.apps.coe.pal.pal.output.OutputAPIManager;
+import com.actionsoft.apps.coe.pal.pal.output.dao.OutputTask;
+import com.actionsoft.apps.coe.pal.pal.output.model.OutputTaskModel;
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.dao.PALRepository;
@@ -61,6 +67,8 @@ import com.actionsoft.bpms.org.cache.UserCache;
import com.actionsoft.bpms.org.model.UserModel;
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.DCUtil;
import com.actionsoft.bpms.util.*;
import com.actionsoft.exception.AWSException;
import com.actionsoft.i18n.I18nRes;
@@ -75,7 +83,6 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import org.apache.commons.lang.StringUtils;
-import org.xlsx4j.sml.Row;
/**
* 流程发布App
@@ -814,7 +821,8 @@ public class ProcessPublishWeb extends ActionWeb {
JSONObject object = new JSONObject();
object.put("id", model.getId());
object.put("name", model.getName());
- object.put("version", model.getVersion());
+ object.put("version", VersionUtil.getVersionStr(model.getVersion()));
+ // object.put("version", model.getVersion());
ja.add(object);
}
}
@@ -1683,11 +1691,11 @@ public class ProcessPublishWeb extends ActionWeb {
newObj.put("publishFileId", newBo.getString("PUBLISHFILEID"));
PALRepositoryModel model = PALRepositoryCache.getCache().get(newBo.getString("PUBLISHFILEID"));
if (model != null) {
- newObj.put("fileVersion", model.getVersion());
+ newObj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
newObj.put("methodId", model.getMethodId());
newObj.put("category", model.getMethodCategory());
} else {
- newObj.put("fileVersion", 1);
+ newObj.put("fileVersion", "1.0");
newObj.put("methodId", "1");
newObj.put("category", "1");
}
@@ -1704,7 +1712,7 @@ public class ProcessPublishWeb extends ActionWeb {
JSONArray array = new JSONArray();
PALRepositoryModel model = PALRepositoryCache.getCache().get(changeBo.getString("CHANGEFILEID"));
if (model != null) {
- changeObj.put("fileVersion", model.getVersion());
+ changeObj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
changeObj.put("methodId", model.getMethodId());
changeObj.put("category", model.getMethodCategory());
List list2 = PALRepositoryCache.getByVersionId(wsId, model.getVersionId());
@@ -1721,23 +1729,23 @@ public class ProcessPublishWeb extends ActionWeb {
JSONObject object = new JSONObject();
object.put("text", model2.getName());
object.put("id", model2.getId());
- object.put("version", model2.getVersion());
+ object.put("version", VersionUtil.getVersionStr(model2.getVersion()));
array.add(object);
}
}
} else {
- changeObj.put("fileVersion", 1);
+ changeObj.put("fileVersion", "1.0");
changeObj.put("methodId", "1");
changeObj.put("category", "1");
}
changeObj.put("targetFiles", array);
PALRepositoryModel targetModel = PALRepositoryCache.getCache().get(changeBo.getString("CHANGEDFILEIDNEW"));
if (targetModel != null) {
- changeObj.put("targetFileVersion", targetModel.getVersion());
+ changeObj.put("targetFileVersion", VersionUtil.getVersionStr(targetModel.getVersion()));
changeObj.put("targetMethodId", targetModel.getMethodId());
changeObj.put("targetCategory", targetModel.getMethodCategory());
} else {
- changeObj.put("targetFileVersion", 1);
+ changeObj.put("targetFileVersion", "1.0");
changeObj.put("targetMethodId", "1");
changeObj.put("targetCategory", "1");
}
@@ -1748,11 +1756,11 @@ public class ProcessPublishWeb extends ActionWeb {
stopObj.put("stopFileId", stopBo.getString("STOPFILEID"));
PALRepositoryModel model = PALRepositoryCache.getCache().get(stopBo.getString("STOPFILEID"));
if (model != null) {
- stopObj.put("fileVersion", model.getVersion());
+ stopObj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
stopObj.put("methodId", model.getMethodId());
stopObj.put("category", model.getMethodCategory());
} else {
- stopObj.put("fileVersion", 1);
+ stopObj.put("fileVersion", "1.0");
stopObj.put("methodId", "1");
stopObj.put("category", "1");
}
@@ -1999,6 +2007,12 @@ public class ProcessPublishWeb extends ActionWeb {
if (!SDK.getAppAPI().isActive("com.actionsoft.apps.coe.pal.output.pr")) {
return ResponseObject.newErrResponse("流程手册未安装或已暂停").toString();
}
+ if (!SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.bd")) {
+ return ResponseObject.newErrResponse("表单手册未安装或已暂停").toString();
+ }
+ if (!SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.zd")) {
+ return ResponseObject.newErrResponse("制度手册未安装或已暂停").toString();
+ }
ResponseObject ro = ResponseObject.newOkResponse();
// 校验
PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid);
@@ -2006,7 +2020,11 @@ public class ProcessPublishWeb extends ActionWeb {
throw new AWSException("没有找到文件:" + uuid);
}
String taskId = "";
- if ("process".equals(model.getMethodCategory()) && !"process.evc".equals(model.getMethodId()) && !"default".equals(model.getMethodId())) {
+ if (("process".equals(model.getMethodCategory()) || "data".equals(model.getMethodCategory()) || "control".equals(model.getMethodCategory())) && !"default".equals(model.getMethodId())) {
+ } else {
+ throw new AWSException("文件不支持创建流程手册:" + uuid);
+ }
+ if ("process".equals(model.getMethodCategory())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
@@ -2014,8 +2032,22 @@ public class ProcessPublishWeb extends ActionWeb {
} else {
throw new AWSException("创建流程手册失败:" + uuid);
}
- } else {
- throw new AWSException("文件不支持创建流程手册:" + uuid);
+ } else if ("data".equals(model.getMethodCategory())) {
+ taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, uuid);
+ JSONObject object = JSONObject.parseObject(taskId);
+ if ("ok".equals(object.getString("result"))) {
+ taskId = object.getJSONObject("data").getString("taskId");
+ } else {
+ throw new AWSException("创建流程手册失败:" + uuid);
+ }
+ } else if ("control".equals(model.getMethodCategory())) {
+ taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, _uc.getUID(), teamId, uuid);
+ JSONObject object = JSONObject.parseObject(taskId);
+ if ("ok".equals(object.getString("result"))) {
+ taskId = object.getJSONObject("data").getString("taskId");
+ } else {
+ throw new AWSException("创建流程手册失败:" + uuid);
+ }
}
ro.put("taskId", taskId);
return ro.toString();
@@ -2044,7 +2076,8 @@ public class ProcessPublishWeb extends ActionWeb {
JSONObject object = new JSONObject();
object.put("id", model.getId());
object.put("text", model.getName());
- object.put("version", model.getVersion());
+ object.put("version", VersionUtil.getVersionStr(model.getVersion()));
+ // object.put("version", model.getVersion());
array.add(object);
}
}
@@ -2297,7 +2330,8 @@ public class ProcessPublishWeb extends ActionWeb {
obj.put("type", type);
obj.put("id", m.getId());
obj.put("name", m.getName());
- obj.put("version", m.getVersion());
+ obj.put("version", VersionUtil.getVersionStr(m.getVersion()));
+ // obj.put("version", m.getVersion());
}
}
}
@@ -2360,11 +2394,11 @@ public class ProcessPublishWeb extends ActionWeb {
obj.put("processNumber", newBo.getString("PROCESS_NUMBER"));
PALRepositoryModel model = PALRepositoryCache.getCache().get(newBo.getString("PUBLISHFILEID"));
if (model != null) {
- obj.put("fileVersion", model.getVersion());
+ obj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
obj.put("methodId", model.getMethodId());
obj.put("category", model.getMethodCategory());
} else {
- obj.put("fileVersion", 1);
+ obj.put("fileVersion", "1.0");
obj.put("methodId", "1");
obj.put("category", "1");
}
@@ -2388,7 +2422,7 @@ public class ProcessPublishWeb extends ActionWeb {
JSONArray array = new JSONArray();
PALRepositoryModel model = PALRepositoryCache.getCache().get(changeBo.getString("CHANGEFILEID"));
if (model != null) {
- obj.put("fileVersion", model.getVersion());
+ obj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
obj.put("methodId", model.getMethodId());
obj.put("category", model.getMethodCategory());
List list2 = PALRepositoryCache.getByVersionId(wsId, model.getVersionId());
@@ -2405,23 +2439,23 @@ public class ProcessPublishWeb extends ActionWeb {
JSONObject object = new JSONObject();
object.put("text", model2.getName());
object.put("id", model2.getId());
- object.put("version", model2.getVersion());
+ object.put("version", VersionUtil.getVersionStr(model2.getVersion()));
array.add(object);
}
}
} else {
- obj.put("fileVersion", 1);
+ obj.put("fileVersion", "1.0");
obj.put("methodId", "1");
obj.put("category", "1");
}
obj.put("targetFiles", array);
PALRepositoryModel targetModel = PALRepositoryCache.getCache().get(changeBo.getString("CHANGEDFILEIDNEW"));
if (targetModel != null) {
- obj.put("targetFileVersion", targetModel.getVersion());
+ obj.put("targetFileVersion", VersionUtil.getVersionStr(targetModel.getVersion()));
obj.put("targetMethodId", targetModel.getMethodId());
obj.put("targetCategory", targetModel.getMethodCategory());
} else {
- obj.put("targetFileVersion", 1);
+ obj.put("targetFileVersion", "1.0");
obj.put("targetMethodId", "1");
obj.put("targetCategory", "1");
}
@@ -2439,11 +2473,11 @@ public class ProcessPublishWeb extends ActionWeb {
obj.put("stopFileId", stopBo.getString("STOPFILEID"));
PALRepositoryModel model = PALRepositoryCache.getCache().get(stopBo.getString("STOPFILEID"));
if (model != null) {
- obj.put("fileVersion", model.getVersion());
+ obj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
obj.put("methodId", model.getMethodId());
obj.put("category", model.getMethodCategory());
} else {
- obj.put("fileVersion", 1);
+ obj.put("fileVersion", "1.0");
obj.put("methodId", "1");
obj.put("category", "1");
}
@@ -2473,9 +2507,16 @@ public class ProcessPublishWeb extends ActionWeb {
* @return
*/
public String createOutputPrReports(String wsId, String teamId, String uuids) {
+ // 校验流程手册是否安装并启动
if (!SDK.getAppAPI().isActive("com.actionsoft.apps.coe.pal.output.pr")) {
return ResponseObject.newErrResponse("流程手册未安装或已暂停").toString();
}
+ if (!SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.bd")) {
+ return ResponseObject.newErrResponse("表单手册未安装或已暂停").toString();
+ }
+ if (!SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.zd")) {
+ return ResponseObject.newErrResponse("制度手册未安装或已暂停").toString();
+ }
ResponseObject ro = ResponseObject.newOkResponse();
JSONObject result = new JSONObject();
JSONArray array = JSONArray.parseArray(uuids);
@@ -2487,7 +2528,7 @@ public class ProcessPublishWeb extends ActionWeb {
throw new AWSException("没有找到文件:" + uuid);
}
String taskId = "";
- if ("process".equals(model.getMethodCategory()) && !"process.evc".equals(model.getMethodId()) && !"default".equals(model.getMethodId())) {
+ if ("process".equals(model.getMethodCategory())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
@@ -2495,8 +2536,22 @@ public class ProcessPublishWeb extends ActionWeb {
} else {
throw new AWSException("创建流程手册失败:" + uuid);
}
- } else {
- throw new AWSException("文件不支持创建流程手册:" + uuid);
+ } else if ("data".equals(model.getMethodCategory())) {
+ taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, uuid);
+ JSONObject object = JSONObject.parseObject(taskId);
+ if ("ok".equals(object.getString("result"))) {
+ taskId = object.getJSONObject("data").getString("taskId");
+ } else {
+ throw new AWSException("创建流程手册失败:" + uuid);
+ }
+ } else if ("control".equals(model.getMethodCategory())) {
+ taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, _uc.getUID(), teamId, uuid);
+ JSONObject object = JSONObject.parseObject(taskId);
+ if ("ok".equals(object.getString("result"))) {
+ taskId = object.getJSONObject("data").getString("taskId");
+ } else {
+ throw new AWSException("创建流程手册失败:" + uuid);
+ }
}
result.put(uuid, UtilString.isEmpty(taskId) ? "" : taskId);
}
@@ -2527,10 +2582,11 @@ public class ProcessPublishWeb extends ActionWeb {
object.put("category", model.getMethodCategory());
object.put("methodId", model.getMethodId());
object.put("changeFileName", model.getName());
- object.put("fileVersion", model.getVersion());
+ object.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
// 查询未发布版本
List models = PALRepositoryCache.getByVersionId(wsId, model.getVersionId());
if (models.size() > 0) {
+ models.sort((m1, m2) -> {return m2.getVersion() > m1.getVersion() ? 1 : -1;});
for (PALRepositoryModel model2 : models) {
if (!model2.isPublish() && !model2.getId().equals(model.getId())) {
String id = model2.getId();
@@ -2539,26 +2595,34 @@ public class ProcessPublishWeb extends ActionWeb {
JSONObject obj = new JSONObject();
obj.put("id", id);
obj.put("text", text);
- obj.put("version", version);
+ obj.put("version", VersionUtil.getVersionStr(version));
object.getJSONArray("targetFiles").add(obj);
}
}
}
// 生成流程手册
if (object.getJSONArray("targetFiles").size() > 0) {
- if ("process".equals(model.getMethodCategory()) && !"process.evc".equals(model.getMethodId()) && !"default".equals(model.getMethodId())) {
+
+ if (("process".equals(model.getMethodCategory()) || "data".equals(model.getMethodCategory()) || "control".equals(model.getMethodCategory())) && !"default".equals(model.getMethodId())) {
String id = object.getJSONArray("targetFiles").getJSONObject(0).getString("id");
PALRepositoryModel model2 = PALRepositoryCache.getCache().get(id);
object.put("changedFileIdNew", model2.getId());
object.put("changedFileNameNew", model2.getName());
- object.put("targetFileVersion", model2.getVersion());
+ object.put("targetFileVersion", VersionUtil.getVersionStr(model2.getVersion()));
object.put("targetMethodId", model2.getMethodId());
object.put("targetCategory", model2.getMethodCategory());
String taskId = "";
if ("submit_create".equals(createTime)) {
taskId = "submit_create";
} else {
- taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, model2.getId());
+ String category = model2.getMethodCategory();
+ if ("process".equals(category)) {
+ taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, model2.getId());
+ } else if ("data".equals(category)) {
+ taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, model2.getId());
+ } else if ("control".equals(category)) {
+ taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, _uc.getUID(), teamId, model2.getId());
+ }
JSONObject object2 = JSONObject.parseObject(taskId);
if ("ok".equals(object2.getString("result"))) {
taskId = object2.getJSONObject("data").getString("taskId");
@@ -2769,7 +2833,7 @@ public class ProcessPublishWeb extends ActionWeb {
obj.put("type", "new");
obj.put("id", model.getId());
obj.put("name", model.getName());
- obj.put("version", model.getVersion());
+ obj.put("version", VersionUtil.getVersionStr(model.getVersion()));
array.add(obj);
}
}
@@ -2789,7 +2853,7 @@ public class ProcessPublishWeb extends ActionWeb {
obj.put("type", "change");
obj.put("id", model.getId());
obj.put("name", model.getName());
- obj.put("version", model.getVersion());
+ obj.put("version", VersionUtil.getVersionStr(model.getVersion()));
array.add(obj);
}
}
@@ -2809,7 +2873,7 @@ public class ProcessPublishWeb extends ActionWeb {
obj.put("type", "stop");
obj.put("id", model.getId());
obj.put("name", model.getName());
- obj.put("version", model.getVersion());
+ obj.put("version", VersionUtil.getVersionStr(model.getVersion()));
array.add(obj);
}
}
@@ -3147,4 +3211,57 @@ public class ProcessPublishWeb extends ActionWeb {
ro.put("orgcode", code);
return ro.toString();
}
+
+ /**
+ * 下载手册
+ *
+ * @param taskId
+ * @param uuid
+ * @return
+ */
+ public String downloadOutput(String taskId, String uuid) {
+ PALRepositoryModel plModel = PALRepositoryCache.getCache().get(uuid);
+ if (plModel == null) {
+ return ResponseObject.newErrResponse("下载失败,模型不存在").toString();
+ }
+ String category = plModel.getMethodCategory();
+ String outputAppId = "process".equals(category) ? "com.actionsoft.apps.coe.pal.output.pr" :
+ "data".equals(category) ? "com.awspaas.user.apps.coe.pal.output.bd" :
+ "control".equals(category) ? "com.awspaas.user.apps.coe.pal.output.zd" : "";
+ if (UtilString.isEmpty(outputAppId)) {
+ return ResponseObject.newErrResponse("下载失败,模型分类不符").toString();
+ }
+ OutputTaskModel model = new OutputTask().getTaskReportById(taskId);
+ ResponseObject ro = ResponseObject.newOkResponse();
+ JSONObject json = new JSONObject();
+ if (model != null) {
+ String taskName = model.getTaskName();
+ try {
+ String url = "";
+ UtilFile file = OutputAPIManager.getInstance().getFilePath(model.getWsId(), taskId, model.getProfileId());
+ if (file.exists()) {
+ DCContext dcContext = null;
+ DCUtil.getInstance();
+ dcContext = DCUtil.createTempFileContext(outputAppId, "output", taskId, "zip");
+ dcContext.setFileName(taskName+ ".zip");
+ File ff = new File(dcContext.getFilePath());
+ UtilFile.zipCompressExcludeName(file.getPath(), ff, "log,**/config.txt");
+ dcContext.setSession(_uc);
+ // 操作行为日志记录
+ if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
+ CoEOpLogAPI.auditOkOp(_uc, CoEOpLogConst.MODULE_CATEGORY_APPCENTER, CoEOpLogConst.OP_DOWNLOAD, CoEOpLogConst.INFO_OUTPUT_DOWNLOAD);
+ }
+ url = dcContext.getDownloadURL();
+ }
+ json.put("url", url);
+ ro.setData(json);
+ return ro.toString();
+ } catch (Exception e) {
+ ro = ResponseObject.newErrResponse("下载失败,错误详情" + e.getMessage());
+ e.printStackTrace();
+ return ro.toString();
+ }
+ }
+ return ResponseObject.newErrResponse("下载失败,手册不存在").toString();
+ }
}
\ No newline at end of file
diff --git a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/action.xml b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/action.xml
index a5a8231c..55d4d659 100644
--- a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/action.xml
+++ b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/action.xml
@@ -464,4 +464,8 @@
+
+
+
+
\ No newline at end of file
diff --git a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js
index aeab4841..01478e2b 100644
--- a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js
+++ b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js
@@ -501,6 +501,7 @@ function queryapprove(){
}
//by bzp
function showlist(data, type, pageNumber, start){
+ debugger;
var tableTdCss = 'style="padding-top: 0;padding-bottom: 0;"';
if (type == 'new') {
$('#new_check_all').check("option", "checked", false);
@@ -512,8 +513,9 @@ function showlist(data, type, pageNumber, start){
for (var i = 0, s = start; i < pageLimit; i++, s++) {
var curr;
if ((curr = data[s - 1]) != undefined) {
- var fileName = curr.publishFileName + ' V' + curr.fileVersion + '.0';
- var reportName = '' + fileName + "-流程手册" + '';
+ var fileName = curr.publishFileName + ' V' + curr.fileVersion;
+ var outputName = (curr.category == 'process' ? '流程' : curr.category == 'data' ? '表单' : curr.category == 'control' ? '制度' : '') + '手册';
+ var reportName = '' + fileName + "-" + outputName + '';
var quickCreate = "立即创建";
var processNumber = '';
if(curr.processNumber != undefined){
@@ -540,6 +542,7 @@ function showlist(data, type, pageNumber, start){
$("#publish_new_tbody .awsui-checkbox").check();
}
if (type == 'change') {
+ var createButtonObj = {};
$('#change_check_all').check("option", "checked", false);
if (data.length > pageLimit) {// 显示分页
$('#change_pagination').show();
@@ -548,21 +551,25 @@ function showlist(data, type, pageNumber, start){
var html = '';
var tempSelect = [];
for (var i = 0, s = start; i < pageLimit; i++, s++) {
+ debugger;
var curr;
if ((curr = data[s - 1]) != undefined) {
- var sourceFileName = curr.changeFileName + ' V' + curr.fileVersion + '.0';
+ var sourceFileName = curr.changeFileName + ' V' + curr.fileVersion;
// 变更目标文件处理
var targetFileName = "";
if (curr.changedFileNameNew != undefined && curr.changedFileNameNew != '') {
- targetFileName = curr.changedFileNameNew + ' V' + curr.targetFileVersion + '.0';
+ targetFileName = curr.changedFileNameNew + ' V' + curr.targetFileVersion;
}
var targetId = "";
if (curr.changedFileIdNew != undefined && curr.changedFileIdNew != '') {
targetId = curr.changedFileIdNew;
}
- var reportName = '' + targetFileName + "-流程手册" + '';
+ debugger;
+ var outputName = (curr.category == 'process' ? '流程' : curr.category == 'data' ? '表单' : curr.category == 'control' ? '制度' : '') + '手册';
+ var reportName = '' + targetFileName + "-" + outputName + '';
var quickCreate = "立即创建";
- reportName = (curr.taskId == undefined || curr.taskId == '') ? '无' : curr.taskId == 'submit_create' ? quickCreate : reportName;
+ createButtonObj[curr.changeFileId] = quickCreate;
+ reportName = (curr.taskId == undefined || curr.taskId == '') ? '无' : curr.taskId == 'submit_create' ? quickCreate : reportName;
// 三员管理,taskId为change标识未创建手册
if (isHighSecurity){
@@ -587,7 +594,7 @@ function showlist(data, type, pageNumber, start){
var targetFiles = $.extend(true, [], curr.targetFiles);
for (var j = 0; j < targetFiles.length; j++) {
var temp = targetFiles[j];
- var name = temp.text + ' V' + temp.version + '.0';
+ var name = temp.text + ' V' + temp.version;
var obj = {id:temp.id, text:name, name:temp.text, version:temp.version};
opt1.data.push(obj);
if (targetId == temp.id) {
@@ -601,6 +608,7 @@ function showlist(data, type, pageNumber, start){
tempObj.selectId = 'change_' + curr.changeFileId;
tempObj.taskId = curr.taskId;
tempObj.id = curr.changeFileId;
+ tempObj.category = curr.category;
tempSelect.push(tempObj);
}
}
@@ -616,11 +624,13 @@ function showlist(data, type, pageNumber, start){
if (tempObj.taskId != undefined && tempObj.taskId != '') {
// 三员管理,taskId为change标识未创建手册
if (tempObj.taskId == 'submit_create' || tempObj.taskId == 'change') {
- $('#report_' + tempObj.id).html(quickCreate);
+ // $('#report_' + tempObj.id).html(quickCreate);
+ $('#report_' + tempObj.id).html(createButtonObj[tempObj.id]);
} else {
for (var m = 0; m < tempObj.opt.data.length; m++) {
if (tempObj.opt.data[m].id == tempObj.targetId) {
- var targetFileName2 = tempObj.opt.data[m].name + ' V' + tempObj.opt.data[m].version + '.0' + '-流程手册';
+ var outputName = (tempObj.category == 'process' ? '流程' : tempObj.category == 'data' ? '表单' : tempObj.category == 'control' ? '制度' : '') + '手册';
+ var targetFileName2 = tempObj.opt.data[m].name + ' V' + tempObj.opt.data[m].version + '-' + outputName + '';
$('#report_' + tempObj.id).html('' + targetFileName2 + '');
break;
}
@@ -652,7 +662,7 @@ function showlist(data, type, pageNumber, start){
for (var i = 0, s = start; i < pageLimit; i++, s++) {
var curr;
if ((curr = data[s - 1]) != undefined) {
- var fileName = curr.stopFileName + ' V' + curr.fileVersion + '.0';
+ var fileName = curr.stopFileName + ' V' + curr.fileVersion;
var reportName = '' + fileName + "-流程手册" + '';
reportName = (curr.taskId == undefined || curr.taskId == '') ? '无' : reportName;
var checkboxPerm = editPerm ? '' : 'disabled="disabled"';
@@ -782,6 +792,7 @@ function addProcess(type) {
return;
}
disabledButton();
+ debugger;
setTimeout(function() {
// 获取说明内容
var desc = $('#publisher_dialog_desc').val();
@@ -888,13 +899,7 @@ function initChangedData(changeFileId) {
// 获取流程手册
var selectedTaskId = "";
selectedTaskId = createReport(changeTemp[i].category, changeTemp[i].methodId, selectedId, selectedTaskId);
- // 更新界面手册
- if (selectedTaskId != '') {
- var targetFileName2 = changeTemp[i].targetFiles[j].text + ' V' + changeTemp[i].targetFiles[j].version + '.0' + '-流程手册';
- $('#report_' + changeFileId).html('' + targetFileName2 + '');
- } else {
- $('#report_' + changeFileId).html('无');
- }
+
// 更新数据
changeTemp[i].changedFileIdNew = selectedId;
changeTemp[i].changedFileNameNew = changeTemp[i].targetFiles[j].text;
@@ -902,6 +907,17 @@ function initChangedData(changeFileId) {
changeTemp[i].targetFileVersion = changeTemp[i].targetFiles[j].version;
changeTemp[i].targetMethodId = changeTemp[i].methodId;
changeTemp[i].targetCategory = changeTemp[i].category;
+
+ // 更新界面手册
+ if (selectedTaskId != '') {
+ var outputName = (changeTemp[i].category == 'process' ? '流程' : changeTemp[i].category == 'data' ? '表单' : changeTemp[i].category == 'control' ? '制度' : '') + '手册';
+
+ var targetFileName2 = changeTemp[i].targetFiles[j].text + ' V' + changeTemp[i].targetFiles[j].version + '-' + outputName + '';
+ $('#report_' + changeFileId).html('' + targetFileName2 + '');
+ } else {
+ $('#report_' + changeFileId).html('无');
+ }
+
break;
}
}
@@ -1259,13 +1275,14 @@ function queryBatchReport(data) {
// 创建流程手册
function createReport(category, method, uuid, taskId) {
- if (category == 'process' && method != "process.evc" && method != 'default') {
+ debugger;
+ if ((category == 'process' || category == 'control' || category == 'data') && method != 'default') {
var param = {
- sid : sid,
- cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_create",
- teamId: teamId,
- wsId: wsId,
- uuid: uuid
+ sid : sid,
+ cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_create",
+ teamId: teamId,
+ wsId: wsId,
+ uuid: uuid
}
$.ajax({
url : "./jd",
@@ -1279,6 +1296,8 @@ function createReport(category, method, uuid, taskId) {
}
}
});
+ } else {
+ $.simpleAlert('不支持创建手册');
}
return taskId;
}
@@ -1288,7 +1307,7 @@ function createBatchReport(data, createTime) {
var ids = [];
for (var i = 0; i < data.length; i++) {
var temp = data[i];
- if (temp.category == 'process' && temp.methodId != "process.evc" && temp.methodId != 'default') {
+ if ((temp.category == 'process' || temp.category == 'control' || temp.category == 'data') && temp.methodId != 'default') {
ids.push(temp.publishFileId);
}
}
@@ -1352,14 +1371,22 @@ function getVersionsAndCreateReport(data, createTime) {
return data;
}
+// 获取手册专属名称
+function getOutputName(category) {
+ return (category == 'process' ? '流程' : category == 'data' ? '表单' : category == 'control' ? '制度' : '') + '手册';
+}
+
//单个流程立即创建流程手册
function quickCreateReport(obj, object, type) {
+ debugger;
var taskId;
var category = obj.category;
var method = obj.methodId;
- var uuid = obj.id === undefined ? obj.publishFileId: obj.id;
- if (isHighSecurity){
- uuid = uuid == undefined ? obj.changedFileIdNew : uuid;
+ var uuid = '';
+ if (type == 'new') {
+ uuid = obj.publishFileId;
+ } else if (type == 'change') {
+ uuid = obj.changedFileIdNew;
}
$.simpleAlert("正在创建", "loading");
taskId = createReport(category, method, uuid, taskId);
@@ -1371,32 +1398,34 @@ function quickCreateReport(obj, object, type) {
if(isHighSecurity){
//更新数据记录
if (type == 'new') {
- var fileName = obj.publishFileName + ' V' + obj.fileVersion + '.0-流程手册';
+ var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category);
$(object).text(fileName);
} else if (type == 'change') {
- var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '.0-流程手册';
+ var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category);
$(object).text(targetFileName);
}
}else{
+ debugger;
//更新数据记录
if (type == 'new') {
- var fileName = obj.publishFileName + ' V' + obj.fileVersion + '.0-流程手册';
+ var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category);
$(object).text(fileName);
for (var i = 0; i < newTemp.length; i++) {
- if (newTemp[i].id == uuid) {
+ if (newTemp[i].publishFileId == uuid) {
newTemp[i].taskId = taskId;
}
}
} else if (type == 'change') {
- var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '.0-流程手册';
+ var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category);
$(object).text(targetFileName);
for (var i = 0; i < changeTemp.length; i++) {
- if (changeTemp[i].id == uuid) {
+ if (changeTemp[i].changedFileIdNew == uuid) {
changeTemp[i].taskId = taskId;
}
}
}
}
+ $(object).parent().append('');
}
// 清空树结构
@@ -1778,7 +1807,7 @@ function saveFormData(type) {
var msg = '以下文件已经在其他未办理完成的表单中,不允许保存/办理';
if (tempData.length > 0) {
for (var i = 0; i < tempData.length; i++) {
- msg += '
' + tempData[i].name + ' V' + tempData[i].version + '.0';
+ msg += '
' + tempData[i].name + ' V' + tempData[i].version;
}
}
var options = {
@@ -1807,6 +1836,7 @@ function formSave(isTransact){
$.simpleAlert('发布内容不能为空', 'info');
return false;
}
+ debugger;
var index = 0;
if (!($("#publisher_new_tr").css('display') == 'none') && newTemp.length > 0) {
index++;
@@ -1830,7 +1860,7 @@ function formSave(isTransact){
for (var i = 0; i < changeTemp.length; i++) {
if (changeTemp[i].changedFileIdNew == "") {
flag = true;
- msg += '
' + changeTemp[i].changeFileName + ' V' + changeTemp[i].fileVersion + '.0';
+ msg += '
' + changeTemp[i].changeFileName + ' V' + changeTemp[i].fileVersion;
}
}
if (flag) {
@@ -1868,7 +1898,7 @@ function formSave(isTransact){
for (var j = 0; j < stopTempData.length; j++) {
if (changeTempData[i].changeFileId == stopTempData[j].stopFileId) {
$.simpleAlert('close');
- $.simpleAlert(stopTempData[j].stopFileName + ' V' + stopTempData[j].fileVersion + '.0' + "
在变更流程和停用流程中同时存在,不允许办理", 'error');
+ $.simpleAlert(stopTempData[j].stopFileName + ' V' + stopTempData[j].fileVersion + "
在变更流程和停用流程中同时存在,不允许办理", 'error');
return false;
}
}
@@ -1923,7 +1953,7 @@ function formSave(isTransact){
var msg = '以下文件已经在其他未办理完成的表单中,不允许保存/办理';
if (tempData.length > 0) {
for (var i = 0; i < tempData.length; i++) {
- msg += '
' + tempData[i].name + ' V' + tempData[i].version + '.0';
+ msg += '
' + tempData[i].name + ' V' + tempData[i].version;
}
}
var options = {
@@ -2216,4 +2246,27 @@ function listenCloseEvent() {
}
});
}
+}
+
+function downloadReport(uuid, taskId) {
+ awsui.ajax.request({
+ type: "POST",
+ url: "./jd",
+ async: false,
+ data: {
+ sid: sid,
+ cmd: "com.actionsoft.apps.coe.pal.publisher_output_download",
+ taskId: taskId,
+ uuid: uuid
+ },
+ success : function(r) {
+ debugger;
+ if (r.result == "ok") {
+ debugger;
+ window.open (r.data.url);
+ } else {
+
+ }
+ }
+ });
}
\ No newline at end of file
diff --git a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.radio.js b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.radio.js
index 9c12492a..84e5aa6c 100644
--- a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.radio.js
+++ b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.radio.js
@@ -228,7 +228,7 @@ var changeOption;
*/
function initPublishData(data, type, isEnd, proNumber) {
if (type == 'new') {
- var fileName = data.publishFileName + ' V' + data.fileVersion + '.0';
+ var fileName = data.publishFileName + ' V' + data.fileVersion;
var aHtml = '' + fileName + '';
$('#publisher_new_file_name').children('span.file_name').html(aHtml);
$('#publisher_new_file_id').val(data.publishFileId);
@@ -250,14 +250,14 @@ function initPublishData(data, type, isEnd, proNumber) {
if (type == 'change') {
changeData = data;
// 变更文件处理
- var sourceFileName = data.changeFileName + ' V' + data.fileVersion + '.0';
+ var sourceFileName = data.changeFileName + ' V' + data.fileVersion;
$('#publisher_change_source_file_name').children('span.file_name').html(sourceFileName);
$('#publisher_change_source_file_id').val(data.changeFileId);
// 变更目标文件处理
var targetFileName = "";
if (data.changedFileNameNew != undefined && data.changedFileNameNew != '') {
- targetFileName = data.changedFileNameNew + ' V' + data.targetFileVersion + '.0';
+ targetFileName = data.changedFileNameNew + ' V' + data.targetFileVersion;
}
var targetId = "";
if (data.changedFileIdNew != undefined && data.changedFileIdNew != '') {
@@ -288,7 +288,7 @@ function initPublishData(data, type, isEnd, proNumber) {
var flag = false;
for (var i = 0; i < data.targetFiles.length; i++) {
var temp = data.targetFiles[i];
- var name = temp.text + ' V' + temp.version + '.0';
+ var name = temp.text + ' V' + temp.version;
var obj = {id:temp.id, text:name};
opt1.data.push(obj);
if (targetId == temp.id) {
@@ -324,7 +324,7 @@ function initPublishData(data, type, isEnd, proNumber) {
}
}
if (type == 'stop') {
- var fileName = data.stopFileName + ' V' + data.fileVersion + '.0';
+ var fileName = data.stopFileName + ' V' + data.fileVersion;
var aHtml = '' + fileName + '';
$('#publisher_stop_file_name').children('span.file_name').html(aHtml);
$('#publisher_stop_file_id').val(data.stopFileId);
@@ -957,7 +957,7 @@ function formSave(isTransact){
if (r.result == 'error') {
flag = true;
var data = r.data.data;
- var name = data.name + ' V' + data.version + '.0';
+ var name = data.name + ' V' + data.version;
console.log(data);
tempName = name;
}
diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar
index d846295a..b8519301 100644
Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ
diff --git a/com.actionsoft.apps.coe.pal/method/control.kpi/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.pal/method/control.kpi/diagram.attribute.custom.xml
index cdc3c3a3..0521b2ed 100644
--- a/com.actionsoft.apps.coe.pal/method/control.kpi/diagram.attribute.custom.xml
+++ b/com.actionsoft.apps.coe.pal/method/control.kpi/diagram.attribute.custom.xml
@@ -1,26 +1,30 @@
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
diff --git a/com.actionsoft.apps.coe.pal/method/control.policy/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.pal/method/control.policy/diagram.attribute.custom.xml
index b6311f45..1e0ea495 100644
--- a/com.actionsoft.apps.coe.pal/method/control.policy/diagram.attribute.custom.xml
+++ b/com.actionsoft.apps.coe.pal/method/control.policy/diagram.attribute.custom.xml
@@ -3,19 +3,19 @@
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -27,5 +27,6 @@
-
+
+
diff --git a/com.actionsoft.apps.coe.pal/method/data.form/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.pal/method/data.form/diagram.attribute.custom.xml
index d38a5b02..c883f3bf 100644
--- a/com.actionsoft.apps.coe.pal/method/data.form/diagram.attribute.custom.xml
+++ b/com.actionsoft.apps.coe.pal/method/data.form/diagram.attribute.custom.xml
@@ -3,17 +3,18 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
diff --git a/com.actionsoft.apps.coe.pal/method/org.normal/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.pal/method/org.normal/diagram.attribute.custom.xml
index e723ab95..95335f50 100644
--- a/com.actionsoft.apps.coe.pal/method/org.normal/diagram.attribute.custom.xml
+++ b/com.actionsoft.apps.coe.pal/method/org.normal/diagram.attribute.custom.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/com.actionsoft.apps.coe.pal/method/org.role/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.pal/method/org.role/diagram.attribute.custom.xml
index 9ef283ff..9fd44a75 100644
--- a/com.actionsoft.apps.coe.pal/method/org.role/diagram.attribute.custom.xml
+++ b/com.actionsoft.apps.coe.pal/method/org.role/diagram.attribute.custom.xml
@@ -1,7 +1,14 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java
index 95b1d7ef..568c7d52 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/PALRepositoryQueryAPIManager.java
@@ -2663,6 +2663,103 @@ public class PALRepositoryQueryAPIManager {
return result;
}
+
+ /**
+ * 导出单个表单手册
+ * 仅限于应用流程手册com.awspaas.user.apps.coe.pal.output.bd下的手册导出
+ * @param wsId 资产库Id
+ * @param userId 用户Id
+ * @param teamId 小组Id
+ * @param fileId 流程文件Id
+ * @return 返回创建流程手册结果及taskId
+ */
+ public String createOutputReportBd(String wsId, String userId, String teamId, String fileId) {
+ UserContext _uc = UserContext.fromUID(userId);
+ OutPutReportWeb web = new OutPutReportWeb(_uc);
+ String appId = "com.awspaas.user.apps.coe.pal.output.bd";
+ // 报告生成器参数配置
+ String config = "{'isItReport':true,'orderNuberFirst':true,'orderNametwo':false,'reportNameIsItName':'%fileName%_%fileVersion%'}";// 配置
+ String title = "表单-手册";
+
+ // 获取流程手册下所有的流程模板
+ List list = web.getOutputAppByAppId(appId);
+ OutputAppProfile outputAppProfile = null;
+ for (OutputAppProfile profile : list) {
+ if (!"".equals(title) && title.equals(profile.getTitle())) {
+ outputAppProfile = profile;
+ break;
+ }
+ }
+ if (outputAppProfile == null) {
+ throw new AWSException("创建表单手册失败,未找到报告模版");
+ }
+ String profileId = outputAppProfile.getId();
+ String taskName = outputAppProfile.getTitle();
+ String language = "".equals(outputAppProfile.getLang())?"cn":outputAppProfile.getLang();
+ String isExecute = "Y";
+ String targetShape = "";
+ String relationFileId = "";
+ String isModify = "false";
+ String taskId = "";
+ String result = web.reportSaveByCallable(language, taskName, userId, teamId, profileId, wsId, isExecute, config, fileId, targetShape, relationFileId, isModify, taskId);
+ ResponseObject ro = ResponseObject.parse(result);
+ if (ro.isOk()) {
+ com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) ro.getData();
+ String id = object.getString("taskId");
+ // 更改状态为隐藏,不在界面显示该方式创建的流程手册数据
+ new OutputTask().updateIsDisplayStatus(id);
+ }
+ return result;
+ }
+
+ /**
+ * 导出单个制度手册
+ * 仅限于应用流程手册com.awspaas.user.apps.coe.pal.output.bd下的手册导出
+ * @param wsId 资产库Id
+ * @param userId 用户Id
+ * @param teamId 小组Id
+ * @param fileId 流程文件Id
+ * @return 返回创建流程手册结果及taskId
+ */
+ public String createOutputReportZd(String wsId, String userId, String teamId, String fileId) {
+ UserContext _uc = UserContext.fromUID(userId);
+ OutPutReportWeb web = new OutPutReportWeb(_uc);
+ String appId = "com.awspaas.user.apps.coe.pal.output.zd";
+ // 报告生成器参数配置
+ String config = "{'isItReport':true,'orderNuberFirst':true,'orderNametwo':false,'reportNameIsItName':'%fileName%_%fileVersion%'}";// 配置
+ String title = "制度-手册";
+
+ // 获取流程手册下所有的流程模板
+ List list = web.getOutputAppByAppId(appId);
+ OutputAppProfile outputAppProfile = null;
+ for (OutputAppProfile profile : list) {
+ if (!"".equals(title) && title.equals(profile.getTitle())) {
+ outputAppProfile = profile;
+ break;
+ }
+ }
+ if (outputAppProfile == null) {
+ throw new AWSException("创建制度手册失败,未找到报告模版");
+ }
+ String profileId = outputAppProfile.getId();
+ String taskName = outputAppProfile.getTitle();
+ String language = "".equals(outputAppProfile.getLang())?"cn":outputAppProfile.getLang();
+ String isExecute = "Y";
+ String targetShape = "";
+ String relationFileId = "";
+ String isModify = "false";
+ String taskId = "";
+ String result = web.reportSaveByCallable(language, taskName, userId, teamId, profileId, wsId, isExecute, config, fileId, targetShape, relationFileId, isModify, taskId);
+ ResponseObject ro = ResponseObject.parse(result);
+ if (ro.isOk()) {
+ com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) ro.getData();
+ String id = object.getString("taskId");
+ // 更改状态为隐藏,不在界面显示该方式创建的流程手册数据
+ new OutputTask().updateIsDisplayStatus(id);
+ }
+ return result;
+ }
+
/**
* 预览流程手册
* @param _uc
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/RepositoryTreeUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/RepositoryTreeUtil.java
index 0be00a23..1de08de2 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/RepositoryTreeUtil.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/RepositoryTreeUtil.java
@@ -11,6 +11,7 @@ import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.pal.method.cache.PALMethodCache;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodModel;
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
+import com.actionsoft.apps.coe.pal.pal.ws.web.VersionUtil;
import com.actionsoft.apps.coe.pal.util.HighSecurityUtil;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.actionsoft.bpms.org.model.DepartmentModel;
@@ -94,7 +95,7 @@ public class RepositoryTreeUtil {
palObject.put("name", palModel.getName());
palObject.put("pid", palModel.getParentId());
palObject.put("versionId", palModel.getVersionId());
- palObject.put("version", palModel.getVersion());
+ palObject.put("version", VersionUtil.getVersionStr(palModel.getVersion()));
palObject.put("category", palModel.getMethodCategory());
palObject.put("method", palModel.getMethodId());
// 责任部门和责任人
@@ -187,7 +188,7 @@ public class RepositoryTreeUtil {
palObject.put("name", palModel.getName());
palObject.put("pid", palModel.getParentId());
palObject.put("versionId", palModel.getVersionId());
- palObject.put("version", palModel.getVersion());
+ palObject.put("version", VersionUtil.getVersionStr(palModel.getVersion()));
palObject.put("category", palModel.getMethodCategory());
palObject.put("method", palModel.getMethodId());
// 责任部门和责任人