Exemplo n.º 1
0
        /// <summary>
        /// 获取我的收藏byID
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1">ID</param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETTEXT(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int DataID = 0;

            int.TryParse(P1, out DataID);
            JH_Auth_WXMSG wxmsg = new JH_Auth_WXMSGB().GetEntity(d => d.ID == DataID);

            msg.Result = wxmsg;
        }
Exemplo n.º 2
0
        //分享页面根据文件夹Id获取文件列表
        public void GETFILELIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int FolderID = int.Parse(P1);//
            int ComId    = int.Parse(P2);

            msg.Result  = new FT_FolderB().GetEntities(d => d.ComId == ComId && d.PFolderID == FolderID);
            msg.Result1 = new FT_FileB().GetEntities(d => d.ComId == ComId && d.FolderID == FolderID);
            return;
        }
Exemplo n.º 3
0
        /// <summary>
        /// 根据ID查询工资明细
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="UserInfo"></param>
        public void GETGZDLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int          ID;
            JH_Auth_User userInfo = new JH_Auth_User();

            int.TryParse(context.Request["ID"] ?? "-1", out ID);
            msg.Result = new SZHL_XZ_GZDB().GetEntities(d => d.ID == ID).ToList();
            return;
        }
Exemplo n.º 4
0
        //获取接收人列表
        public void GETXXFBUSERLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int id = 0;

            int.TryParse(P1, out id);
            SZHL_XXFBType xxfbType = new SZHL_XXFBTypeB().GetEntity(d => d.ID == id && d.ComId == UserInfo.User.ComId);

            msg.Result = new JH_Auth_UserB().GetEntities(d => xxfbType.SeeUser.Contains(d.UserName) && d.ComId == UserInfo.User.ComId);
        }
Exemplo n.º 5
0
        public void CHECKREGISTERPHONE(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            var qy2 = new JH_Auth_QYB().GetEntities(p => p.Mobile == P1.Trim());

            if (qy2.Count() > 0)
            {
                msg.ErrorMsg = "此手机已注册企业,请更换手机号继续注册";
            }
        }
Exemplo n.º 6
0
        public void GETMOBILEINDEX(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string    strSql = string.Format(@"SELECT  top 3 item.* from  SZHL_XXFB_ITEM item inner join SZHL_XXFB  xxfb on item.XXFBId=xxfb.ID  
                                            where item.ComId={0}  and xxfb.IsSend='1'  
                                            and SHStatus=2  and (','+xxfb.JSUser+',' LIKE '%,{1},%' or  xxfb.JSUser='')  order by xxfb.FBTime DESC", UserInfo.User.ComId, UserInfo.User.UserName);
            DataTable dt     = new SZHL_XXFBB().GetDTByCommand(strSql);

            msg.Result = dt;
        }
Exemplo n.º 7
0
        /// <summary>
        /// 获取我所监督的自律小组列表
        /// </summary>
        public void GETMYJIANDUGROUPTEAM(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            //我的自律小组名称
            JH_Auth_User thisuser = new JH_Auth_UserB().GetEntity(d => d.ID == UserInfo.User.ID);
            string       viewname = "select Items as XiaoZu from dbo.Split(REPLACE('" + thisuser.JianDuXiaoZu + "',' ',''),';') ";
            DataTable    dt       = new JH_Auth_UserB().GetDTByCommand(viewname);

            msg.Result  = dt;
            msg.Result1 = thisuser.ZiLvXiaoZu;
        }
Exemplo n.º 8
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 SETPDFILED(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int Id = 0;

            int.TryParse(P1, out Id);
            Yan_WF_TD TD = new Yan_WF_TDB().GetEntity(d => d.ID == Id && d.ComId == UserInfo.User.ComId);

            TD.WritableFields = P2;
            new Yan_WF_TDB().Update(TD);
        }
Exemplo n.º 9
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 BACKCLJL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int       ID   = int.Parse(P1);
            SZHL_YCGL ycgl = new SZHL_YCGLB().GetEntity(d => d.ID == ID && d.ComId == UserInfo.User.ComId);

            ycgl.Status   = "0";//0 归还  1正在使用
            ycgl.BackDate = DateTime.Now;
            new SZHL_YCGLB().Update(ycgl);
            msg.Result = ycgl;
        }
