master
lxw 6 months ago
parent 1f79d26f25
commit 9cd82fb7f1

@ -2,6 +2,7 @@
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Repository.Ammeter;
namespace Service.Ammeter
@ -17,7 +18,7 @@ namespace Service.Ammeter
this.BaseDal = service;
}
public async Task<PageResult<EmeterHourEnergy>> Page(PageAmmeterReq queryPageModel)
public async Task<Result<PageResult<EmeterHourEnergy>>> Page(PageAmmeterReq queryPageModel)
{
QueryPageModel queryPageModel1 = new QueryPageModel
{
@ -25,9 +26,9 @@ namespace Service.Ammeter
PageSize = queryPageModel.PageSize,
};
if (!string.IsNullOrEmpty(queryPageModel.Code))
return PageResult<EmeterHourEnergy>.ConvertPage(this.BaseDal.QueryIPageByCause(queryPageModel1, u => u.Code == queryPageModel.Code));
return Result<PageResult<EmeterHourEnergy>>.Success(PageResult<EmeterHourEnergy>.ConvertPage(this.BaseDal.QueryIPageByCause(queryPageModel1, u => u.Code == queryPageModel.Code)));
else
return PageResult<EmeterHourEnergy>.ConvertPage(this.BaseDal.QueryIPageByCause(queryPageModel1, null));
return Result<PageResult<EmeterHourEnergy>>.Success(PageResult<EmeterHourEnergy>.ConvertPage(this.BaseDal.QueryIPageByCause(queryPageModel1, null)));
}
}
}

