上报换电订单 查询次数

zw
lxw 5 months ago
parent 40fa536ac2
commit 848dcc4d3a

@ -179,8 +179,8 @@ namespace Entity.DbModel.Station
/// Nullable:True
/// </summary>
/// [SugarColumn(IsPrimaryKey = false, , ColumnDescription = "创建时间")]
[SugarColumn(ColumnName = "created_time", IsOnlyIgnoreUpdate = true)]
public DateTime? CreatedTime { get; set; }= DateTime.Now;
[SugarColumn(ColumnName = "created_time", InsertServerTime = true)]
public DateTime? CreatedTime { get; set; }
/// <summary>
@ -204,7 +204,7 @@ namespace Entity.DbModel.Station
/// Default:CURRENT_TIMESTAMP
/// Nullable:True
/// </summary>
[SugarColumn(ColumnName = "updated_time")]
[SugarColumn(ColumnName = "updated_time", UpdateServerTime = true)]
public DateTime? UpdatedTime { get; set; } = DateTime.Now;
/// <summary>
@ -224,8 +224,5 @@ namespace Entity.DbModel.Station
/// </summary>
[SugarColumn(ColumnName = "can_charge_flag")]
public int? CanChargeFlag { get; set; }
}
}

@ -99,7 +99,9 @@ public class SwapOrderReportCloudTask : AbstractTaskHandler
}
//TODO::获取本日第几次换电
var uploadSwapOrder = CloudApi.UploadSwapOrder(swapOrder, 0, swapOrderBattery, 1);
var count = _swapOrderRepository.GetCount(i =>
i.SwapResult == 1 && i.SwapEndTime >= DateTime.Today && i.SwapEndTime < swapOrder.SwapEndTime);
var uploadSwapOrder = CloudApi.UploadSwapOrder(swapOrder, count++, swapOrderBattery, 1);
if (uploadSwapOrder == 0)
{
swapOrder.CloudReportStatus = 1;

@ -6,6 +6,7 @@ using Service.Cloud.Msg.Cloud.Req;
using Service.Cloud.Msg.Cloud.Resp;
using Service.Cloud.Msg.Host.Req;
using Service.Execute.Model;
using Service.Init;
namespace Service.Execute.Api;
@ -55,6 +56,7 @@ public abstract class CloudApi
{
UploadSwapOrder uploadSwapOrder = new()
{
sn=StaticStationInfo.StationNo,
son = swapOrder.CloudSn,
cn = swapOrder.VehicleNo,
so = seq,

Loading…
Cancel
Save