发布流程重构代码提交
This commit is contained in:
parent
696af37dca
commit
05ea496a36
@ -8,6 +8,7 @@ import java.util.Map;
|
|||||||
import com.actionsoft.apps.coe.pal.publisher.alsp.SendEHSQAlsp;
|
import com.actionsoft.apps.coe.pal.publisher.alsp.SendEHSQAlsp;
|
||||||
import com.actionsoft.apps.coe.pal.publisher.alsp.SendKMSAlsp;
|
import com.actionsoft.apps.coe.pal.publisher.alsp.SendKMSAlsp;
|
||||||
import com.actionsoft.apps.coe.pal.publisher.alsp.SendOAAlsp;
|
import com.actionsoft.apps.coe.pal.publisher.alsp.SendOAAlsp;
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.alsp.SendOAReadAlsp;
|
||||||
import com.actionsoft.apps.coe.pal.publisher.at.*;
|
import com.actionsoft.apps.coe.pal.publisher.at.*;
|
||||||
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishClientWeb;
|
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishClientWeb;
|
||||||
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishWeb;
|
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishWeb;
|
||||||
@ -166,12 +167,17 @@ public class Plugins implements PluginListener {
|
|||||||
list.add(new AtFormulaPluginProfile("依据任务接收时间与意见回复期限返回小时数", "@getConsultHour(*bindid,*taskId,*deadline)", getConsultHour.class.getName(), "依据任务接收时间与意见回复期限返回小时数", "依据任务接收时间与意见回复期限返回小时数"));
|
list.add(new AtFormulaPluginProfile("依据任务接收时间与意见回复期限返回小时数", "@getConsultHour(*bindid,*taskId,*deadline)", getConsultHour.class.getName(), "依据任务接收时间与意见回复期限返回小时数", "依据任务接收时间与意见回复期限返回小时数"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
list.add(new ASLPPluginProfile("SendOAAlsp", SendOAAlsp.class.getName(), "OA系统请求调用请求调用", new HttpASLP(HttpASLP.AUTH_AWS_SID)));
|
list.add(new ASLPPluginProfile("SendOAAlsp", SendOAAlsp.class.getName(), "OA系统请求调用请求调用", new HttpASLP(HttpASLP.AUTH_AWS_SID)));
|
||||||
|
|
||||||
list.add(new ASLPPluginProfile("SendKMSAlsp", SendKMSAlsp.class.getName(), "KMS调用", new HttpASLP(HttpASLP.AUTH_AWS_SID)));
|
list.add(new ASLPPluginProfile("SendKMSAlsp", SendKMSAlsp.class.getName(), "KMS调用", new HttpASLP(HttpASLP.AUTH_AWS_SID)));
|
||||||
|
|
||||||
list.add(new ASLPPluginProfile("SendEHSQAlsp", SendEHSQAlsp.class.getName(), "EHSQ调用", new HttpASLP(HttpASLP.AUTH_AWS_SID)));
|
list.add(new ASLPPluginProfile("SendEHSQAlsp", SendEHSQAlsp.class.getName(), "EHSQ调用", new HttpASLP(HttpASLP.AUTH_AWS_SID)));
|
||||||
|
|
||||||
|
list.add(new ASLPPluginProfile("SendOAReadAlsp", SendOAReadAlsp.class.getName(), "OA待阅接口ALSP", new HttpASLP(HttpASLP.AUTH_AWS_SID)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.actionsoft.apps.coe.pal.publisher.alsp;
|
|||||||
|
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
|
||||||
@ -39,6 +40,7 @@ public class SendKMSAlsp implements ASLP {
|
|||||||
@Meta(parameter = {"name:'processId',required:true,desc:'流程实例ID'",
|
@Meta(parameter = {"name:'processId',required:true,desc:'流程实例ID'",
|
||||||
"name:'sid',required:true,desc:'sid'"})
|
"name:'sid',required:true,desc:'sid'"})
|
||||||
public ResponseObject call(Map<String, Object> map) {
|
public ResponseObject call(Map<String, Object> map) {
|
||||||
|
System.out.println("开始进入KMS方法中");
|
||||||
ResponseObject ro = ResponseObject.newWarnResponse("结果未知");
|
ResponseObject ro = ResponseObject.newWarnResponse("结果未知");
|
||||||
try {
|
try {
|
||||||
String processId = String.valueOf(map.get("processId"));
|
String processId = String.valueOf(map.get("processId"));
|
||||||
@ -95,10 +97,9 @@ public class SendKMSAlsp implements ASLP {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
}
|
}
|
||||||
List<RowMap> mapsl = DBSql.getMaps(open, "SELECT * FROM ORGUSER WHERE CLOSED = '0'");
|
List<RowMap> mapsl = DBSql.getMaps(open, "SELECT USERID FROM ORGUSER WHERE CLOSED = '0'");
|
||||||
for (RowMap rowMap : mapsl) {
|
for (RowMap rowMap : mapsl) {
|
||||||
String userId = rowMap.getString("USERID");
|
String userId = rowMap.getString("USERID");
|
||||||
|
|
||||||
if (!"10033643".equals(userId) && !userList1.contains(userId)
|
if (!"10033643".equals(userId) && !userList1.contains(userId)
|
||||||
&& !userList2.contains(userId) && !userList3.contains(userId)) {
|
&& !userList2.contains(userId) && !userList3.contains(userId)) {
|
||||||
sendList.add(userId);
|
sendList.add(userId);
|
||||||
@ -109,7 +110,6 @@ public class SendKMSAlsp implements ASLP {
|
|||||||
sendList = processEndAfterEvent_new.getSendList(processInstance, bo_act_coe_publish, jsonObject);
|
sendList = processEndAfterEvent_new.getSendList(processInstance, bo_act_coe_publish, jsonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
new_uid = new_uid.join(",", sendList);
|
new_uid = new_uid.join(",", sendList);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -129,16 +129,22 @@ public class SendKMSAlsp implements ASLP {
|
|||||||
// 将旧的知识取消发布或者移动到废止发布中
|
// 将旧的知识取消发布或者移动到废止发布中
|
||||||
String publishfileid_stop = bo.getString("STOPFILEID");
|
String publishfileid_stop = bo.getString("STOPFILEID");
|
||||||
filed.add(publishfileid_stop);
|
filed.add(publishfileid_stop);
|
||||||
String sql_s = "select * from APP_ACT_COE_PAL_REPOSITORY where id = '" + publishfileid_stop
|
/*String sql_s = "select EXT4 from APP_ACT_COE_PAL_REPOSITORY where id='" + publishfileid_stop
|
||||||
+ "'";
|
+ "'";*/
|
||||||
RowMap map1 = DBSql.getMap(open, sql_s);
|
PALRepositoryModel plmodel = PALRepositoryCache.getCache().get(publishfileid_stop);
|
||||||
if (StringUtils.isNotEmpty(map1.getString("EXT4"))) {
|
|
||||||
|
String ext4=plmodel.getExt4();
|
||||||
|
|
||||||
|
/*RowMap map1 = DBSql.getMap(open, sql_s);*/
|
||||||
|
if (StringUtils.isNotEmpty(ext4)) {
|
||||||
processEndAfterEvent_new.CancelPublishKnwl(processInstance,
|
processEndAfterEvent_new.CancelPublishKnwl(processInstance,
|
||||||
sid,
|
sid,
|
||||||
map1.getString("EXT4"));
|
ext4);
|
||||||
|
|
||||||
DBSql.update(open, "UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT4 = '' WHERE ID = '"
|
DBSql.update(open, "UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT4='' WHERE ID='"
|
||||||
+ publishfileid_stop + "'");
|
+ publishfileid_stop + "'");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@ -37,7 +37,9 @@ public class SendOAAlsp implements ASLP {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Meta(parameter = {"name:'processId',required:true,desc:'流程ID'",
|
@Meta(parameter = {"name:'processId',required:true,desc:'流程ID'",
|
||||||
"name:'taskId',required:true,desc:'任务ID'"})
|
"name:'taskId',required:true,desc:'任务ID'",
|
||||||
|
"name:'sid',required:true,desc:'用户会话ID'"
|
||||||
|
})
|
||||||
public ResponseObject call(Map<String, Object> map) {
|
public ResponseObject call(Map<String, Object> map) {
|
||||||
ResponseObject ro = ResponseObject.newWarnResponse("结果未知");
|
ResponseObject ro = ResponseObject.newWarnResponse("结果未知");
|
||||||
try {
|
try {
|
||||||
@ -50,9 +52,7 @@ public class SendOAAlsp implements ASLP {
|
|||||||
|
|
||||||
ProcessInstance processInstance = SDK.getProcessAPI().getInstanceById(processId);
|
ProcessInstance processInstance = SDK.getProcessAPI().getInstanceById(processId);
|
||||||
TaskInstance taskInstance = SDK.getTaskAPI().getInstanceById(taskId);
|
TaskInstance taskInstance = SDK.getTaskAPI().getInstanceById(taskId);
|
||||||
if (processInstance != null && processInstance.getControlState().equals(ProcessRuntimeConst.INST_STATE_END) && taskInstance != null) {
|
processEndAfterEventNew.ProcessData(processInstance, taskInstance, open, sid);
|
||||||
processEndAfterEventNew.ProcessData(processInstance, taskInstance, open, sid);
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
|||||||
import com.actionsoft.bpms.server.UserContext;
|
import com.actionsoft.bpms.server.UserContext;
|
||||||
import com.actionsoft.bpms.util.DBSql;
|
import com.actionsoft.bpms.util.DBSql;
|
||||||
import com.actionsoft.bpms.util.UtilString;
|
import com.actionsoft.bpms.util.UtilString;
|
||||||
|
import com.actionsoft.exception.AWSDataAccessException;
|
||||||
import com.actionsoft.sdk.local.SDK;
|
import com.actionsoft.sdk.local.SDK;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@ -19,6 +20,7 @@ import org.dom4j.DocumentException;
|
|||||||
import org.dom4j.DocumentHelper;
|
import org.dom4j.DocumentHelper;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -32,192 +34,199 @@ public class SendOAReadAlsp implements ASLP {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Meta(parameter = {"name:'processId',required:true,desc:'流程实例ID'",
|
@Meta(parameter = {"name:'processId',required:true,desc:'流程实例ID'",
|
||||||
"name:'userIds',required:true,desc:'userIds'"})
|
"name:'userIds',required:true,desc:'用户数据'",
|
||||||
|
"name:'type',required:true,desc:'类型'"
|
||||||
|
})
|
||||||
public ResponseObject call(Map<String, Object> map) {
|
public ResponseObject call(Map<String, Object> map) {
|
||||||
String processId = String.valueOf(map.get("processId"));
|
|
||||||
String userIds = String.valueOf(map.get("userIds"));
|
|
||||||
String type = String.valueOf(map.get("type"));
|
|
||||||
|
|
||||||
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(processId);
|
System.out.println("即将开始进入方法体========================");
|
||||||
|
Connection conn =null;
|
||||||
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
ResponseObject ro = ResponseObject.newWarnResponse("结果未知");
|
||||||
.addQuery("BINDID=", instanceById.getId())
|
|
||||||
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
|
||||||
|
|
||||||
String sql = "SELECT ID FROM WFH_TASK WHERE PROCESSINSTID = '" + instanceById.getId()
|
|
||||||
+ "' AND ACTIVITYDEFID = 'obj_c9e5a3144b200001b68cffa01ed0153e' ";
|
|
||||||
String taskInd = DBSql.getString(sql);
|
|
||||||
|
|
||||||
TaskInstance ta = SDK.getTaskAPI().getInstanceById(taskInd);
|
|
||||||
String portalUrl = SDK.getPortalAPI().getPortalUrl();
|
|
||||||
|
|
||||||
String url = portalUrl + "/r/or?cmd=com.yili_process_page&oauthName=oauthLogin&processInstId="
|
|
||||||
+ instanceById.getId() + "&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="
|
|
||||||
+ instanceById.getId() + "&taskInstId="
|
|
||||||
+ taskInd;
|
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
//Timestamp endTime = taskInstance.getBeginTime();
|
|
||||||
Timestamp endTime = new Timestamp(System.currentTimeMillis());
|
|
||||||
|
|
||||||
JSONObject jsonObjects = new JSONObject(new LinkedHashMap());
|
|
||||||
jsonObjects.put("action", "read");
|
|
||||||
jsonObjects.put("title", " " + "" + bo_act_coe_publish1.getString("PROCESS_TITLE") + "");
|
|
||||||
jsonObjects.put("dept", SDK.getORGAPI()
|
|
||||||
.getDepartmentByUser(ta.getTarget()).getNo());// SDK.getORGAPI().getDepartmentByUser(processExecutionContext.getProcessInstance().getCreateUser()).getNo()
|
|
||||||
String target = ta.getTarget();
|
|
||||||
|
|
||||||
jsonObjects.put("user", target);
|
|
||||||
// jsonObject.put("user",);//processExecutionContext.getProcessInstance().getCreateUser()
|
|
||||||
jsonObjects.put("date", sdf.format(endTime));
|
|
||||||
jsonObjects.put("remark", bo_act_coe_publish1.getString("PROCESS_TITLE"));
|
|
||||||
jsonObjects.put("status", "0");
|
|
||||||
jsonObjects.put("dataid",instanceById.getId());
|
|
||||||
jsonObjects.put("pcurl", url);
|
|
||||||
jsonObjects.put("mobileurl", mobileurl);
|
|
||||||
|
|
||||||
String[] resrt = userIds.split(",");
|
|
||||||
long start_time = System.currentTimeMillis();
|
|
||||||
BO bo_OA_read = new BO();
|
|
||||||
bo_OA_read.set("FIR_NUMS",resrt.length);
|
|
||||||
bo_OA_read.set("START_TIME",start_time);
|
|
||||||
jsonObjects.put("userList", userIds);
|
|
||||||
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[" + jsonObjects + "]]>" + " </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");
|
|
||||||
UtilUrl uc=new UtilUrl();
|
|
||||||
String postSoap =uc.doPostSoap(readurl, xmlStr, "");
|
|
||||||
Document document = null;
|
|
||||||
try {
|
try {
|
||||||
document = DocumentHelper.parseText(postSoap);
|
String processId = String.valueOf(map.get("processId"));
|
||||||
} catch (DocumentException e) {
|
String userIds = String.valueOf(map.get("userIds"));
|
||||||
|
String type = String.valueOf(map.get("type"));
|
||||||
|
|
||||||
|
System.out.println("processId=========="+processId);
|
||||||
|
System.out.println("userIds=========="+userIds);
|
||||||
|
System.out.println("type=========="+type);
|
||||||
|
|
||||||
|
conn=DBSql.open();
|
||||||
|
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(processId);
|
||||||
|
|
||||||
|
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
||||||
|
.addQuery("BINDID=", instanceById.getId())
|
||||||
|
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
||||||
|
|
||||||
|
String sql = "SELECT ID FROM WFH_TASK WHERE PROCESSINSTID = '" + instanceById.getId()
|
||||||
|
+ "' AND ACTIVITYDEFID = 'obj_c9e5a3144b200001b68cffa01ed0153e' ";
|
||||||
|
String taskInd = DBSql.getString(sql);
|
||||||
|
|
||||||
|
TaskInstance ta = SDK.getTaskAPI().getInstanceById(taskInd);
|
||||||
|
String portalUrl = SDK.getPortalAPI().getPortalUrl();
|
||||||
|
|
||||||
|
String url = portalUrl + "/r/or?cmd=com.yili_process_page&oauthName=oauthLogin&processInstId="
|
||||||
|
+ instanceById.getId() + "&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="
|
||||||
|
+ instanceById.getId() + "&taskInstId="
|
||||||
|
+ taskInd;
|
||||||
|
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
//Timestamp endTime = taskInstance.getBeginTime();
|
||||||
|
Timestamp endTime = new Timestamp(System.currentTimeMillis());
|
||||||
|
|
||||||
|
JSONObject jsonObjects = new JSONObject(new LinkedHashMap());
|
||||||
|
jsonObjects.put("action", "read");
|
||||||
|
jsonObjects.put("title", " " + "" + bo_act_coe_publish1.getString("PROCESS_TITLE") + "");
|
||||||
|
jsonObjects.put("dept", SDK.getORGAPI()
|
||||||
|
.getDepartmentByUser(ta.getTarget()).getNo());// SDK.getORGAPI().getDepartmentByUser(processExecutionContext.getProcessInstance().getCreateUser()).getNo()
|
||||||
|
String target = ta.getTarget();
|
||||||
|
|
||||||
|
jsonObjects.put("user", target);
|
||||||
|
jsonObjects.put("date", sdf.format(endTime));
|
||||||
|
jsonObjects.put("remark", bo_act_coe_publish1.getString("PROCESS_TITLE"));
|
||||||
|
jsonObjects.put("status", "0");
|
||||||
|
jsonObjects.put("dataid",instanceById.getId());
|
||||||
|
jsonObjects.put("pcurl", url);
|
||||||
|
jsonObjects.put("mobileurl", mobileurl);
|
||||||
|
|
||||||
|
String[] resrt = userIds.split(",");
|
||||||
|
long start_time = System.currentTimeMillis();
|
||||||
|
BO bo_OA_read = new BO();
|
||||||
|
bo_OA_read.set("FIR_NUMS",resrt.length);
|
||||||
|
bo_OA_read.set("START_TIME",start_time);
|
||||||
|
jsonObjects.put("userList", userIds);
|
||||||
|
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[" + jsonObjects + "]]>" + " </web:in0>" + " </web:service>"
|
||||||
|
+ " </soapenv:Body>" + "</soapenv:Envelope>";
|
||||||
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
|
UtilUrl uc=new UtilUrl();
|
||||||
|
String postSoap =uc.doPostSoap(readurl, xmlStr, "");
|
||||||
|
Document document = null;
|
||||||
|
try {
|
||||||
|
document = DocumentHelper.parseText(postSoap);
|
||||||
|
} catch (DocumentException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
Element rootElement = document.getRootElement();
|
||||||
|
Element result = rootElement.element("Body").element("serviceResponse").element("out");
|
||||||
|
String resultString = result.getData().toString();
|
||||||
|
JSONObject jsonObject1 = JSON.parseObject(resultString);
|
||||||
|
String datas = jsonObject1.getString("data");
|
||||||
|
long have_time = System.currentTimeMillis();
|
||||||
|
bo_OA_read.set("HAVE_TIME",have_time);
|
||||||
|
bo_OA_read.set("SUM_TIME",(have_time-start_time));
|
||||||
|
String status = jsonObject1.getString("status");
|
||||||
|
|
||||||
|
|
||||||
|
if ("true".equals(status)) {
|
||||||
|
System.out.println("发送接口方法");
|
||||||
|
JSONArray resultArray = JSONObject.parseArray(datas);
|
||||||
|
//加入时间戳
|
||||||
|
long set_start_time = System.currentTimeMillis();
|
||||||
|
bo_OA_read.set("SET_TIME",set_start_time);
|
||||||
|
if(resultArray.size()>0){
|
||||||
|
System.out.println("resultArray============="+resultArray);
|
||||||
|
List<BO> recordLists = new ArrayList<BO>();
|
||||||
|
long startTime2 = System.currentTimeMillis();
|
||||||
|
for (int j = 0; j < resultArray.size(); j++) {
|
||||||
|
|
||||||
|
System.out.println("==============================");
|
||||||
|
JSONObject jsonObject2 = resultArray.getJSONObject(j);
|
||||||
|
String user = jsonObject2.get("user").toString();
|
||||||
|
String dataid = jsonObject2.get("dataid").toString();
|
||||||
|
BO bo = new BO();
|
||||||
|
bo.set("TITLE", instanceById.getTitle());
|
||||||
|
bo.set("PROCESSID", instanceById.getId());
|
||||||
|
bo.set("USER_ID", user);
|
||||||
|
if(UtilString.isNotEmpty(SDK.getORGAPI().getUser(user).getDepartmentId())){
|
||||||
|
bo.set("USERDEP", SDK.getORGAPI().getUser(user).getDepartmentId());
|
||||||
|
}
|
||||||
|
bo.set("DATAID", dataid);
|
||||||
|
bo.set("RESULT", status);
|
||||||
|
bo.set("SENDTYPE", "1");
|
||||||
|
bo.set("READSTATE", "未读");
|
||||||
|
bo.set("TYPE", type);
|
||||||
|
recordLists.add(bo);
|
||||||
|
}
|
||||||
|
SDK.getBOAPI().create("BO_ACT_DATAID",recordLists, instanceById, UserContext.fromUID(instanceById.getCreateUser()),conn);
|
||||||
|
|
||||||
|
long endTime2 = System.currentTimeMillis();
|
||||||
|
System.err.println(instanceById.getTitle() + "批量插入OA待阅数据====>" + "用时:"
|
||||||
|
+ (endTime2 - startTime2) / 1000 + "秒");
|
||||||
|
|
||||||
|
|
||||||
|
BO oa_real_time=SDK.getBOAPI().query("BO_ACT_OA_REAL_TIME").addQuery("PROCESSID=",instanceById.getId()).detail();
|
||||||
|
|
||||||
|
String sqly = "SELECT COUNT(1) FROM BO_ACT_DATAID WHERE PROCESSID=? AND SENDTYPE='1'";
|
||||||
|
int mapsy = DBSql.getInt(sqly, new Object[]{instanceById.getId()});
|
||||||
|
|
||||||
|
if(oa_real_time!=null){
|
||||||
|
int r1 = DBSql.update("UPDATE BO_ACT_OA_REAL_TIME SET SENDNUMSJ='" +mapsy + "'WHERE PROCESSID ='" + instanceById.getId() + "'");
|
||||||
|
}else{
|
||||||
|
BO publishbo=SDK.getBOAPI().query("BO_ACT_COE_PUBLISH").bindId(instanceById.getId()).detail();
|
||||||
|
String user=publishbo.getString("APPLYUSERNAME");
|
||||||
|
//插入实时更新人数表
|
||||||
|
BO realTimeBO=new BO();
|
||||||
|
realTimeBO.set("USREID", user);
|
||||||
|
realTimeBO.set("DEPID", "");
|
||||||
|
realTimeBO.set("BUNAME","");
|
||||||
|
realTimeBO.set("TITLE", instanceById.getTitle());
|
||||||
|
realTimeBO.set("PROCESSID", instanceById.getId());
|
||||||
|
realTimeBO.set("SENDNUMSJ", 1);
|
||||||
|
realTimeBO.set("SENDNUM",sendTotal);
|
||||||
|
SDK.getBOAPI().create("BO_ACT_OA_REAL_TIME", realTimeBO, instanceById, UserContext.fromUID(instanceById.getCreateUser()),conn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
long set_end_time = System.currentTimeMillis();
|
||||||
|
bo_OA_read.set("SET_END_TIME",set_end_time);
|
||||||
|
bo_OA_read.set("SET_SUM_TIME",(set_end_time-set_start_time));
|
||||||
|
bo_OA_read.set("PROCESS_ID",instanceById.getId());
|
||||||
|
SDK.getBOAPI().create("BO_EU_OA_READ_LOG", bo_OA_read, instanceById, UserContext.fromUID(instanceById.getCreateUser()),conn);
|
||||||
|
if("单个账号推送".equals(type)) {
|
||||||
|
DBSql.update("UPDATE BO_EU_READ_COUNT SET RESULT = '已重新推送' WHERE PROCESSID = '"+instanceById+"' AND NAME = '"+resrt+"'");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<String> idList = Arrays.asList(resrt);
|
||||||
|
BO bo = null;
|
||||||
|
List<BO> recordFailLists = new ArrayList<BO>();
|
||||||
|
if(idList.size()>0){
|
||||||
|
for (String userId : idList) {
|
||||||
|
System.out.println(instanceById.getTitle() + "待阅推送失败:" + userId);
|
||||||
|
try {
|
||||||
|
bo= new BO();
|
||||||
|
bo.set("TITLE", instanceById.getTitle());
|
||||||
|
bo.set("NAME", userId);
|
||||||
|
bo.set("TYPE", type);
|
||||||
|
bo.set("RESULT", "待处理");
|
||||||
|
bo.set("PROCESSID", instanceById.getId());
|
||||||
|
bo.set("DEPNAME", "");
|
||||||
|
recordFailLists.add(bo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
bo= new BO();
|
||||||
|
bo.set("TITLE", instanceById.getTitle());
|
||||||
|
bo.set("NAME", userIds);
|
||||||
|
bo.set("TYPE", type);
|
||||||
|
bo.set("RESULT", "待处理");
|
||||||
|
bo.set("PROCESSID", instanceById.getId());
|
||||||
|
bo.set("DEPNAME", "");
|
||||||
|
recordFailLists.add(bo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SDK.getBOAPI().create("BO_EU_READ_COUNT", recordFailLists, instanceById, UserContext.fromUID(instanceById.getCreateUser()),conn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (AWSDataAccessException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
ro = ResponseObject.newErrResponse(e.getMessage());
|
||||||
Element rootElement = document.getRootElement();
|
}finally {
|
||||||
Element result = rootElement.element("Body").element("serviceResponse").element("out");
|
DBSql.close(conn);
|
||||||
String resultString = result.getData().toString();
|
|
||||||
JSONObject jsonObject1 = JSON.parseObject(resultString);
|
|
||||||
String datas = jsonObject1.getString("data");
|
|
||||||
long have_time = System.currentTimeMillis();
|
|
||||||
bo_OA_read.set("HAVE_TIME",have_time);
|
|
||||||
bo_OA_read.set("SUM_TIME",(have_time-start_time));
|
|
||||||
String status = jsonObject1.getString("status");
|
|
||||||
|
|
||||||
|
|
||||||
if ("true".equals(status)) {
|
|
||||||
JSONArray resultArray = JSONObject.parseArray(datas);
|
|
||||||
//System.out.println(processInstance.getTitle() + "待阅推送成功:" + idList.size()+"人");
|
|
||||||
//批量入库操作
|
|
||||||
//加入时间戳
|
|
||||||
long set_start_time = System.currentTimeMillis();
|
|
||||||
bo_OA_read.set("SET_TIME",set_start_time);
|
|
||||||
if(resultArray.size()>0){
|
|
||||||
List<BO> recordLists = new ArrayList<BO>();
|
|
||||||
long startTime2 = System.currentTimeMillis();
|
|
||||||
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", instanceById.getTitle());
|
|
||||||
bo.set("PROCESSID", instanceById.getId());
|
|
||||||
bo.set("USER_ID", user);
|
|
||||||
if(UtilString.isNotEmpty(SDK.getORGAPI().getUser(user).getDepartmentId())){
|
|
||||||
bo.set("USERDEP", SDK.getORGAPI().getUser(user).getDepartmentId());
|
|
||||||
}
|
|
||||||
bo.set("DATAID", dataid);
|
|
||||||
bo.set("RESULT", status);
|
|
||||||
bo.set("SENDTYPE", "1");
|
|
||||||
bo.set("READSTATE", "未读");
|
|
||||||
bo.set("TYPE", type);
|
|
||||||
recordLists.add(bo);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
SDK.getBOAPI().create("BO_ACT_DATAID",recordLists, instanceById, UserContext.fromUID(instanceById.getCreateUser()));
|
|
||||||
|
|
||||||
long endTime2 = System.currentTimeMillis();
|
|
||||||
System.err.println(instanceById.getTitle() + "批量插入OA待阅数据====>" + "用时:"
|
|
||||||
+ (endTime2 - startTime2) / 1000 + "秒");
|
|
||||||
|
|
||||||
|
|
||||||
BO oa_real_time=SDK.getBOAPI().query("BO_ACT_OA_REAL_TIME").addQuery("PROCESSID=",instanceById.getId()).detail();
|
|
||||||
|
|
||||||
String sqly = "SELECT COUNT(1) FROM BO_ACT_DATAID WHERE PROCESSID=? AND SENDTYPE='1'";
|
|
||||||
int mapsy = DBSql.getInt(sqly, new Object[]{instanceById.getId()});
|
|
||||||
|
|
||||||
if(oa_real_time!=null){
|
|
||||||
int r1 = DBSql.update("UPDATE BO_ACT_OA_REAL_TIME SET SENDNUMSJ='" +mapsy + "'WHERE PROCESSID ='" + instanceById.getId() + "'");
|
|
||||||
}else{
|
|
||||||
BO publishbo=SDK.getBOAPI().query("BO_ACT_COE_PUBLISH").bindId(instanceById.getId()).detail();
|
|
||||||
String user=publishbo.getString("APPLYUSERNAME");
|
|
||||||
//插入实时更新人数表
|
|
||||||
BO realTimeBO=new BO();
|
|
||||||
realTimeBO.set("USREID", user);
|
|
||||||
realTimeBO.set("DEPID", "");
|
|
||||||
realTimeBO.set("BUNAME","");
|
|
||||||
realTimeBO.set("TITLE", instanceById.getTitle());
|
|
||||||
realTimeBO.set("PROCESSID", instanceById.getId());
|
|
||||||
realTimeBO.set("SENDNUMSJ", 1);
|
|
||||||
realTimeBO.set("SENDNUM",sendTotal);
|
|
||||||
SDK.getBOAPI().create("BO_ACT_OA_REAL_TIME", realTimeBO, instanceById, UserContext.fromUID(instanceById.getCreateUser()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
long set_end_time = System.currentTimeMillis();
|
|
||||||
bo_OA_read.set("SET_END_TIME",set_end_time);
|
|
||||||
bo_OA_read.set("SET_SUM_TIME",(set_end_time-set_start_time));
|
|
||||||
bo_OA_read.set("PROCESS_ID",instanceById.getId());
|
|
||||||
SDK.getBOAPI().create("BO_EU_OA_READ_LOG", bo_OA_read, instanceById, UserContext.fromUID(instanceById.getCreateUser()));
|
|
||||||
if("单个账号推送".equals(type)) {
|
|
||||||
DBSql.update("UPDATE BO_EU_READ_COUNT SET RESULT = '已重新推送' WHERE PROCESSID = '"+instanceById+"' AND NAME = '"+resrt+"'");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
List<String> idList = Arrays.asList(resrt);
|
|
||||||
BO bo = null;
|
|
||||||
List<BO> recordFailLists = new ArrayList<BO>();
|
|
||||||
if(idList.size()>0){
|
|
||||||
for (String userId : idList) {
|
|
||||||
System.out.println(instanceById.getTitle() + "待阅推送失败:" + userId);
|
|
||||||
try {
|
|
||||||
bo= new BO();
|
|
||||||
bo.set("TITLE", instanceById.getTitle());
|
|
||||||
bo.set("NAME", userId);
|
|
||||||
bo.set("TYPE", type);
|
|
||||||
bo.set("RESULT", "待处理");
|
|
||||||
bo.set("PROCESSID", instanceById.getId());
|
|
||||||
bo.set("DEPNAME", SDK.getORGAPI().getUser(userId).getDepartmentId());
|
|
||||||
//SDK.getBOAPI().create("BO_EU_READ_COUNT", bo, processInstance.getId(), processInstance.getCreateUser());
|
|
||||||
recordFailLists.add(bo);
|
|
||||||
} catch (Exception e) {
|
|
||||||
bo= new BO();
|
|
||||||
bo.set("TITLE", instanceById.getTitle());
|
|
||||||
bo.set("NAME", userIds);
|
|
||||||
bo.set("TYPE", type);
|
|
||||||
bo.set("RESULT", "待处理");
|
|
||||||
bo.set("PROCESSID", instanceById.getId());
|
|
||||||
bo.set("DEPNAME", SDK.getORGAPI().getUser(userIds).getDepartmentId());
|
|
||||||
//SDK.getBOAPI().create("BO_EU_READ_COUNT", bo, processInstance.getId(), processInstance.getCreateUser());
|
|
||||||
recordFailLists.add(bo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SDK.getBOAPI().create("BO_EU_READ_COUNT", recordFailLists, instanceById, UserContext.fromUID(instanceById.getCreateUser()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println("调用结束===============================");
|
||||||
return null;
|
return ro;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,9 +22,6 @@ public class getConsultHour extends AbstExpression {
|
|||||||
String taskId = getParameter(s, 2);
|
String taskId = getParameter(s, 2);
|
||||||
String deadline = getParameter(s, 3);
|
String deadline = getParameter(s, 3);
|
||||||
|
|
||||||
System.out.println("bindid=========="+bindid);
|
|
||||||
System.out.println("taskId=========="+taskId);
|
|
||||||
System.out.println("deadline=========="+deadline);
|
|
||||||
|
|
||||||
//计算时间差
|
//计算时间差
|
||||||
|
|
||||||
|
|||||||
@ -259,10 +259,14 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
if (bolistN != null) {
|
if (bolistN != null) {
|
||||||
for (BO boN : bolistN) {
|
for (BO boN : bolistN) {
|
||||||
String fileId = boN.getString("PUBLISHFILEID");
|
String fileId = boN.getString("PUBLISHFILEID");
|
||||||
int countEXT5=DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='" + fileId + "'");
|
PALRepository palRepository=new PALRepository();
|
||||||
|
palRepository.updateRepositoryExtAll(fileId,"","","","","1","");
|
||||||
|
/*int countEXT5=DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='" + fileId + "'");
|
||||||
if(countEXT5==0){
|
if(countEXT5==0){
|
||||||
System.out.println("发布新增表模型id为="+fileId);
|
System.out.println("发布新增表模型id为="+fileId);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新部门视图EXT6字段
|
* 更新部门视图EXT6字段
|
||||||
@ -278,12 +282,14 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
}
|
}
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
dempId = dempId.substring(0, dempId.length() - 1);
|
||||||
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6=TO_CLOB('" + dempId + "') WHERE ID = '" + fileId + "'");
|
/*int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6=TO_CLOB('" + dempId + "') WHERE ID = '" + fileId + "'");
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
||||||
if (plModel != null) {
|
if (plModel != null) {
|
||||||
PALRepositoryCache.getCache().put(fileId, plModel);
|
PALRepositoryCache.getCache().put(fileId, plModel);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
palRepository.updateRepositoryExtAll(fileId,"","","","","",dempId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -294,8 +300,13 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
|
|
||||||
String changefileId = boC.getString("CHANGEFILEID");
|
String changefileId = boC.getString("CHANGEFILEID");
|
||||||
String changefileIdNew = boC.getString("CHANGEDFILEIDNEW");
|
String changefileIdNew = boC.getString("CHANGEDFILEIDNEW");
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='0' WHERE ID='"+changefileId+"'");
|
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='"+changefileIdNew+"'");
|
PALRepository palRepository=new PALRepository();
|
||||||
|
palRepository.updateRepositoryExtAll(changefileId,"","","","","0","");
|
||||||
|
palRepository.updateRepositoryExtAll(changefileIdNew,"","","","","1","");
|
||||||
|
|
||||||
|
/*DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='0' WHERE ID='"+changefileId+"'");
|
||||||
|
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='"+changefileIdNew+"'");*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新部门视图EXT6字段
|
* 更新部门视图EXT6字段
|
||||||
@ -311,12 +322,12 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
}
|
}
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
dempId = dempId.substring(0, dempId.length() - 1);
|
||||||
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6=TO_CLOB('" + dempId + "') WHERE ID='" + changefileIdNew + "'");
|
/* int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6=TO_CLOB('" + dempId + "') WHERE ID='" + changefileIdNew + "'");
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(changefileIdNew);
|
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(changefileIdNew);
|
||||||
if (plModel != null) {
|
if (plModel != null) {
|
||||||
PALRepositoryCache.getCache().put(changefileIdNew, plModel);
|
PALRepositoryCache.getCache().put(changefileIdNew, plModel);
|
||||||
}
|
}*/
|
||||||
|
palRepository.updateRepositoryExtAll(changefileIdNew,"","","","","",dempId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -324,7 +335,10 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
if (bolistS != null) {
|
if (bolistS != null) {
|
||||||
for (BO boS : bolistS) {
|
for (BO boS : bolistS) {
|
||||||
String fileId = boS.get("STOPFILEID").toString();
|
String fileId = boS.get("STOPFILEID").toString();
|
||||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='0' WHERE ID='"+fileId+"'");
|
|
||||||
|
PALRepository palRepository=new PALRepository();
|
||||||
|
palRepository.updateRepositoryExtAll(fileId,"","","","","0","");
|
||||||
|
//DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='0' WHERE ID='"+fileId+"'");
|
||||||
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import java.util.concurrent.Executors;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao;
|
||||||
@ -135,9 +136,10 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
// 给定必填参数
|
// 给定必填参数
|
||||||
params.put("processId", ext.getProcessInstance().getId());
|
params.put("processId", ext.getProcessInstance().getId());
|
||||||
params.put("taskId", ext.getTaskInstance().getId());
|
params.put("taskId", ext.getTaskInstance().getId());
|
||||||
|
params.put("sid", ext.getUserContext().getSessionId());
|
||||||
|
|
||||||
AppAPI appApi = SDK.getAppAPI();
|
AppAPI appApi = SDK.getAppAPI();
|
||||||
//统一接口中心请求调用
|
//发送OA待阅接口
|
||||||
appApi.asynCallASLP(appApi.getAppContext(sourceAppId), aslp, params);
|
appApi.asynCallASLP(appApi.getAppContext(sourceAppId), aslp, params);
|
||||||
|
|
||||||
|
|
||||||
@ -151,7 +153,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
kmsparams.put("sid", ext.getUserContext().getSessionId());
|
kmsparams.put("sid", ext.getUserContext().getSessionId());
|
||||||
|
|
||||||
AppAPI kmsappApi = SDK.getAppAPI();
|
AppAPI kmsappApi = SDK.getAppAPI();
|
||||||
//统一接口中心请求调用
|
//创建KMS知识
|
||||||
appApi.asynCallASLP(kmsappApi.getAppContext(sourceAppId), kmsaslp, params);
|
appApi.asynCallASLP(kmsappApi.getAppContext(sourceAppId), kmsaslp, params);
|
||||||
|
|
||||||
|
|
||||||
@ -163,10 +165,10 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
|
|
||||||
|
|
||||||
//发送消息通知
|
//发送消息通知
|
||||||
List<BO> readCountBO=SDK.getBOAPI().query("BO_EU_READ_COUNT").addQuery("PROCESSID=",ext.getProcessInstance().getId()).addQuery("RESULT=","待处理").list();
|
/* List<BO> readCountBO=SDK.getBOAPI().query("BO_EU_READ_COUNT").addQuery("PROCESSID=",ext.getProcessInstance().getId()).addQuery("RESULT=","待处理").list();
|
||||||
if(readCountBO.size()>0){
|
if(readCountBO.size()>0){
|
||||||
SDK.getNotificationAPI().sendMessage("admin", "admin", "文件名称:"+ext.getProcessInstance().getTitle()+"文件有失败记录,请及时处理!!!");
|
SDK.getNotificationAPI().sendMessage("admin", "admin", "文件名称:"+ext.getProcessInstance().getTitle()+"文件有失败记录,请及时处理!!!");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
//更新任务状态
|
//更新任务状态
|
||||||
@ -190,7 +192,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
|
|
||||||
//发送OA待办
|
//发送OA待办
|
||||||
TaskInstance taskInstance= SDK.getTaskAPI().getInstanceById(processInstance.getStartTaskInstId());
|
TaskInstance taskInstance= SDK.getTaskAPI().getInstanceById(processInstance.getStartTaskInstId());
|
||||||
sendOaPending(taskInstance,processInstance,ext);
|
//sendOaPending(taskInstance,processInstance,ext);
|
||||||
|
|
||||||
String url="https://bpm.yili.com:8088/portal/r/w?sid="+ext.getUserContext().getSessionId()+"&cmd=CLIENT_BPM_FORM_MAIN_PAGE_OPEN&processInstId="+processInstance.getId()+"&openState=1&taskInstId="+processInstance.getStartTaskInstId()+"&displayToolbar=true";
|
String url="https://bpm.yili.com:8088/portal/r/w?sid="+ext.getUserContext().getSessionId()+"&cmd=CLIENT_BPM_FORM_MAIN_PAGE_OPEN&processInstId="+processInstance.getId()+"&openState=1&taskInstId="+processInstance.getStartTaskInstId()+"&displayToolbar=true";
|
||||||
|
|
||||||
@ -206,7 +208,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ProcessData(ProcessInstance processInstance,TaskInstance taskInstance,Connection open,String sid) throws Exception {
|
public void ProcessData(ProcessInstance processInstance,TaskInstance taskInstance,Connection open,String sid) throws Exception {
|
||||||
// http://localhost:8089/portal/r/or?cmd=com.hy_client_bpm_form_main_page_open&oauthName=oauthLogin&processInstId=3505e654-9217-41cd-a31d-4971846b3219
|
|
||||||
/**
|
/**
|
||||||
* 当流程不等于终止的时候往下走
|
* 当流程不等于终止的时候往下走
|
||||||
*/
|
*/
|
||||||
@ -215,11 +216,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
String wsId = "";
|
String wsId = "";
|
||||||
JSONArray filed = new JSONArray(new LinkedList<>());
|
JSONArray filed = new JSONArray(new LinkedList<>());
|
||||||
String portalUrl = SDK.getPortalAPI().getPortalUrl();
|
String portalUrl = SDK.getPortalAPI().getPortalUrl();
|
||||||
// System.out.println("portal======>>>>" + portalUrl);
|
|
||||||
/*
|
|
||||||
* if (portalUrl.equals("http://10.114.11.135:8088/portal")){ portalUrl =
|
|
||||||
* "http://bpm.yili.com:8088/portal/"; }
|
|
||||||
*/
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
//构建PC地址
|
//构建PC地址
|
||||||
@ -241,10 +238,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
.addQuery("BINDID=", processInstance.getId())
|
.addQuery("BINDID=", processInstance.getId())
|
||||||
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
||||||
|
|
||||||
// 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
|
|
||||||
String not_url = "/w?cmd=com.yili_process_page&processInstId="
|
String not_url = "/w?cmd=com.yili_process_page&processInstId="
|
||||||
+ processInstance.getId() + "&taskInstId="
|
+ processInstance.getId() + "&taskInstId="
|
||||||
+ taskInstance.getId();
|
+ taskInstance.getId();
|
||||||
@ -274,8 +267,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
jsonObject.put("dataid", processInstance.getId());
|
jsonObject.put("dataid", processInstance.getId());
|
||||||
jsonObject.put("pcurl", url);
|
jsonObject.put("pcurl", url);
|
||||||
jsonObject.put("mobileurl", mobileurl);
|
jsonObject.put("mobileurl", mobileurl);
|
||||||
// list.add(1,"00352394");
|
|
||||||
// list.add(2,"00352394");
|
|
||||||
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true).connection(open)
|
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true).connection(open)
|
||||||
.addQuery("BINDID=", processInstance.getId())
|
.addQuery("BINDID=", processInstance.getId())
|
||||||
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
||||||
@ -318,7 +309,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
}
|
}
|
||||||
//System.err.println("系统人员=====>" + userList1);
|
|
||||||
// 项目开发人员
|
// 项目开发人员
|
||||||
ArrayList<String> userList2 = new ArrayList<String>();
|
ArrayList<String> userList2 = new ArrayList<String>();
|
||||||
try {
|
try {
|
||||||
@ -327,7 +317,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
}
|
}
|
||||||
//System.err.println("项目开发人员=====>" + userList2);
|
|
||||||
// 离退人员
|
// 离退人员
|
||||||
ArrayList<String> userList3 = new ArrayList<String>();
|
ArrayList<String> userList3 = new ArrayList<String>();
|
||||||
try {
|
try {
|
||||||
@ -336,12 +325,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
}
|
}
|
||||||
//System.err.println("离退人员=====>" + userList3);
|
|
||||||
List<RowMap> mapsl = DBSql.getMaps(open,"SELECT * FROM ORGUSER WHERE CLOSED = '0'");
|
List<RowMap> mapsl = DBSql.getMaps(open,"SELECT * FROM ORGUSER WHERE CLOSED = '0'");
|
||||||
for (RowMap rowMap : mapsl) {
|
for (RowMap rowMap : mapsl) {
|
||||||
String userId = rowMap.getString("USERID");
|
String userId = rowMap.getString("USERID");
|
||||||
// RowMap map = DBSql.getMap("SELECT ID FROM BO_ACT_DATAID WHERE PROCESSID = '"
|
|
||||||
// + instanceById.getId() + "' AND USER_ID = '" + userId + "'");
|
|
||||||
if (!"10033643".equals(userId) && !userList1.contains(userId)
|
if (!"10033643".equals(userId) && !userList1.contains(userId)
|
||||||
&& !userList2.contains(userId) && !userList3.contains(userId)) {
|
&& !userList2.contains(userId) && !userList3.contains(userId)) {
|
||||||
sendList.add(userId);
|
sendList.add(userId);
|
||||||
@ -351,8 +337,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
// 发送组织岗位职级
|
// 发送组织岗位职级
|
||||||
sendList = getSendList(instanceById, bo_act_coe_publish1, jsonObject);
|
sendList = getSendList(instanceById, bo_act_coe_publish1, jsonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long countTime = System.currentTimeMillis();
|
long countTime = System.currentTimeMillis();
|
||||||
System.err.println(instanceById.getTitle() + "待发送人员数量====>" + sendList.size() + " 计算用时===>"
|
System.err.println(instanceById.getTitle() + "待发送人员数量====>" + sendList.size() + " 计算用时===>"
|
||||||
+ (countTime - sendUserstartTime) + "毫秒");
|
+ (countTime - sendUserstartTime) + "毫秒");
|
||||||
@ -401,7 +385,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
* 创建线程发送待阅数据
|
* 创建线程发送待阅数据
|
||||||
*/
|
*/
|
||||||
course(list,startTime,jsonObject,processInstance,sendList,sid);
|
course(list,startTime,jsonObject,processInstance,sendList,sid);
|
||||||
//System.out.println("发送人员数据>>>>>>>>>>>>>>"+list);
|
|
||||||
}else {
|
}else {
|
||||||
int size = users.length/length;
|
int size = users.length/length;
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
@ -420,16 +403,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
* 创建线程发送待阅数据
|
* 创建线程发送待阅数据
|
||||||
*/
|
*/
|
||||||
course(list,startTime,jsonObject,processInstance,sendList,sid);
|
course(list,startTime,jsonObject,processInstance,sendList,sid);
|
||||||
//System.out.println("发送人员数据>>>>>>>>>>>>>>"+list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新数据看板底表
|
* 更新数据看板底表
|
||||||
*/
|
*/
|
||||||
@ -456,20 +432,20 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean createIndexesByContent(ProcessInstance processInstance,JSONArray contents) {
|
public boolean createIndexesByContent(ProcessInstance processInstance,JSONArray contents) {
|
||||||
// 调用App
|
// 调用App
|
||||||
String sourceAppId =processInstance.getAppId() ;
|
String sourceAppId =processInstance.getAppId() ;
|
||||||
// aslp服务地址
|
// aslp服务地址
|
||||||
String aslp = "aslp://com.actionsoft.apps.addons.es/createIndexesByContent";
|
String aslp = "aslp://com.actionsoft.apps.addons.es/createIndexesByContent";
|
||||||
// 参数定义列表
|
// 参数定义列表
|
||||||
Map params = new HashMap<String, Object>();
|
Map params = new HashMap<String, Object>();
|
||||||
//索引内容(JSONArray格式, JSONArray中包含JSONObject, JSONObject的内容同创建单个索引),必填
|
//索引内容(JSONArray格式, JSONArray中包含JSONObject, JSONObject的内容同创建单个索引),必填
|
||||||
params.put("contents", contents);
|
params.put("contents", contents);
|
||||||
//索引名称(文档在哪存放),必填
|
//索引名称(文档在哪存放),必填
|
||||||
params.put("index", "com.actionsoft.apps.kms_kmsdoc_card");
|
params.put("index", "com.actionsoft.apps.kms_kmsdoc_card");
|
||||||
//类型(索引中对数据进行逻辑分区。不同 type的文档可能有不同的字段,但最好能够非常相似,比如:存储所有产品到索引products中,但是你有许多不同的产品类别,这些产品共享一种相同的(或非常相似)的模式:他们有一个标题、描述、产品代码和价格。他们只是正好属于“产品”下的一些子类。用type表示不同的类别),必填
|
//类型(索引中对数据进行逻辑分区。不同 type的文档可能有不同的字段,但最好能够非常相似,比如:存储所有产品到索引products中,但是你有许多不同的产品类别,这些产品共享一种相同的(或非常相似)的模式:他们有一个标题、描述、产品代码和价格。他们只是正好属于“产品”下的一些子类。用type表示不同的类别),必填
|
||||||
params.put("type", "kmsdoc_card");
|
params.put("type", "kmsdoc_card");
|
||||||
AppAPI appAPI = SDK.getAppAPI();
|
AppAPI appAPI = SDK.getAppAPI();
|
||||||
//入库操作,创建内容索引(多个)
|
//入库操作,创建内容索引(多个)
|
||||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
|
|
||||||
return ro.isOk();
|
return ro.isOk();
|
||||||
@ -485,43 +461,25 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
public void course(List<String[]> list,long startTime,JSONObject jsonObject,ProcessInstance processInstance,ArrayList<String> sendList,String sid) throws InterruptedException {
|
public void course(List<String[]> list,long startTime,JSONObject jsonObject,ProcessInstance processInstance,ArrayList<String> sendList,String sid) throws InterruptedException {
|
||||||
// 创建线程来实现为每100人为一个的线程跑待阅
|
// 创建线程来实现为每100人为一个的线程跑待阅
|
||||||
ProcessInstance instanceById = processInstance;
|
ProcessInstance instanceById = processInstance;
|
||||||
CountDownLatch countDownLatch = new CountDownLatch(list.size());
|
//CountDownLatch countDownLatch = new CountDownLatch(list.size());
|
||||||
//ExecutorService service = Executors.newFixedThreadPool(4);
|
//ExecutorService service = Executors.newFixedThreadPool(4);
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
//200个循环
|
||||||
for (String[] resrt:list) {
|
for (String[] resrt:list) {
|
||||||
/*int finalM = m;
|
System.out.println("开始进入循环调用OA");
|
||||||
service.execute(new Runnable() {
|
//每次循环
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
String userIds = "";
|
|
||||||
userIds = StringUtils.join(resrt, ",");
|
|
||||||
try {
|
|
||||||
SendOARead(processInstance, userIds,"批量推送");
|
|
||||||
countDownLatch.countDown();
|
|
||||||
} catch (DocumentException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
m++;*/
|
|
||||||
|
|
||||||
// 调用方
|
|
||||||
String sourceAppId = "com.actionsoft.apps.coe.pal.publisher";
|
String sourceAppId = "com.actionsoft.apps.coe.pal.publisher";
|
||||||
// 服务地址
|
|
||||||
String aslp = "aslp://com.actionsoft.apps.coe.pal.publisher/SendOAReadAlsp";
|
String aslp = "aslp://com.actionsoft.apps.coe.pal.publisher/SendOAReadAlsp";
|
||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
// 给定必填参数
|
|
||||||
params.put("processId", processInstance.getId());
|
|
||||||
String userIds = "";
|
String userIds = "";
|
||||||
userIds = StringUtils.join(resrt, ",");
|
userIds = StringUtils.join(resrt, ",");
|
||||||
|
params.put("processId", processInstance.getId());
|
||||||
params.put("userIds",userIds);
|
params.put("userIds",userIds);
|
||||||
|
params.put("type","批量推送");
|
||||||
AppAPI appApi = SDK.getAppAPI();
|
AppAPI appApi = SDK.getAppAPI();
|
||||||
//统一接口中心请求调用
|
|
||||||
appApi.asynCallASLP(appApi.getAppContext(sourceAppId), aslp, params);
|
appApi.asynCallASLP(appApi.getAppContext(sourceAppId), aslp, params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
System.out.println("执行结束");
|
||||||
/*countDownLatch.await();
|
/*countDownLatch.await();
|
||||||
if (countDownLatch.getCount()==0){
|
if (countDownLatch.getCount()==0){
|
||||||
|
|
||||||
@ -592,16 +550,17 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
* 这个主要是负责对流程手册进行相关的文件的生成
|
* 这个主要是负责对流程手册进行相关的文件的生成
|
||||||
*/
|
*/
|
||||||
String sourceAppId =processInstance.getAppId();
|
String sourceAppId =processInstance.getAppId();
|
||||||
// aslp服务地址
|
// aslp服务地址
|
||||||
String aslp = "aslp://com.actionsoft.apps.kms/CreateFile";
|
String aslp = "aslp://com.actionsoft.apps.kms/CreateFile";
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(cardId)) {
|
if (StringUtils.isNotEmpty(cardId)) {
|
||||||
|
|
||||||
|
|
||||||
String sql_ext4 = "select * from APP_ACT_COE_PAL_REPOSITORY where EXT4 = '" + cardId + "'";
|
String sql_ext4 = "select * from APP_ACT_COE_PAL_REPOSITORY where EXT4 = '" + cardId + "'";
|
||||||
RowMap map = DBSql.getMap(sql_ext4);
|
RowMap map = DBSql.getMap(sql_ext4);
|
||||||
RowMap rowMap = DBSql
|
RowMap rowMap = DBSql
|
||||||
.getMap("SELECT * FROM " + bo_name + " where " + fileid + " '" + map.getString("ID") + "'");
|
.getMap("SELECT * FROM " + bo_name + " where " + fileid + " '" + map.getString("ID") + "'");
|
||||||
// BO bos =
|
|
||||||
// SDK.getBOAPI().query(bo_name,true).addQuery(fileid,"17e7d198-1656-4a2c-8912-a81850170be9").detail();
|
|
||||||
if (rowMap != null) {
|
if (rowMap != null) {
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(rowMap.getString("TASKID"))) {
|
if (StringUtils.isNotEmpty(rowMap.getString("TASKID"))) {
|
||||||
@ -641,7 +600,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
}
|
}
|
||||||
DCContext dcContext = new DCContext(userContext, dcProfile, appProfile.getAppContext().getId(),
|
DCContext dcContext = new DCContext(userContext, dcProfile, appProfile.getAppContext().getId(),
|
||||||
model.getWsId(), rowMap.getString("TASKID"), filename + "_" + lever + ".doc");
|
model.getWsId(), rowMap.getString("TASKID"), filename + "_" + lever + ".doc");
|
||||||
// UtilFile file = new UtilFile(dcContext.getPath());
|
|
||||||
|
|
||||||
Map params = new HashMap<String, Object>();
|
Map params = new HashMap<String, Object>();
|
||||||
//知识ID,必填
|
//知识ID,必填
|
||||||
@ -651,7 +609,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
|
|
||||||
params.put("dc", dcContext);
|
params.put("dc", dcContext);
|
||||||
AppAPI appAPI = SDK.getAppAPI();
|
AppAPI appAPI = SDK.getAppAPI();
|
||||||
//创建文件
|
//创建文件
|
||||||
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
|
|
||||||
JSONArray coontest = new JSONArray(new LinkedList<>());
|
JSONArray coontest = new JSONArray(new LinkedList<>());
|
||||||
@ -745,17 +703,14 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
for (String id_names : deptSplit_id) {
|
for (String id_names : deptSplit_id) {
|
||||||
jsonArray.add(id_names);
|
jsonArray.add(id_names);
|
||||||
}
|
}
|
||||||
// jsonObject.put(deptSplit_id);
|
|
||||||
id += ",";
|
id += ",";
|
||||||
String[] deptSplit_das = id.split(",");
|
String[] deptSplit_das = id.split(",");
|
||||||
JSONArray jsonArray_das = new JSONArray();
|
JSONArray jsonArray_das = new JSONArray();
|
||||||
for (String das : deptSplit_das) {
|
for (String das : deptSplit_das) {
|
||||||
jsonArray_das.add(das);
|
jsonArray_das.add(das);
|
||||||
}
|
}
|
||||||
// jsonObject.put(deptSplit_id);
|
|
||||||
|
|
||||||
if (!jsonArray_das.isEmpty() && !jsonArray.isEmpty()) {
|
if (!jsonArray_das.isEmpty() && !jsonArray.isEmpty()) {
|
||||||
|
|
||||||
// 调用App
|
// 调用App
|
||||||
String sourceAppId = processInstance.getAppId();
|
String sourceAppId = processInstance.getAppId();
|
||||||
// aslp服务地址
|
// aslp服务地址
|
||||||
@ -921,15 +876,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
public void SendOARead( ProcessInstance processInstance, String userIds,String type)
|
public void SendOARead( ProcessInstance processInstance, String userIds,String type)
|
||||||
throws DocumentException {
|
throws DocumentException {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String processInstId = processInstance.getId();
|
String processInstId = processInstance.getId();
|
||||||
// System.err.println(processInstance.getTitle() + "开始发送:" + userId);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* if ("".equals(userId) || UtilString.isEmpty(userId)) { return; }
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
||||||
.addQuery("BINDID=", processInstance.getId())
|
.addQuery("BINDID=", processInstance.getId())
|
||||||
@ -980,7 +927,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
+ " <soapenv:Header/>" + " <soapenv:Body>" + " <web:service>" + " <web:in0>"
|
+ " <soapenv:Header/>" + " <soapenv:Body>" + " <web:service>" + " <web:in0>"
|
||||||
+ "<![CDATA[" + jsonObjects + "]]>" + " </web:in0>" + " </web:service>"
|
+ "<![CDATA[" + jsonObjects + "]]>" + " </web:in0>" + " </web:service>"
|
||||||
+ " </soapenv:Body>" + "</soapenv:Envelope>";
|
+ " </soapenv:Body>" + "</soapenv:Envelope>";
|
||||||
// System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
UtilUrl uc=new UtilUrl();
|
UtilUrl uc=new UtilUrl();
|
||||||
String postSoap =uc.doPostSoap(readurl, xmlStr, "");
|
String postSoap =uc.doPostSoap(readurl, xmlStr, "");
|
||||||
@ -1120,22 +1066,11 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
|
|
||||||
|
|
||||||
String processInstId = processInstance.getId();
|
String processInstId = processInstance.getId();
|
||||||
// System.err.println(processInstance.getTitle() + "开始发送:" + userId);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* if ("".equals(userId) || UtilString.isEmpty(userId)) { return; }
|
|
||||||
*/
|
|
||||||
if (idList.size() == 0) {
|
if (idList.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// System.err.println(processInstance.getTitle() + "开始发送:" + userId);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* if ("".equals(userId) || UtilString.isEmpty(userId)) { return; }
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
BO bo_act_coe_publish1 = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
|
||||||
.addQuery("BINDID=", processInstance.getId())
|
.addQuery("BINDID=", processInstance.getId())
|
||||||
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
|
||||||
@ -1181,7 +1116,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
+ " <soapenv:Header/>" + " <soapenv:Body>" + " <web:service>" + " <web:in0>"
|
+ " <soapenv:Header/>" + " <soapenv:Body>" + " <web:service>" + " <web:in0>"
|
||||||
+ "<![CDATA[" + jsonObjects + "]]>" + " </web:in0>" + " </web:service>"
|
+ "<![CDATA[" + jsonObjects + "]]>" + " </web:in0>" + " </web:service>"
|
||||||
+ " </soapenv:Body>" + "</soapenv:Envelope>";
|
+ " </soapenv:Body>" + "</soapenv:Envelope>";
|
||||||
// System.out.println("xmlStr>>>>>>>>" + xmlStr);
|
|
||||||
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl");
|
||||||
UtilUrl uc=new UtilUrl();
|
UtilUrl uc=new UtilUrl();
|
||||||
String postSoap = uc.doPostSoap(readurl, xmlStr, "");
|
String postSoap = uc.doPostSoap(readurl, xmlStr, "");
|
||||||
@ -1490,11 +1424,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// System.err.println(SDK.getProcessAPI().getInstanceById(processid) +
|
|
||||||
// "_得到的总人数为:" + arr_test.size());
|
|
||||||
// System.err.println(SDK.getProcessAPI().getInstanceById(processid) +
|
|
||||||
// "_得到的过滤后的人数为:" + arr.size());
|
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1507,15 +1436,8 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
String uid = userModel.getUID();
|
String uid = userModel.getUID();
|
||||||
if (!arr.contains(uid)) {
|
if (!arr.contains(uid)) {
|
||||||
if (!"10033643".equals(uid)) {
|
if (!"10033643".equals(uid)) {
|
||||||
// System.err.println("发送人员======>" + uid); }
|
|
||||||
arr.add(uid);
|
arr.add(uid);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* RowMap map = DBSql.getMap("SELECT ID FROM BO_ACT_DATAID WHERE PROCESSID = '"
|
|
||||||
* + processid + "' AND USER_ID = '" + uid + "'"); if (map == null) {
|
|
||||||
* //System.err.println("发送人员======>" + uid); }
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1541,11 +1463,8 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
String uid = userModel.getUID();
|
String uid = userModel.getUID();
|
||||||
if (!arr.contains(uid)) {
|
if (!arr.contains(uid)) {
|
||||||
if (!"10033643".equals(uid)) {
|
if (!"10033643".equals(uid)) {
|
||||||
// System.err.println("发送人员======>" + uid); }
|
|
||||||
arr.add(uid);
|
arr.add(uid);
|
||||||
}
|
}
|
||||||
// System.err.println(SDK.getProcessAPI().getInstanceById(processid) +
|
|
||||||
// "_发送人员======>" + uid);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1717,22 +1636,22 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
params_create.put("knwlName",plmodel.getName() + "V" + level);
|
params_create.put("knwlName",plmodel.getName() + "V" + level);
|
||||||
//是否可以评论,必填
|
//是否可以评论,必填
|
||||||
params_create.put("isComment", true);
|
params_create.put("isComment", true);
|
||||||
//是否可以评分,必填
|
//是否可以评分,必填
|
||||||
params_create.put("isRate", true);
|
params_create.put("isRate", true);
|
||||||
//有效期:yyyy-MM-dd,非必填
|
//有效期:yyyy-MM-dd,非必填
|
||||||
params_create.put("validDate", "2099-12-31");
|
params_create.put("validDate", "2099-12-31");
|
||||||
//只读控制,1:在线阅读和下载 0:在线阅读,必填
|
//只读控制,1:在线阅读和下载 0:在线阅读,必填
|
||||||
params_create.put("onlineLevel", 1);
|
params_create.put("onlineLevel", 1);
|
||||||
//知识创建人,某些特殊场景下,sid和createUser代表的用户并不一样,如果此参数为null,则使用sid代表的用户,非必填
|
//知识创建人,某些特殊场景下,sid和createUser代表的用户并不一样,如果此参数为null,则使用sid代表的用户,非必填
|
||||||
params_create.put("createUser", "admin");
|
params_create.put("createUser", "admin");
|
||||||
//知识内容,非必填
|
//知识内容,非必填
|
||||||
params_create.put("cardContext", "");
|
params_create.put("cardContext", "");
|
||||||
//sid,必填
|
//sid,必填
|
||||||
params_create.put("sid", sid);
|
params_create.put("sid", sid);
|
||||||
AppAPI appAPI_create = SDK.getAppAPI();
|
AppAPI appAPI_create = SDK.getAppAPI();
|
||||||
//创建知识
|
//创建知识
|
||||||
ResponseObject ro_create = appAPI_create.callASLP(
|
ResponseObject ro_create = appAPI_create.callASLP(
|
||||||
appAPI_create.getAppContext(processInstance.getAppId()),
|
appAPI_create.getAppContext(processInstance.getAppId()),
|
||||||
aslps_create, params_create);
|
aslps_create, params_create);
|
||||||
@ -1778,7 +1697,10 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
AddKnwlAC(processInstance, jsonArray1, sid,
|
AddKnwlAC(processInstance, jsonArray1, sid,
|
||||||
cardId);
|
cardId);
|
||||||
|
|
||||||
String update_sql = "UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT4 = '" + cardId + "' WHERE "
|
PALRepository palRepository=new PALRepository();
|
||||||
|
int count=palRepository.updateRepositoryExtAll(publishfileid,"","","",cardId,"","");
|
||||||
|
|
||||||
|
/* String update_sql = "UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT4='" + cardId + "' WHERE "
|
||||||
+ " PLCATEGORY = 'process'and PLMETHODID !='process.framework' "
|
+ " PLCATEGORY = 'process'and PLMETHODID !='process.framework' "
|
||||||
+ " and PLNAME not in ('流程架构图','测试用','GMY-截图用','sx批量测试'"
|
+ " and PLNAME not in ('流程架构图','测试用','GMY-截图用','sx批量测试'"
|
||||||
+ " ,'8.2培训使用','用户练习使用','YX测试分部','yx测试人员','yx测试部','流程架构测试')"
|
+ " ,'8.2培训使用','用户练习使用','YX测试分部','yx测试人员','yx测试部','流程架构测试')"
|
||||||
@ -1787,12 +1709,12 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
+ " '36ac7cdd-a361-4bd3-9511-c03c1b3627a4','84e534b4-e51a-4874-9ff1-8a0206d9e0c5',"
|
+ " '36ac7cdd-a361-4bd3-9511-c03c1b3627a4','84e534b4-e51a-4874-9ff1-8a0206d9e0c5',"
|
||||||
+ " '98bd5917-7563-4b29-b775-815e91d9864c','f07da63c-3423-4c1e-ae75-b323c6a69093',"
|
+ " '98bd5917-7563-4b29-b775-815e91d9864c','f07da63c-3423-4c1e-ae75-b323c6a69093',"
|
||||||
+ " '79cb4c35-d2f7-4c43-a7db-44038b557eac','7ad79a73-a497-417a-a5ec-d4c9fd45061c',"
|
+ " '79cb4c35-d2f7-4c43-a7db-44038b557eac','7ad79a73-a497-417a-a5ec-d4c9fd45061c',"
|
||||||
+ " '42c09260-c1d3-44b7-ac3d-f8280e04c294') and ID = '" + publishfileid + "'";
|
+ " '42c09260-c1d3-44b7-ac3d-f8280e04c294') and ID='" + publishfileid + "'";
|
||||||
int update = DBSql.update(update_sql);
|
int update = DBSql.update(update_sql);*/
|
||||||
|
|
||||||
System.out.println("更新id为:" + publishfileid + "版本为:的知识对应的资产库的EXT4的影响行数为" + update);
|
System.out.println("更新id为:" + publishfileid + "版本为:的知识对应的资产库的EXT4的影响行数为" + count);
|
||||||
creadteFile(processInstance, "BO_ACT_COE_PUBLISH_N",UserContext.fromSessionId(sid),
|
creadteFile(processInstance, "BO_ACT_COE_PUBLISH_N",UserContext.fromSessionId(sid),
|
||||||
cardId, "PUBLISHFILEID = ");
|
cardId, "PUBLISHFILEID=");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2281,7 +2203,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
xmlDatasUtil.setMobileurl(portalUrl+"/r/or?cmd=com.yili_form_page_open&corpid=wwb0ae23173b140618&appAgentId=1000014&oauthName=wechat&casaccount="+taskInstance.getTarget()+"&processInstId="+processInstance.getId()+"&taskInstId="+taskInstance.getId()+"&openState="+taskInstance.getState());
|
xmlDatasUtil.setMobileurl(portalUrl+"/r/or?cmd=com.yili_form_page_open&corpid=wwb0ae23173b140618&appAgentId=1000014&oauthName=wechat&casaccount="+taskInstance.getTarget()+"&processInstId="+processInstance.getId()+"&taskInstId="+taskInstance.getId()+"&openState="+taskInstance.getState());
|
||||||
String target = taskInstance.getTarget();
|
String target = taskInstance.getTarget();
|
||||||
|
|
||||||
//System.out.println("当前账户======》》》》"+target);
|
|
||||||
BO bo_eu_oa_reson = SDK.getBOAPI().query("BO_EU_OA_RESON", true).addQuery("WORKCODE=" , target).detail();
|
BO bo_eu_oa_reson = SDK.getBOAPI().query("BO_EU_OA_RESON", true).addQuery("WORKCODE=" , target).detail();
|
||||||
//System.out.println("bo>>>>>>>>>>"+bo_eu_oa_reson);
|
//System.out.println("bo>>>>>>>>>>"+bo_eu_oa_reson);
|
||||||
if (bo_eu_oa_reson!=null){
|
if (bo_eu_oa_reson!=null){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user