生成手册优化
This commit is contained in:
parent
57124ad5dd
commit
8e1bc7a8fd
Binary file not shown.
@ -1,10 +1,16 @@
|
|||||||
package com.actionsoft.apps.coe.pal.publisher;
|
package com.actionsoft.apps.coe.pal.publisher;
|
||||||
|
|
||||||
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishClientWeb;
|
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishClientWeb;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.model.run.delegate.ProcessInstance;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.model.run.delegate.TaskInstance;
|
||||||
import com.actionsoft.bpms.server.UserContext;
|
import com.actionsoft.bpms.server.UserContext;
|
||||||
import com.actionsoft.bpms.server.bind.annotation.Controller;
|
import com.actionsoft.bpms.server.bind.annotation.Controller;
|
||||||
import com.actionsoft.bpms.server.bind.annotation.Mapping;
|
import com.actionsoft.bpms.server.bind.annotation.Mapping;
|
||||||
import com.actionsoft.bpms.util.UtilString;
|
import com.actionsoft.bpms.util.UtilString;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class PublishClientController {
|
public class PublishClientController {
|
||||||
@ -502,4 +508,19 @@ public class PublishClientController {
|
|||||||
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
return web.getCoeWorkSpaceAndOrgInfo();
|
return web.getCoeWorkSpaceAndOrgInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补充发送OA待遇
|
||||||
|
* @param sid
|
||||||
|
* @param processDefId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.awspaas.user.apps.publish.RetransmissionOA")
|
||||||
|
public String RetransmissionOA(UserContext me, String id) throws SQLException {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.RetransmissionOA(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -850,7 +850,7 @@ public class PublisherController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Mapping("com.actionsoft.apps.coe.pal.publisher_publish_Refresh_Manual")
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_publish_Refresh_Manual")
|
||||||
public String RefreshManual(UserContext me,String processInstId,String type) {
|
public String RefreshManual(UserContext me,String processInstId,String type) {
|
||||||
ProcessPublishWeb web = new ProcessPublishWeb(me);
|
ProcessPublishWeb web = new ProcessPublishWeb(me);
|
||||||
return web.RefreshManual(processInstId,type);
|
return web.RefreshManual(processInstId,type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
package com.actionsoft.apps.coe.pal.publisher.client.web;
|
package com.actionsoft.apps.coe.pal.publisher.client.web;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.SQLException;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.text.Collator;
|
import java.text.Collator;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -15,6 +18,7 @@ import java.util.List;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
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;
|
||||||
@ -30,7 +34,12 @@ import com.actionsoft.apps.coe.pal.util.HighSecurityUtil;
|
|||||||
import com.actionsoft.apps.lifecycle.api.AppsAPIManager;
|
import com.actionsoft.apps.lifecycle.api.AppsAPIManager;
|
||||||
import com.actionsoft.apps.resource.AppContext;
|
import com.actionsoft.apps.resource.AppContext;
|
||||||
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
|
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
|
||||||
|
import com.actionsoft.bpms.bo.engine.BO;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.model.run.delegate.ProcessInstance;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.model.run.delegate.TaskInstance;
|
||||||
import com.actionsoft.bpms.bpmn.modeler.io.BPMNIO;
|
import com.actionsoft.bpms.bpmn.modeler.io.BPMNIO;
|
||||||
|
import com.actionsoft.bpms.commons.database.RowMap;
|
||||||
import com.actionsoft.bpms.commons.htmlframework.HtmlPageTemplate;
|
import com.actionsoft.bpms.commons.htmlframework.HtmlPageTemplate;
|
||||||
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
||||||
import com.actionsoft.bpms.commons.portal.pub.web.PublicPortalWeb;
|
import com.actionsoft.bpms.commons.portal.pub.web.PublicPortalWeb;
|
||||||
@ -46,10 +55,7 @@ import com.actionsoft.bpms.org.model.UserModel;
|
|||||||
import com.actionsoft.bpms.server.UserContext;
|
import com.actionsoft.bpms.server.UserContext;
|
||||||
import com.actionsoft.bpms.server.fs.DCContext;
|
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.util.Base64;
|
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.constant.CoEConstant;
|
||||||
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishHistoryCache;
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishHistoryCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.manage.publish.dao.PublishCommonDao;
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.dao.PublishCommonDao;
|
||||||
@ -84,11 +90,18 @@ 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.awspaas.user.apps.app.util.UtilUrl;
|
||||||
import org.apache.commons.collections4.IteratorUtils;
|
import org.apache.commons.collections4.IteratorUtils;
|
||||||
|
import org.dom4j.Document;
|
||||||
|
import org.dom4j.DocumentException;
|
||||||
|
import org.dom4j.DocumentHelper;
|
||||||
|
import org.dom4j.Element;
|
||||||
|
|
||||||
public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSkinsInterface {
|
public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSkinsInterface {
|
||||||
private UserContext _uc;
|
private UserContext _uc;
|
||||||
|
|
||||||
|
private String isSendOA = "true";
|
||||||
|
|
||||||
public ProcessPublishClientWeb() {
|
public ProcessPublishClientWeb() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4788,4 +4801,389 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk
|
|||||||
}
|
}
|
||||||
return PALRepositoryQueryAPIManager.getInstance().getPublishPortalHtml(me, uuid, taskId);
|
return PALRepositoryQueryAPIManager.getInstance().getPublishPortalHtml(me, uuid, taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对于OA待阅失败人员数据进行重新推送
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String RetransmissionOA(String id) throws SQLException {
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
String[] ids=id.split(",");
|
||||||
|
|
||||||
|
for(String oneid: ids){
|
||||||
|
|
||||||
|
BO readCountBO=SDK.getBOAPI().query("BO_EU_READ_COUNT").detailById(oneid);
|
||||||
|
if(readCountBO!=null){
|
||||||
|
String publshId=readCountBO.getString("PROCESSID");
|
||||||
|
BO publishBO=SDK.getBOAPI().query("BO_ACT_COE_PUBLISH").detailByBindId(publshId);
|
||||||
|
|
||||||
|
// 发布流程发布节点任务Id
|
||||||
|
String sql = "SELECT ID FROM WFH_TASK WHERE PROCESSINSTID = '" + publshId
|
||||||
|
+ "' AND ACTIVITYDEFID = 'obj_c9e5a3144b200001b68cffa01ed0153e' ";
|
||||||
|
String taskInd = DBSql.getString(sql);
|
||||||
|
TaskInstance taskInst = SDK.getTaskAPI().getInstanceById(taskInd);
|
||||||
|
|
||||||
|
BO publishBo = SDK.getBOAPI().getByProcess("BO_ACT_COE_PUBLISH", publshId);
|
||||||
|
// 发送岗位
|
||||||
|
String send_scope_post = publishBo.getString("SEND_SCOPE_POST");
|
||||||
|
// 发送组织
|
||||||
|
String send_scope_org = publishBo.getString("SEND_SCOPE_ORG");
|
||||||
|
|
||||||
|
List<BO> bo_act_coe_publish_n = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N", true).addQuery("BINDID=", publshId)
|
||||||
|
.list();
|
||||||
|
List<BO> bo_act_coe_publish_c = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C", true).addQuery("BINDID=", publshId)
|
||||||
|
.list();
|
||||||
|
List<BO> bo_act_coe_publish_s = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_S", true).addQuery("BINDID=", publshId)
|
||||||
|
.list();
|
||||||
|
|
||||||
|
// 获取文件版本ID
|
||||||
|
ArrayList<Map> vessionArr = new ArrayList<Map>();
|
||||||
|
if (bo_act_coe_publish_n.size() > 0) {
|
||||||
|
for (BO bo : bo_act_coe_publish_n) {
|
||||||
|
String plId = bo.getString("PUBLISHFILEID");
|
||||||
|
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(plId);
|
||||||
|
String versionId = palRepositoryModel.getVersionId();
|
||||||
|
String name = palRepositoryModel.getName();
|
||||||
|
String wsId = palRepositoryModel.getWsId();
|
||||||
|
HashMap map = new HashMap<String, String>();
|
||||||
|
map.put("versionId", versionId);
|
||||||
|
map.put("name", name);
|
||||||
|
map.put("wsId", wsId);
|
||||||
|
vessionArr.add(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (bo_act_coe_publish_c.size() > 0) {
|
||||||
|
for (BO bo : bo_act_coe_publish_c) {
|
||||||
|
String plId = bo.getString("CHANGEDFILEIDNEW");
|
||||||
|
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(plId);
|
||||||
|
String versionId = palRepositoryModel.getVersionId();
|
||||||
|
String name = palRepositoryModel.getName();
|
||||||
|
String wsId = palRepositoryModel.getWsId();
|
||||||
|
HashMap map = new HashMap<String, String>();
|
||||||
|
map.put("versionId", versionId);
|
||||||
|
map.put("name", name);
|
||||||
|
map.put("wsId", wsId);
|
||||||
|
vessionArr.add(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (bo_act_coe_publish_s.size() > 0) {
|
||||||
|
for (BO bo : bo_act_coe_publish_s) {
|
||||||
|
String plId = bo.getString("STOPFILEID");
|
||||||
|
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(plId);
|
||||||
|
String versionId = palRepositoryModel.getVersionId();
|
||||||
|
String name = palRepositoryModel.getName();
|
||||||
|
String wsId = palRepositoryModel.getWsId();
|
||||||
|
HashMap map = new HashMap<String, String>();
|
||||||
|
map.put("versionId", versionId);
|
||||||
|
map.put("name", name);
|
||||||
|
map.put("wsId", wsId);
|
||||||
|
vessionArr.add(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
String sendScope = "";
|
||||||
|
if (vessionArr.size() > 0) {
|
||||||
|
String sqlM = "SELECT PERMTYPE FROM BO_ACT_PUBLISH_PERM_SCOPE WHERE PALVERSIONID = '"
|
||||||
|
+ vessionArr.get(0).get("versionId") + "'";
|
||||||
|
sendScope = DBSql.getString(sqlM);
|
||||||
|
}
|
||||||
|
|
||||||
|
//待阅需要发送的人员
|
||||||
|
ArrayList<String> arr = new ArrayList<String>();
|
||||||
|
//StringBuffer postSb = new StringBuffer();
|
||||||
|
ArrayList<String> postList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
arr.add(oneid);
|
||||||
|
UserModel user = SDK.getORGAPI().getUser(oneid);
|
||||||
|
if (user != null) {
|
||||||
|
String positionNo = user.getPositionNo();
|
||||||
|
postList.add(positionNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 发布流程实例
|
||||||
|
ProcessInstance publshInst = SDK.getProcessAPI().getInstanceById(publshId);
|
||||||
|
|
||||||
|
System.err.println(publshInst.getTitle() + "_补充推送文件开始========>");
|
||||||
|
Connection open = DBSql.open();
|
||||||
|
// http://localhost:8089/portal/r/or?cmd=com.hy_client_bpm_form_main_page_open&oauthName=oauthLogin&processInstId=3505e654-9217-41cd-a31d-4971846b3219
|
||||||
|
/**
|
||||||
|
* 当流程不等于终止的时候往下走
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
|
||||||
|
String portalUrl = SDK.getPortalAPI().getPortalUrl();
|
||||||
|
String url = portalUrl + "/r/or?cmd=com.yili_process_page&oauthName=oauthLogin&processInstId="
|
||||||
|
+ publshId + "&taskInstId=" + taskInd;
|
||||||
|
String mobileurl = "https://bpm.yili.com:8088/portal"
|
||||||
|
+ "/r/or?cmd=com.yili_process_page_phone&corpid=wwb0ae23173b140618&appAgentId=1000014&oauthName=wechat&processInstId="
|
||||||
|
+ publshId + "&taskInstId=" + taskInd;
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Timestamp endTime = publshInst.getStartTime();
|
||||||
|
BO boActCoePublish = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true).addQuery("BINDID=", publshId)
|
||||||
|
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
||||||
|
String not_url = "/w?cmd=com.yili_process_page&processInstId=" + publshId + "&taskInstId=" + taskInd;
|
||||||
|
|
||||||
|
/*execute(pec, boActCoePublish.getString("APPLYUSERNAME"), boActCoePublish.getString("PROCESS_TITLE"),
|
||||||
|
not_url, boActCoePublish.getString("SEND_SCOPE_ORG"), boActCoePublish.getString("SEND_SCOP"),
|
||||||
|
boActCoePublish.getString("APPLYDATE"), publshId, boActCoePublish.getString("SEND_SCOPE_POST"),
|
||||||
|
boActCoePublish.getString("SEND_SCOPE_LEVEL"), "1");*/
|
||||||
|
|
||||||
|
JSONObject jsonObject = new JSONObject(new LinkedHashMap());
|
||||||
|
jsonObject.put("action", "read");
|
||||||
|
jsonObject.put("title", " " + "" + boActCoePublish.getString("PROCESS_TITLE") + "");
|
||||||
|
jsonObject.put("dept", SDK.getORGAPI().getDepartmentByUser(taskInst.getTarget()).getNo());// SDK.getORGAPI().getDepartmentByUser(processExecutionContext.getProcessInstance().getCreateUser()).getNo()
|
||||||
|
String target = taskInst.getTarget();
|
||||||
|
target = taskInst.getTarget();
|
||||||
|
jsonObject.put("user", target);
|
||||||
|
// jsonObject.put("user",);//processExecutionContext.getProcessInstance().getCreateUser()
|
||||||
|
jsonObject.put("date", sdf.format(endTime));
|
||||||
|
jsonObject.put("remark", boActCoePublish.getString("PROCESS_TITLE"));
|
||||||
|
jsonObject.put("status", "0");
|
||||||
|
jsonObject.put("dataid", publshId);
|
||||||
|
jsonObject.put("pcurl", url);
|
||||||
|
jsonObject.put("mobileurl", mobileurl);
|
||||||
|
// list.add(1,"00352394");
|
||||||
|
// list.add(2,"00352394");
|
||||||
|
/**
|
||||||
|
* 推送待阅文件到OA
|
||||||
|
*/
|
||||||
|
if ("true".equals(isSendOA)) {
|
||||||
|
if (publishBO != null && publshInst != null) {
|
||||||
|
System.err.println(publshInst.getTitle() + "推送OA待阅执行开始====>");
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
System.err.println(publshInst.getTitle() + "待发送人员数量====>" + arr.size());
|
||||||
|
for (String uid : arr) {
|
||||||
|
try {
|
||||||
|
SendOARead(jsonObject, publshInst, uid);
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
long endTimes = System.currentTimeMillis();
|
||||||
|
// 存入日志
|
||||||
|
createReadLog(publshInst, jsonObject, arr, startTime, endTimes);
|
||||||
|
System.err.println(publshInst.getTitle() + "补充推送OA待阅执行完毕====>" + "用时:"
|
||||||
|
+ (endTimes - startTime) / 1000 / 60 + "分钟" + "_共推送:" + arr.size() + "人");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
open.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return ro.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送OA待阅数据
|
||||||
|
*
|
||||||
|
* @param jsonObject
|
||||||
|
* @param processInstance
|
||||||
|
* @param results
|
||||||
|
* @throws DocumentException
|
||||||
|
*/
|
||||||
|
public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, String userId)
|
||||||
|
throws DocumentException {
|
||||||
|
// System.err.println(processInstance.getTitle() + "开始发送:" + userId);
|
||||||
|
if ("".equals(userId) || UtilString.isEmpty(userId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
jsonObject.put("userList", userId);
|
||||||
|
String xmlStr = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"webservices.yili.weaver.com.cn\">\n"
|
||||||
|
+ " <soapenv:Header/>" + " <soapenv:Body>" + " <web:service>" + " <web:in0>"
|
||||||
|
+ "<![CDATA[" + jsonObject + "]]>" + " </web:in0>" + " </web:service>"
|
||||||
|
+ " </soapenv:Body>" + "</soapenv:Envelope>";
|
||||||
|
// System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
||||||
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
|
|
||||||
|
String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, "");
|
||||||
|
Document document = DocumentHelper.parseText(postSoap);
|
||||||
|
Element rootElement = document.getRootElement();
|
||||||
|
// System.out.println("rootElement>>>>>>" + rootElement);
|
||||||
|
Element result = rootElement.element("Body").element("serviceResponse").element("out");
|
||||||
|
String resultString = result.getData().toString();
|
||||||
|
JSONObject jsonObject1 = JSON.parseObject(resultString);
|
||||||
|
String datas = jsonObject1.getString("data");
|
||||||
|
String status = jsonObject1.getString("status");
|
||||||
|
// System.out.println("推送》》》》》》》》》》》" + status);
|
||||||
|
if ("false".equals(status)) {
|
||||||
|
System.out.println(processInstance.getTitle() + "待阅推送失败:" + userId);
|
||||||
|
try {
|
||||||
|
BO bo = new BO();
|
||||||
|
bo.set("TITLE", processInstance.getTitle());
|
||||||
|
bo.set("NAME", userId);
|
||||||
|
bo.set("DEPNAME", SDK.getORGAPI().getUser(userId).getDepartmentId());
|
||||||
|
SDK.getBOAPI().create("BO_EU_READ_COUNT", bo, processInstance.getId(), processInstance.getCreateUser());
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO: handle exception
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// System.out.println(processInstance.getTitle() + "待阅推送成功:" + userId);
|
||||||
|
JSONArray resultArray = JSONObject.parseArray(datas);
|
||||||
|
for (int j = 0; j < resultArray.size(); j++) {
|
||||||
|
JSONObject jsonObject2 = resultArray.getJSONObject(j);
|
||||||
|
String user = jsonObject2.get("user").toString();
|
||||||
|
String dataid = jsonObject2.get("dataid").toString();
|
||||||
|
BO bo = new BO();
|
||||||
|
bo.set("TITLE", processInstance.getTitle());
|
||||||
|
bo.set("PROCESSID", processInstance.getId());
|
||||||
|
bo.set("USER_ID", user);
|
||||||
|
bo.set("USERDEP", SDK.getORGAPI().getUser(user).getDepartmentId());
|
||||||
|
bo.set("DATAID", dataid);
|
||||||
|
bo.set("RESULT", status);
|
||||||
|
bo.set("SENDTYPE", "3");
|
||||||
|
bo.set("READSTATE", "未读");
|
||||||
|
bo.set("TYPE", "补充推送");
|
||||||
|
SDK.getBOAPI().create("BO_ACT_DATAID", bo, processInstance.getId(), processInstance.getCreateUser());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新对应的发布流程的权限阅览权限范围
|
||||||
|
*
|
||||||
|
* @param ext ext
|
||||||
|
* @author wangpf
|
||||||
|
*/
|
||||||
|
private void updatePerm(String bindId, String title, String orgPerm, String postPerm, String levelPerm) {
|
||||||
|
System.out.println(title + ":权限范围补发开始执行");
|
||||||
|
//需要补发权限的权限阅览id
|
||||||
|
String sql = "UPDATE BO_ACT_PUBLISH_PERM_SCOPE set ORGPERM =? , POSTPERM=? , LEVELPERM=? WHERE PUBLISHPROCESSID=?";
|
||||||
|
//更新权限
|
||||||
|
DBSql.update(sql, new Object[]{orgPerm, postPerm, levelPerm, bindId});
|
||||||
|
System.out.println("流程发布实例id为:" + bindId + "的权限范围补发成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建待阅日志
|
||||||
|
*
|
||||||
|
* @param processExecutionContext
|
||||||
|
* @param jsonObject
|
||||||
|
* @param users
|
||||||
|
* @param startTime
|
||||||
|
*/
|
||||||
|
|
||||||
|
public void createReadLog(ProcessInstance publshInst, JSONObject jsonObject, ArrayList<String> arr, long startTime,
|
||||||
|
long endTimes) {
|
||||||
|
UserContext fromUID = UserContext.fromUID(publshInst.getCreateUser());
|
||||||
|
BO bo_Read_log = new BO();
|
||||||
|
bo_Read_log.set("USREID", fromUID.getUID());
|
||||||
|
bo_Read_log.set("DEPID", fromUID.getDepartmentModel().getId());
|
||||||
|
bo_Read_log.set("BUNAME", fromUID.getUserModel().getExt4());
|
||||||
|
bo_Read_log.set("TITLE", "补充发送" + jsonObject.get("title"));
|
||||||
|
bo_Read_log.set("PROCESSID", publshInst.getId());
|
||||||
|
bo_Read_log.set("SENDNUM", arr.size());
|
||||||
|
|
||||||
|
String sqly = "SELECT * FROM BO_ACT_DATAID WHERE PROCESSID = '" + publshInst.getId() + "' AND SENDTYPE = '3'";
|
||||||
|
List<RowMap> mapsy = DBSql.getMaps(sqly);
|
||||||
|
bo_Read_log.set("SENDNUMSJ", mapsy.size());
|
||||||
|
BO bo_act_coe_publishs = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
||||||
|
.addQuery("BINDID=", publshInst.getId()).addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
||||||
|
String send_scop = bo_act_coe_publishs.getString("SEND_SCOP");
|
||||||
|
bo_Read_log.set("SEND_SCOP", "");
|
||||||
|
String SEND_SCOPE_ORG = bo_act_coe_publishs.getString("SEND_SCOPE_ORG");
|
||||||
|
if (UtilString.isNotEmpty(SEND_SCOPE_ORG)) {
|
||||||
|
String[] resulr = SEND_SCOPE_ORG.split(",");
|
||||||
|
bo_Read_log.set("SEND_SCOPE_ORGNUM", 0);
|
||||||
|
}
|
||||||
|
String SEND_SCOPE_POST = bo_act_coe_publishs.getString("SEND_SCOPE_POST");
|
||||||
|
if (UtilString.isNotEmpty(SEND_SCOPE_POST)) {
|
||||||
|
String[] resulr = SEND_SCOPE_POST.split(",");
|
||||||
|
bo_Read_log.set("SEND_SCOPE_POST_NUM", 0);
|
||||||
|
}
|
||||||
|
String SEND_SCOPE_LEVEL = bo_act_coe_publishs.getString("SEND_SCOPE_LEVEL");
|
||||||
|
if (UtilString.isNotEmpty(SEND_SCOPE_LEVEL)) {
|
||||||
|
String[] resulr = SEND_SCOPE_LEVEL.split(",");
|
||||||
|
bo_Read_log.set("SEND_SCOPE_LEVEL_NUM", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bo_Read_log.set("STARTTIMES", startTime);
|
||||||
|
bo_Read_log.set("ENDTIMES", endTimes);
|
||||||
|
bo_Read_log.set("TIMECOUNT", (endTimes - startTime) / 1000 + "秒");
|
||||||
|
// 文件发布成功回执流程
|
||||||
|
ProcessInstance processInst = SDK.getProcessAPI().createProcessInstance("obj_b4700f89a7a144c086d047de0cfe9531",
|
||||||
|
"admin", jsonObject.get("title") + "成功发布回执单");
|
||||||
|
SDK.getBOAPI().create("BO_EU_PAL_PULBISH_SUCCESS", bo_Read_log, processInst, UserContext.fromUID("admin"));
|
||||||
|
TaskInstance taskInst = SDK.getProcessAPI().start(processInst).fetchActiveTasks().get(0);
|
||||||
|
SDK.getTaskAPI().completeTask(taskInst.getId(), "admin");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建XPage页面上的待阅文件
|
||||||
|
*
|
||||||
|
* @param processExecutionContext
|
||||||
|
* @param fileCreateName
|
||||||
|
* @param fileName
|
||||||
|
* @param fileurl
|
||||||
|
* @param readingScope_org
|
||||||
|
* @param isFullCompany
|
||||||
|
* @param fileCreateDate
|
||||||
|
* @param relationProcessinstId
|
||||||
|
* @param readingScope_post
|
||||||
|
* @param readingScope_level
|
||||||
|
* @param fileid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean execute(ProcessExecutionContext processExecutionContext, String fileCreateName, String fileName,
|
||||||
|
String fileurl, String readingScope_org, String isFullCompany, String fileCreateDate,
|
||||||
|
String relationProcessinstId, String readingScope_post, String readingScope_level, String fileid) {
|
||||||
|
// 调用App
|
||||||
|
String sourceAppId = processExecutionContext.getProcessInstance().getAppId();
|
||||||
|
// aslp服务地址
|
||||||
|
String aslp = "aslp://com.awspaas.user.apps.docview/PushFileToXpage";
|
||||||
|
// 参数定义列表
|
||||||
|
Map params = new HashMap<String, Object>();
|
||||||
|
// 发布人,不允许空值,必填
|
||||||
|
params.put("fileCreateName", fileCreateName);
|
||||||
|
// 待阅文件标题名称,不允许空值,必填
|
||||||
|
params.put("fileName", fileName);
|
||||||
|
// 阅读范围_组织,不允许空值,非必填
|
||||||
|
params.put("readingScope_org", readingScope_org);
|
||||||
|
// 是否全公司可见,不允许空值,必填
|
||||||
|
params.put("isFullCompany", isFullCompany);
|
||||||
|
// 待阅文件Url,不允许空值,必填
|
||||||
|
params.put("fileurl", fileurl);
|
||||||
|
// 发布日期,不允许空值,必填
|
||||||
|
params.put("fileCreateDate", fileCreateDate);
|
||||||
|
// 发布流程ID,不允许空值,必填
|
||||||
|
params.put("relationProcessinstId", relationProcessinstId);
|
||||||
|
// 阅读范围_岗位,不允许空值,非必填
|
||||||
|
params.put("readingScope_post", readingScope_post);
|
||||||
|
// 阅读范围_职级,不允许空值,非必填
|
||||||
|
params.put("readingScope_level", readingScope_level);
|
||||||
|
// 待阅文件ID,多个逗号隔开,不允许空值,必填
|
||||||
|
params.put("fileid", fileid);
|
||||||
|
AppAPI appAPI = SDK.getAppAPI();
|
||||||
|
// 推送待阅文件到xpage门户
|
||||||
|
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
|
System.out.println("ros++++++++=====待阅》》》》》》》》》》" + ro);
|
||||||
|
return ro.isOk();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4456,76 +4456,84 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
public String RefreshManual(String processInstId, String type) {
|
public String RefreshManual(String processInstId, String type) {
|
||||||
ResponseObject ro = ResponseObject.newOkResponse();
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (type.equals("1")) {
|
||||||
|
//发布新文件
|
||||||
|
List<BO> publishNBO = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N").bindId(processInstId).list();
|
||||||
|
|
||||||
if (type.equals("1")) {
|
if (publishNBO.size() > 0) {
|
||||||
//发布新文件
|
for (BO onePublishN : publishNBO) {
|
||||||
List<BO> publishNBO = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N").bindId(processInstId).list();
|
|
||||||
|
|
||||||
if (publishNBO.size() > 0) {
|
if(onePublishN.getString("TASKID").equals("submit_create")){
|
||||||
for (BO onePublishN : publishNBO) {
|
return ResponseObject.newWarnResponse("请先创建手册!!").toString();
|
||||||
String plId = onePublishN.getString("PUBLISHFILEID");
|
}
|
||||||
int count = 0;
|
String plId = onePublishN.getString("PUBLISHFILEID");
|
||||||
// 重新生成手册
|
int count = 0;
|
||||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(plId);
|
// 重新生成手册
|
||||||
String wsIdro = queryMaPublishGetWsId();
|
PALRepositoryModel model = PALRepositoryCache.getCache().get(plId);
|
||||||
JSONObject wsIdJson = JSONObject.parseObject(wsIdro);
|
String wsIdro = queryMaPublishGetWsId();
|
||||||
String taskId = createOutputReport(model, wsIdJson.getJSONObject("data").get("wsId").toString(), "admin", "", plId);
|
JSONObject wsIdJson = JSONObject.parseObject(wsIdro);
|
||||||
// 刷新预览加载的表
|
String taskId = createOutputReport(model, wsIdJson.getJSONObject("data").get("wsId").toString(), "admin", "", plId);
|
||||||
String sqlr = "UPDATE BO_EU_PAL_OUTPUTREPORT SET TASKID = '" + taskId + "' WHERE PLID = '" + plId + "'";
|
// 刷新预览加载的表
|
||||||
DBSql.update(sqlr);
|
String sqlr = "UPDATE BO_EU_PAL_OUTPUTREPORT SET TASKID = '" + taskId + "' WHERE PLID = '" + plId + "'";
|
||||||
String sql1 = "SELECT ID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID = '" + plId + "'";
|
DBSql.update(sqlr);
|
||||||
String sql2 = "SELECT ID FROM BO_ACT_COE_PUBLISH_C WHERE CHANGEDFILEIDNEW = '" + plId + "'";
|
String sql1 = "SELECT ID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID = '" + plId + "'";
|
||||||
if (UtilString.isNotEmpty(DBSql.getString(sql1))) {
|
String sql2 = "SELECT ID FROM BO_ACT_COE_PUBLISH_C WHERE CHANGEDFILEIDNEW = '" + plId + "'";
|
||||||
count = DBSql.update(
|
if (UtilString.isNotEmpty(DBSql.getString(sql1))) {
|
||||||
"UPDATE BO_ACT_COE_PUBLISH_N SET TASKID='" + taskId + "'WHERE PUBLISHFILEID ='" + plId + "'");
|
count = DBSql.update(
|
||||||
}
|
"UPDATE BO_ACT_COE_PUBLISH_N SET TASKID='" + taskId + "'WHERE PUBLISHFILEID ='" + plId + "'");
|
||||||
if (UtilString.isNotEmpty(DBSql.getString(sql2))) {
|
}
|
||||||
count = DBSql.update(
|
if (count != 0) {
|
||||||
"UPDATE BO_ACT_COE_PUBLISH_C SET TASKID='" + taskId + "'WHERE CHANGEDFILEIDNEW ='" + plId + "'");
|
DBSql.update("UPDATE APP_ACT_COE_PAL_PUBLISH_LIST SET TASKID='" + taskId + "'WHERE PALREPOSITORYID='"
|
||||||
}
|
+ plId + "'");
|
||||||
if (count != 0) {
|
}
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_PUBLISH_LIST SET TASKID='" + taskId + "'WHERE PALREPOSITORYID='"
|
|
||||||
+ plId + "'");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
//发布变更文件
|
||||||
|
List<BO> publishCBO = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C").bindId(processInstId).list();
|
||||||
|
|
||||||
}
|
if (publishCBO.size() > 0) {
|
||||||
} else {
|
|
||||||
//发布变更文件
|
|
||||||
List<BO> publishCBO = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C").bindId(processInstId).list();
|
|
||||||
|
|
||||||
if (publishCBO.size() > 0) {
|
for (BO onePublishC : publishCBO) {
|
||||||
|
|
||||||
|
if(onePublishC.getString("TASKID")=="submit_create"){
|
||||||
|
return ResponseObject.newWarnResponse("请先创建手册!!").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
String plId = onePublishC.getString("CHANGEDFILEIDNEW");
|
||||||
|
int count = 0;
|
||||||
|
// 重新生成手册
|
||||||
|
PALRepositoryModel model = PALRepositoryCache.getCache().get(plId);
|
||||||
|
String wsIdro = queryMaPublishGetWsId();
|
||||||
|
JSONObject wsIdJson = JSONObject.parseObject(wsIdro);
|
||||||
|
String taskId = createOutputReport(model, wsIdJson.getJSONObject("data").get("wsId").toString(), "admin", "", plId);
|
||||||
|
// 刷新预览加载的表
|
||||||
|
String sqlr = "UPDATE BO_EU_PAL_OUTPUTREPORT SET TASKID = '" + taskId + "' WHERE PLID = '" + plId + "'";
|
||||||
|
DBSql.update(sqlr);
|
||||||
|
String sql2 = "SELECT ID FROM BO_ACT_COE_PUBLISH_C WHERE CHANGEDFILEIDNEW = '" + plId + "'";
|
||||||
|
|
||||||
|
if (UtilString.isNotEmpty(DBSql.getString(sql2))) {
|
||||||
|
count = DBSql.update(
|
||||||
|
"UPDATE BO_ACT_COE_PUBLISH_C SET TASKID='" + taskId + "'WHERE CHANGEDFILEIDNEW ='" + plId + "'");
|
||||||
|
}
|
||||||
|
if (count != 0) {
|
||||||
|
DBSql.update("UPDATE APP_ACT_COE_PAL_PUBLISH_LIST SET TASKID='" + taskId + "'WHERE PALREPOSITORYID='"
|
||||||
|
+ plId + "'");
|
||||||
|
}
|
||||||
|
|
||||||
for (BO onePublishC : publishCBO) {
|
|
||||||
String plId = onePublishC.getString("CHANGEDFILEIDNEW");
|
|
||||||
int count = 0;
|
|
||||||
// 重新生成手册
|
|
||||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(plId);
|
|
||||||
String wsIdro = queryMaPublishGetWsId();
|
|
||||||
JSONObject wsIdJson = JSONObject.parseObject(wsIdro);
|
|
||||||
String taskId = createOutputReport(model, wsIdJson.getJSONObject("data").get("wsId").toString(), "admin", "", plId);
|
|
||||||
// 刷新预览加载的表
|
|
||||||
String sqlr = "UPDATE BO_EU_PAL_OUTPUTREPORT SET TASKID = '" + taskId + "' WHERE PLID = '" + plId + "'";
|
|
||||||
DBSql.update(sqlr);
|
|
||||||
String sql2 = "SELECT ID FROM BO_ACT_COE_PUBLISH_C WHERE CHANGEDFILEIDNEW = '" + plId + "'";
|
|
||||||
|
|
||||||
if (UtilString.isNotEmpty(DBSql.getString(sql2))) {
|
|
||||||
count = DBSql.update(
|
|
||||||
"UPDATE BO_ACT_COE_PUBLISH_C SET TASKID='" + taskId + "'WHERE CHANGEDFILEIDNEW ='" + plId + "'");
|
|
||||||
}
|
}
|
||||||
if (count != 0) {
|
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_PUBLISH_LIST SET TASKID='" + taskId + "'WHERE PALREPOSITORYID='"
|
|
||||||
+ plId + "'");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} catch (AWSDataAccessException e) {
|
||||||
|
ro.put("result","创建手册失败!!!");
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ro.toString();
|
return ro.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -99,6 +99,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ProcessData(ProcessExecutionContext processExecutionContext) throws Exception {
|
public void ProcessData(ProcessExecutionContext processExecutionContext) throws Exception {
|
||||||
|
|
||||||
System.err.println(processExecutionContext.getTaskInstance().getTitle() + "_推送文件开始========>");
|
System.err.println(processExecutionContext.getTaskInstance().getTitle() + "_推送文件开始========>");
|
||||||
// http://localhost:8089/portal/r/or?cmd=com.hy_client_bpm_form_main_page_open&oauthName=oauthLogin&processInstId=3505e654-9217-41cd-a31d-4971846b3219
|
// http://localhost:8089/portal/r/or?cmd=com.hy_client_bpm_form_main_page_open&oauthName=oauthLogin&processInstId=3505e654-9217-41cd-a31d-4971846b3219
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -81,9 +81,18 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
@Override
|
@Override
|
||||||
public void execute(ProcessExecutionContext ext) throws Exception {
|
public void execute(ProcessExecutionContext ext) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
//用户点击确认发布按钮后进行触发推送任务
|
//用户点击确认发布按钮后进行触发推送任务
|
||||||
Boolean isConfirmRelease = SDK.getTaskAPI().isChoiceActionMenu(ext.getTaskInstance(), "确认发布");
|
Boolean isConfirmRelease = SDK.getTaskAPI().isChoiceActionMenu(ext.getTaskInstance(), "确认发布");
|
||||||
if(isConfirmRelease==true){
|
|
||||||
|
if(isConfirmRelease){
|
||||||
|
ProcessInstance boProcessInstance = SDK.getProcessAPI()
|
||||||
|
.createBOProcessInstance("obj_a2d419f9aff446c1be891785200e914c", ext.getUserContext().getUserName(), "OA任务传输");
|
||||||
|
BO executiveTaskBO=new BO();
|
||||||
|
executiveTaskBO.set("TASKTITLE",ext.getProcessInstance().getTitle());
|
||||||
|
executiveTaskBO.set("TASKID",ext.getProcessInstance().getId());
|
||||||
|
executiveTaskBO.set("TASKSTATUS",1);
|
||||||
|
SDK.getBOAPI().create("BO_ACT_EXECUTIVE_TASK",executiveTaskBO,boProcessInstance.getId(),"");
|
||||||
ExecutorService service = Executors.newFixedThreadPool(1);
|
ExecutorService service = Executors.newFixedThreadPool(1);
|
||||||
service.execute(new Runnable() {
|
service.execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -383,6 +392,10 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
}
|
}
|
||||||
List<String> idList = sendList.subList(i, i + toIndex);
|
List<String> idList = sendList.subList(i, i + toIndex);
|
||||||
try {
|
try {
|
||||||
|
BO executiveTaskBO=SDK.getBOAPI().query("BO_ACT_EXECUTIVE_TASK").addQuery("TASKID=",processExecutionContext.getProcessInstance().getId()).addQuery("TASKSTATUS=",2).detail();
|
||||||
|
if(executiveTaskBO!=null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
SendOARead(jsonObject, instanceById, idList, "批量推送");
|
SendOARead(jsonObject, instanceById, idList, "批量推送");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
|
|||||||
@ -259,8 +259,8 @@ function initHtml() {
|
|||||||
newHtml += '<button name="add" type="button" class="awsui-btn awsui-btn-blue" onclick="addProcess(\'new\');">新增</button>';
|
newHtml += '<button name="add" type="button" class="awsui-btn awsui-btn-blue" onclick="addProcess(\'new\');">新增</button>';
|
||||||
// newHtml += '<button name="save" type="button" class="awsui-btn" onclick="saveFormData(\'new\');">保存</button>';
|
// newHtml += '<button name="save" type="button" class="awsui-btn" onclick="saveFormData(\'new\');">保存</button>';
|
||||||
newHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn-danger" onclick="deleteFile(\'new\');">删除</button>';
|
newHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn-danger" onclick="deleteFile(\'new\');">删除</button>';
|
||||||
newHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn" onclick="refreshManual('+$("#processInstId").val()+','+"1"+');">重新生成手册</button>';
|
newHtml += '<button name="refreshManual" type="button" class="awsui-btn awsui-btn" onclick="refreshManuals(\''+$("#processInstId").val()+'\',\''+"1"+'\');">重新生成手册</button>';
|
||||||
newHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn" onclick="getFiles();">生成附件</button>';
|
newHtml += '<button name="getFiles" type="button" class="awsui-btn awsui-btn" onclick="getFiles();">生成附件</button>';
|
||||||
}
|
}
|
||||||
//newHtml += '<button name="add" type="button" class="awsui-btn awsui-btn-blue" onclick="addProcess(\'new\');">新增</button>';
|
//newHtml += '<button name="add" type="button" class="awsui-btn awsui-btn-blue" onclick="addProcess(\'new\');">新增</button>';
|
||||||
// newHtml += '<button name="save" type="button" class="awsui-btn" onclick="saveFormData(\'new\');">保存</button>';
|
// newHtml += '<button name="save" type="button" class="awsui-btn" onclick="saveFormData(\'new\');">保存</button>';
|
||||||
@ -292,7 +292,7 @@ function initHtml() {
|
|||||||
changeHtml += '<button name="add" type="button" class="awsui-btn awsui-btn-blue" onclick="addProcess(\'change\');">新增</button>';
|
changeHtml += '<button name="add" type="button" class="awsui-btn awsui-btn-blue" onclick="addProcess(\'change\');">新增</button>';
|
||||||
// changeHtml += '<button name="save" type="button" class="awsui-btn" onclick="saveFormData(\'change\');">保存</button>';
|
// changeHtml += '<button name="save" type="button" class="awsui-btn" onclick="saveFormData(\'change\');">保存</button>';
|
||||||
changeHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn-danger" onclick="deleteFile(\'change\');">删除</button>';
|
changeHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn-danger" onclick="deleteFile(\'change\');">删除</button>';
|
||||||
changeHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn" onclick="refreshManual(\'+$("#processInstId").val()+"2"+\');">重新生成手册</button>';
|
changeHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn" onclick="refreshManuals(\''+$("#processInstId").val()+'\',\''+"2"+'\');">重新生成手册</button>';
|
||||||
changeHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn" onclick="getFiles()">生成附件</button>';
|
changeHtml += '<button name="delete" type="button" class="awsui-btn awsui-btn" onclick="getFiles()">生成附件</button>';
|
||||||
}
|
}
|
||||||
//changeHtml += '<button name="add" type="button" class="awsui-btn awsui-btn-blue" onclick="addProcess(\'change\');">新增</button>';
|
//changeHtml += '<button name="add" type="button" class="awsui-btn awsui-btn-blue" onclick="addProcess(\'change\');">新增</button>';
|
||||||
@ -1115,7 +1115,8 @@ function openPortalPage(uuid, taskId) {
|
|||||||
* 重新生成手册
|
* 重新生成手册
|
||||||
* @param uuid
|
* @param uuid
|
||||||
*/
|
*/
|
||||||
function refreshManual(processInstId,type) {
|
function refreshManuals(processInstId,type) {
|
||||||
|
//FormToolBarAction.BTN_SAVE();
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_Refresh_Manual",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_Refresh_Manual",
|
||||||
@ -1130,8 +1131,9 @@ function refreshManual(processInstId,type) {
|
|||||||
success : function(r) {
|
success : function(r) {
|
||||||
if (r.result == 'ok') {
|
if (r.result == 'ok') {
|
||||||
AWSFormUtil.refreshPage();
|
AWSFormUtil.refreshPage();
|
||||||
|
} else {
|
||||||
|
$.simpleAlert(r.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user