Exemplo n.º 1
0
        public ActionResult GetStandard(string RiskId)
        {
            string wheresql = "";

            ERCHTMS.Code.Operator user = ERCHTMS.Code.OperatorProvider.Provider.Current();
            if (user.IsSystem)
            {
                wheresql = "";
            }
            else
            {
                string where = new ERCHTMS.Busines.AuthorizeManage.AuthorizeBLL().GetModuleDataAuthority(ERCHTMS.Code.OperatorProvider.Provider.Current(), HttpContext.Request.Cookies["currentmoduleId"].Value);
                wheresql    += " and " + where;
            }

            string       Sta = hazarddetectionbll.GetStandard(RiskId, wheresql);
            ComboxEntity cmb = new ComboxEntity();

            if (Sta != null && Sta != "")
            {
                cmb.itemName  = "true";
                cmb.itemValue = Sta;
            }
            else
            {
                cmb.itemName  = "false";
                cmb.itemValue = "";
            }

            return(ToJsonResult(cmb));
        }
        public object GetArRiskCmbList([FromBody] JObject json)
        {
            try
            {
                string  res    = json.Value <string>("json");
                dynamic dy     = JsonConvert.DeserializeObject <ExpandoObject>(res);
                string  areaid = dy.data.areaid;
                string  userId = dy.userid;
                //获取用户基本信息
                OperatorProvider.AppUserId = userId;
                Operator user = OperatorProvider.Provider.Current();

                //先获取所有数据
                IEnumerable <HazardfactorsEntity> hlist = hazardfactorsbll.PhoneGetList(areaid, user.OrganizeCode);
                List <ComboxEntity> Rlist  = new List <ComboxEntity>();
                List <string>       conStr = new List <string>();//用于判断重复的集合
                foreach (HazardfactorsEntity item in hlist)
                {
                    ComboxEntity risk = new ComboxEntity();
                    risk.itemName  = item.RiskValue;
                    risk.itemValue = item.Riskid;
                    if (!conStr.Contains(item.RiskValue))
                    {
                        Rlist.Add(risk);//如果没有重复则加入
                        conStr.Add(item.RiskValue);
                    }
                }
                return(new { Code = 0, Count = Rlist.Count, Info = "获取数据成功", data = Rlist });
            }
            catch (Exception ex)
            {
                return(new { Code = -1, Count = 0, Info = ex.Message });
            }
        }
Exemplo n.º 3
0
        public ActionResult GetWzStatus()
        {
            List <ComboxEntity> Rlist = new List <ComboxEntity>();
            ComboxEntity        y1    = new ComboxEntity();

            y1.itemName  = "有";
            y1.itemValue = "0";
            ComboxEntity y2 = new ComboxEntity();

            y2.itemName  = "无";
            y2.itemValue = "1";
            Rlist.Add(y1);
            Rlist.Add(y2);
            return(ToJsonResult(Rlist));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 报警类型
        /// </summary>
        /// <returns></returns>
        public ActionResult GetCarCailthepolice()
        {
            List <ComboxEntity> Rlist = new List <ComboxEntity>();
            DataItemDetailBLL   pdata = new DataItemDetailBLL();
            ComboxEntity        y1    = new ComboxEntity();

            y1.itemName  = "越界报警";
            y1.itemValue = "1";
            ComboxEntity y2 = new ComboxEntity();

            y2.itemName  = "超速报警";
            y2.itemValue = "0";
            Rlist.Add(y1);
            Rlist.Add(y2);
            return(ToJsonResult(Rlist));
        }
Exemplo n.º 5
0
        /// <summary>
        /// 编码管理车辆进出场添加查询
        /// </summary>
        /// <returns></returns>
        public ActionResult GetCarInfo(string name)
        {
            List <ComboxEntity> Rlist = new List <ComboxEntity>();
            DataItemDetailBLL   pdata = new DataItemDetailBLL();
            var dt = pdata.GetDataItemListByItemName(name);

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow item in dt.Rows)
                {
                    ComboxEntity y1 = new ComboxEntity();
                    y1.itemName  = item[0].ToString();
                    y1.itemValue = item[1].ToString();
                    Rlist.Add(y1);
                }
            }
            return(ToJsonResult(Rlist));
        }
