From c14f8a94958772b5aa0fdd8e128c4e8a2edc2100 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期三, 25 二月 2026 16:14:26 +0800
Subject: [PATCH] 成本费用单编辑增加工序
---
WebAPI/Service/GeTuiService.cs | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/WebAPI/Service/GeTuiService.cs b/WebAPI/Service/GeTuiService.cs
index 9261a6c..0e7b281 100644
--- a/WebAPI/Service/GeTuiService.cs
+++ b/WebAPI/Service/GeTuiService.cs
@@ -9,6 +9,7 @@
using Newtonsoft.Json;
using com.igetui.api.openservice.igetui.template;
using com.igetui.api.openservice.igetui;
+using WebApiWithFleck;
namespace WebAPI.Service
{
@@ -46,15 +47,16 @@
{
string title = ds.Tables[0].Rows[0]["涓婚"].ToString();
string content = ds.Tables[0].Rows[0]["鍐呭"].ToString();
- template = GetNotificationTemplate(title, content, "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList", "0");
+ template = GetNotificationTemplate(title, content, "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery", "0"); // 璺宠浆鍒板伐浣滆仈绯诲崟鏌ヨ椤甸潰
+ bool pushSuccess = false;
// 骞挎挱
if(ds.Tables[0].Rows[0]["鍙戦�佺被鍨�"].ToString() == "鍏叡")
{
// 閬嶅巻 鍏ㄦ帹閫�
foreach(DataRow row in ds.Tables[1].Rows)
{
- PushMessageToSingle(template, row["HClientID"].ToString());
+ pushSuccess = PushMessageToSingle(template, row["HClientID"].ToString());
}
}else // 鍗曠嫭鎺ㄩ��
{
@@ -63,8 +65,17 @@
{
if(ds.Tables[0].Rows[0]["鎺ユ敹浜�"].ToString() == row["HUserName"].ToString()
|| ds.Tables[0].Rows[0]["鎶勯�佹帴鏀朵汉"].ToString() == row["HUserName"].ToString())
- PushMessageToSingle(template, row["HClientID"].ToString());
+ {
+ pushSuccess = PushMessageToSingle(template, row["HClientID"].ToString());
+ }
}
+ }
+
+ if(!pushSuccess)
+ {
+ // 涓帹 鎺ㄩ�佷笉鎴愬姛(鍐呯綉鐜) 浣跨敤webSocket杩涜鎺ㄩ��
+ // TODO: 浣跨敤 rabbitMQ 瀹炵幇娑堟伅闃熷垪
+ // WebSocketServer.PushOne(HInterID);
}
}
}
@@ -76,7 +87,7 @@
}
// 鍗曟帹 浣跨敤閫氱煡娑堟伅妯″瀷
- private static void PushMessageToSingle(NotificationTemplate template, string ClientID)
+ private static bool PushMessageToSingle(NotificationTemplate template, string ClientID)
{
IGtPush push = new IGtPush(HOST, APPKEY, MASTERSECRET);
@@ -100,6 +111,7 @@
LogService.Write("-----------------------------------------------");
LogService.Write("-----------------------------------------------");
LogService.Write("----------------鏈嶅姟绔繑鍥炵粨鏋滐細" + pushResult);
+ return true;
}
catch (RequestException e)
{
@@ -109,6 +121,7 @@
LogService.Write("-----------------------------------------------");
LogService.Write("-----------------------------------------------");
LogService.Write("----------------鏈嶅姟绔繑鍥炵粨鏋滐細" + pushResult);
+ return false;
}
}
@@ -156,8 +169,8 @@
template.IsClearable = true;
var customData = new Dictionary<string, string>
{
- {"pagePath", pagePath}, // 绀轰緥锛�"/pages/detail/detail"
- {"itemId", HItemID} // 绀轰緥锛�"123456"
+ {"pagePath", pagePath},
+ {"itemId", HItemID}
};
template.TransmissionContent = JsonConvert.SerializeObject(customData); // 搴忓垪鍖栦负 JSON 瀛楃涓�
template.TransmissionType = 1; // 1=鐐瑰嚮閫氱煡鍚庤Е鍙戝鎴风鍥炶皟锛堥�忎紶鍐呭缁欏鎴风锛�
--
Gitblit v1.9.1