充电订单云平台订单号生成规则修改

master
rszn 5 months ago
parent a7262b5d37
commit e5af38ef5e

@ -10,6 +10,7 @@ public static class ChargerConst
public static readonly AttributeKey<string> EqmCode = AttributeKey<string>.ValueOf("eqm_code");
public static readonly AttributeKey<string> DestAddr = AttributeKey<string>.ValueOf("dest_addr");
public static readonly string DateFormat = "yyMMddHHmmss";
public static readonly string yyyyMMddHHmmss = "yyyyMMddHHmmss";
public static readonly byte[] StartChar = { 0x68 /* ,0xEE*/ };
public static readonly string AuthCode = "szhckj01";

@ -58,6 +58,12 @@ public static class ChargerUtils
return StaticStationInfo.StationNo + DateTime.Now.ToString(ChargerConst.DateFormat) +
GetRandomNumLimit99();
}
public static string GenChargeOrderNo(string chargerSn)
{
return StaticStationInfo.StationNo +chargerSn + DateTime.Now.ToString(ChargerConst.yyyyMMddHHmmss) +
GetRandomNumLimit99();
}
/// <summary>
/// 根据云平台下发,计算本地充电机枪号
/// </summary>

@ -64,7 +64,7 @@ namespace HybirdFrameworkServices.Charger.Handler
if (string.IsNullOrWhiteSpace(cloudChargeOrder))
{
cloudChargeOrder = ChargerUtils.GenChargeOrderSn();
cloudChargeOrder = ChargerUtils.GenChargeOrderNo(sn);
}
HashSet<int> hashSet = orders.Select(it => it.Id).ToHashSet();

Loading…
Cancel
Save