From 666510a3164c458f3366ef534f2a05009ff9c26d Mon Sep 17 00:00:00 2001
From: tq <1916474859@qq,com>
Date: Thu, 6 Jun 2024 19:10:46 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=94=B5=E6=B1=A0=E8=BF=90?=
=?UTF-8?q?=E8=90=A5=E6=A8=A1=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Entity/Dto/ChargeOrderDto.cs | 2 +-
Entity/Dto/Req/BatteryOpModelDetailReq.cs | 25 +++++++++
.../BatteryOpModelDetailController.cs | 52 +++++++++++++++++++
.../Controllers/EquipAlarmRecordController.cs | 4 +-
4 files changed, 80 insertions(+), 3 deletions(-)
create mode 100644 Entity/Dto/Req/BatteryOpModelDetailReq.cs
create mode 100644 WebStarter/Controllers/BatteryOpModelDetailController.cs
diff --git a/Entity/Dto/ChargeOrderDto.cs b/Entity/Dto/ChargeOrderDto.cs
index 4ad17bb..9b80f09 100644
--- a/Entity/Dto/ChargeOrderDto.cs
+++ b/Entity/Dto/ChargeOrderDto.cs
@@ -293,7 +293,7 @@ public class ChargeOrderDto
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
///
- [ExporterHeader(DisplayName = "更新时间", IsBold = true)]
+ [ExporterHeader(DisplayName = "更新时间", IsBold = true,Width = 25)]
public DateTime? UpdatedTime { get; set; }
diff --git a/Entity/Dto/Req/BatteryOpModelDetailReq.cs b/Entity/Dto/Req/BatteryOpModelDetailReq.cs
new file mode 100644
index 0000000..76d576d
--- /dev/null
+++ b/Entity/Dto/Req/BatteryOpModelDetailReq.cs
@@ -0,0 +1,25 @@
+using Entity.DbModel.Station;
+using HybirdFrameworkCore.Entity;
+
+namespace Entity.Dto.Req;
+
+public class BatteryOpModelDetailReq
+{
+}
+
+public class PageBatteryOpModelDetailReq : QueryPageModel
+{
+ public string BatteryType { get; set; }
+}
+
+public class AddBatteryOpModelDetailReq : BatteryOpModelDetail
+{
+}
+
+public class UpdateBatteryOpModelDetailReq : AddBatteryOpModelDetailReq
+{
+}
+
+public class DeleteBatteryOpModelDetailReq : BaseIdReq
+{
+}
\ No newline at end of file
diff --git a/WebStarter/Controllers/BatteryOpModelDetailController.cs b/WebStarter/Controllers/BatteryOpModelDetailController.cs
new file mode 100644
index 0000000..9fb730e
--- /dev/null
+++ b/WebStarter/Controllers/BatteryOpModelDetailController.cs
@@ -0,0 +1,52 @@
+using System.ComponentModel.DataAnnotations;
+using Entity.DbModel.Station;
+using Entity.Dto.Req;
+using HybirdFrameworkCore.Entity;
+using Microsoft.AspNetCore.Mvc;
+using Service.Station;
+
+namespace WebStarter.Controllers;
+
+///
+/// 电池运营模型
+///
+[ApiController]
+[Route("api/[controller]")]
+public class BatteryOpModelDetailController
+{
+ private readonly BatteryOpModelDetailService _batteryOpModelDetailService;
+
+ public BatteryOpModelDetailController(BatteryOpModelDetailService batteryOpModelService)
+ {
+ _batteryOpModelDetailService = batteryOpModelService;
+ }
+
+ ///
+ /// 获取电池运营模型分页列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("page")]
+ public async Task> BatteryOpModelPageList(
+ [FromBody] PageBatteryOpModelDetailReq input)
+ {
+ return await _batteryOpModelDetailService.Page(input);
+ }
+
+ ///
+ /// 删除电池运营模型
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("delete")]
+ public async Task> DeleteBatteryOpModel([FromBody] [Required] DeleteBatteryOpModelDetailReq input)
+ {
+ var data = await _batteryOpModelDetailService.DeleteBatteryOpModelDetail(input);
+ if (data)
+ return Result.Success(data);
+ else
+ return Result.Fail(data);
+ }
+}
\ No newline at end of file
diff --git a/WebStarter/Controllers/EquipAlarmRecordController.cs b/WebStarter/Controllers/EquipAlarmRecordController.cs
index a32b458..25e9ce5 100644
--- a/WebStarter/Controllers/EquipAlarmRecordController.cs
+++ b/WebStarter/Controllers/EquipAlarmRecordController.cs
@@ -26,7 +26,7 @@ public class EquipAlarmRecordController : ControllerBase
/// 设备类型:-1-查询全部;0-充电机;1-电表;2-水冷机;3-plc<
/// 设备编码
///
- [HttpPost("/QueryEquipAlarmPage")]
+ [HttpPost("QueryEquipAlarmPage")]
public Result> QueryEquipAlarmPage([FromBody] QueryAlarmReq req)
{
return equipAlarmRecordService.QueryEquipAlarmPage(req);
@@ -38,7 +38,7 @@ public class EquipAlarmRecordController : ControllerBase
/// 设备类型:-1-查询全部;0-充电机;1-电表;2-水冷机;3-plc
/// 设备编码
///
- [HttpPost("/QueryEquipAlarmProcessPage")]
+ [HttpPost("QueryEquipAlarmProcessPage")]
public Result> QueryEquipAlarmProcessPage([FromBody] QueryAlarmReq req)
{
return equipAlarmRecordService.QueryEquipAlarmProcessPage(req);