예제 #1
0
        // string url = "http://192.168.1.160:9000/tms/searchMuliExitsAjax.do";
        /// <summary>
        /// 验证车牌
        /// </summary>
        /// <param name="context"></param>
        public void VerifyLicensePlate(HttpContext context)
        {
            var               cph      = context.Request.Params["cph"].ToString().Replace(",", ";");
            string            logid    = context.Request.Params["logid"];
            string            token    = HttpUtility.UrlEncode(DESEncrypt(userid, "tms&sgt#"));
            string            param    = "userId=" + userid + "&token=" + token + "&vnos=" + HttpUtility.UrlEncode(cph, Encoding.UTF8);
            string            ret      = PostWebRequest(url, param, Encoding.UTF8);
            KyMapResponseData KymapRes = new KyMapResponseData();

            KymapRes = JsonConvert.DeserializeObject <KyMapResponseData>(ret);

            if (KymapRes.code == "0" || KymapRes.code == "3")
            {
                res.result = true;
                res.data   = param;
                if (KymapRes.code == "3")
                {
                    res.msg   = KymapRes.result;
                    res.sfcph = KymapRes.result;
                    res.data  = "userId=" + userid + "&token=" + token + "&vnos="
                                + HttpUtility.UrlEncode(KymapRes.result.Replace(",", ";").TrimEnd(';'), Encoding.UTF8);
                }
                if (string.IsNullOrEmpty(logid))
                {
                    Interfaces.Service.KyMapService serv = new Interfaces.Service.KyMapService();
                    serv.InsertMapLog(userid, token, cph, res.msg);
                    res.sfcph = KymapRes.result;
                }
            }
            else if (KymapRes.code == "1" || KymapRes.code == "2")
            {
                res.result = false;
                res.msg    = KymapRes.des;
            }
        }
예제 #2
0
        /// <summary>
        /// 获取车牌列表
        /// </summary>
        public void getLicensePlateList(HttpContext context)
        {
            int    page     = int.Parse(request.Params["page"]);
            int    pageSize = int.Parse(request.Params["rows"]);
            string sort     = request.Params["sort"];
            string order    = request.Params["order"];

            if (page <= 0)
            {
                page = 1;
            }

            string from        = request.Params["from"].ToString();
            string to          = request.Params["to"].ToString();
            string zt          = request.Params["zt"].ToString();
            string gl          = request.Params["gl"].ToString();
            string pc          = request.Params["pc"].ToString();
            string jyddsdsc_xs = request.Params["jyddsdsc_xs"].ToString();
            string mdd         = request.Params["mdd"].ToString();
            string jdrhkh      = request.Params["jdrhkh"].ToString();

            //string jyddsdsc = request.Params["jyddsdsc"].ToString();
            Interfaces.Service.KyMapService serv = new Interfaces.Service.KyMapService();
            var Dlwtf = QsWebSoft.AppService.GetDlwtf();

            var list  = serv.getCarMapList(from, to, zt, gl, pc, jyddsdsc_xs, Dlwtf, mdd, jdrhkh, pageSize, page, sort, order);
            int count = serv.getCarMapCount(from, to, zt, gl, pc, jyddsdsc_xs, Dlwtf, mdd, jdrhkh);

            res.rows  = list;
            res.total = count;
        }
예제 #3
0
        /// <summary>
        /// 查询历史记录
        /// </summary>
        public void GetMapViewHistory(HttpContext context)
        {
            Interfaces.Service.KyMapService serv = new Interfaces.Service.KyMapService();
            var list = serv.getCarMapHistory(userid);

            res.result = true;
            res.rows   = list;
        }