parent
43c427a040
commit
132b18ddb3
|
@ -192,9 +192,9 @@ public class TestFormPlugin extends AbstractFormPlugin {
|
|||
if (null != toTime) {
|
||||
supplier.set("qeug_end", new Date(toTime));//营业期限(终止)
|
||||
}
|
||||
if (null != cancelDate) {
|
||||
supplier.set("qeug_logoff", new Date(cancelDate));//注销日期
|
||||
}
|
||||
// if (null != cancelDate) {
|
||||
// supplier.set("qeug_logoff", new Date(cancelDate));//注销日期
|
||||
// }
|
||||
SaveServiceHelper.save(new DynamicObject[]{supplier});
|
||||
|
||||
}
|
||||
|
|
|
@ -161,24 +161,33 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
|
|||
//获取流程实例ID
|
||||
Long processInstanceId = messageContext.getProcessInstanceId();
|
||||
|
||||
//获取单据编码
|
||||
String billNo = messageContext.getBillNo();
|
||||
//获取审批人集合
|
||||
List<DynamicObject> approvers = new ArrayList<>();
|
||||
List<Long> userIds = toDoInfo.getUserIds(); // 审批人ID集合
|
||||
List<DynamicObject> approversLists = getApprovers(userIds, approvers);
|
||||
for (DynamicObject approversList : approversLists) {
|
||||
String number = approversList.getString("number");
|
||||
//获取单据编码
|
||||
String billNo = messageContext.getBillNo();
|
||||
|
||||
//获取token
|
||||
String oaToken = OAUtils.getOaToken(billNo);
|
||||
if (StringUtils.isNotEmpty(oaToken)) {
|
||||
//获取token
|
||||
String oaToken = OAUtils.getOaToken(billNo);
|
||||
if (StringUtils.isNotEmpty(oaToken)) {
|
||||
|
||||
HashMap<String, Object> updateStateMap = new HashMap<>();
|
||||
updateStateMap.put("oaToken", oaToken);
|
||||
updateStateMap.put("taskId", taskId);
|
||||
updateStateMap.put("state", "1");
|
||||
updateStateMap.put("subState", subState);
|
||||
updateStateMap.put("billNo", billNo);
|
||||
HashMap<String, Object> updateStateMap = new HashMap<>();
|
||||
updateStateMap.put("oaToken", oaToken);
|
||||
updateStateMap.put("taskId", taskId + number);
|
||||
updateStateMap.put("state", "1");
|
||||
updateStateMap.put("subState", subState);
|
||||
updateStateMap.put("billNo", billNo);
|
||||
|
||||
//推送OA待办变更接口
|
||||
updatePendingState(updateStateMap);
|
||||
//推送OA待办变更接口
|
||||
updatePendingState(updateStateMap);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
System.out.println("createToDo");
|
||||
System.out.println("createToDo");
|
||||
}
|
||||
|
@ -204,24 +213,33 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
|
|||
// subState = "3";
|
||||
// }
|
||||
|
||||
//获取单据编码
|
||||
String billNo = messageContext.getBillNo();
|
||||
//获取审批人集合
|
||||
List<DynamicObject> approvers = new ArrayList<>();
|
||||
List<Long> userIds = toDoInfo.getUserIds(); // 审批人ID集合
|
||||
List<DynamicObject> approversLists = getApprovers(userIds, approvers);
|
||||
for (DynamicObject approversList : approversLists) {
|
||||
String number = approversList.getString("number");
|
||||
//获取单据编码
|
||||
String billNo = messageContext.getBillNo();
|
||||
|
||||
//获取token
|
||||
String oaToken = OAUtils.getOaToken(billNo);
|
||||
if (StringUtils.isNotEmpty(oaToken)) {
|
||||
//获取token
|
||||
String oaToken = OAUtils.getOaToken(billNo);
|
||||
if (StringUtils.isNotEmpty(oaToken)) {
|
||||
|
||||
HashMap<String, Object> updateStateMap = new HashMap<>();
|
||||
updateStateMap.put("oaToken", oaToken);
|
||||
updateStateMap.put("taskId", taskId);
|
||||
updateStateMap.put("state", "1");
|
||||
updateStateMap.put("subState", subState);
|
||||
updateStateMap.put("billNo", billNo);
|
||||
HashMap<String, Object> updateStateMap = new HashMap<>();
|
||||
updateStateMap.put("oaToken", oaToken);
|
||||
updateStateMap.put("taskId", taskId + number);
|
||||
updateStateMap.put("state", "1");
|
||||
updateStateMap.put("subState", subState);
|
||||
updateStateMap.put("billNo", billNo);
|
||||
|
||||
//推送OA待办变更接口
|
||||
updatePendingState(updateStateMap);
|
||||
//推送OA待办变更接口
|
||||
updatePendingState(updateStateMap);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,6 +17,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static kd.isc.iscb.platform.core.connector.self.Attachment.random;
|
||||
import static shkd.repc.resm.opplugin.PushOASupplierOPPlugin.RESM_OFFICIAL_SUPPLIER;
|
||||
import static shkd.repc.resm.opplugin.PushOASupplierOPPlugin.assembleBody;
|
||||
|
||||
|
@ -198,7 +199,10 @@ public class OAUtils {
|
|||
List<DynamicObject> approversLists = (List<DynamicObject>)thirdPartyMap.get("approversLists");
|
||||
for (DynamicObject approver :approversLists ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("taskId", String.valueOf(thirdPartyMap.get("taskId")));//第三方待办主键(保证唯一)
|
||||
// // 生成随机8位数
|
||||
// long taskId = 10000000L + (long) (random.nextDouble() * 90000000L);
|
||||
// String taskid = String.valueOf(taskId);
|
||||
jsonObject.put("taskId", String.valueOf(thirdPartyMap.get("taskId")) + approver.getString("number"));//第三方待办主键(保证唯一)
|
||||
jsonObject.put("registerCode", "3004");//系统注册编码
|
||||
jsonObject.put("title", String.valueOf(thirdPartyMap.get("title")) );//待办标题
|
||||
jsonObject.put("thirdSenderId", String.valueOf(thirdPartyMap.get("startNumber")));//第三方待办发起人主键
|
||||
|
@ -319,7 +323,7 @@ public class OAUtils {
|
|||
List<DynamicObject> approversLists = (List<DynamicObject>)thirdPartyMap.get("approversLists");
|
||||
for (DynamicObject approver :approversLists ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("thirdpartyMessageId", String.valueOf(thirdPartyMap.get("taskId")));//待办主键(保证唯一)
|
||||
jsonObject.put("thirdpartyMessageId", String.valueOf(thirdPartyMap.get("taskId")) + approver.getString("number"));//待办主键(保证唯一)
|
||||
jsonObject.put("thirdpartyRegisterCode", "3004");//系统注册编码
|
||||
jsonObject.put("messageContent", String.valueOf(thirdPartyMap.get("content")) );//消息内容
|
||||
jsonObject.put("thirdpartySenderId", String.valueOf(thirdPartyMap.get("startNumber")));//发起人主键
|
||||
|
|
Loading…
Reference in New Issue