示例#1
0
        public int PoiBillAudit(string userName, string type, string id)
        {
            //审核bill
            string cookies = HttpContext.Current.Request.Cookies["guid"] == null ? "" : HttpContext.Current.Request.Cookies["guid"].Value as string;
            string session = Session.SessionID.ToString();

            if (!cookies.Equals(session))
            {
                return(-1);//身份验证失败
            }
            MLogin.GetExeUname();
            L_PushPoi        n    = new L_PushPoi();
            List <L_PushPoi> list = n.Select(" and id =" + id);

            if (list.Count <= 0)
            {
                return(-1);
            }
            else
            {
                n.ZF2 = userName;                   //审核人
                n.ZF3 = SysTime.GetTime.ToString(); //审核时间
                if (type.ToUpper() == "YES")
                {
                    n.OPERATE_TYPE = "同意";
                    KFLocation.Set(list[0].BILLMAN, list[0].CLIENT, list[0].AFTER_LNG + "," + list[0].AFTER_LAT);
                }
                else
                {
                    n.OPERATE_TYPE = "否决";
                }
                return(n.Updata(" and id=" + id));
            }
        }
示例#2
0
        public string PoiApply(string userName, string name, string position)
        {
            string cookies = HttpContext.Current.Request.Cookies["guid"] == null ? "" : HttpContext.Current.Request.Cookies["guid"].Value as string;
            string session = Session.SessionID.ToString();

            if (!cookies.Equals(session))
            {
                return("身份验证失败,请重新登录系统!");//身份验证失败
            }
            MLogin.GetExeUname();
            ClientService_kfku        k  = new ClientService_kfku();
            List <ClientService_kfku> ts = k.Select(" and name='" + name.Trim() + "' and zf29<>'' and zf30<>'' ");

            if (ts.Count > 0)
            {
                L_PushPoi p   = new L_PushPoi();
                string    sql = " select * from L_PushPoi a where not exists( " +
                                "  select 1 from L_PushPoi b where b.client = a.client and b.id > a.id) " +
                                "  and  client='" + name.Trim() + "' ";
                DataTable dt = DBLL.ExecuteDataTable(MyGlobal.DataBase, sql);
                if (dt != null && dt.Rows.Count > 0)
                {
                    string 当前单据状态 = dt.Rows[0]["OPERATE_TYPE"].ToString();
                    string 当前审核人  = dt.Rows[0]["ZF1"].ToString();
                    if (当前单据状态 != "已提交")//最新申请已被查看
                    {
                        p.ZF1          = "总经办";
                        p.BILLMAN      = userName;
                        p.OPERATE_TIME = SysTime.GetTime.ToString();
                        p.OPERATE_TYPE = "已提交";
                        p.CLIENT       = name;
                        p.BEFORE_LNG   = ts[0].ZF29;//原始定位
                        p.BEFORE_LAT   = ts[0].ZF30;
                        string[] po = position.Split(',');
                        p.AFTER_LNG = po[0];  //经度//现在请求定位
                        p.AFTER_LAT = po[1];  //纬度
                        p.Insert();
                        return("已提交审核至总经办!"); //已提交总经办审核
                    }
                    else//最新记录还在审核状态
                    {
                        return("定位还在审核,请勿重复提交!");//
                    }
                }
                else
                {
                    p.ZF1          = "销售内勤";
                    p.BILLMAN      = userName;
                    p.OPERATE_TIME = SysTime.GetTime.ToString();
                    p.OPERATE_TYPE = "已提交";
                    p.CLIENT       = name;
                    p.BEFORE_LNG   = ts[0].ZF29;//原始定位
                    p.BEFORE_LAT   = ts[0].ZF30;
                    string[] po = position.Split(',');
                    p.AFTER_LNG = po[0]; //经度//现在请求定位
                    p.AFTER_LAT = po[1]; //纬度
                    p.Insert();
                    return("已提交审核至销售内勤!");
                }
            }
            else
            {
                return("该客户尚未定位,无需申请修正!");//没有该用户
            }
        }