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 214d62e5..9b7f5717 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/client/web/ProcessPublishClientWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java
index 1a335127..7a2ee6e1 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
@@ -4783,7 +4783,7 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk
public String openPage(UserContext me, String uuid, String taskId) {
PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid);
- if (model != null && "process".equals(model.getMethodCategory()) && UtilString.isEmpty(taskId)) {
+ if (model != null && ("control.policy".equals(model.getMethodId()) || "data.form".equals(model.getMethodId()) || model.getMethodId().contains("process.")) && UtilString.isEmpty(taskId)) {
taskId = new PublishListHistory().getLastPublishTaskIdByModelId(uuid);
}
return PALRepositoryQueryAPIManager.getInstance().getPublishPortalHtml(me, uuid, taskId);
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 4eff755c..65f5e313 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
@@ -2024,11 +2024,11 @@ public class ProcessPublishWeb extends ActionWeb {
throw new AWSException("没有找到文件:" + uuid);
}
String taskId = "";
- if (("process".equals(model.getMethodCategory()) || "data".equals(model.getMethodCategory()) || "control".equals(model.getMethodCategory())) && !"default".equals(model.getMethodId())) {
+ if (("control.policy".equals(model.getMethodId()) || "data.form".equals(model.getMethodId()) || model.getMethodId().contains("process.")) && !"default".equals(model.getMethodId())) {
} else {
throw new AWSException("文件不支持创建流程手册:" + uuid);
}
- if ("process".equals(model.getMethodCategory())) {
+ if (model.getMethodId().contains("process.")) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
@@ -2036,7 +2036,7 @@ public class ProcessPublishWeb extends ActionWeb {
} else {
throw new AWSException("创建流程手册失败:" + uuid);
}
- } else if ("data".equals(model.getMethodCategory())) {
+ } else if ("data.form".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
@@ -2044,7 +2044,7 @@ public class ProcessPublishWeb extends ActionWeb {
} else {
throw new AWSException("创建流程手册失败:" + uuid);
}
- } else if ("control".equals(model.getMethodCategory())) {
+ } else if ("control.policy".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
@@ -2542,7 +2542,7 @@ public class ProcessPublishWeb extends ActionWeb {
throw new AWSException("没有找到文件:" + uuid);
}
String taskId = "";
- if ("process".equals(model.getMethodCategory())) {
+ if (model.getMethodId().contains("process.")) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
@@ -2550,21 +2550,21 @@ public class ProcessPublishWeb extends ActionWeb {
} else {
throw new AWSException("创建流程手册失败:" + uuid);
}
- } else if ("data".equals(model.getMethodCategory())) {
+ } else if ("data.form".equals(model.getMethodId())) {
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);
+ throw new AWSException("创建表单手册失败:" + uuid);
}
- } else if ("control".equals(model.getMethodCategory())) {
+ } else if ("control.policy".equals(model.getMethodId())) {
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);
+ throw new AWSException("创建制度手册失败:" + uuid);
}
}
result.put(uuid, UtilString.isEmpty(taskId) ? "" : taskId);
@@ -2617,7 +2617,7 @@ public class ProcessPublishWeb extends ActionWeb {
// 生成流程手册
if (object.getJSONArray("targetFiles").size() > 0) {
- if (("process".equals(model.getMethodCategory()) || "data".equals(model.getMethodCategory()) || "control".equals(model.getMethodCategory())) && !"default".equals(model.getMethodId())) {
+ if (("control.policy".equals(model.getMethodId()) || "data.form".equals(model.getMethodId()) || model.getMethodId().contains("process.")) && !"default".equals(model.getMethodId())) {
String id = object.getJSONArray("targetFiles").getJSONObject(0).getString("id");
PALRepositoryModel model2 = PALRepositoryCache.getCache().get(id);
object.put("changedFileIdNew", model2.getId());
@@ -2630,11 +2630,11 @@ public class ProcessPublishWeb extends ActionWeb {
taskId = "submit_create";
} else {
String category = model2.getMethodCategory();
- if ("process".equals(category)) {
+ if (model.getMethodId().contains("process.")) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, _uc.getUID(), teamId, model2.getId());
- } else if ("data".equals(category)) {
+ } else if ("data.form".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, _uc.getUID(), teamId, model2.getId());
- } else if ("control".equals(category)) {
+ } else if ("control.policy".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, _uc.getUID(), teamId, model2.getId());
}
JSONObject object2 = JSONObject.parseObject(taskId);
@@ -3228,9 +3228,10 @@ public class ProcessPublishWeb extends ActionWeb {
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" : "";
+
+ String outputAppId = plModel.getMethodId().contains("process.") ? "com.actionsoft.apps.coe.pal.output.pr" :
+ "data.form".equals(plModel.getMethodId()) ? "com.awspaas.user.apps.coe.pal.output.bd" :
+ "control.policy".equals(plModel.getMethodId()) ? "com.awspaas.user.apps.coe.pal.output.zd" : "";
if (UtilString.isEmpty(outputAppId)) {
return ResponseObject.newErrResponse("下载失败,模型分类不符").toString();
}
diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java
index 031470d5..dd39da0e 100644
--- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java
+++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java
@@ -224,15 +224,15 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
return;
}
// 校验流程手册是否安装并启动
- if ("process".equals(category) && !SDK.getAppAPI().isActive("com.actionsoft.apps.coe.pal.output.pr")) {
+ if (model.getMethodId().contains("process.") && !SDK.getAppAPI().isActive("com.actionsoft.apps.coe.pal.output.pr")) {
SDK.getLogAPI().consoleErr("[流程手册未安装]流程手册更新失败");
return;
}
- if ("data".equals(category) && !SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.bd")) {
+ if ("data.form".equals(model.getMethodId()) && !SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.bd")) {
SDK.getLogAPI().consoleErr("[表单手册未安装]流程手册更新失败");
return;
}
- if ("control".equals(category) && !SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.zd")) {
+ if ("control.policy".equals(model.getMethodId()) && !SDK.getAppAPI().isActive("com.awspaas.user.apps.coe.pal.output.zd")) {
SDK.getLogAPI().consoleErr("[表单手册未安装]流程手册更新失败");
return;
}
@@ -312,19 +312,19 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
*/
private String createOutputReport(PALRepositoryModel model, String wsId, String userId, String teamId, String uuid) {
String taskId = "";
- if ("process".equals(model.getMethodCategory())) {
+ if (model.getMethodId().contains("process.")) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, userId, teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
taskId = object.getJSONObject("data").getString("taskId");
}
- } else if ("data".equals(model.getMethodCategory())) {
+ } else if ("data.form".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportBd(wsId, userId, teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
taskId = object.getJSONObject("data").getString("taskId");
}
- } else if ("control".equals(model.getMethodCategory())) {
+ } else if ("control.policy".equals(model.getMethodId())) {
taskId = PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, userId, teamId, uuid);
JSONObject object = JSONObject.parseObject(taskId);
if ("ok".equals(object.getString("result"))) {
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 e432384e..e8af9c1f 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
@@ -404,7 +404,6 @@ function initPublishData(data, type, pageNumber, start){
// 初始化数据
function selectPublishData(data, type, pageNumber, start) {
- debugger;
//渲染到前台的流程架构L1,L2,L3
@@ -422,7 +421,6 @@ function selectPublishData(data, type, pageNumber, start) {
async : true,
data : param,
success : function(r) {
- debugger;
var info = r.data.info;
var L1 = r.data.data.Process_Architecture_L1;
var L2 = r.data.data.Process_Architecture_L2;
@@ -504,7 +502,6 @@ 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);
@@ -517,7 +514,7 @@ function showlist(data, type, pageNumber, start){
var curr;
if ((curr = data[s - 1]) != undefined) {
var fileName = curr.publishFileName + ' V' + curr.fileVersion;
- var outputName = (curr.category == 'process' ? '流程' : curr.category == 'data' ? '表单' : curr.category == 'control' ? '制度' : '') + '手册';
+ var outputName = getOutputName(curr.category, curr.methodId);
var reportName = '' + fileName + "-" + outputName + '';
var quickCreate = "立即创建";
var processNumber = '';
@@ -554,7 +551,6 @@ 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;
@@ -567,8 +563,7 @@ function showlist(data, type, pageNumber, start){
if (curr.changedFileIdNew != undefined && curr.changedFileIdNew != '') {
targetId = curr.changedFileIdNew;
}
- debugger;
- var outputName = (curr.category == 'process' ? '流程' : curr.category == 'data' ? '表单' : curr.category == 'control' ? '制度' : '') + '手册';
+ var outputName = getOutputName(curr.category, curr.methodId);
var reportName = '' + targetFileName + "-" + outputName + '';
var quickCreate = "立即创建";
createButtonObj[curr.changeFileId] = quickCreate;
@@ -612,6 +607,7 @@ function showlist(data, type, pageNumber, start){
tempObj.taskId = curr.taskId;
tempObj.id = curr.changeFileId;
tempObj.category = curr.category;
+ tempObj.methodId = curr.methodId;
tempSelect.push(tempObj);
}
}
@@ -632,7 +628,7 @@ function showlist(data, type, pageNumber, start){
} else {
for (var m = 0; m < tempObj.opt.data.length; m++) {
if (tempObj.opt.data[m].id == tempObj.targetId) {
- var outputName = (tempObj.category == 'process' ? '流程' : tempObj.category == 'data' ? '表单' : tempObj.category == 'control' ? '制度' : '') + '手册';
+ var outputName = getOutputName(tempObj.category, tempObj.methodId);
var targetFileName2 = tempObj.opt.data[m].name + ' V' + tempObj.opt.data[m].version + '-' + outputName + '';
$('#report_' + tempObj.id).html('' + targetFileName2 + '');
break;
@@ -795,7 +791,6 @@ function addProcess(type) {
return;
}
disabledButton();
- debugger;
setTimeout(function() {
// 获取说明内容
var desc = $('#publisher_dialog_desc').val();
@@ -913,7 +908,8 @@ function initChangedData(changeFileId) {
// 更新界面手册
if (selectedTaskId != '') {
- var outputName = (changeTemp[i].category == 'process' ? '流程' : changeTemp[i].category == 'data' ? '表单' : changeTemp[i].category == 'control' ? '制度' : '') + '手册';
+
+ var outputName = getOutputName(changeTemp[i].category, changeTemp[i].methodId);
var targetFileName2 = changeTemp[i].targetFiles[j].text + ' V' + changeTemp[i].targetFiles[j].version + '-' + outputName + '';
$('#report_' + changeFileId).html('' + targetFileName2 + '');
@@ -1243,10 +1239,11 @@ function getStopBatchResult(type) {
// 获取已有的流程手册
function queryBatchReport(data) {
+ debugger;
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.methodId == 'control.policy' || temp.methodId == 'data.form' || temp.methodId.indexOf('process.') > -1) && temp.methodId != 'default') {
ids.push(temp.stopFileId);
}
}
@@ -1278,8 +1275,7 @@ function queryBatchReport(data) {
// 创建流程手册
function createReport(category, method, uuid, taskId) {
- debugger;
- if ((category == 'process' || category == 'control' || category == 'data') && method != 'default') {
+ if ((method == 'control.policy' || method == 'data.form' || method.indexOf('process.') > -1) && method != 'default') {
var param = {
sid : sid,
cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_create",
@@ -1310,7 +1306,7 @@ function createBatchReport(data, createTime) {
var ids = [];
for (var i = 0; i < data.length; i++) {
var temp = data[i];
- if ((temp.category == 'process' || temp.category == 'control' || temp.category == 'data') && temp.methodId != 'default') {
+ if ((temp.methodId == 'control.policy' || temp.methodId == 'data.form' || temp.methodId.indexOf('process.') > -1) && temp.methodId != 'default') {
ids.push(temp.publishFileId);
}
}
@@ -1375,8 +1371,18 @@ function getVersionsAndCreateReport(data, createTime) {
}
// 获取手册专属名称
-function getOutputName(category) {
- return (category == 'process' ? '流程' : category == 'data' ? '表单' : category == 'control' ? '制度' : '') + '手册';
+function getOutputName(category, method) {
+ debugger;
+ if (method == 'control.policy') {
+ return '制度手册';
+ }
+ if (method == 'data.form') {
+ return '表单手册'
+ }
+ if (method.indexOf('process.') > -1) {
+ return '流程搜册';
+ }
+ return '手册';
}
//单个流程立即创建流程手册
@@ -1401,17 +1407,17 @@ function quickCreateReport(obj, object, type) {
if(isHighSecurity){
//更新数据记录
if (type == 'new') {
- var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category);
+ var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category, method);
$(object).text(fileName);
} else if (type == 'change') {
- var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category);
+ var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category, method);
$(object).text(targetFileName);
}
}else{
debugger;
//更新数据记录
if (type == 'new') {
- var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category);
+ var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category, method);
$(object).text(fileName);
for (var i = 0; i < newTemp.length; i++) {
if (newTemp[i].publishFileId == uuid) {
@@ -1419,7 +1425,7 @@ function quickCreateReport(obj, object, type) {
}
}
} else if (type == 'change') {
- var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category);
+ var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category, method);
$(object).text(targetFileName);
for (var i = 0; i < changeTemp.length; i++) {
if (changeTemp[i].changedFileIdNew == uuid) {
@@ -1912,7 +1918,7 @@ function formSave(isTransact){
if (isHighSecurity){
for (let i=0;i -1) && data.methodId != 'default') {
data.taskId = "new";
}
}