Exemplo n.º 10
0
        /// <summary>
        /// 获取投票人
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1"></param>
        /// <param name="P2"></param>
        /// <param name="strUserName"></param>
        public void GETTPR(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int Id = 0, opid = 0;

            int.TryParse(P1, out Id);
            int.TryParse(P2, out opid);
            DataTable dttpr = new SZHL_QYHD_ResultB().GetDTByCommand("SELECT CRUser FROM SZHL_QYHD_Result WHERE HDId=" + P1 + " AND OptionID=" + opid + " GROUP BY CRUser");

            msg.Result = dttpr;
        }
Exemplo n.º 11
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 GETYCGLVIEW(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string strSql = string.Format("SELECT  ycgl.ID,ycgl.intProcessStanceid,ts.tsBrand+'-'+ts.tsType+'-'+ts.tsNum+'  '+CONVERT(VARCHAR(5),ycgl.StartTime,8)+'~'+CONVERT(VARCHAR(5),ycgl.EndTime,8) title,ycgl.StartTime start,ycgl.EndTime [end]  from SZHL_TSGL  ycgl left outer join SZHL_TSGL_TS ts on ycgl.tsID=ts.ID   where ( dbo.fn_PDStatus(ycgl.intProcessStanceid)='已审批' or dbo.fn_PDStatus(ycgl.intProcessStanceid)='正在审批' or dbo.fn_PDStatus(ycgl.intProcessStanceid)='-1' ) and ycgl.ComId=" + UserInfo.User.ComId + " and isnull(ts.tsType,'')!=''");

            if (P1 != "0")
            {
                strSql += string.Format(" and ycgl.tsID={0} ", P1);
            }
            msg.Result = new SZHL_CCXJB().GetDTByCommand(strSql);
        }
