上报换电订单 查询次数

master
lxw 6 months ago
parent 40fa536ac2
commit 848dcc4d3a

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

@ -99,7 +99,9 @@ public class SwapOrderReportCloudTask : AbstractTaskHandler
} }
//TODO::获取本日第几次换电 //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) if (uploadSwapOrder == 0)
{ {
swapOrder.CloudReportStatus = 1; swapOrder.CloudReportStatus = 1;

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

Loading…
Cancel
Save