@ -104,9 +104,9 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表变化值信息
/// </summary>
[HttpPost("TEgEmeterRealEnergyValue")]
public async Task<PageResult<EmeterMinutesEnergyChange>> GetEmeterMinutesEnergyChange([FromBody] PageAmmeterReq queryPageModel)
public async Task<Result<PageResult<EmeterMinutesEnergyChange>>> GetEmeterMinutesEnergyChange([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterMinutesEnergyChangeService.Page(queryPageModel);
return Result<PageResult<EmeterMinutesEnergyChange>>.Success(await _emeterMinutesEnergyChangeService.Page(queryPageModel));
}
/// <summary>
@ -133,7 +133,7 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表小时能耗值
/// </summary>
[HttpPost("TEgEmeterHourEnergyValue")]
public async Task<PageResult<EmeterHourEnergy>> GetEmeterHourEnergy([FromBody] PageAmmeterReq queryPageModel)
public async Task<Result<PageResult<EmeterHourEnergy>>> GetEmeterHourEnergy([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterHourEnergyService.Page(queryPageModel);
}
@ -161,9 +161,9 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表每天能耗值
/// </summary>
[HttpPost("TEgEmeterDayEnergyValue")]
public async Task<PageResult<EmeterDayEnergy>> GetEmeterDayEnergy([FromBody] PageAmmeterReq queryPageModel)
public async Task<Result<PageResult<EmeterDayEnergy>>> GetEmeterDayEnergy([FromBody] PageAmmeterReq queryPageModel)
{
return await _emeterDayEnergyService.Page(queryPageModel);
return Result<PageResult<EmeterDayEnergy>>.Success(await _emeterDayEnergyService.Page(queryPageModel));
}
/// <summary>

@ -33,10 +33,10 @@ public class ChargeMonitorController
/// 充电仓查询:条件:仓位编号 仓位名称
/// </summary>
[HttpPost("ChargePositionQuery")]
public async Task<PageResult<BinInfo>> ChargePositionQuery(
public async Task<Result<PageResult<BinInfo>>> ChargePositionQuery(
[FromBody] ChargePositionQueryReq chargePositionQueryReq)
{
return await _binInfoService.ChargePositionQuery(chargePositionQueryReq);
return Result<PageResult<BinInfo>>.Success( await _binInfoService.ChargePositionQuery(chargePositionQueryReq));
}
/// <summary>

@ -26,9 +26,9 @@ namespace WebStarter.Controllers
/// </summary>
/// <returns></returns>
[HttpPost("GetExStationDaySwapRunRes")]
public async Task<PageResult<ExchangeStationDayRunResult>> GetExStationDaySwapRunRes([FromBody] QueryPageModel queryPageModel)
public async Task<Result<PageResult<ExchangeStationDayRunResult>>> GetExStationDaySwapRunRes([FromBody] QueryPageModel queryPageModel)
{
return await _exStationDayRunResultService.ExStationDaySwapRunRes(queryPageModel);
return Result<PageResult<ExchangeStationDayRunResult>>.Success(await _exStationDayRunResultService.ExStationDaySwapRunRes(queryPageModel));
}
/// <summary>

@ -5,6 +5,7 @@ using Entity.DbModel.System;
using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Service.Station;
namespace WebStarter.Controllers.System;
@ -30,9 +31,9 @@ public class BatteryOpModelController
/// <returns></returns>
[HttpPost]
[Route("page")]
public async Task<PageResult<BatteryOpModel>> BatteryOpModelPageList([FromBody] PageBatteryOpReq input)
public async Task<Result<PageResult<BatteryOpModel>>> BatteryOpModelPageList([FromBody] PageBatteryOpReq input)
{
return await _batteryOpModelService.Page(input);
return Result<PageResult<BatteryOpModel>>.Success(await _batteryOpModelService.Page(input));
}
/// <summary>
@ -63,6 +64,7 @@ public class BatteryOpModelController
else
return Result<bool>.Fail(data);
}
/// <summary>
/// 删除电池运营模型
/// </summary>

@ -20,9 +20,9 @@ namespace WebStarter.Controllers.System.Dict
[HttpPost]
[Route("/api/sysDictData/page")]
public async Task<PageResult<SysDictData>> DictDataPage([FromBody][Required] PageDictDataReq pageDictDataInput)
public async Task<Result<PageResult<SysDictData>>> DictDataPage([FromBody][Required] PageDictDataReq pageDictDataInput)
{
return await _sysDictDataServices.Page(pageDictDataInput);
return Result<PageResult<SysDictData>>.Success(await _sysDictDataServices.Page(pageDictDataInput));
}
[HttpGet]

@ -19,9 +19,9 @@ namespace WebStarter.Controllers.System.Dict
[HttpPost]
[Route("api/sysDictType/page")]
public async Task<PageResult<SysDictType>> DictTypePage(PageDictTypeReq input)
public async Task<Result<PageResult<SysDictType>>> DictTypePage(PageDictTypeReq input)
{
return await _sysDictTypeService.Page(input);
return Result<PageResult<SysDictType>>.Success(await _sysDictTypeService.Page(input));
}
[HttpGet]

@ -36,9 +36,9 @@ namespace WebStarter.Controllers.System
[HttpPost]
[Route("page")]
public async Task<PageResult<SysConfig>> Page(PageConfigReq input)
public async Task<Result<PageResult<SysConfig>>> Page(PageConfigReq input)
{
return await _sysConfigService.Page(input);
return Result<PageResult<SysConfig>>.Success(await _sysConfigService.Page(input));
}
[HttpGet]

@ -23,9 +23,9 @@ namespace WebStarter.Controllers.System
[HttpPost]
[Route("/api/sysFile/page")]
public async Task<PageResult<SysFile>> Page(PageFileReq input)
public async Task<Result<PageResult<SysFile>>> Page(PageFileReq input)
{
return await _sysFileServices.Page(input);
return Result<PageResult<SysFile>>.Success(await _sysFileServices.Page(input));
}
[HttpPost]

@ -20,9 +20,9 @@ namespace WebStarter.Controllers.System.SysLog
[HttpPost]
[Route("api/sysLogDiff/page")]
public async Task<PageResult<SysLogDiff>> LogDiffPage(PageLogReq input)
public async Task<Result<PageResult<SysLogDiff>>> LogDiffPage(PageLogReq input)
{
return await _sysLogDiffService.Page(input);
return Result<PageResult<SysLogDiff>>.Success(await _sysLogDiffService.Page(input));
}
[HttpGet]

@ -20,9 +20,9 @@ namespace WebStarter.Controllers.System.SysLog
[HttpPost]
[Route("api/sysLogEx/page")]
public async Task<PageResult<SysLogEx>> LogExPage(PageLogReq input)
public async Task<Result<PageResult<SysLogEx>>> LogExPage(PageLogReq input)
{
return await _sysLogExService.Page(input);
return Result<PageResult<SysLogEx>>.Success(await _sysLogExService.Page(input));
}
[HttpPost]

@ -19,9 +19,9 @@ namespace WebStarter.Controllers.System.SysLog
[HttpPost]
[Route("api/sysLogOp/page")]
public async Task<PageResult<SysLogOp>> LogOpPage(PageLogReq input)
public async Task<Result<PageResult<SysLogOp>>> LogOpPage(PageLogReq input)
{
return await _sysLogOpService.Page(input);
return Result<PageResult<SysLogOp>>.Success(await _sysLogOpService.Page(input));
}
[HttpPost]

@ -27,9 +27,9 @@ namespace WebStarter.Controllers.System.SysLog
[HttpPost]
[Route("api/sysLogVis/page")]
public async Task<PageResult<SysLogVis>> LogVisPage(PageLogReq input)
public async Task<Result<PageResult<SysLogVis>>> LogVisPage(PageLogReq input)
{
return await _sysLogVisService.Page(input);
return Result<PageResult<SysLogVis>>.Success(await _sysLogVisService.Page(input));
}
}
}