Exemplo n.º 12
0
 public void GETWDSL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
 {
     try
     {
         msg.Result = new SZHL_TSSQB().GetDTByCommand("SELECT COUNT(*) AS SL FROM SZHL_TSSQ WHERE  ','+RedUsers+',' NOT like '%," + UserInfo.User.UserName + ",%'");
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 13
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 GETHYGLVIEW(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string strSql = string.Format("SELECT  hygl.ID,hygl.intProcessStanceid,hygl.FQUser,'['+room.Name+']'+hygl.Title+'  '+CONVERT(VARCHAR(5),hygl.StartTime,8)+'~'+CONVERT(VARCHAR(5),hygl.EndTime,8) title,hygl.StartTime start,hygl.EndTime [end],CASE when dbo.fn_PDStatus(hygl.intProcessStanceid)='已审批' then 1 when dbo.fn_PDStatus(hygl.intProcessStanceid)='-1' then 1  when dbo.fn_PDStatus(hygl.intProcessStanceid)='正在审批' then 0 end SHStatus from SZHL_HYGL hygl INNER join SZHL_HYGL_ROOM  room on hygl.RoomID=room.ID  where ( dbo.fn_PDStatus(hygl.intProcessStanceid)='已审批' or dbo.fn_PDStatus(hygl.intProcessStanceid)='正在审批' or dbo.fn_PDStatus(hygl.intProcessStanceid)='-1' ) and hygl.ComId=" + UserInfo.User.ComId);

            if (P1 != "0")
            {
                strSql += string.Format(" and hygl.RoomID={0} ", P1);
            }
            msg.Result = new SZHL_YCGLB().GetDTByCommand(strSql);
        }
Exemplo n.º 14
0
        //获取素材列表
        public void GETSCLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string strSql = string.Format("select * from SZHL_XXFB_SCK where CRUser='******' and ComId={1} ", UserInfo.User.UserName, UserInfo.User.ComId);//and Type={1}

            msg.Result = new SZHL_XXFB_SCKB().GetDTByCommand(strSql + " and Type=0");
            string strSql2 = string.Format("SELECT sck.*,files.name,files.FileExtendName,files.FileMD5 from  SZHL_XXFB_SCK sck inner join FT_File files on sck.Files=files.Id   where sck.CRUser='******' and sck.ComId={1} ", UserInfo.User.UserName, UserInfo.User.ComId);//and Type={1}

            msg.Result1 = new SZHL_XXFB_SCKB().GetDTByCommand(strSql2 + " and Type=1");
            msg.Result2 = new SZHL_XXFB_SCKB().GetDTByCommand(strSql2 + " and Type=2");
        }
Exemplo n.º 15
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 LOGIN(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string password = context.Request["password"] ?? "";
            string username = context.Request["UserName"] ?? "";
            string chkcode  = context.Request["chkcode"] ?? "";

            msg.ErrorMsg = "";
            //取消验证码 Weiler
            //if (context.Session["chkcode"] != null)
            //{

            //    if (!chkcode.ToUpper().Equals(context.Session["chkcode"].ToString()))
            //    {
            //        msg.ErrorMsg = "验证码不正确";
            //        return;
            //    }
            //}
            //else
            //{
            //    msg.ErrorMsg = "验证码已过期";
            //    return;
            //}


            JH_Auth_QY qyModel = new JH_Auth_QYB().GetALLEntities().First();

            password = CommonHelp.GetMD5(password);
            JH_Auth_User userInfo = new JH_Auth_User();

            List <JH_Auth_User> userList = new JH_Auth_UserB().GetEntities(d => (d.UserName == username || d.mobphone == username) && d.UserPass == password).ToList();

            if (userList.Count() == 0)
            {
                msg.ErrorMsg = "用户名或密码不正确";
                return;
            }
            else
            {
                userInfo = userList[0];
                if (userInfo.IsUse != "Y")
                {
                    msg.ErrorMsg = "用户被禁用,请联系管理员";
                    return;
                }
                if (string.IsNullOrEmpty(userInfo.pccode))
                {
                    userInfo.pccode = CommonHelp.CreatePCCode(userInfo);
                }
                userInfo.logindate = DateTime.Now;
                new JH_Auth_UserB().Update(userInfo);
                msg.Result  = userInfo.pccode;
                msg.Result1 = userInfo.UserName;
                msg.Result4 = userInfo;
            }
        }
Exemplo n.º 16
0
        public void ADDJFBX(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            SZHL_JFBX            jfbxModel = JsonConvert.DeserializeObject <SZHL_JFBX>(P1);
            List <SZHL_JFBXITEM> itemList  = JsonConvert.DeserializeObject <List <SZHL_JFBXITEM> >(P2);

            if (itemList == null || itemList.Count() == 0)
            {
                msg.Result = "请添加消费记录";
                return;
            }

            string wximg = context.Request["wximg"] ?? "";

            if (wximg != "") // 处理微信上传的图片
            {
                string fids = new FT_FileB().ProcessWxIMG(wximg, "JFBX", UserInfo);

                if (!string.IsNullOrEmpty(jfbxModel.Files))
                {
                    jfbxModel.Files += "," + fids;
                }
                else
                {
                    jfbxModel.Files = fids;
                }
            }
            if (jfbxModel.ID == 0)
            {
                jfbxModel.CRDate     = DateTime.Now;
                jfbxModel.CRUser     = UserInfo.User.UserName;
                jfbxModel.ComId      = UserInfo.User.ComId;
                jfbxModel.FormCode   = new SZHL_JFBXB().GetFormCode();
                jfbxModel.BranchName = UserInfo.BranchInfo.DeptName;
                jfbxModel.BranchNo   = UserInfo.BranchInfo.DeptCode;
                new SZHL_JFBXB().Insert(jfbxModel);
                foreach (SZHL_JFBXITEM item in itemList)
                {
                    item.ComID  = UserInfo.User.ComId;
                    item.JFBXID = jfbxModel.ID;
                    new SZHL_JFBXITEMB().Insert(item);
                }
            }
            else
            {
                new SZHL_JFBXB().Update(jfbxModel);
                new SZHL_JFBXITEMB().Delete(d => d.JFBXID == jfbxModel.ID && d.ComID == UserInfo.User.ComId);
                foreach (SZHL_JFBXITEM item in itemList)
                {
                    item.ComID  = UserInfo.User.ComId;
                    item.JFBXID = jfbxModel.ID;
                    new SZHL_JFBXITEMB().Insert(item);
                }
            }
            msg.Result = jfbxModel;
        }
Exemplo n.º 17
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 ADDWQQD(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            SZHL_WQQD wqqd = JsonConvert.DeserializeObject <SZHL_WQQD>(P1);

            if (string.IsNullOrEmpty(wqqd.Position))
            {
                msg.ErrorMsg = "当前位置不能为空";
                return;
            }
            if (P2 != "") // 处理微信上传的图片
            {
                string fids = new FT_FileB().ProcessWxIMG(P2, "RLZY", UserInfo);

                if (!string.IsNullOrEmpty(wqqd.Files))
                {
                    wqqd.Files += "," + fids;
                }
                else
                {
                    wqqd.Files = fids;
                }
            }
            if (wqqd.ID == 0)
            {
                wqqd.CRDate     = DateTime.Now;
                wqqd.CRUser     = UserInfo.User.UserName;
                wqqd.BranchName = UserInfo.BranchInfo.DeptName;
                wqqd.BranchNo   = UserInfo.User.BranchCode;
                wqqd.ComId      = UserInfo.User.ComId;
                wqqd.CRUserName = UserInfo.User.UserRealName;
                new SZHL_WQQDB().Insert(wqqd);

                if (!string.IsNullOrEmpty(wqqd.HBUser))
                {
                    SZHL_TXSX CSTX = new SZHL_TXSX();
                    CSTX.Date           = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    CSTX.APIName        = "WQQD";
                    CSTX.ComId          = UserInfo.User.ComId;
                    CSTX.FunName        = "SENDWQMSG";
                    CSTX.CRUserRealName = UserInfo.User.UserRealName;
                    CSTX.MsgID          = wqqd.ID.ToString();
                    CSTX.ISCS           = "N";
                    CSTX.TXUser         = wqqd.HBUser;
                    CSTX.TXMode         = "WQQD";
                    CSTX.CRUser         = UserInfo.User.UserName;

                    TXSX.TXSXAPI.AddALERT(CSTX); //时间为发送时间
                }
            }
            else
            {
                new SZHL_WQQDB().Update(wqqd);
            }
            msg.Result = wqqd;
        }
Exemplo n.º 18
0
        public void REGISTERYSOLD(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            JH_Auth_QY QY = new JH_Auth_QYB().GetEntity(d => d.ComId == 10334);

            QY.CRDate        = DateTime.Now.AddYears(-2);
            QY.QYProfile     = QY.FileServerUrl;
            QY.FileServerUrl = "";
            QY.IsUseWX       = "N";
            new JH_Auth_QYB().Update(QY);
            msg.Result = QY;
        }
Exemplo n.º 19
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 YZQYMC(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
 {
     if (!string.IsNullOrEmpty(P1))
     {
         var qy = new JH_Auth_QYB().GetEntity(p => p.QYName == P1);
         if (qy != null)
         {
             msg.ErrorMsg = "企业名称已存在";
         }
     }
 }
Exemplo n.º 20
0
        public void UPDZY(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            String zyid = context.Request("ZYID") ?? "0";


            FT_File model = new FT_FileB().GetEntity(d => d.zyid == zyid && d.ComId == UserInfo.User.ComId.Value);

            model.Name = P1;
            new FT_FileB().Update(model);
            msg.Result = model;
        }
Exemplo n.º 21
0
        //首页获取任务数据
        public void GETRWGLINDEXLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            string    userName    = UserInfo.User.UserName;
            string    strWhere    = string.Format(" (bg.CRUser='******' or  ','+RWFZR+','  like '%,{0},%'  or ','+RWCYR+','  like '%,{0},%' ) ", userName);
            int       recordCount = 0;
            DataTable dtList      = new SZHL_GZBGB().GetDataPager(" SZHL_RWGL  bg inner join JH_Auth_ZiDian zd on LeiBie= zd.ID and Class=7  ", "bg.*,zd.TypeName  ", 8, 1, "bg.CRDate desc", strWhere + " And RWStatus=0", ref recordCount);
            DataTable dtList1     = new SZHL_GZBGB().GetDataPager(" SZHL_RWGL  bg inner join JH_Auth_ZiDian zd on LeiBie= zd.ID and Class=7  ", "bg.*,zd.TypeName  ", 8, 1, "bg.CRDate desc", strWhere + " And RWStatus=1", ref recordCount);

            msg.Result  = dtList;
            msg.Result1 = dtList1;
        }
Exemplo n.º 22
0
        public void SAVEDATA(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            BI_DB_YBP model = new BI_DB_YBP();

            model.Name   = P1;
            model.YBType = P2;
            model.CRUser = UserInfo.User.UserName;
            model.CRDate = DateTime.Now;
            new BI_DB_YBPB().Insert(model);
            msg.Result = model;
        }
Exemplo n.º 23
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 GETCLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            // string strSql = string.Format("SELECT  car.* from  SZHL_YCGL_CAR car LEFT JOIN SZHL_YCGL ycgl on car.ID=ycgl.CarID where car.Status=0 and (ycgl.Status=0 or ycgl.Status is NULL) and car.ComId={0}", UserInfo.User.ComId);
            string strSql = string.Format("SELECT  car.* from  SZHL_YCGL_CAR car  where car.Status=0  and car.ComId={0}", UserInfo.User.ComId);

            //if (P1 != "")
            //{
            //    strSql += string.Format(" and ycgl.EndTime<'{0}' ", P1);
            //}
            msg.Result = new SZHL_YCGL_CARB().GetDTByCommand(strSql);
        }
