示例#1
0
        public IActionResult TreatWorkOfStation(string timeRange, string stTime, string endTime //,int pageIndex=1,int pageSize=20
                                                )
        {
            DateTime?dt0 = Convert.ToDateTime(stTime), dt1 = Convert.ToDateTime(endTime);

            base.initialData_TimeRange(ref dt0, ref dt1, timeRange: timeRange); //时间初始化
                                                                                //  base.initialData_Page(ref pageIndex, ref pageSize); //分页的初始
            var model = new StatisticsCBL(this).TreatWorkOfStationCBL(dt0.Value, dt1.Value);

            return(View(model));
        }
示例#2
0
        private IEnumerable <ChargeType> GetFinaceChartType(int?stationId, string timeRange)
        {
            DateTime?sTime = null, eTime = null;

            base.initialData_TimeRange(ref sTime, ref eTime, timeRange: timeRange); //时间初始化
            if (!stationId.HasValue)
            {
                stationId = UserSelf.StationId;
            }
            var model = new StatisticsCBL(this).ChargeTypeChartCBL(sTime.Value, eTime.Value, stationId.Value);

            return(model);
        }
示例#3
0
        public IActionResult LoadFinaceChart_Gain(int?stationId, string timeRange = "Last3Days")
        {
            DateTime dt = DateTime.Now;
            DateTime?sTime = null, eTime = null;

            base.initialData_TimeRange(ref sTime, ref eTime, timeRange: timeRange); //时间初始化
            if (!stationId.HasValue)
            {
                stationId = UserSelf.StationId;
            }
            var             model    = new StatisticsCBL(this).GainChartCBL(sTime.Value, eTime.Value, stationId.Value);
            List <TitleVal> partList = new List <TitleVal>()
            {
                new TitleVal {
                    Title = "中药", Val = model.Sum(m => m.HerbVal)
                },
                new TitleVal {
                    Title = "成药", Val = model.Sum(m => m.FormedVal)
                },
                new TitleVal {
                    Title = "诊金", Val = model.Sum(m => m.ConsultationVal)
                },
                new TitleVal {
                    Title = "快递", Val = model.Sum(m => m.ShippingVal)
                },
                new TitleVal {
                    Title = "其他", Val = model.Sum(m => m.OtherFeeVal)
                },
            };

            //ViewBag.Total = new TitleVal { Title = "总计", Val = model.Sum(m => m.TotalVal) };
            //ViewBag.PartList = partList;
            //return PartialView("_pvLoadFinaceChart_Gain", model);

            return(TryCatchFunc(d =>
            {
                d.total = new TitleVal {
                    Title = "总计", Val = model.Sum(m => m.TotalVal)
                };
                d.partList = partList;
                d.items = model;
                return null;
            }));
        }
示例#4
0
        public IActionResult LoadGainChartOfNetWebFinace(int?stationId, int?supplierId, string timeRange = "Last3Days")
        {
            DateTime dt = DateTime.Now;
            DateTime?sTime = null, eTime = null;

            base.initialData_TimeRange(ref sTime, ref eTime, timeRange: timeRange); //时间初始化
            if (!stationId.HasValue)
            {
                stationId = UserSelf.StationId;
            }
            if (!supplierId.HasValue)
            {
                supplierId = MPS.DefaultSupplierId;
            }

            var             model    = new StatisticsCBL(this).GainOfWebNetSended(stationId.Value, supplierId.Value, sTime.Value, eTime.Value);
            List <TitleVal> partList = new List <TitleVal>()
            {
                new TitleVal {
                    Title = "快递费", Val = model.Sum(m => m.TransFeeAmount)
                },
                new TitleVal {
                    Title = "药品费", Val = model.Sum(m => m.TotalAmount) - model.Sum(m => m.TransFeeAmount)
                }
            };

            //ViewBag.Total = new TitleVal { Title = "总计", Val = model.Sum(m => m.TotalVal) };
            //ViewBag.PartList = partList;
            //return PartialView("_pvLoadFinaceChart_Gain", model);

            return(TryCatchFunc(d =>
            {
                d.total = new TitleVal {
                    Title = "总计", Val = model.Sum(m => m.TotalAmount)
                };
                d.partList = partList;
                d.items = model;
                return null;
            }));
        }