主要接口完成

master
lxw 6 months ago
parent ac5315fad7
commit 2d9b4836f4

@ -0,0 +1,210 @@
using System.ComponentModel.DataAnnotations;
using SqlSugar;
namespace Entity.Api.Req
{
///<summary>
///修改充电订单
///</summary>
public class ModifyChargeOrderReq
{
/// <summary>
/// Desc:id
/// Default:
/// Nullable:False
/// </summary>
[Required]
public int Id {get;set;}
/// <summary>
/// Desc:订单编号
/// Default:
/// Nullable:True
/// </summary>
public string Sn {get;set;}
/// <summary>
/// Desc:电池编号
/// Default:
/// Nullable:True
/// </summary>
public string BatteryNo {get;set;}
/// <summary>
/// Desc:启动报文状态;0-初始化1-启动成功
/// Default:0
/// Nullable:True
/// </summary>
public int? CmdStatus {get;set;}
/// <summary>
/// Desc:充电机编号
/// Default:
/// Nullable:True
/// </summary>
public string ChargerNo {get;set;}
/// <summary>
/// Desc:充电枪编号
/// Default:
/// Nullable:True
/// </summary>
public string ChargerGunNo {get;set;}
/// <summary>
/// Desc:充电开始时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? StartTime {get;set;}
/// <summary>
/// Desc:充电结束时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? EndTime {get;set;}
/// <summary>
/// Desc:充电开始soc
/// Default:
/// Nullable:True
/// </summary>
public int? StartSoc {get;set;}
/// <summary>
/// Desc:充电结束soc
/// Default:
/// Nullable:True
/// </summary>
public int? StopSoc {get;set;}
/// <summary>
/// Desc:充电时长
/// Default:
/// Nullable:True
/// </summary>
public string ChargeTimeCount {get;set;}
/// <summary>
/// Desc:充电电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? ElecCount {get;set;}
/// <summary>
/// Desc:充电开始交流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StartAcElec {get;set;}
/// <summary>
/// Desc:充电结束交流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StopAcElec {get;set;}
/// <summary>
/// Desc:充电开始直流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StartDcElec {get;set;}
/// <summary>
/// Desc:充电结束直流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StopDcElec {get;set;}
/// <summary>
/// Desc:停止原因;0满电自动停止1-人工停止
/// Default:0
/// Nullable:True
/// </summary>
public int? StopReason {get;set;}
/// <summary>
/// Desc:尖时段电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? SharpElecCount {get;set;}
/// <summary>
/// Desc:峰时段电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? PeakElecCount {get;set;}
/// <summary>
/// Desc:平时段电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? FlatElecCount {get;set;}
/// <summary>
/// Desc:谷时段电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? ValleyElecCount {get;set;}
/// <summary>
/// Desc:电价版本号
/// Default:
/// Nullable:True
/// </summary>
public string ElecPriceModelVersion {get;set;}
/// <summary>
/// Desc:换电订单编号
/// Default:
/// Nullable:True
/// </summary>
public string SwapOrderSn {get;set;}
/// <summary>
/// Desc:上传云平台状态;0-未上传1-已上传
/// Default:0
/// Nullable:True
/// </summary>
public int? CloudReportStatus {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
public DateTime? UpdatedTime {get;set;}
}
}

@ -0,0 +1,139 @@
using System.ComponentModel.DataAnnotations;
using SqlSugar;
namespace Entity.Api.Req
{
///<summary>
///查询充电订单
///</summary>
public class QueryChargeOrderReq
{
/// <summary>
/// Desc:订单编号
/// Default:
/// Nullable:True
/// </summary>
public string Sn {get;set;}
/// <summary>
/// Desc:电池编号
/// Default:
/// Nullable:True
/// </summary>
public string BatteryNo {get;set;}
/// <summary>
/// Desc:充电机编号
/// Default:
/// Nullable:True
/// </summary>
public string ChargerNo {get;set;}
/// <summary>
/// Desc:充电枪编号
/// Default:
/// Nullable:True
/// </summary>
public string ChargerGunNo {get;set;}
/// <summary>
/// Desc:充电开始时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? StartTime {get;set;}
/// <summary>
/// Desc:充电结束时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? EndTime {get;set;}
/// <summary>
/// Desc:充电开始soc
/// Default:
/// Nullable:True
/// </summary>
public int? StartSoc {get;set;}
/// <summary>
/// Desc:充电结束soc
/// Default:
/// Nullable:True
/// </summary>
public int? StopSoc {get;set;}
/// <summary>
/// Desc:充电时长
/// Default:
/// Nullable:True
/// </summary>
public string ChargeTimeCount {get;set;}
/// <summary>
/// Desc:充电电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? ElecCount {get;set;}
/// <summary>
/// Desc:充电开始交流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StartAcElec {get;set;}
/// <summary>
/// Desc:充电结束交流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StopAcElec {get;set;}
/// <summary>
/// Desc:充电开始直流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StartDcElec {get;set;}
/// <summary>
/// Desc:充电结束直流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StopDcElec {get;set;}
/// <summary>
/// Desc:电价版本号
/// Default:
/// Nullable:True
/// </summary>
public string ElecPriceModelVersion {get;set;}
/// <summary>
/// Desc:换电订单编号
/// Default:
/// Nullable:True
/// </summary>
public string SwapOrderSn {get;set;}
/// <summary>
/// Desc:上传云平台状态;0-未上传1-已上传
/// Default:0
/// Nullable:True
/// </summary>
public int? CloudReportStatus {get;set;}
}
}

@ -0,0 +1,208 @@
using SqlSugar;
namespace Entity.Api.Resp
{
///<summary>
///充电订单;
///</summary>
public partial class ChargeOrderResp
{
/// <summary>
/// Desc:id
/// Default:
/// Nullable:False
/// </summary>
public int Id {get;set;}
/// <summary>
/// Desc:订单编号
/// Default:
/// Nullable:True
/// </summary>
public string Sn {get;set;}
/// <summary>
/// Desc:电池编号
/// Default:
/// Nullable:True
/// </summary>
public string BatteryNo {get;set;}
/// <summary>
/// Desc:启动报文状态;0-初始化1-启动成功
/// Default:0
/// Nullable:True
/// </summary>
public int? CmdStatus {get;set;}
/// <summary>
/// Desc:充电机编号
/// Default:
/// Nullable:True
/// </summary>
public string ChargerNo {get;set;}
/// <summary>
/// Desc:充电枪编号
/// Default:
/// Nullable:True
/// </summary>
public string ChargerGunNo {get;set;}
/// <summary>
/// Desc:充电开始时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? StartTime {get;set;}
/// <summary>
/// Desc:充电结束时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? EndTime {get;set;}
/// <summary>
/// Desc:充电开始soc
/// Default:
/// Nullable:True
/// </summary>
public int? StartSoc {get;set;}
/// <summary>
/// Desc:充电结束soc
/// Default:
/// Nullable:True
/// </summary>
public int? StopSoc {get;set;}
/// <summary>
/// Desc:充电时长
/// Default:
/// Nullable:True
/// </summary>
public string ChargeTimeCount {get;set;}
/// <summary>
/// Desc:充电电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? ElecCount {get;set;}
/// <summary>
/// Desc:充电开始交流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StartAcElec {get;set;}
/// <summary>
/// Desc:充电结束交流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StopAcElec {get;set;}
/// <summary>
/// Desc:充电开始直流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StartDcElec {get;set;}
/// <summary>
/// Desc:充电结束直流表电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? StopDcElec {get;set;}
/// <summary>
/// Desc:停止原因;0满电自动停止1-人工停止
/// Default:0
/// Nullable:True
/// </summary>
public int? StopReason {get;set;}
/// <summary>
/// Desc:尖时段电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? SharpElecCount {get;set;}
/// <summary>
/// Desc:峰时段电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? PeakElecCount {get;set;}
/// <summary>
/// Desc:平时段电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? FlatElecCount {get;set;}
/// <summary>
/// Desc:谷时段电量
/// Default:
/// Nullable:True
/// </summary>
public decimal? ValleyElecCount {get;set;}
/// <summary>
/// Desc:电价版本号
/// Default:
/// Nullable:True
/// </summary>
public string ElecPriceModelVersion {get;set;}
/// <summary>
/// Desc:换电订单编号
/// Default:
/// Nullable:True
/// </summary>
public string SwapOrderSn {get;set;}
/// <summary>
/// Desc:上传云平台状态;0-未上传1-已上传
/// Default:0
/// Nullable:True
/// </summary>
public int? CloudReportStatus {get;set;}
/// <summary>
/// Desc:创建人
/// Default:
/// Nullable:True
/// </summary>
public string CreatedBy {get;set;}
/// <summary>
/// Desc:创建时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
public DateTime? CreatedTime {get;set;}
/// <summary>
/// Desc:更新人
/// Default:
/// Nullable:True
/// </summary>
public string UpdatedBy {get;set;}
/// <summary>
/// Desc:更新时间
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
public DateTime? UpdatedTime {get;set;}
}
}

@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc;
namespace WebStarter.Controllers;
/**
*
*
*/
[ApiController]
[Route("api/[controller]")]
@ -18,57 +18,57 @@ public class ChargeOrderController : ControllerBase
/// </summary>
/// <returns></returns>
[HttpPost("QueryPage")]
public async Task<Result<PageResult<SwapOrderResp>>> QueryPage([FromBody] QuerySwapOrderPageReq req)
public async Task<Result<PageResult<ChargeOrderResp>>> QueryPage([FromBody] QueryChargeOrderReq req)
{
return Result<PageResult<SwapOrderResp>>.Success(null);
return Result<PageResult<ChargeOrderResp>>.Success(null);
}
/// <summary>
/// 修改换电订单
/// 导出
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpGet("Modify")]
public async Task<Result<bool>> Modify([FromBody] ModifySwapOrderReq req)
[HttpPost("Export")]
public async void Export([FromBody] QueryChargeOrderReq req,HttpRequest httpRequest)
{
return Result<bool>.Success(null);
}
/// <summary>
/// 删除
/// 获取列表
/// </summary>
/// <param name="ids">ids 订单列表</param>
/// <returns></returns>
[HttpGet("DeleteByIds")]
public async Task<Result<bool>> DeleteByIds(List<long> ids)
[HttpPost("GetList")]
public async Task<Result<List<ChargeOrderResp>>> GetList([FromBody] QueryChargeOrderReq req)
{
return Result<bool>.Success(null);
return Result<List<ChargeOrderResp>>.Success(null);
}
/// <summary>
/// 换电订单上报云端
/// 修改充电订单
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpGet("UploadCloud/{id}")]
public async Task<Result<bool>> UploadCloud(long id)
[HttpGet("Modify")]
public async Task<Result<bool>> Modify([FromBody] ModifyChargeOrderReq req)
{
return Result<bool>.Success(null);
}
/// <summary>
/// 电订单上报云端
/// 电订单上报云端
/// </summary>
/// <returns></returns>
[HttpPost("Add")]
public async Task<Result<bool>> Add([FromBody] AddSwapOrderReq req)
[HttpGet("UploadCloud/{id}")]
public async Task<Result<bool>> UploadCloud(long id)
{
return Result<bool>.Success(null);
}
}
Loading…
Cancel
Save