Exemplo n.º 24
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 DELHYS(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int            Id    = int.Parse(P1);
            int            ss    = int.Parse(P2);
            SZHL_HYGL_ROOM model = new SZHL_HYGL_ROOMB().GetEntity(d => d.ID == Id && d.ComId == UserInfo.User.ComId);

            model.IsDel   = ss;
            model.DelUser = UserInfo.User.UserName;
            model.DelDate = DateTime.Now;
            new SZHL_HYGL_ROOMB().Update(model);
        }
Exemplo n.º 25
0
        public void DXGL_CHECK(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            SZHL_TXSX TX = JsonConvert.DeserializeObject <SZHL_TXSX>(P1);

            if (!string.IsNullOrEmpty(TX.TXUser))
            {
                // UserInfo = new JH_Auth_UserB().GetUserInfo(TX.ComId.Value,TX.CRUser);
                //发送微信消息
                new SZHL_DXGLB().SendSMS(TX.TXUser, TX.TXContent, TX.ComId.Value);
            }
        }
Exemplo n.º 26
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 ADDPROCESS(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            Yan_WF_PD lcsp = JsonConvert.DeserializeObject <Yan_WF_PD>(P1);

            if (lcsp.ProcessName.Trim() == "")
            {
                msg.ErrorMsg = "流程名称不能为空";
                return;
            }
            if (lcsp.ID == 0)//如果Id为0,为添加操作
            {
                if (new Yan_WF_PDB().GetEntities(d => d.ComId == UserInfo.User.ComId && d.ProcessName == lcsp.ProcessName).Count() > 0)
                {
                    msg.ErrorMsg = "已存在此流程";
                    return;
                }

                lcsp.lcstatus = 1;
                lcsp.ComId    = UserInfo.User.ComId;
                if (lcsp.ManageRole != null)
                {
                    lcsp.ManageRole.Trim(',');
                }
                lcsp.CRDate     = DateTime.Now;
                lcsp.CRUser     = UserInfo.User.UserName;
                lcsp.CRUserName = UserInfo.User.UserRealName;

                new Yan_WF_PDB().Insert(lcsp); //添加流程表数据
            }
            else
            {
                //修改流程表数据
                new Yan_WF_PDB().Update(lcsp);
            }
            //如果流程类型为固定流程并且固定流程内容不为空,添加固定流程数据
            if (lcsp.ProcessType == "1" && !string.IsNullOrEmpty(P2))
            {
                List <Yan_WF_TD> tdList = JsonConvert.DeserializeObject <List <Yan_WF_TD> >(P2);
                tdList.ForEach(d => d.ProcessDefinitionID = lcsp.ID);
                tdList.ForEach(d => d.ComId        = UserInfo.User.ComId);
                tdList.ForEach(d => d.CRDate       = DateTime.Now);
                tdList.ForEach(d => d.CRUser       = UserInfo.User.UserName);
                tdList.ForEach(d => d.TDCODE       = d.ProcessDefinitionID + "-" + d.Taskorder);
                tdList.ForEach(d => d.AssignedRole = d.AssignedRole.Trim(','));
                new Yan_WF_TDB().Delete(d => d.ProcessDefinitionID == tdList[0].ProcessDefinitionID);

                List <string> ExtendModes = new List <string>();

                ExtendModes = new JH_Auth_ExtendModeB().GetEntities(D => D.ComId == UserInfo.User.ComId && D.PDID == lcsp.ID).Select(D => D.TableFiledColumn).ToList();
                tdList[0].WritableFields = ExtendModes.ListTOString(',');
                new Yan_WF_TDB().Insert(tdList);
            }
            msg.Result = lcsp;
        }
