Sfoglia il codice sorgente

【U审批】【消息推送应用变更】

wuyx 6 anni fa
parent
commit
ae00e60200

+ 3 - 3
uas-office-qywx/src/main/java/com/usoftchina/uas/office/qywx/listener/UasProcessListener.java

@@ -51,7 +51,7 @@ public class UasProcessListener {
      */
     @UasEventListener(caller = "JProcess", operation = "SAVE")
     public void onProcessSave(UasEvent event) {
-        if (!messageSdk.isAgentEnabled("Uas")) {
+        if (!messageSdk.isAgentEnabled("UasAudit")||!messageSdk.isAgentEnabled("Uas")) {
             return;
         }
         if (event.getKey() instanceof List) {
@@ -78,12 +78,12 @@ public class UasProcessListener {
         String title = process.getJp_launchername() + "的" + process.getJp_name();
         String description = "单据编号:" + process.getJp_codevalue();
         try {
-            // 往uas应用发送
+            // 根据UAS配置的外部地址发送
             QywxAgent agent = getUasAgent();
             String paramsStr = "{\"master\":\"" + event.getMaster() + "\",\"nodeId\":" + process.getJp_nodeid() + ",\"baseUrl\":\"" + URLEncoder.encode(agent.getOuterUrl(), "utf-8") + "\"}";
             String msgUrl = UrlUtils.generateOAuthUrl(messageSdk.getCorpId(), event.getMaster(), "Uas", agent.getOuterUrl(),
                     dataCenter.getOuterUrl() + "api/authorize", "uas/approval/" + URLEncoder.encode(paramsStr, "utf-8"));
-            messageSdk.send("Uas", new SendMessageReq()
+            messageSdk.send("UasAudit", new SendMessageReq()
                     .textCard(title, description, msgUrl, "查看详情")
                     .toUser(employee.getEm_qywx()));
         } catch (Exception e) {