@ -27,9 +27,9 @@ namespace WebStarter.Controllers.System
/// <returns></returns>
[HttpPost]
[Route("api/sysRole/page")]
public async Task<PageResult<SysRole>> RolePage(PageRoleReq input)
public async Task<Result<PageResult<SysRole>>> RolePage(PageRoleReq input)
{
return await _sysRoleServices.Page(input);
return Result<PageResult<SysRole>>.Success(await _sysRoleServices.Page(input));
}
/// <summary>

@ -27,9 +27,9 @@ namespace WebStarter.Controllers.System
/// <returns></returns>
[HttpPost]
[Route("api/sysUser/page")]
public async Task<PageResult<SysUser>> UserPageList([FromBody] PageUserReq input)
public async Task<Result<PageResult<SysUser>>> UserPageList([FromBody] PageUserReq input)
{
return await _sysUserService.Page(input);
return Result<PageResult<SysUser>>.Success(await _sysUserService.Page(input));
}
//UpdateUser
[HttpPost]

@ -1,6 +1,6 @@
{
"Version": 1,
"Hash": "PUkZxlgk8KRfiyiYD55Dczq9Q9JYZyET99LUbVltauo=",
"Hash": "kIfehZk8TWWy62IgCKeVJMphEP8JJ0AGeTvs9NqLTfU=",
"Source": "WebStarter",
"BasePath": "_content/WebStarter",
"Mode": "Default",
@ -10,17 +10,17 @@
{
"Name": "WebStarter\\wwwroot",
"Source": "WebStarter",
"ContentRoot": "D:\\RiderProjects\\hn_back_main\\WebStarter\\wwwroot\\",
"ContentRoot": "D:\\lxw\\work\\pro\\c#\\hn_back_main\\WebStarter\\wwwroot\\",
"BasePath": "_content/WebStarter",
"Pattern": "**"
}
],
"Assets": [
{
"Identity": "D:\\RiderProjects\\hn_back_main\\WebStarter\\wwwroot\\20240523\\0.jpg",
"Identity": "D:\\lxw\\work\\pro\\c#\\hn_back_main\\WebStarter\\wwwroot\\20240523\\0.jpg",
"SourceId": "WebStarter",
"SourceType": "Discovered",
"ContentRoot": "D:\\RiderProjects\\hn_back_main\\WebStarter\\wwwroot\\",
"ContentRoot": "D:\\lxw\\work\\pro\\c#\\hn_back_main\\WebStarter\\wwwroot\\",
"BasePath": "_content/WebStarter",
"RelativePath": "20240523/0.jpg",
"AssetKind": "All",
@ -36,10 +36,10 @@
"OriginalItemSpec": "wwwroot\\20240523\\0.jpg"
},
{
"Identity": "D:\\RiderProjects\\hn_back_main\\WebStarter\\wwwroot\\20240524\\0.jpg",
"Identity": "D:\\lxw\\work\\pro\\c#\\hn_back_main\\WebStarter\\wwwroot\\20240524\\0.jpg",
"SourceId": "WebStarter",
"SourceType": "Discovered",
"ContentRoot": "D:\\RiderProjects\\hn_back_main\\WebStarter\\wwwroot\\",
"ContentRoot": "D:\\lxw\\work\\pro\\c#\\hn_back_main\\WebStarter\\wwwroot\\",
"BasePath": "_content/WebStarter",
"RelativePath": "20240524/0.jpg",
"AssetKind": "All",
@ -55,10 +55,10 @@
"OriginalItemSpec": "wwwroot\\20240524\\0.jpg"
},
{
"Identity": "D:\\RiderProjects\\hn_back_main\\WebStarter\\wwwroot\\20240524\\0.png",
"Identity": "D:\\lxw\\work\\pro\\c#\\hn_back_main\\WebStarter\\wwwroot\\20240524\\0.png",
"SourceId": "WebStarter",
"SourceType": "Discovered",
"ContentRoot": "D:\\RiderProjects\\hn_back_main\\WebStarter\\wwwroot\\",
"ContentRoot": "D:\\lxw\\work\\pro\\c#\\hn_back_main\\WebStarter\\wwwroot\\",
"BasePath": "_content/WebStarter",
"RelativePath": "20240524/0.png",
"AssetKind": "All",

Loading…
Cancel
Save