K3/Cloud 6.1
代码实现推送消息到云之家时,报错:输入字符串的格式不正确。是在调用
IXunTongService xunTongService = Kingdee.BOS.Contracts.ServiceFactory.GetXunTongService(this.Context);
xunTongService.SendSingleMessage(this.Context, msg);
的时候。附上相关代码,请帮忙看一下什么问题。
用户传的是FUSERID。
//云之家
string content = string.Format("单据编号为{0}已审核,请查看。", entity["BillNo"].ToString());
sql = new StringBuilder();
sql.AppendLine(" SELECT ue.fname FROM T_HR_EMPINFO sta ");
sql.AppendLine(" INNER JOIN T_SEC_USER ue ON ue.FLINKOBJECT=sta.FPERSONID");
sql.AppendFormat(" WHERE sta.fid IN ('{0}')", string.Join("','", FMESUSERID.Select(p => p["FMESUSERID_Id"])));
receiveIds = DBUtils.ExecuteDynamicObject(this.Context, sql.ToString());
XTSingleTextMessage msg = new XTSingleTextMessage();
msg.Title = "通知";
msg.Text = content;
msg.Users = receiveIds.Select(p => Convert.ToString(p["fname"])).ToList
IXunTongService xunTongService = Kingdee.BOS.Contracts.ServiceFactory.GetXunTongService(this.Context);
xunTongService.SendSingleMessage(this.Context, msg);