| @@ -51,10 +51,6 @@ public class WxCarTJDCallBackController extends BaseController { | |||||
| @Autowired | @Autowired | ||||
| WxCUserService wxCUserService; | WxCUserService wxCUserService; | ||||
| SimpleDateFormat dateFormat0 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |||||
| SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss"); | |||||
| /** | /** | ||||
| * 注册车牌 | * 注册车牌 | ||||
| * @param paramMap | * @param paramMap | ||||
| @@ -193,7 +189,7 @@ public class WxCarTJDCallBackController extends BaseController { | |||||
| record.setParkName(parkName); | record.setParkName(parkName); | ||||
| record.setPlateNumber(carNumber); | record.setPlateNumber(carNumber); | ||||
| if(StringUtils.isNotBlank(inDt)) { | if(StringUtils.isNotBlank(inDt)) { | ||||
| record.setEntranceTime(dateFormat1.parse(inDt)); | |||||
| record.setEntranceTime(TJDUtil.dateOutFormat.parse(inDt)); | |||||
| } | } | ||||
| record.setPhone(phoneStrs); | record.setPhone(phoneStrs); | ||||
| WxCarPayRecord query = new WxCarPayRecord(); | WxCarPayRecord query = new WxCarPayRecord(); | ||||
| @@ -285,10 +281,10 @@ public class WxCarTJDCallBackController extends BaseController { | |||||
| record.setPlateNumber(carNumber); | record.setPlateNumber(carNumber); | ||||
| record.setSynId(tradeId); | record.setSynId(tradeId); | ||||
| if(StringUtils.isNotBlank(inDt)) { | if(StringUtils.isNotBlank(inDt)) { | ||||
| record.setEntranceTime(dateFormat1.parse(inDt)); | |||||
| record.setEntranceTime(TJDUtil.dateOutFormat.parse(inDt)); | |||||
| } | } | ||||
| if(StringUtils.isNotBlank(outDt)) { | if(StringUtils.isNotBlank(outDt)) { | ||||
| record.setExitTime(dateFormat1.parse(outDt)); | |||||
| record.setExitTime(TJDUtil.dateOutFormat.parse(outDt)); | |||||
| Long stayedTime = (record.getExitTime().getTime() - record.getEntranceTime().getTime())/ 1000; | Long stayedTime = (record.getExitTime().getTime() - record.getEntranceTime().getTime())/ 1000; | ||||
| record.setStayedTime(stayedTime); | record.setStayedTime(stayedTime); | ||||
| } | } | ||||
| @@ -383,7 +379,7 @@ public class WxCarTJDCallBackController extends BaseController { | |||||
| record.setSynId(tradeId); | record.setSynId(tradeId); | ||||
| record.setFee(stopFee); | record.setFee(stopFee); | ||||
| if (StringUtils.isNotBlank(stopFeeTime)) { | if (StringUtils.isNotBlank(stopFeeTime)) { | ||||
| record.setFeeTime(dateFormat1.parse(stopFeeTime)); | |||||
| record.setFeeTime(TJDUtil.dateOutFormat.parse(stopFeeTime)); | |||||
| } | } | ||||
| WxCarPayRecord query = new WxCarPayRecord(); | WxCarPayRecord query = new WxCarPayRecord(); | ||||
| @@ -57,6 +57,9 @@ public class TJDUtil { | |||||
| public static final String TJD_PAY_DT = "payDt"; | public static final String TJD_PAY_DT = "payDt"; | ||||
| public static final String TJD_FREE_MINS = "freeMins"; | public static final String TJD_FREE_MINS = "freeMins"; | ||||
| public static final SimpleDateFormat dateInFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |||||
| public static final SimpleDateFormat dateOutFormat = new SimpleDateFormat("yyyyMMddHHmmss"); | |||||
| private final static Logger logger = LoggerFactory.getLogger(TJDUtil.class); | private final static Logger logger = LoggerFactory.getLogger(TJDUtil.class); | ||||
| @@ -117,8 +120,7 @@ public class TJDUtil { | |||||
| */ | */ | ||||
| public static String getCurrentDate() { | public static String getCurrentDate() { | ||||
| Date currentDate = new Date(); | Date currentDate = new Date(); | ||||
| SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |||||
| String timestamp = sdf.format(currentDate); | |||||
| String timestamp = dateInFormat.format(currentDate); | |||||
| return timestamp; | return timestamp; | ||||
| } | } | ||||
| @@ -167,7 +169,7 @@ public class TJDUtil { | |||||
| String service = "parkhub.car.register"; | String service = "parkhub.car.register"; | ||||
| Map<String, String> paramMap = MapUtil.getOrderMap(); | Map<String, String> paramMap = MapUtil.getOrderMap(); | ||||
| paramMap.put("carNum", carNum); | |||||
| paramMap.put(TJD_CAR_NUMBER, carNum); | |||||
| paramMap.put("carNumColor", carNumColor); | paramMap.put("carNumColor", carNumColor); | ||||
| if (phone != null) { | if (phone != null) { | ||||
| paramMap.put("phone", phone); | paramMap.put("phone", phone); | ||||
| @@ -326,7 +328,7 @@ public class TJDUtil { | |||||
| // 为指定订单抵扣停车费,如果此时车辆已经出场,返回isSuccess错误码为3,停简单系统不再接收此笔抵扣信息,对方系统 需要给用户发起退款。 | // 为指定订单抵扣停车费,如果此时车辆已经出场,返回isSuccess错误码为3,停简单系统不再接收此笔抵扣信息,对方系统 需要给用户发起退款。 | ||||
| String service = "parkhub.order.deductionNotSettle"; | String service = "parkhub.order.deductionNotSettle"; | ||||
| Map<String, String> paramMap = MapUtil.getOrderMap(); | Map<String, String> paramMap = MapUtil.getOrderMap(); | ||||
| paramMap.put("tradeId", tradeId); | |||||
| paramMap.put(TJD_TRADE_ID, tradeId); | |||||
| paramMap.put("deductionAmount", deductionAmount); | paramMap.put("deductionAmount", deductionAmount); | ||||
| paramMap.put("outTradeNo", outTradeNo); | paramMap.put("outTradeNo", outTradeNo); | ||||
| paramMap.put("accountId", accountId); | paramMap.put("accountId", accountId); | ||||