// GET: Statistics
        public ActionResult OnGetStatistics(string ztcode, string level, string func, string username, string before, string month)
        {
            StatusReport sr = new StatusReport();

            if (string.IsNullOrEmpty(level) || string.IsNullOrEmpty(func))
            {
                sr.status = "Fail";
                sr.result = "信息不完整";
                return(Json(sr));
            }
            switch (func)
            {
            case "收费统计":
                sr = ChargeDal.GetChargeStatistics(ztcode, level, username, month);
                break;

            case "工单统计":
                sr = RepairDal.GetRepairStatistics(ztcode, level, username, before);
                break;

            case "设备统计":
                sr = EquipmentDal.GetEquipmentStatistics(ztcode, level);
                break;

            case "投诉统计":
                sr = ComplainDal.GetComplainStatistics(ztcode, level, before);
                break;

            case "设备故障统计":
                sr = EquipmentDal.GetEquipmentTroubleStatistics(ztcode, level);
                break;
            }

            return(Json(sr));
        }
Пример #2
0
 public ActionResult OnGetChargeDetail(string ZTCode, string RoomNumber, string Name)
 {
     if (string.IsNullOrEmpty(RoomNumber) || string.IsNullOrEmpty(Name) || string.IsNullOrEmpty(ZTCode))
     {
         return(Json(new { status = "Fail", result = "信息不完整" }));
     }
     return(Json(ChargeDal.GetCharges(ZTCode, RoomNumber, Name)));
 }
Пример #3
0
 public ActionResult OnGetChargedDetail(string RoomNumber, string Name, string ZTCode, string startMonth, string endMonth)
 {
     if (string.IsNullOrEmpty(RoomNumber) || string.IsNullOrEmpty(Name) || string.IsNullOrEmpty(ZTCode) || string.IsNullOrEmpty(startMonth) || string.IsNullOrEmpty(endMonth))
     {
         return(Json(new { status = "Fail", result = "信息不完整" }));
     }
     return(Json(ChargeDal.GetChargedDetail(RoomNumber, Name, ZTCode, startMonth, endMonth)));
 }
Пример #4
0
        public ActionResult OnGetChargeList(string homeNumber, string name, string ztcode, string buildingNumber)
        {
            StatusReport sr = new StatusReport();

            if (string.IsNullOrEmpty(ztcode))
            {
                return(Json(new { status = "Fail", result = "信息不完整" }));
            }
            return(Json(ChargeDal.GetChargeList(homeNumber, name, ztcode, buildingNumber)));
        }
Пример #5
0
        public ActionResult OnGetIncomeAndExpenseStatistics(string level, string year)
        {
            StatusReport sr = new StatusReport();

            if (string.IsNullOrEmpty(level) || string.IsNullOrEmpty(year))
            {
                return(Json(sr.SetFail("请求数据不完整")));
            }
            if (level != "公司")
            {
                return(Json(sr.SetFail("没有此权限")));
            }
            return(Json(ChargeDal.GetIncomeAndExpenseStatistics(year)));
        }
Пример #6
0
        /// <summary>
        /// 财务_月收费统计
        /// </summary>
        /// <param name="ztcode">帐套代码</param>
        /// <param name="level">用户身份</param>
        /// <param name="startTime">开始时间</param>
        /// <returns></returns>
        public ActionResult OnGetMonthChargeStatistics(string ztcode, string level, string startTime, string endTime)
        {
            StatusReport sr = new StatusReport();

            if (string.IsNullOrEmpty(level) || string.IsNullOrEmpty(startTime))
            {
                sr.status = "Fail";
                sr.result = "信息不完整";
                return(Json(sr));
            }
            if (string.IsNullOrEmpty(endTime))
            {
                endTime = DateTime.Now.ToString();
            }

            sr = level == "公司" ? ChargeDal.GetMonthChargeStatisticsCompany(startTime, endTime) : ChargeDal.GetMonthChargeStatisticsProject(ztcode, startTime, endTime);
            return(Json(sr));
        }
Пример #7
0
 public ActionResult OnGetChargeStatistics(string ztcode, string level, string month, string ztName)
 {
     //StatusReport sr = new StatusReport();
     if (string.IsNullOrEmpty(level) || string.IsNullOrEmpty(month))
     {
         return(Json(new StatusReport().SetFail("信息不完整")));
     }
     if (level == "公司")
     {
         return(Json(ChargeDal.GetChargeStatisticsCompany(month)));
     }
     else if (level == "项目经理")
     {
         return(Json(ChargeDal.GetChargeStatisticsProject(month, ztcode, ztName)));
     }
     else
     {
         return(Json(new StatusReport().SetFail("没有权限")));
     }
 }
Пример #8
0
 public ActionResult OnSetCharges(string datetime, string proprietorName, string tradeNumber, string[] chargeIds)
 {
     //return Json(new { datetime = datetime, proprietorName = proprietorName, chargeIds = chargeIds });
     return(Json(ChargeDal.SetCharges(datetime, proprietorName, tradeNumber, chargeIds)));
 }
Пример #9
0
 public ActionResult OnGetCharges(string ztCode, string roomNumber, string userName)
 {
     return(Json(ChargeDal.GetCharges(ztCode, roomNumber, userName)));
 }
Пример #10
0
 public ActionResult OnGetChargeStatistics(string ztCode, string level, string userCode, string month)
 {
     return(Json(ChargeDal.GetChargeStatistics(ztCode, level, userCode, month), JsonRequestBehavior.AllowGet));
 }
Пример #11
0
 public ActionResult OnSetCharges(string datetime, string name, string[] chargeIds, string paymentMethod)
 {
     //return Json(new { datetime = datetime, proprietorName = proprietorName, chargeIds = chargeIds });
     return(Json(ChargeDal.SetCharges(datetime, name, chargeIds, paymentMethod)));
 }