Exemplo n.º 6
0
        public ActionResult GetIsExcessiveCmbList()
        {
            List <ComboxEntity> Rlist = new List <ComboxEntity>();
            ComboxEntity        yes   = new ComboxEntity();

            yes.itemName  = "是";
            yes.itemValue = "1";

            ComboxEntity no = new ComboxEntity();

            no.itemName  = "否";
            no.itemValue = "0";

            Rlist.Add(yes);
            Rlist.Add(no);

            return(ToJsonResult(Rlist));
        }
Exemplo n.º 7
0
        public ActionResult GetRiskCmbList()
        {
            string   wheresql = "";
            Operator user     = ERCHTMS.Code.OperatorProvider.Provider.Current();

            if (user.IsSystem)
            {
                wheresql = "";
            }
            else
            {
                string where = new ERCHTMS.Busines.AuthorizeManage.AuthorizeBLL().GetModuleDataAuthority(ERCHTMS.Code.OperatorProvider.Provider.Current(), HttpContext.Request.Cookies["currentmoduleId"].Value);
                wheresql    += " and " + where;
            }

            //先获取所有数据
            DataTable           hlist  = hazardfactorsbll.GetList("", wheresql);
            List <ComboxEntity> Rlist  = new List <ComboxEntity>();
            List <string>       conStr = new List <string>();//用于判断重复的集合

            foreach (DataRow item in hlist.Rows)
            {
                string rv  = item["RISKVALUE"].ToString();
                string rid = item["RISKID"].ToString();


                ComboxEntity risk = new ComboxEntity();
                risk.itemName  = rv;
                risk.itemValue = rid;
                if (!conStr.Contains(rv))
                {
                    Rlist.Add(risk);//如果没有重复则加入
                    conStr.Add(rv);
                }
            }

            var data = Rlist;

            return(ToJsonResult(data));
        }
Exemplo n.º 8
0
        public ActionResult GetYearCmbList(string year, string dept)
        {
            List <ComboxEntity> cmbList = new List <ComboxEntity>();
            ComboxEntity        cmb     = new ComboxEntity();

            cmb.itemName  = "近5年";
            cmb.itemValue = "5";

            ComboxEntity cmb2 = new ComboxEntity();

            cmb2.itemName  = "近10年";
            cmb2.itemValue = "10";


            ComboxEntity cmb3 = new ComboxEntity();

            cmb3.itemName  = "全部";
            cmb3.itemValue = "0";

            cmbList.Add(cmb);
            cmbList.Add(cmb2);
            cmbList.Add(cmb3);
            return(ToJsonResult(cmbList));
        }
Exemplo n.º 9
0
        public ActionResult GetStatus()
        {
            List <ComboxEntity> Rlist = new List <ComboxEntity>();
            ComboxEntity        y1    = new ComboxEntity();

            y1.itemName  = "待审核";
            y1.itemValue = "1";

            //ComboxEntity y2 = new ComboxEntity();
            //y2.itemName = "已绑定GPS";
            //y2.itemValue = "2";

            ComboxEntity y3 = new ComboxEntity();

            y3.itemName  = "已入厂";
            y3.itemValue = "3";

            ComboxEntity y4 = new ComboxEntity();

            y4.itemName  = "已离厂";
            y4.itemValue = "4";

            ComboxEntity y5 = new ComboxEntity();

            y5.itemName  = "拒绝入厂";
            y5.itemValue = "99";

            Rlist.Add(y1);
            //Rlist.Add(y2);
            Rlist.Add(y3);
            Rlist.Add(y4);
            Rlist.Add(y5);


            return(ToJsonResult(Rlist));
        }