コード例 #1
0
        public static R_KqbcInfo GetDefaultKqbc()
        {
            R_KqbcInfo kqbc = new R_KqbcInfo();

            kqbc = r_KqbcService.GetDefaultKqbcCache(new RKqbcCacheGetByConditionRequest()).Data;
            return(kqbc);
        }
コード例 #2
0
        private DateTime GetFirstBcTime()
        {
            DateTime   firstBcTime = new DateTime();
            R_KqbcInfo defaultKqbc = r_KqbcService.GetDefaultKqbcCache(new RKqbcCacheGetByConditionRequest()).Data;

            if (defaultKqbc != null)
            {
                firstBcTime = DateTime.Parse(DateTime.Now.ToShortDateString() + " " + defaultKqbc.B1stime + ":00");
            }
            return(firstBcTime);
        }
コード例 #3
0
        private void cmb_adr_SelectedIndexChanged(object sender, EventArgs e)
        {
            obj.clear();

            R_KqbcInfo DefaultKqbc = r_KqbcService.GetDefaultKqbcCache(new RKqbcCacheGetByConditionRequest()).Data;

            List <R_PrealInfo>     prealInfoList     = r_PrealService.GetAllPrealCacheList(new RPrealCacheGetAllRequest()).Data;
            List <R_PersoninfInfo> personinfInfoList = r_PersoninfService.GetAllPersonInfoCache(new BasicRequest()).Data;
            List <Jc_DefInfo>      pointdefList      = personPointDefineService.GetAllPointDefineCache().Data;

            getmsg(DefaultKqbc, prealInfoList, personinfInfoList, pointdefList);
            realshow();
        }
コード例 #4
0
        private void fthread()
        {
            while (_isRun)
            {
                try
                {
                    R_KqbcInfo             DefaultKqbc       = r_KqbcService.GetDefaultKqbcCache(new RKqbcCacheGetByConditionRequest()).Data;
                    List <R_PrealInfo>     prealInfoList     = r_PrealService.GetAllPrealCacheList(new RPrealCacheGetAllRequest()).Data;
                    List <R_PersoninfInfo> personinfInfoList = r_PersoninfService.GetAllPersonInfoCache(new BasicRequest()).Data;
                    List <Jc_DefInfo>      pointdefList      = personPointDefineService.GetAllPointDefineCache().Data;

                    MethodInvoker In = new MethodInvoker(() => getmsg(DefaultKqbc, prealInfoList, personinfInfoList, pointdefList));
                    this.BeginInvoke(In);
                }
                catch (Exception ex)
                {
                    Basic.Framework.Logging.LogHelper.Error(ex);
                }
                Thread.Sleep(5000);
            }
        }
コード例 #5
0
        private void getmsg(R_KqbcInfo DefaultKqbc, List <R_PrealInfo> rPrealInfoList, List <R_PersoninfInfo> rPersoninfInfoList, List <Jc_DefInfo> pointdefList)
        {
            try
            {
                //计算今日下井人数
                obj.TodayNumberWells = rPrealInfoList.FindAll(a => a.Ontime >= GetFirstBcTime()).Count.ToString();
                //计算井下总人数
                obj.UndergroundNumber = rPrealInfoList.FindAll(a => a.Flag != "1").Count.ToString();


                obj.rPrealShowdt.Clear();
                //人员实时值
                List <R_PrealInfo> pointPrealList = rPrealInfoList.FindAll(a => a.Flag != "1");
                foreach (R_PrealInfo temppreal in pointPrealList)
                {
                    R_PersoninfInfo temppersoninf = rPersoninfInfoList.Find(a => a.Yid == temppreal.Yid);
                    object[]        prealObj      = new object[obj.rPrealShowdt.Columns.Count];
                    prealObj[0] = temppreal.Bh;
                    if (temppersoninf != null)
                    {
                        prealObj[1] = temppersoninf.Gh;
                    }
                    else
                    {
                        prealObj[1] = "";
                    }
                    if (temppersoninf != null)
                    {
                        prealObj[2] = temppersoninf.Name;
                    }
                    else
                    {
                        prealObj[2] = "";
                    }
                    if (temppersoninf != null)
                    {
                        prealObj[3] = temppersoninf.deptName;
                    }
                    else
                    {
                        prealObj[3] = "";
                    }
                    if (temppersoninf != null)
                    {
                        prealObj[4] = temppersoninf.zwDesc;
                    }
                    else
                    {
                        prealObj[4] = "";
                    }
                    if (temppersoninf != null)
                    {
                        prealObj[5] = temppersoninf.gzDesc;
                    }
                    else
                    {
                        prealObj[5] = "";
                    }
                    Jc_DefInfo tempdef = pointdefList.Find(a => a.PointID == temppreal.Pointid);
                    if (tempdef != null)
                    {
                        prealObj[6] = tempdef.Wz;
                    }
                    else
                    {
                        prealObj[6] = "";
                    }
                    prealObj[7] = temppreal.Rtime;
                    tempdef     = pointdefList.Find(a => a.PointID == temppreal.Uppointid);
                    if (tempdef != null)
                    {
                        prealObj[8] = tempdef.Wz;
                    }
                    else
                    {
                        prealObj[8] = "";
                    }
                    tempdef = pointdefList.Find(a => a.PointID == temppreal.Onpointid);
                    if (tempdef != null)
                    {
                        prealObj[9] = tempdef.Wz;
                    }
                    else
                    {
                        prealObj[9] = "";
                    }
                    prealObj[10] = temppreal.Ontime;
                    int tempRjsc = 0;
                    int.TryParse(temppreal.Rjsc, out tempRjsc);
                    prealObj[11] = tempRjsc / 60 + "小时" + tempRjsc % 60 + "分钟";
                    prealObj[12] = temppreal.BjtypeDesc;
                    obj.rPrealShowdt.Rows.Add(prealObj);
                }



                realshow();
            }
            catch (Exception ex)
            {
                Basic.Framework.Logging.LogHelper.Error(ex);
            }
        }