Browse Source

fix

release_toaliyun_real
winter 2 years ago
parent
commit
fdfedeef7e
1 changed files with 20 additions and 2 deletions
  1. +20
    -2
      mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv2/HaiKangWeiShiV2ParkService.java

+ 20
- 2
mallinkService/src/main/java/com/iformall/service/park/impl/haikangweishiv2/HaiKangWeiShiV2ParkService.java View File

@@ -125,12 +125,30 @@ public class HaiKangWeiShiV2ParkService extends BaseParkService implements ParkA
String appId = "";
String parkOrderId = attribute.getString("billCode");
Double fee = attribute.getDouble("payMoney");
if (fee <= 0 && StringUtils.isBlank(parkOrderId)) {
parkOrderId = attribute.getString("inUnid");
}
Date _createTime = new Date((Long) attribute.get("enterTime"));//计费时间,格式为“yyyy-MM-dd HH:mi:ss”
Date _endTime = DateUtils.getSecondsTimeAfter(attribute.getIntValue("parkPeriodTime"), _createTime);//离场时间,格式为“yyyy-MM-dd HH:mi:ss”
Date _endTime = DateUtils.getMinuteTimeAfter(attribute.getIntValue("parkPeriodTime"), _createTime);//离场时间,格式为“yyyy-MM-dd HH:mi:ss”
String payPath = "";
Integer freeMinute = (Integer)park.getVendorParamsByKey("freeMinute");
return new ParkStopFee(parkOrderId,_createTime,_endTime,
String.valueOf(fee/100),appId,payPath,null,null,"0元请勿使用优惠券,无法退回。支付后"+freeMinute+"分钟内离场");
}
public static void main(String[] args) {
String json = "{\"code\":\"200\",\"msg\":\"SUCCESS\",\"data\":{\"billCode\":\"\",\"parkCode\":\"1017UKDWJNFTP8H\",\"parkName\":\"万佳家居装饰广场\",\"plateNo\":\"琼A2G575\",\"plateColor\":null,\"enterTime\":1711325096000,\"costTime\":1711353703935,\"parkPeriodTime\":476,\"totalCost\":0,\"deductMoney\":0,\"payMoney\":0,\"inUnid\":\"5ead3b78-1dd2-11b2-9b8c-b98a3c3e3870\"}}";
JSONObject attribute = JSON.parseObject(json).getJSONObject("data");
String appId = "";
String parkOrderId = attribute.getString("billCode");
Date _createTime = new Date((Long) attribute.get("enterTime"));//计费时间,格式为“yyyy-MM-dd HH:mi:ss”
Date _endTime = DateUtils.getSecondsTimeAfter(attribute.getIntValue("parkPeriodTime"), _createTime);//离场时间,格式为“yyyy-MM-dd HH:mi:ss”
String payPath = "";
Integer freeMinute = 15;
ParkStopFee fee = new ParkStopFee(parkOrderId,_createTime,_endTime,
String.valueOf(attribute.getDouble("payMoney")/100),appId,payPath,null,null,"0元请勿使用优惠券,无法退回。支付后"+freeMinute+"分钟内离场");
System.out.println(JSON.toJSONString(fee));
}
/**
@@ -173,7 +191,7 @@ public class HaiKangWeiShiV2ParkService extends BaseParkService implements ParkA
}
//查询临停信息,判断缓存是否已经存在
JSONObject stopInfo = haikangV2.getCarStopFee(park, getCacheToken(park), carNumber);
String inRecordSyscode = stopInfo.getString("billCode");
String inRecordSyscode = stopInfo.getString("inUnid");
Integer used = RedisCacheUtils.getCacheInteger(redisTemplate, "carStop:haikangv2StopInfoUseCoupon:"+carNumber+":"+inRecordSyscode);
if (null == used || (null != used && used.intValue() < 1) ) {
//do nothing


Loading…
Cancel
Save