2021-05-27 16:58:40 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
|
using Waste.Application;
|
|
|
|
|
using Waste.Domain;
|
|
|
|
|
|
|
|
|
|
namespace Waste.Web.Entry.Pages.CountInfo
|
|
|
|
|
{
|
|
|
|
|
public class IndexModel : PageModel
|
|
|
|
|
{
|
|
|
|
|
public string defaulttime = "";
|
|
|
|
|
public List<W_Business> businesslist = new List<W_Business>();
|
|
|
|
|
public List<W_WasteType> wastetypelist = new List<W_WasteType>();
|
2021-05-30 16:02:38 +08:00
|
|
|
public BusinessReport data = new BusinessReport();
|
2021-05-27 16:58:40 +08:00
|
|
|
private IBusinessService _businessService;
|
|
|
|
|
private IWasteService _wasteService;
|
|
|
|
|
public IndexModel(IBusinessService businessService,IWasteService wasteService)
|
|
|
|
|
{
|
|
|
|
|
_businessService = businessService;
|
|
|
|
|
_wasteService = wasteService;
|
|
|
|
|
}
|
|
|
|
|
public async Task OnGetAsync()
|
|
|
|
|
{
|
|
|
|
|
defaulttime = $"{DateTime.Now.AddDays(-7).ToString("yyyy/MM/dd")} ~ {DateTime.Now.AddDays(-1).ToString("yyyy/MM/dd")}";
|
|
|
|
|
businesslist = await _businessService.GetAllList();
|
|
|
|
|
wastetypelist = await _wasteService.GetAllTypeList();
|
2021-05-30 16:02:38 +08:00
|
|
|
data = await _businessService.GetBusinessTotalInfo();
|
2021-05-27 16:58:40 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|