伴随发布提示
This commit is contained in:
parent
8d1b7ffd5c
commit
e505c72835
Binary file not shown.
@ -2591,7 +2591,6 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
StringBuilder modelsb = new StringBuilder();
|
||||
JSONArray array = JSONArray.parseArray(uuids);
|
||||
if(array.size()==0){
|
||||
ro.put("result","error");
|
||||
@ -2623,7 +2622,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
// 文件:根据relationFileId 和 文件类型 查询
|
||||
List<UpfileModel> list2 = dao.search(splitRelationFileId[0], tempShapeId, "s");
|
||||
if(list2.size()==0){
|
||||
sb.append("模型名称:").append(shape.get("plName")).append("中节点名称:").append("'"+shape.get("name")+"'").append("未上传附件,请检查").append(",");
|
||||
sb.append("模型名称:").append(shape.get("plName")).append("中节点名称:").append("'"+shape.get("name")+"'").append("未上传附件,请检查").append(",").append("</br>");
|
||||
}
|
||||
|
||||
}
|
||||
@ -2637,6 +2636,8 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
sb1=sb.deleteCharAt(sb.length()-1);
|
||||
ro.put("sb",sb1);
|
||||
ro.put("result","error");
|
||||
}else{
|
||||
ro.put("result","ok");
|
||||
}
|
||||
|
||||
}
|
||||
@ -2647,14 +2648,17 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
|
||||
|
||||
/**
|
||||
* 获取关联表单模型插入流程发布中
|
||||
* 提示用户将关联未发布表单模型进行发布
|
||||
* @param wsId
|
||||
* @param teamId
|
||||
* @param uuids
|
||||
* @return
|
||||
*/
|
||||
public String RelevancyPublish(String wsId, String teamId, String uuids,String bindId){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
|
||||
JSONArray array = JSONArray.parseArray(uuids);
|
||||
if(array.size()==0){
|
||||
ro.put("result","error");
|
||||
@ -2675,28 +2679,33 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
if(propertyModel.getPropertyId().equals("support_files")){
|
||||
String relationFileId=JSONObject.parseObject(propertyModel.getPropertyValue()).getString("relationFileId");
|
||||
String[] splitRelationFileId;
|
||||
if(relationFileId!=null){
|
||||
if(UtilString.isNotEmpty(relationFileId)){
|
||||
splitRelationFileId=relationFileId.split(",");
|
||||
RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=?",splitRelationFileId[0]);
|
||||
String ispublish=rowMap.getString("ISPUBLISH");
|
||||
if(ispublish.equals("0")) {
|
||||
BO bo=new BO();
|
||||
bo.set("PUBLISHFILEID", splitRelationFileId[0]);
|
||||
bo.set("PUBLISHFILENAME", rowMap.getString("PLNAME"));
|
||||
bo.set("PUBLISHDESC", "");
|
||||
bo.set("PROCESSDEFID", bindId);
|
||||
bo.set("TASKID", "");
|
||||
i = SDK.getBOAPI().create("BO_ACT_COE_PUBLISH_N", bo, bindId, _uc.getUID());
|
||||
|
||||
sb.append(rowMap.getString("PLNAME")).append("需进行选择发布!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (sb.length() > 0) {
|
||||
sb1=sb.deleteCharAt(sb.length()-1);
|
||||
ro.put("sb",sb1);
|
||||
ro.put("result","error");
|
||||
}else{
|
||||
ro.put("result","ok");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -63,11 +63,11 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
|
||||
for (PALRepositoryPropertyModel propertyModel : oldPropertyList) {
|
||||
|
||||
//获取文件属性中支持文件
|
||||
if (propertyModel.getPropertyId().equals("support_files")) {
|
||||
String relationFileId = JSONObject.parseObject(propertyModel.getPropertyValue()).getString("relationFileId");
|
||||
if(propertyModel.getPropertyId().equals("support_files")){
|
||||
String relationFileId=JSONObject.parseObject(propertyModel.getPropertyValue()).getString("relationFileId");
|
||||
String[] splitRelationFileId;
|
||||
if (relationFileId != null) {
|
||||
splitRelationFileId = relationFileId.split(",");
|
||||
if(relationFileId!=null){
|
||||
splitRelationFileId=relationFileId.split(",");
|
||||
//获取关联表单模型id
|
||||
List<Map<String, Object>> fileElements = CoeDesignerUtil.getShapeMessageJson4(splitRelationFileId[0]);
|
||||
for (Map<String, Object> shape : fileElements) {
|
||||
@ -76,8 +76,8 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int
|
||||
UpFileDao dao = new UpFileDao();
|
||||
// 文件:根据relationFileId 和 文件类型 查询
|
||||
List<UpfileModel> list2 = dao.search(splitRelationFileId[0], tempShapeId, "s");
|
||||
if (list2.size() == 0) {
|
||||
sb.append("模型名称:").append(shape.get("plName")).append("中节点名称:").append("'" + shape.get("name") + "'").append("未上传附件,请检查!!!").append(",").append("</br>");
|
||||
if(list2.size()==0){
|
||||
sb.append("模型名称:").append(shape.get("plName")).append("中节点名称:").append("'"+shape.get("name")+"'").append("未上传附件,请检查").append(",");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -412,30 +412,6 @@ function selectPublishData(data, type, pageNumber, start) {
|
||||
}
|
||||
}
|
||||
|
||||
//校验模型中支持文件附件是否上传
|
||||
var param = {
|
||||
sid : sid,
|
||||
cmd : "com.actionsoft.apps.coe.pal.publisher_get_publishFlow_files",
|
||||
wsId: wsId,
|
||||
uuids: JSON.stringify(ids)
|
||||
}
|
||||
$.ajax({
|
||||
url : "./jd",
|
||||
type : "POST",
|
||||
data : param,
|
||||
success : function(r) {
|
||||
if (r.result == 'ok') {
|
||||
if(r.data.result=='error'){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert(r.data.sb,"error",3000);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var param = {
|
||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_getPublishNameByJs',
|
||||
processInstId: processInstId,
|
||||
@ -540,6 +516,7 @@ function showlist(data, type, pageNumber, start){
|
||||
// 加载数据
|
||||
var html = '';
|
||||
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
||||
debugger;
|
||||
var curr;
|
||||
if ((curr = data[s - 1]) != undefined) {
|
||||
var fileName = curr.publishFileName + ' V' + curr.fileVersion;
|
||||
@ -774,7 +751,6 @@ function addProcess(type) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
disabledButton();
|
||||
setTimeout(function() {
|
||||
// 获取说明内容
|
||||
@ -801,6 +777,9 @@ function addProcess(type) {
|
||||
temps[i].publishDesc = desc;
|
||||
newTemp.push(temps[i]);
|
||||
}
|
||||
|
||||
|
||||
publishFlowCheck(newTemp);
|
||||
// 初始化页数及当前页
|
||||
initNewPagination(newPageSetting.pageNum - 1);
|
||||
// 初始化当前页的数据
|
||||
@ -912,6 +891,66 @@ function addProcess(type) {
|
||||
});
|
||||
}
|
||||
|
||||
function publishFlowCheck(data) {
|
||||
var ids = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var temp = data[i];
|
||||
if ((temp.methodId == 'control.policy' || temp.methodId == 'data.form' || temp.methodId.indexOf('process.') > -1) && temp.methodId != 'default') {
|
||||
ids.push(temp.publishFileId);
|
||||
}
|
||||
}
|
||||
|
||||
//校验模型中支持文件附件是否上传
|
||||
var param = {
|
||||
sid : sid,
|
||||
cmd : "com.actionsoft.apps.coe.pal.publisher_get_publishFlow_files",
|
||||
wsId: wsId,
|
||||
uuids: JSON.stringify(ids)
|
||||
}
|
||||
$.ajax({
|
||||
url : "./jd",
|
||||
type : "POST",
|
||||
data : param,
|
||||
success : function(r) {
|
||||
if (r.result == 'ok') {
|
||||
if(r.data.result=='error'){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert(r.data.sb,"error",3000);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//伴随发布功能
|
||||
var param = {
|
||||
sid : sid,
|
||||
cmd : "com.actionsoft.apps.coe.pal.publisher_get_RelevancyPublish",
|
||||
wsId: wsId,
|
||||
uuids: JSON.stringify(ids),
|
||||
bindid:$("#processInstId").val()
|
||||
}
|
||||
$.ajax({
|
||||
url : "./jd",
|
||||
type : "POST",
|
||||
data : param,
|
||||
success : function(r) {
|
||||
if (r.result == 'ok') {
|
||||
if(r.data.result=='error'){
|
||||
$('#publisher_dialog').find('div.dlg-button').find('button:first').prop('disabled', '');
|
||||
$.simpleAlert(r.data.sb,"error",3000);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 打开流程树选择窗口
|
||||
function queryTree() {
|
||||
if ($("#treeDialog").css('display') == 'none') {// 防止多次打开
|
||||
@ -1359,10 +1398,6 @@ function createBatchReport(data, createTime) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var param = {
|
||||
sid : sid,
|
||||
cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_reports_create",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user