Exemplo n.º 27
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 DELFORM(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
 {
     if (!string.IsNullOrEmpty(P1))
     {
         int[] IDS = P1.SplitTOInt(',');
         new Yan_WF_PIB().Delete(d => d.ComId == UserInfo.User.ComId && IDS.Contains(d.ID));
         new Yan_WF_TIB().Delete(d => d.ComId == UserInfo.User.ComId && IDS.Contains(d.PIID));
         new JH_Auth_ExtendDataB().Delete(d => d.ComId == UserInfo.User.ComId && IDS.Contains(d.DataID.Value));
         //是不是还需要删除关联表得数据
     }
 }
Exemplo n.º 28
0
        public void DELDRAFTS(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int       ID   = int.Parse(P1);
            SZHL_XXFB xxfb = new SZHL_XXFBB().GetEntity(d => d.ID == ID && d.IsSend == "0" && d.ComId == UserInfo.User.ComId);

            if (xxfb != null)
            {
                new SZHL_XXFBB().Delete(xxfb);
                new SZHL_XXFB_ITEMB().Delete(d => d.XXFBId == xxfb.ID);
            }
        }
Exemplo n.º 29
0
        /// <summary>
        /// 根据小组名称获取自律小组信息,包含我所监督的小组
        /// </summary>
        public void GETGROUPTEAMBYCODE(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            P1 = P1.Trim();
            string viewname = "select U.* , wu.nickName from JH_Auth_User U LEFT JOIN WX_User wu on u.WxOpenid = wu.openid  " +
                              "where u.ZiLvXiaoZu is not null and u.ZiLvXiaoZu <> '' and  u.ZiLvXiaoZu = '" + P1 + "' "
                              + "or  ('" + P1 + "' like (select Items from dbo.Split(REPLACE(u.jianduxiaozu,' ',''),';') where items='" + P1 + "'))"
                              + " order by u.UserOrder, u.IsZuZhang desc, u.UserRealName asc";
            DataTable dt = new JH_Auth_UserB().GetDTByCommand(viewname);

            msg.Result = dt;
        }
Exemplo n.º 30
0
        public void GETSHXXFBLIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int page = 0;

            int.TryParse(context.Request["p"] ?? "1", out page);
            string    strWhere    = string.Format(" fgtype.IsCheck='True'  and  ','+fgtype.CheckUser+',' LIKE '%,{0},%'  and fb.ComId={1} and fb.MsgType=1", UserInfo.User.UserName, UserInfo.User.ComId);
            int       recordCount = 0;
            DataTable dt          = new SZHL_XXFBB().GetDataPager("SZHL_XXFB fb inner join SZHL_XXFBType fgtype on fb.TypeID=fgtype.ID", " fb.*,fgtype.TypeName,fgtype.CheckUser", 8, page, " FBTime desc", strWhere, ref recordCount);

            msg.Result  = dt;
            msg.Result1 = recordCount;
        }