|
|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.iformall.service.park.impl.dahua; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Map; |
|
|
|
@@ -37,6 +38,7 @@ import com.iformall.service.park.entity.ParkStopFee; |
|
|
|
import com.iformall.service.park.impl.BaseParkService; |
|
|
|
import com.iformall.service.park.impl.util.ParkHelper; |
|
|
|
import com.iformall.service.park.utils.ParkCacheUtils; |
|
|
|
import com.iformall.utils.DateUtils; |
|
|
|
import com.iformall.utils.RedisCacheUtils; |
|
|
|
import com.iformall.utils.RedisLock; |
|
|
|
|
|
|
|
@@ -160,16 +162,16 @@ public class DaHuaParkService extends BaseParkService implements ParkAdapterServ |
|
|
|
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(), "dahua getCarStopFee error. no order result"+carNumber); |
|
|
|
} |
|
|
|
|
|
|
|
Double totalFee = attribute.getDouble("totalFee"); |
|
|
|
BigDecimal totalFee = attribute.getBigDecimal("notPaidAmount"); |
|
|
|
String appId = "wxe01cc0f34a5c70dc"; |
|
|
|
String parkOrderId = null; |
|
|
|
//String parkOrderId = attribute.getString("orderNo"); |
|
|
|
String parkOrderId = attribute.getString("parkingRecordId"); |
|
|
|
Integer freeMinute = (Integer)park.getVendorParamsByKey("freeMinute"); |
|
|
|
|
|
|
|
String createTime = attribute.getString("startTime");//计费时间,格式为“yyyy-MM-dd HH:mi:ss” |
|
|
|
//String endTime = attribute.getString("endTime");//离场时间,格式为“yyyy-MM-dd HH:mi:ss” |
|
|
|
Date createTime = DateUtils.string2Date(attribute.getString("carInTime"),DateUtils.DATE_TIME_PATTERN).getTime();//计费时间,格式为“yyyy-MM-dd HH:mi:ss” |
|
|
|
Long seconds = attribute.getLong("duration")*60;//停车时长秒 |
|
|
|
Date endTime = DateUtils.getSecondsTimeAfter(seconds, createTime);//离场时间,格式为“yyyy-MM-dd HH:mi:ss” |
|
|
|
String payPath = "pages/parkingOrder/parkingOrder?carNum="+carNumber+"&isFromPay=1&filterRoadsideInParking=0"; |
|
|
|
return new ParkStopFee(parkOrderId,dahua.utcToLocal(createTime),new Date(), |
|
|
|
return new ParkStopFee(parkOrderId,createTime,endTime, |
|
|
|
String.valueOf(totalFee),appId,payPath,null,null,"请支付后"+freeMinute+"分钟内离场"); |
|
|
|
} |
|
|
|
|
|
|
|
|