Example #1
0
        public JsonResult GetGZTZ()
        {
            int month = 1;

            if (DateTime.Now.Month < 4)
            {
                month = 1;
            }
            else if (DateTime.Now.Month < 7)
            {
                month = 4;
            }
            else if (DateTime.Now.Month < 10)
            {
                month = 7;
            }
            else if (DateTime.Now.Month <= 12)
            {
                month = 10;
            }
            DateTime sdt  = new DateTime(DateTime.Now.Year, month, 1);
            var      user = OperatorProvider.Provider.Current();

            if (user.DeptId == "0")
            {
                user.DeptCode = "0";
            }

            var total = 0;

            var list = workmeetingbll.GetData(10000, 1, out total, new Dictionary <string, string>()
            {
                { "departmentid", user.DeptId }, { "meetingstarttime", sdt.ToString("yyyy-MM-dd") }
            });
            int count1 = total;

            //var list1 = workmeetingbll.GetBaseDataNew("", 10000, 1, out total).Where(x => x.CreateDate > sdt);
            int count2 = service.GetAllDanger(user.DeptCode, sdt.ToString("yyyy-MM-dd"));

            int count3 = service.GetAllActivity(user.DeptCode, sdt.ToString("yyyy-MM-dd"));
            int count4 = service.GetAllEducation(user.DeptCode, sdt.ToString("yyyy-MM-dd"));
            int count5 = service.GetAllLllegal(user.DeptId, sdt.ToString("yyyy-MM-dd"));
            int count6 = service.GetAllEmergencyWork(user.DeptName, sdt.ToString("yyyy-MM-dd"));
            int count7 = service.GetAllToolborrow(user.DeptCode, sdt.ToString("yyyy-MM-dd"));
            int count8 = service.GetAllGlassStock(user.DeptCode, sdt.ToString("yyyy-MM-dd"));

            return(Json(new { count1 = count1, count2 = count2, count3 = count3, count4 = count4, count5 = count5, count6 = count6, count7 = count7, count8 = count8 }));
        }