mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-17 05:39:50 +08:00
深圳停车平台
This commit is contained in:
@@ -34,14 +34,16 @@ import com.jsowell.pile.vo.web.ChargeParkingDiscountVO;
|
|||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import com.jsowell.thirdparty.huawei.HuaweiServiceV2;
|
import com.jsowell.thirdparty.huawei.HuaweiServiceV2;
|
||||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||||
import com.jsowell.thirdparty.parking.service.LTYTService;
|
|
||||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||||
|
import com.jsowell.thirdparty.parking.common.bean.QcyunParkCouponDTO;
|
||||||
|
import com.jsowell.thirdparty.parking.service.LTYTService;
|
||||||
|
import com.jsowell.thirdparty.parking.service.QcyunsService;
|
||||||
|
import com.jsowell.thirdparty.parking.service.RJService;
|
||||||
import com.jsowell.thirdparty.platform.service.impl.DianXingPlatformServiceImpl;
|
import com.jsowell.thirdparty.platform.service.impl.DianXingPlatformServiceImpl;
|
||||||
import com.jsowell.thirdparty.platform.service.impl.HaiNanPlatformServiceImpl;
|
import com.jsowell.thirdparty.platform.service.impl.HaiNanPlatformServiceImpl;
|
||||||
import com.jsowell.thirdparty.platform.service.impl.NingXiaPlatformServiceImpl;
|
import com.jsowell.thirdparty.platform.service.impl.NingXiaPlatformServiceImpl;
|
||||||
import com.jsowell.thirdparty.platform.service.impl.QingHaiPlatformServiceImpl;
|
import com.jsowell.thirdparty.platform.service.impl.QingHaiPlatformServiceImpl;
|
||||||
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
|
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
|
||||||
import com.jsowell.thirdparty.parking.service.RJService;
|
|
||||||
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
||||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||||
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
|
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
|
||||||
@@ -109,6 +111,9 @@ public class CommonService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RJService rjService;
|
private RJService rjService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QcyunsService qcyunsService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HuaweiServiceV2 huaweiServiceV2;
|
private HuaweiServiceV2 huaweiServiceV2;
|
||||||
|
|
||||||
@@ -744,6 +749,13 @@ public class CommonService {
|
|||||||
return rjService.useCoupon(dto);
|
return rjService.useCoupon(dto);
|
||||||
} else if (StringUtils.equals(ParkingPlatformEnum.SHEN_ZHEN_PLATFORM.getCode(), stationInfo.getParkingId())) {
|
} else if (StringUtils.equals(ParkingPlatformEnum.SHEN_ZHEN_PLATFORM.getCode(), stationInfo.getParkingId())) {
|
||||||
// 深圳道闸
|
// 深圳道闸
|
||||||
|
QcyunParkCouponDTO dto = QcyunParkCouponDTO.builder()
|
||||||
|
.plateNumber(orderBasicInfo.getPlateNumber())
|
||||||
|
.stationId(orderBasicInfo.getStationId())
|
||||||
|
.stationName(stationInfo.getStationName())
|
||||||
|
.parkId(stationInfo.getParkingId())
|
||||||
|
.build();
|
||||||
|
qcyunsService.issuanceOfParkingTickets(dto);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
package com.jsowell.thirdparty.parking.common;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @desc: 临时车信息
|
|
||||||
* @date: 2021-11-01 14:55
|
|
||||||
*/
|
|
||||||
@Setter
|
|
||||||
@Getter
|
|
||||||
public class TempCarInfo {
|
|
||||||
//入场时间
|
|
||||||
String inTime;
|
|
||||||
//停车时长
|
|
||||||
String stopTime;
|
|
||||||
//停车时间戳
|
|
||||||
String stopTimeSecond;
|
|
||||||
//需交费
|
|
||||||
Double amount;
|
|
||||||
//总应收
|
|
||||||
Double totalFee;
|
|
||||||
//已缴费用
|
|
||||||
Double beforePay;
|
|
||||||
//已优惠,单位:分钟/元
|
|
||||||
String discountVal;
|
|
||||||
//优惠券类型 1.金额(分钟) 2.时间(元)
|
|
||||||
Integer discountType;
|
|
||||||
//通道ID 场内支付(为空) 出口扫码支付(必填)
|
|
||||||
Integer laneId;
|
|
||||||
//平台进出场ID (平台ID与本地ID不能同时为空)
|
|
||||||
Integer recordId;
|
|
||||||
//本地进出场ID (平台ID与本地ID不能同时为空)
|
|
||||||
Integer localId;
|
|
||||||
//入场图片
|
|
||||||
String inPic;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.jsowell.thirdparty.parking.common.bean;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qcyun停车券DTO
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class QcyunParkCouponDTO {
|
||||||
|
// 车牌号
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
// 站点id
|
||||||
|
private String stationId;
|
||||||
|
|
||||||
|
// 站点名称
|
||||||
|
private String stationName;
|
||||||
|
|
||||||
|
private String parkId;
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.jsowell.thirdparty.parking.service;
|
package com.jsowell.thirdparty.parking.service;
|
||||||
|
|
||||||
|
import com.jsowell.thirdparty.parking.common.bean.QcyunParkCouponDTO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后亭慢充道闸service
|
* 后亭慢充道闸service
|
||||||
*/
|
*/
|
||||||
@@ -9,4 +11,19 @@ public interface QcyunsService {
|
|||||||
* 根据车牌号获取车辆信息(临时车,月租车,储值车)
|
* 根据车牌号获取车辆信息(临时车,月租车,储值车)
|
||||||
*/
|
*/
|
||||||
String getCarInfo(String parkId, String plateNumber);
|
String getCarInfo(String parkId, String plateNumber);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商家优惠
|
||||||
|
* @param plate
|
||||||
|
* @param grantSerial
|
||||||
|
* @param parkingSerial
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean createDiscountCoupon(String plate, String grantSerial, String parkingSerial);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发放停车券
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String issuanceOfParkingTickets(QcyunParkCouponDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import com.jsowell.common.util.ParkingUtil;
|
|||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.common.util.id.UUID;
|
import com.jsowell.common.util.id.UUID;
|
||||||
import com.jsowell.thirdparty.parking.common.ServiceApiCmd;
|
import com.jsowell.thirdparty.parking.common.ServiceApiCmd;
|
||||||
|
import com.jsowell.thirdparty.parking.common.bean.QcyunParkCouponDTO;
|
||||||
|
import com.jsowell.thirdparty.parking.common.bean.TempCarInfo;
|
||||||
import com.jsowell.thirdparty.parking.common.response.DataResponse;
|
import com.jsowell.thirdparty.parking.common.response.DataResponse;
|
||||||
import com.jsowell.thirdparty.parking.service.QcyunsService;
|
import com.jsowell.thirdparty.parking.service.QcyunsService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -66,15 +68,16 @@ public class QcyunsServiceImpl implements QcyunsService {
|
|||||||
* 商家减免
|
* 商家减免
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean createDiscountCoupon() {
|
@Override
|
||||||
|
public boolean createDiscountCoupon(String plate, String grantSerial, String parkingSerial) {
|
||||||
// 业务参数
|
// 业务参数
|
||||||
Map<String, String> data = Maps.newHashMap();
|
Map<String, String> data = Maps.newHashMap();
|
||||||
data.put("parkingSerial", "");
|
data.put("parkingSerial", parkingSerial);
|
||||||
data.put("grantSerial", "");
|
data.put("grantSerial", grantSerial); // 对接方唯一id
|
||||||
data.put("plate", ""); // 车牌号
|
data.put("plate", plate); // 车牌号
|
||||||
data.put("storeName", ""); // 商家名称
|
data.put("storeName", ""); // 商家名称
|
||||||
data.put("type", ""); // 优惠类型: 1.金额, 2.时长, 3.全免
|
data.put("type", "1"); // 优惠类型: 1.金额, 2.时长, 3.全免
|
||||||
data.put("value", ""); // 当type=1时单位为分;当type=2时单位为分钟
|
data.put("value", String.valueOf(10 * 100)); // 当type=1时单位为分;当type=2时单位为分钟
|
||||||
data.put("parkId", ""); //
|
data.put("parkId", ""); //
|
||||||
// 组装请求体
|
// 组装请求体
|
||||||
ParkingCommonParam param = new ParkingCommonParam();
|
ParkingCommonParam param = new ParkingCommonParam();
|
||||||
@@ -93,4 +96,23 @@ public class QcyunsServiceImpl implements QcyunsService {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发放停车券
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String issuanceOfParkingTickets(QcyunParkCouponDTO dto) {
|
||||||
|
String parkId = "";
|
||||||
|
String plateNumber = dto.getPlateNumber();
|
||||||
|
// 1. 查询车辆信息
|
||||||
|
String carInfo = getCarInfo(parkId, plateNumber);
|
||||||
|
if (StringUtils.isBlank(carInfo)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
TempCarInfo tempCarInfo = JSON.parseObject(carInfo, TempCarInfo.class);
|
||||||
|
// 2. 创建停车券
|
||||||
|
boolean discountCoupon = createDiscountCoupon(plateNumber, tempCarInfo.getRecordId() + "", tempCarInfo.getRecordId() + "");
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user