| @@ -29,7 +29,7 @@ public class BoLinkParkService extends BaseParkService implements ParkAdapterSer | |||||
| @Override | @Override | ||||
| public String bindCar(Map<String, String> paramMap, WxPark park, WxCUserBasicInfo member) { | public String bindCar(Map<String, String> paramMap, WxPark park, WxCUserBasicInfo member) { | ||||
| return null; | |||||
| return member.getId().toString(); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -5,10 +5,12 @@ import java.util.Map; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import com.iformall.domain.vo.WxCarCYFVo; | |||||
| import com.iformall.service.park.ParkCallBackAdapterService; | import com.iformall.service.park.ParkCallBackAdapterService; | ||||
| import com.iformall.service.park.entity.ParkNotifyParam; | import com.iformall.service.park.entity.ParkNotifyParam; | ||||
| import com.iformall.service.park.impl.BaseParkService; | import com.iformall.service.park.impl.BaseParkService; | ||||
| import com.iformall.utils.car.CYFUtil; | import com.iformall.utils.car.CYFUtil; | ||||
| import com.iformall.utils.car.TJDUtil; | |||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
| @@ -33,7 +35,6 @@ public class CYFParkCallbackService extends BaseParkService implements ParkCallB | |||||
| try { | try { | ||||
| p.setEntranceTime(CYFUtil.utcToLocal(entranceTime)); | p.setEntranceTime(CYFUtil.utcToLocal(entranceTime)); | ||||
| } catch (ParseException e) { | } catch (ParseException e) { | ||||
| e.printStackTrace(); | |||||
| log.error("cyf entranceTime format error",e); | log.error("cyf entranceTime format error",e); | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -42,8 +43,26 @@ public class CYFParkCallbackService extends BaseParkService implements ParkCallB | |||||
| @Override | @Override | ||||
| public ParkNotifyParam parseOutNoticyParam(Object param) { | public ParkNotifyParam parseOutNoticyParam(Object param) { | ||||
| return null; | |||||
| WxCarCYFVo vo = (WxCarCYFVo) param; | |||||
| ParkNotifyParam p = new ParkNotifyParam(); | |||||
| p.setCarNumber(vo.getPlate()); | |||||
| p.setParkId(String.valueOf(vo.getParkingId())); | |||||
| p.setParkName(vo.getRecordOrderId()); | |||||
| p.setSynId(vo.getRecordOrderId()); | |||||
| try { | |||||
| p.setEntranceTime(TJDUtil.dateOutFormat.parse(vo.getInInfo().getTime())); | |||||
| } catch (ParseException e) { | |||||
| log.error("cyf entranceTime format error",e); | |||||
| return null; | |||||
| } | |||||
| try { | |||||
| p.setOutTime(TJDUtil.dateOutFormat.parse(vo.getOutInfo().getTime())); | |||||
| } catch (ParseException e) { | |||||
| log.error("cyf outTime format error",e); | |||||
| return null; | |||||
| } | |||||
| p.setFee(String.valueOf(vo.getPayInfoList().getActualFee())); | |||||
| return p; | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -58,13 +58,13 @@ public class DaHuaParkService extends BaseParkService implements ParkAdapterServ | |||||
| @Override | @Override | ||||
| public ResultData useCoupon(Map<String, String> paramMap, WxPark park, WxCouponOrderCarCVo userCar,WxCoupon coupon,String carNumber) { | public ResultData useCoupon(Map<String, String> paramMap, WxPark park, WxCouponOrderCarCVo userCar,WxCoupon coupon,String carNumber) { | ||||
| return null; | |||||
| return new ResultData(); | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData getParkStatus(WxPark park) { | public ResultData getParkStatus(WxPark park) { | ||||
| return null; | |||||
| return new ResultData(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -48,8 +48,7 @@ public class ShangAnParkService extends BaseParkService implements ParkAdapterSe | |||||
| @Override | @Override | ||||
| public ResultData carStopFee(Map<String, String> paramMap, WxPark park) { | public ResultData carStopFee(Map<String, String> paramMap, WxPark park) { | ||||
| // TODO Auto-generated method stub | |||||
| return null; | |||||
| return new ResultData(); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -24,6 +24,7 @@ import com.iformall.enums.EnumCarVendor; | |||||
| import com.iformall.enums.EnumCouponUnit; | import com.iformall.enums.EnumCouponUnit; | ||||
| import com.iformall.enums.EnumScoreType; | import com.iformall.enums.EnumScoreType; | ||||
| import com.iformall.enums.EnumTJDCode; | import com.iformall.enums.EnumTJDCode; | ||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.service.WxCUserCarService; | import com.iformall.service.WxCUserCarService; | ||||
| import com.iformall.service.WxCUserTagsService; | import com.iformall.service.WxCUserTagsService; | ||||
| import com.iformall.service.WxCouponService; | import com.iformall.service.WxCouponService; | ||||
| @@ -95,6 +96,11 @@ public class TJDParkService extends BaseParkService implements ParkAdapterServic | |||||
| carNumber, carNumColor, null, outCarId); | carNumber, carNumColor, null, outCarId); | ||||
| JSONObject retObj = JSON.parseObject(ret); | JSONObject retObj = JSON.parseObject(ret); | ||||
| retObj.put("vendor", park.getVendorType()); | retObj.put("vendor", park.getVendorType()); | ||||
| if (retObj.getString("returnCode").equalsIgnoreCase(EnumTJDCode.SUCCESS.getMessage())) { | |||||
| return String.valueOf(newCarId); | |||||
| }else { | |||||
| throw new MallinkException(ErrorCode.CAR_BIND_FAIL.getCode(), "绑车牌失败"); | |||||
| } | |||||
| // if (retObj.getString("returnCode").equalsIgnoreCase(EnumTJDCode.SUCCESS.getMessage())) { | // if (retObj.getString("returnCode").equalsIgnoreCase(EnumTJDCode.SUCCESS.getMessage())) { | ||||
| // ResultData e = tjdInsertToDB(carNumber, newCarId, retObj, park, cuUserId); | // ResultData e = tjdInsertToDB(carNumber, newCarId, retObj, park, cuUserId); | ||||
| // if (e != null) return e; | // if (e != null) return e; | ||||
| @@ -102,7 +108,6 @@ public class TJDParkService extends BaseParkService implements ParkAdapterServic | |||||
| // } else { | // } else { | ||||
| // return new ResultData(ErrorCode.CAR_BIND_FAIL.getCode(), "绑车牌失败", retObj); | // return new ResultData(ErrorCode.CAR_BIND_FAIL.getCode(), "绑车牌失败", retObj); | ||||
| // } | // } | ||||
| return null; | |||||
| } | } | ||||
| @@ -164,12 +169,12 @@ public class TJDParkService extends BaseParkService implements ParkAdapterServic | |||||
| String ret = tjd.writeOffCar(url, partner, key, version, carId); | String ret = tjd.writeOffCar(url, partner, key, version, carId); | ||||
| JSONObject retObj = JSON.parseObject(ret); | JSONObject retObj = JSON.parseObject(ret); | ||||
| if (retObj.getString("returnCode").equalsIgnoreCase(EnumTJDCode.SUCCESS.getMessage())) { | if (retObj.getString("returnCode").equalsIgnoreCase(EnumTJDCode.SUCCESS.getMessage())) { | ||||
| try { | |||||
| wxCUserCarService.deleteByObj(userCar); | |||||
| } catch (Exception e) { | |||||
| logger.error("解绑车牌数据库错误, e:" + e.getMessage()); | |||||
| return new ResultData(ErrorCode.DB_FAIL.getCode(), "解绑车牌数据库错误, e:" + e.getMessage()); | |||||
| } | |||||
| // try { | |||||
| // wxCUserCarService.deleteByObj(userCar); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("解绑车牌数据库错误, e:" + e.getMessage()); | |||||
| // return new ResultData(ErrorCode.DB_FAIL.getCode(), "解绑车牌数据库错误, e:" + e.getMessage()); | |||||
| // } | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } else { | } else { | ||||