1
llj
3 天以前 599aeb0d380f9b194e1dc363364779f3b498969e
WebAPI/Service/GeTuiService.cs
@@ -56,7 +56,7 @@
                                   a.HCheckDate AS 审核日期, a.HUpDater AS 修改人, a.HUpDateDate AS 修改日期, a.HCloseMan AS 关闭人, 
                                   a.HCloseDate AS 关闭日期, a.HDeleteMan AS 作废人, a.HDeleteDate AS 作废日期, a.HBillType
                    from OA_WorkLinkBillMain a where HInterID = {HInterID}
                    select * from Gy_UserClientIdRelation
                    select * from Gy_UserClientIdRelation where HOnline = 1
                ", "OA_WorkLinkBillMain");
                NotificationTemplate template = null;
                ConcurrentDictionary<string, List<string>> userClientIDDictionary = new ConcurrentDictionary<string, List<string>>();
@@ -65,12 +65,17 @@
                {
                    foreach (DataRow row in ds.Tables[1].Rows)
                    {
                        if (userClientIDDictionary.ContainsKey(row["HUserName"].ToString())){
                            userClientIDDictionary[row["HUserName"].ToString()].Add(row["HClientID"].ToString());
                        }
                        else
                        // 只有在线的用户 在需要加入到待发送用户设备关联字典中 不需要给不在线的用户发消息
                        if(row["HOnline"].ToString() == "1")
                        {
                            userClientIDDictionary.TryAdd(row["HUserName"].ToString(), new List<string>() { row["HClientID"].ToString() });
                            if (userClientIDDictionary.ContainsKey(row["HUserName"].ToString()))
                            {
                                userClientIDDictionary[row["HUserName"].ToString()].Add(row["HClientID"].ToString());
                            }
                            else
                            {
                                userClientIDDictionary.TryAdd(row["HUserName"].ToString(), new List<string>() { row["HClientID"].ToString() });
                            }
                        }
                    }
                }
@@ -206,6 +211,9 @@
                LogService.Write("-----------------------------------------------");
                LogService.Write("-----------------------------------------------");
                LogService.Write("----------------服务端返回结果:" + pushResult);
                //TODO: 当错误信息显示设备离线时,将当前设备UUID绑定的用户登录状态配置为未登录
                return false;  
            }
        }