流程待办集成0.6

泛微syscode根据单据配置
This commit is contained in:
李靖 2024-06-11 17:27:39 +08:00
parent 9216d861ae
commit 5a2b41a601
1 changed files with 14 additions and 18 deletions

View File

@ -205,7 +205,6 @@ public class MessageListen extends AbstractMessageServiceHandler {
String MessageState = ""; String MessageState = "";
String billno = ""; String billno = "";
// String title = isdel ? "流程撤回" : toDoInfo.getContent(); // String title = isdel ? "流程撤回" : toDoInfo.getContent();
// 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,31 +319,28 @@ 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(); String entityName = messageContext.getEntityName();
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 syscodestr = System.getProperty("cxkg.integration.MessageListen.oakey");
// JSONObject jsonCode = JSON.parseObject(syscode); JSONObject jsonCode = JSON.parseObject(syscodestr);
// syscode String syscode = jsonCode.getString(entityName);
String syscodestr = System.getProperty("cxkg.integration.MessageListen.syscode"); if(syscode == null || "".equals(syscode)){
JSONObject jsonCode2 = JSON.parseObject(syscodestr); if(entityName.startsWith("差旅报销单")){
String syscode2 = jsonCode2.getString(entityNumber); syscode = jsonCode.getString("差旅报销单");
if(syscode2 == null || "".equals(syscode2)){ } else {
log.info("cxkg.integration.MessageListen.syscode is null: " + log.info("cxkg.integration.MessageListen.syscode is null: " +
messageContext.getEntityName() + "/" + entityNumber); entityName + "/" + messageContext.getEntityNumber());
}
} }
// 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(); 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", syscode2); requestBody.put("syscode", syscode);
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); // + "审批流程"
@ -362,10 +358,10 @@ public class MessageListen extends AbstractMessageServiceHandler {
requestBody.put("bizState", String.valueOf(tasktype)); requestBody.put("bizState", String.valueOf(tasktype));
requestBody.put("lastNameList", userName); requestBody.put("lastNameList", userName);
// requestBody.put("targetId", "588|"+String.valueOf(processInstanceId)); // requestBody.put("targetId", "588|"+String.valueOf(processInstanceId));
// requestBodyList.add(requestBody); requestBodyList.add(requestBody);
} else { } else {
Map<String, Object> requestBody = new HashMap(); Map<String, Object> requestBody = new HashMap();
requestBody.put("syscode", syscode2); requestBody.put("syscode", syscode);
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);