流程待办集成0.5

泛微syscode根据单据配置
This commit is contained in:
李靖 2024-06-11 14:09:52 +08:00
parent 4a6c59da22
commit 9216d861ae
1 changed files with 20 additions and 7 deletions

View File

@ -204,8 +204,8 @@ public class MessageListen extends AbstractMessageServiceHandler {
String msg_type = ""; String msg_type = "";
String MessageState = ""; String MessageState = "";
String billno = ""; String billno = "";
String title = isdel ? "流程撤回" : toDoInfo.getContent(); // String title = isdel ? "流程撤回" : toDoInfo.getContent();
String entityName = messageContext.getEntityName(); // String entityName = messageContext.getEntityName();
// if (title != null) { // if (title != null) {
// int dex = title.indexOf("", 0); // int dex = title.indexOf("", 0);
// if (dex != -1) { // if (dex != -1) {
@ -320,18 +320,31 @@ public class MessageListen extends AbstractMessageServiceHandler {
//// startUserMobile = receiver.getString("phone"); //// startUserMobile = receiver.getString("phone");
// receiverUser = receiver.getString("username"); // receiverUser = receiver.getString("username");
// } // }
String entityNumber = messageContext.getEntityNumber();
userNames.add(startUserName); userNames.add(startUserName);
List<Map<String, Object>> requestBodyList = new ArrayList(); List<Map<String, Object>> requestBodyList = new ArrayList();
Iterator var47 = userNames.iterator(); Iterator var47 = userNames.iterator();
String syscode = System.getProperty("cxkg.integration.MessageListen.oakey"); // String syscode = System.getProperty("cxkg.integration.MessageListen.oakey");
JSONObject jsonCode = JSON.parseObject(syscode); // JSONObject jsonCode = JSON.parseObject(syscode);
title = "请处理" + startUserTrueName + "提交的" + entityName + "" + messageContext.getBillNo(); // syscode
String syscodestr = System.getProperty("cxkg.integration.MessageListen.syscode");
JSONObject jsonCode2 = JSON.parseObject(syscodestr);
String syscode2 = jsonCode2.getString(entityNumber);
if(syscode2 == null || "".equals(syscode2)){
log.info("cxkg.integration.MessageListen.syscode is null: " +
messageContext.getEntityName() + "/" + entityNumber);
}
// entityName
String workflownamestr = System.getProperty("cxkg.integration.MessageListen.workflowname");
JSONObject jsonCode3 = JSON.parseObject(workflownamestr);
String entityName = jsonCode3.getString(entityNumber);
String title = "请处理" + startUserTrueName + "提交的" + entityName + "" + messageContext.getBillNo();
while (var47.hasNext()) { while (var47.hasNext()) {
String userName = (String) var47.next(); String userName = (String) var47.next();
if (userName.equals(startUserName)) { if (userName.equals(startUserName)) {
Map<String, Object> requestBody = new HashMap(); Map<String, Object> requestBody = new HashMap();
requestBody.put("syscode", jsonCode.getString(entityName)); requestBody.put("syscode", syscode2);
requestBody.put("flowid", String.valueOf(processInstanceId)); requestBody.put("flowid", String.valueOf(processInstanceId));
requestBody.put("requestname", title); requestBody.put("requestname", title);
requestBody.put("workflowname", entityName); // + "审批流程" requestBody.put("workflowname", entityName); // + "审批流程"
@ -352,7 +365,7 @@ public class MessageListen extends AbstractMessageServiceHandler {
// requestBodyList.add(requestBody); // requestBodyList.add(requestBody);
} else { } else {
Map<String, Object> requestBody = new HashMap(); Map<String, Object> requestBody = new HashMap();
requestBody.put("syscode", jsonCode.getString(entityName)); requestBody.put("syscode", syscode2);
requestBody.put("flowid", String.valueOf(processInstanceId)); requestBody.put("flowid", String.valueOf(processInstanceId));
if (title != null) { if (title != null) {
requestBody.put("requestname", title); requestBody.put("requestname", title);