zw
lxw 6 months ago
parent 1f79d26f25
commit 9cd82fb7f1

@ -2,6 +2,7 @@
using Entity.Dto.Req; using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity; using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Repository.Ammeter; using Repository.Ammeter;
namespace Service.Ammeter namespace Service.Ammeter
@ -17,7 +18,7 @@ namespace Service.Ammeter
this.BaseDal = service; this.BaseDal = service;
} }
public async Task<PageResult<EmeterHourEnergy>> Page(PageAmmeterReq queryPageModel) public async Task<Result<PageResult<EmeterHourEnergy>>> Page(PageAmmeterReq queryPageModel)
{ {
QueryPageModel queryPageModel1 = new QueryPageModel QueryPageModel queryPageModel1 = new QueryPageModel
{ {
@ -25,9 +26,9 @@ namespace Service.Ammeter
PageSize = queryPageModel.PageSize, PageSize = queryPageModel.PageSize,
}; };
if (!string.IsNullOrEmpty(queryPageModel.Code)) 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 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> /// </summary>
[HttpPost("TEgEmeterRealEnergyValue")] [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> /// <summary>
@ -133,7 +133,7 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表小时能耗值 /// 统计分析/电能表小时能耗值
/// </summary> /// </summary>
[HttpPost("TEgEmeterHourEnergyValue")] [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); return await _emeterHourEnergyService.Page(queryPageModel);
} }
@ -161,9 +161,9 @@ namespace WebStarter.Controllers.Ammeter
/// 统计分析/电能表每天能耗值 /// 统计分析/电能表每天能耗值
/// </summary> /// </summary>
[HttpPost("TEgEmeterDayEnergyValue")] [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> /// <summary>

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

@ -26,9 +26,9 @@ namespace WebStarter.Controllers
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost("GetExStationDaySwapRunRes")] [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> /// <summary>

@ -5,6 +5,7 @@ using Entity.DbModel.System;
using Entity.Dto.Req; using Entity.Dto.Req;
using HybirdFrameworkCore.Entity; using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Service.Station; using Service.Station;
namespace WebStarter.Controllers.System; namespace WebStarter.Controllers.System;
@ -30,9 +31,9 @@ public class BatteryOpModelController
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("page")] [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> /// <summary>
@ -47,7 +48,7 @@ public class BatteryOpModelController
var data = await _batteryOpModelService.AddBatteryOpModel(input); var data = await _batteryOpModelService.AddBatteryOpModel(input);
return Result<string>.Success(data); return Result<string>.Success(data);
} }
/// <summary> /// <summary>
/// 更新电池运营模型 /// 更新电池运营模型
/// </summary> /// </summary>
@ -63,6 +64,7 @@ public class BatteryOpModelController
else else
return Result<bool>.Fail(data); return Result<bool>.Fail(data);
} }
/// <summary> /// <summary>
/// 删除电池运营模型 /// 删除电池运营模型
/// </summary> /// </summary>
@ -70,7 +72,7 @@ public class BatteryOpModelController
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("delete")] [Route("delete")]
public async Task<Result<bool>> DeleteBatteryOpModel([FromBody][Required] DeleteBatteryOpReq input) public async Task<Result<bool>> DeleteBatteryOpModel([FromBody] [Required] DeleteBatteryOpReq input)
{ {
var data = await _batteryOpModelService.DeleteBatteryOpModel(input); var data = await _batteryOpModelService.DeleteBatteryOpModel(input);
if (data) if (data)

@ -20,9 +20,9 @@ namespace WebStarter.Controllers.System.Dict
[HttpPost] [HttpPost]
[Route("/api/sysDictData/page")] [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] [HttpGet]

@ -19,9 +19,9 @@ namespace WebStarter.Controllers.System.Dict
[HttpPost] [HttpPost]
[Route("api/sysDictType/page")] [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] [HttpGet]

@ -36,9 +36,9 @@ namespace WebStarter.Controllers.System
[HttpPost] [HttpPost]
[Route("page")] [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] [HttpGet]

@ -23,9 +23,9 @@ namespace WebStarter.Controllers.System
[HttpPost] [HttpPost]
[Route("/api/sysFile/page")] [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] [HttpPost]

@ -20,9 +20,9 @@ namespace WebStarter.Controllers.System.SysLog
[HttpPost] [HttpPost]
[Route("api/sysLogDiff/page")] [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] [HttpGet]

@ -20,9 +20,9 @@ namespace WebStarter.Controllers.System.SysLog
[HttpPost] [HttpPost]
[Route("api/sysLogEx/page")] [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] [HttpPost]

@ -19,9 +19,9 @@ namespace WebStarter.Controllers.System.SysLog
[HttpPost] [HttpPost]
[Route("api/sysLogOp/page")] [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] [HttpPost]

@ -27,9 +27,9 @@ namespace WebStarter.Controllers.System.SysLog
[HttpPost] [HttpPost]
[Route("api/sysLogVis/page")] [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> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("api/sysRole/page")] [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> /// <summary>

@ -27,9 +27,9 @@ namespace WebStarter.Controllers.System
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("api/sysUser/page")] [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 //UpdateUser
[HttpPost] [HttpPost]

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

Loading…
Cancel
Save