深圳停车平台

This commit is contained in:
Guoqs
2025-02-14 15:40:37 +08:00
parent 8f6642df11
commit e18cd482fa
2 changed files with 8 additions and 10 deletions

View File

@@ -305,10 +305,6 @@ public class SpringBootTestController {
public void issuanceOfParkingTicketsTest() { public void issuanceOfParkingTicketsTest() {
QcyunParkCouponDTO dto = QcyunParkCouponDTO.builder() QcyunParkCouponDTO dto = QcyunParkCouponDTO.builder()
.plateNumber("粤B99614") .plateNumber("粤B99614")
.stationId("")
.stationName("测试站点")
.orgId("BTTEST01")
.parkId("61578")
.build(); .build();
qcyunsService.issuanceOfParkingTickets(dto); qcyunsService.issuanceOfParkingTickets(dto);
} }

View File

@@ -36,7 +36,7 @@ public class QcyunsServiceImpl implements QcyunsService {
@Value("${parking.qcyuns.parkId}") @Value("${parking.qcyuns.parkId}")
private String parkId; private String parkId;
@Value("${parking.qcyuns.parkId}") @Value("${parking.qcyuns.orgId}")
private String orgId; private String orgId;
/** /**
@@ -61,6 +61,8 @@ public class QcyunsServiceImpl implements QcyunsService {
dto.setParkingSerial(String.valueOf(tempCarInfo.getRecordId())); dto.setParkingSerial(String.valueOf(tempCarInfo.getRecordId()));
// 2. 创建停车券 // 2. 创建停车券
boolean discountCoupon = createDiscountCoupon(dto); boolean discountCoupon = createDiscountCoupon(dto);
// 3. 查询优惠抵扣金额
// queryCarInfoDiscountDestory(dto);
return discountCoupon; return discountCoupon;
} }
@@ -87,7 +89,7 @@ public class QcyunsServiceImpl implements QcyunsService {
// 发送请求 // 发送请求
String result = HttpUtil.post(URL, JSON.toJSONString(param)); String result = HttpUtil.post(URL, JSON.toJSONString(param));
DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class); DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class);
log.info("获取车辆信息接口成功, response:{}", JSON.toJSONString(dataResponse)); log.info("获取车辆信息接口成功, param:{}, response:{}", JSON.toJSONString(param), JSON.toJSONString(dataResponse));
if (dataResponse.getRetCode() == 0) { if (dataResponse.getRetCode() == 0) {
return dataResponse.getRetData().toString(); return dataResponse.getRetData().toString();
} }
@@ -120,8 +122,8 @@ public class QcyunsServiceImpl implements QcyunsService {
// 发送请求 // 发送请求
String result = HttpUtil.post(URL, JSON.toJSONString(param)); String result = HttpUtil.post(URL, JSON.toJSONString(param));
DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class); DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class);
log.info("创建优惠券成功, response:{}", JSON.toJSONString(dataResponse)); log.info("创建优惠券成功, param:{}, response:{}", JSON.toJSONString(param), JSON.toJSONString(dataResponse));
queryCarInfoDiscountDestory(dto);
if (dataResponse.getRetCode() == 0 && StringUtils.equals("减免成功", dataResponse.getRetData().toString())) { if (dataResponse.getRetCode() == 0 && StringUtils.equals("减免成功", dataResponse.getRetData().toString())) {
return true; return true;
} }
@@ -146,14 +148,14 @@ public class QcyunsServiceImpl implements QcyunsService {
param.setService(ServiceApiCmd.CarInfoDiscountDestory); param.setService(ServiceApiCmd.CarInfoDiscountDestory);
param.setVersion("01"); param.setVersion("01");
param.setMsgId(UUID.randomUUID().toString()); param.setMsgId(UUID.randomUUID().toString());
param.setOrgId(dto.getOrgId()); param.setOrgId(orgId);
param.setData(data); param.setData(data);
// 生成sign // 生成sign
ParkingUtil.generateAndSetSign(param, secretKey); ParkingUtil.generateAndSetSign(param, secretKey);
// 发送请求 // 发送请求
String result = HttpUtil.post(URL, JSON.toJSONString(param)); String result = HttpUtil.post(URL, JSON.toJSONString(param));
DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class); DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class);
log.info("查询优惠抵扣金额, response:{}", JSON.toJSONString(dataResponse)); log.info("查询优惠抵扣金额, param:{}, response:{}", JSON.toJSONString(param), JSON.toJSONString(dataResponse));
} }
} }