Esempio n. 1
0
        /// <summary>
        /// 信息发布审核
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void SHXXFB(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string strSql = string.Format("UPDATE SZHL_XXFB set SHStatus={0} ,SHYJ='{1}',SHDate=getdate() where ID in ({2}) and ComId={3}", P2, context.Request["jy"] ?? "", P1, UserInfo.User.ComId);

            new SZHL_XXFBB().ExsSql(strSql);
            int[] Ids = P1.SplitTOInt(',');
            foreach (int ID in Ids)
            {
                SZHL_XXFB     model = new SZHL_XXFBB().GetEntity(d => d.ID == ID);
                SZHL_XXFBType type  = new SZHL_XXFBTypeB().GetEntity(d => d.ID == model.XXFBType);
                //判断审核状态为审核通过,给接收人发送消息
                if (model.SHStatus == 1)
                {
                    if (type.ISzjfb.ToLower() == "true")  //判断审核通过直接发布
                    {
                        SUREXXFB(context, msg, ID.ToString(), P2, UserInfo);
                    }
                    else
                    {
                        //给接收人发送消息
                        SZHL_TXSX tx = new SZHL_TXSX();
                        tx.ComId   = UserInfo.User.ComId;
                        tx.APIName = "XXFB";
                        tx.TXMode  = "XXFB";
                        tx.MsgID   = model.ID.ToString();
                        tx.CRUser  = UserInfo.User.UserName;
                        tx.FunName = "SENDWXMSG_CHECK";
                        tx.Date    = model.FBTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                        TXSX.TXSXAPI.AddALERT(tx); //时间为发送时间
                    }
                }
                else
                if (model.SHStatus == -1)    //退回发送PC消息及微信消息
                {
                    string strMsg = UserInfo.User.UserRealName + "退回了您发布的企业信息";
                    new JH_Auth_User_CenterB().SendMsg(UserInfo, "XXFB", strMsg, model.ID.ToString(), model.CRUser);
                    WXHelp wx = new WXHelp(UserInfo.QYinfo);
                    wx.SendWXRText(strMsg, "XXFB", model.CRUser);
                }
            }
        }