You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Entity.Ammeter;
|
|
|
|
|
using Entity.Dto.Req;
|
|
|
|
|
using HybirdFrameworkCore.Autofac.Attribute;
|
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
|
using Repository.Ammeter;
|
|
|
|
|
|
|
|
|
|
namespace Service.Ammeter
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Scope("SingleInstance")]
|
|
|
|
|
public class EmeterHourEnergyService: BaseServices<EmeterHourEnergy>
|
|
|
|
|
{
|
|
|
|
|
public EmeterHourEnergyService(EmeterHourEnergyRepository service)
|
|
|
|
|
{
|
|
|
|
|
this.BaseDal = service;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<Result<PageResult<EmeterHourEnergy>>> Page(PageAmmeterReq queryPageModel)
|
|
|
|
|
{
|
|
|
|
|
QueryPageModel queryPageModel1 = new QueryPageModel
|
|
|
|
|
{
|
|
|
|
|
PageNum = queryPageModel.PageNum,
|
|
|
|
|
PageSize = queryPageModel.PageSize,
|
|
|
|
|
};
|
|
|
|
|
if (!string.IsNullOrEmpty(queryPageModel.Code))
|
|
|
|
|
return Result<PageResult<EmeterHourEnergy>>.Success(PageResult<EmeterHourEnergy>.ConvertPage(this.BaseDal.QueryIPageByCause(queryPageModel1, u => u.Code == queryPageModel.Code)));
|
|
|
|
|
else
|
|
|
|
|
return Result<PageResult<EmeterHourEnergy>>.Success(PageResult<EmeterHourEnergy>.ConvertPage(this.BaseDal.QueryIPageByCause(queryPageModel1, null)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|