示例#1
0
        public Index_ModelforA5dot2Tab2 jdcSummy(DateTime time)
        {
            Index_ModelforA5dot2Tab2 jdcSummy = new Index_ModelforA5dot2Tab2();

            jdcSummy.Am     = new List <A5dot2Tab2>();
            jdcSummy.Hm     = new List <A5dot2Tab2>();
            ViewBag.curtime = DateTime.Now.ToString();
            ViewBag.curuser = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
            string yearandmonth = time.Year + "年" + time.Month;

            List <A5dot2Tab2> miss = Sx.jdcsum(yearandmonth);

            foreach (var item in miss)
            {
                A5dot2Tab2 a = new A5dot2Tab2();
                a.cjName             = item.cjName;
                a.zzName             = item.zzName;
                a.sbGyCode           = item.sbGyCode;
                a.sbCode             = item.sbCode;
                a.problemDescription = item.problemDescription;
                a.Id = item.Id;
                jdcSummy.Am.Add(a);
            }
            return(jdcSummy);
        }
示例#2
0
        public Index_ModelforA5dot2Tab2 getRecordforIndex()
        {
            Index_ModelforA5dot2Tab2 record = new Index_ModelforA5dot2Tab2();

            record.Am       = new List <A5dot2Tab2>();
            ViewBag.curtime = DateTime.Now.ToString();
            ViewBag.curuser = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
            DateTime time         = DateTime.Now;
            string   yearandmonth = "";

            if (time.Day > 15)
            {
                time         = time.AddMonths(+1);
                yearandmonth = time.Year + "年" + time.Month;
                //record.title = time.Year.ToString() + "-" + time.AddMonths(1).Month.ToString() + "月" + "最脏十台机泵";
            }
            else if (time.Day < 15)
            {
                yearandmonth = time.Year + "年" + time.Month;
                //record.title = time.Year.ToString() + "-" + time.Month.ToString() + "月" + "最脏十台机泵";
            }
            record.title = "2016-8月最脏十台机泵";
            List <A5dot2Tab2> miss = Sx.jdcsum("2016年8");

            foreach (var item in miss)
            {
                A5dot2Tab2 a = new A5dot2Tab2();
                //List<A5dot2Tab1> uncomplete = Sx.uncom(item.sbCode,time);
                a.cjName              = item.cjName;
                a.zzName              = item.zzName;
                a.sbGyCode            = item.sbGyCode;
                a.sbCode              = item.sbCode;
                a.sbType              = item.sbType;
                a.nProblemsInCurMonth = item.nProblemsInCurMonth;
                a.nProblemsInCurYear  = item.nProblemsInCurYear;//这台最脏设备累计未整改数
                a.problemDescription  = item.problemDescription;
                //string lastmonth = time.Year + "年" + (time.Month-1);
                //string lastmp = Sx.lastmonthproblem(lastmonth, item.sbCode);
                //if(lastmp!=null)
                //{


                //string[] distiproblem = lastmp.Split(new char[] { '$' });
                //for (int i = 0; i < distiproblem.Length;i++ )
                //{
                //    if(distiproblem[i].Contains("(未整改)"))
                //    {
                //        string[] str = distiproblem[i].Split(new[] { "(未整改)" }, StringSplitOptions.None);
                //        a.problemDescription= a.problemDescription+"$"+str[0] + "(上月未整改)";
                //    }
                //}
                //}

                a.Id = item.Id;
                record.Am.Add(a);
            }
            return(record);
        }
示例#3
0
        public Index_ModelforA5dot2Tab2 getRecord_detailTab2(DateTime time)
        {
            Index_ModelforA5dot2Tab2 RecordforA5dot2Tab2 = new Index_ModelforA5dot2Tab2();

            RecordforA5dot2Tab2.Am = new List <A5dot2Tab2>();
            RecordforA5dot2Tab2.Hm = new List <A5dot2Tab2>();
            ViewBag.curtime        = DateTime.Now.ToString();
            ViewBag.curuser        = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name;
            string yearandmonth = time.Year + "年" + time.Month;

            List <A5dot2Tab2> miss = Sx.GetA5dot2Tab2ItemForPq(yearandmonth);

            foreach (var item in miss)
            {
                A5dot2Tab2 a = new A5dot2Tab2();
                a.cjName              = item.cjName;
                a.zzName              = item.zzName;
                a.sbGyCode            = item.sbGyCode;
                a.sbCode              = item.sbCode;
                a.nProblemsInCurMonth = item.nProblemsInCurMonth;
                a.nProblemsInCurYear  = Sx.GetnProblemsInYearItem(item.sbCode);
                a.Id = item.Id;
                RecordforA5dot2Tab2.Am.Add(a);
            }
            //List<A5dot2Tab1> miss = Sx.GetSxItem_detail(IntId);
            //foreach (var item in miss)
            //{
            //    A5dot2Tab1 a = new A5dot2Tab1();
            //    a.cjName = item.cjName;
            //    a.zzName = item.zzName;
            //    a.sbGyCode = item.sbGyCode;
            //    a.sbCode = item.sbCode;
            //    a.sbType = item.sbType;
            //    a.zyType = item.zyType;
            //    a.problemDescription = item.problemDescription;
            //    a.temp1 = Convert.ToString(miss.IndexOf(item) + 1);
            //    a.state = item.state;
            //    a.Id = item.Id;
            //    RecordforA5dot2.Am.Add(a);
            //}

            return(RecordforA5dot2Tab2);
        }