From f7642c009005ddc89a952d5b4b7028bc73f97314 Mon Sep 17 00:00:00 2001 From: lxw Date: Wed, 29 May 2024 21:41:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=8F=AF=E6=8D=A2?= =?UTF-8?q?=E7=94=B5=20=E5=8F=AF=E5=85=85=E7=94=B5=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Api/Resp/BinInfoResp.cs | 348 ++++++++++++------------ Entity/DbModel/Station/BinInfo.cs | 15 + Repository/Station/BinInfoRepository.cs | 2 +- 3 files changed, 195 insertions(+), 170 deletions(-) diff --git a/Entity/Api/Resp/BinInfoResp.cs b/Entity/Api/Resp/BinInfoResp.cs index ad93307..359c79a 100644 --- a/Entity/Api/Resp/BinInfoResp.cs +++ b/Entity/Api/Resp/BinInfoResp.cs @@ -2,172 +2,182 @@ namespace Entity.Api.Resp; public class BinInfoResp { - /// - /// Desc:id - /// Default: - /// Nullable:False - /// - public int Id { get; set; } - - /// - /// Desc:仓位编号 - /// Default: - /// Nullable:True - /// - public string No { get; set; } - - /// - /// Desc:仓位编码 - /// Default: - /// Nullable:True - /// - public string Code { get; set; } - - /// - /// Desc:仓位名称 - /// Default: - /// Nullable:True - /// - public string Name { get; set; } - - /// - /// Desc:在位状态:0-不在位;1-在位;2-无效 - /// Default: - /// Nullable:True - /// - public int Exists { get; set; } - - /// - /// Desc:电池编号 - /// Default: - /// Nullable:True - /// - public string BatteryNo { get; set; } - - /// - /// Desc:充电机编号 - /// Default: - /// Nullable:True - /// - public string ChargerNo { get; set; } - - /// - /// Desc:充电枪编号 - /// Default: - /// Nullable:True - /// - public string ChargerGunNo { get; set; } - - /// - /// Desc:水冷编号 - /// Default: - /// Nullable:True - /// - public string WaterCoolNo { get; set; } - - /// - /// Desc:是否有电插头;0-无电插头;1-有电插头 - /// Default: - /// Nullable:True - /// - public int? ElecPluginFlag { get; set; } - - /// - /// Desc:电插头状态;0-未知;1-已经连接;2-未连接 - /// Default: - /// Nullable:True - /// - public string ElecPluginStatus { get; set; } - - /// - /// Desc:是否有水插头;0-无水插头;1-有水插头 - /// Default: - /// Nullable:False - /// - public string WaterPluginFlag { get; set; } - - /// - /// Desc:预约锁定;0-未锁定;1-锁定 - /// Default: - /// Nullable:True - /// - public int AmtLock { get; set; } - - /// - /// Desc:soc - /// Default: - /// Nullable:True - /// - public decimal? Soc { get; set; } - - /// - /// Desc:soe - /// Default: - /// Nullable:True - /// - public decimal? Soe { get; set; } - - /// - /// Desc:soh - /// Default: - /// Nullable:True - /// - public decimal? Soh { get; set; } - - /// - /// Desc:电池入仓顺序 - /// Default: - /// Nullable:True - /// - public int? BatteryEnterSeq { get; set; } - - /// - /// Desc:充电状态;0-未知;1-正在充电;2-无电池;3-禁用 - /// Default:0 - /// Nullable:True - /// - public int? ChargeStatus { get; set; } - - /// - /// Desc:仓位状态;0-禁用;1-启用 - /// Default:1 - /// Nullable:True - /// - public int? Status { get; set; } - - - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - public DateTime? CreatedTime { get; set; } - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - public string UpdatedBy { get; set; } - - /// - /// Desc:最后结束充电时间 结束充电后更新 - /// Default: - /// Nullable:True - /// - public DateTime? LastChargeFinishTime { get; set; } - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - public DateTime? UpdatedTime { get; set; } - - - /// - /// 缓存仓标记 0:不是 1:是 - /// - public int CacheBinFlag { get; set; } -} \ No newline at end of file + /// + /// Desc:id + /// Default: + /// Nullable:False + /// + public int Id { get; set; } + + /// + /// Desc:仓位编号 + /// Default: + /// Nullable:True + /// + public string No { get; set; } + + /// + /// Desc:仓位编码 + /// Default: + /// Nullable:True + /// + public string Code { get; set; } + + /// + /// Desc:仓位名称 + /// Default: + /// Nullable:True + /// + public string Name { get; set; } + + /// + /// Desc:在位状态:0-不在位;1-在位;2-无效 + /// Default: + /// Nullable:True + /// + public int Exists { get; set; } + + /// + /// Desc:电池编号 + /// Default: + /// Nullable:True + /// + public string BatteryNo { get; set; } + + /// + /// Desc:充电机编号 + /// Default: + /// Nullable:True + /// + public string ChargerNo { get; set; } + + /// + /// Desc:充电枪编号 + /// Default: + /// Nullable:True + /// + public string ChargerGunNo { get; set; } + + /// + /// Desc:水冷编号 + /// Default: + /// Nullable:True + /// + public string WaterCoolNo { get; set; } + + /// + /// Desc:是否有电插头;0-无电插头;1-有电插头 + /// Default: + /// Nullable:True + /// + public int? ElecPluginFlag { get; set; } + + /// + /// Desc:电插头状态;0-未知;1-已经连接;2-未连接 + /// Default: + /// Nullable:True + /// + public string ElecPluginStatus { get; set; } + + /// + /// Desc:是否有水插头;0-无水插头;1-有水插头 + /// Default: + /// Nullable:False + /// + public string WaterPluginFlag { get; set; } + + /// + /// Desc:预约锁定;0-未锁定;1-锁定 + /// Default: + /// Nullable:True + /// + public int AmtLock { get; set; } + + /// + /// Desc:soc + /// Default: + /// Nullable:True + /// + public decimal? Soc { get; set; } + + /// + /// Desc:soe + /// Default: + /// Nullable:True + /// + public decimal? Soe { get; set; } + + /// + /// Desc:soh + /// Default: + /// Nullable:True + /// + public decimal? Soh { get; set; } + + /// + /// Desc:电池入仓顺序 + /// Default: + /// Nullable:True + /// + public int? BatteryEnterSeq { get; set; } + + /// + /// Desc:充电状态;0-未知;1-正在充电;2-无电池;3-禁用 + /// Default:0 + /// Nullable:True + /// + public int? ChargeStatus { get; set; } + + /// + /// Desc:仓位状态;0-禁用;1-启用 + /// Default:1 + /// Nullable:True + /// + public int? Status { get; set; } + + + /// + /// Desc:创建时间 + /// Default:CURRENT_TIMESTAMP + /// Nullable:True + /// + public DateTime? CreatedTime { get; set; } + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + public string UpdatedBy { get; set; } + + /// + /// Desc:最后结束充电时间 结束充电后更新 + /// Default: + /// Nullable:True + /// + public DateTime? LastChargeFinishTime { get; set; } + + /// + /// Desc:更新时间 + /// Default:CURRENT_TIMESTAMP + /// Nullable:True + /// + public DateTime? UpdatedTime { get; set; } + + + /// + /// 缓存仓标记 0:不是 1:是 + /// + public int CacheBinFlag { get; set; } + + + /// + /// 是否可以换电 0:不可换 1:可换 + /// + public int CanSwapFlag { get; set; } + + /// + /// 是否可以充电 0:不可换 1:可换 + /// + public int CanChargeFlag { get; set; } +} \ No newline at end of file diff --git a/Entity/DbModel/Station/BinInfo.cs b/Entity/DbModel/Station/BinInfo.cs index f21a91a..1a7f2f9 100644 --- a/Entity/DbModel/Station/BinInfo.cs +++ b/Entity/DbModel/Station/BinInfo.cs @@ -209,5 +209,20 @@ namespace Entity.DbModel.Station /// [SugarColumn(ColumnName = "cache_bin_flag")] public int CacheBinFlag { get; set; } + + /// + /// 是否可以换电 0:不可换 1:可换 + /// + [SugarColumn(ColumnName = "can_swap_flag")] + public int CanSwapFlag { get; set; } + + /// + /// 是否可以充电 0:不可换 1:可换 + /// + [SugarColumn(ColumnName = "can_charge_flag")] + public int CanChargeFlag { get; set; } + + + } } \ No newline at end of file diff --git a/Repository/Station/BinInfoRepository.cs b/Repository/Station/BinInfoRepository.cs index 9a1c0ff..816a277 100644 --- a/Repository/Station/BinInfoRepository.cs +++ b/Repository/Station/BinInfoRepository.cs @@ -26,7 +26,7 @@ public class BinInfoRepository : BaseRepository SuccessFlag = false, }; List list = - QueryListByClause(i => i.CacheBinFlag == 0 && + QueryListByClause(i => i.CacheBinFlag == 0 && i.CanSwapFlag==1 && i.Exists == 1 && i.Status == 1 && i.AmtLock == (int)InfoEnum.AmtBatLockStatus.UnLock, "battery_enter_seq asc"); BinInfo? cacheBinBattery = ChooseCacheBinBattery();