Bladeren bron

iaw 和 Ias 签约修改

master
chenchaod 4 weken geleden
bovenliggende
commit
2949c2d2cc

+ 1
- 0
gly-base-core/src/main/java/cn/com/taiji/core/entity/dict/issue/IssueOrderStep.java Bestand weergeven

@@ -24,6 +24,7 @@ public enum IssueOrderStep {
REFUNDING(15, "退款中"),
REFUNDED(16, "退款成功"),
RETURNED(17, "退货成功"),
RETURNFAILED(18,"拒绝换货")

;


+ 2
- 2
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/ass/ResignRequest.java Bestand weergeven

@@ -21,8 +21,8 @@ public class ResignRequest extends AbstractSignTypeRequest<SignQueryResponse> {
}
@NotBlank(message = "wxOpenId不能为空")
String wxOpenId;
@NotBlank(message = "agencyId不能为空")
String agencyId;
@NotBlank(message = "productId不能为空")
String productId;
@NotBlank(message = "vehicleId不能为空")
String vehicleId;
@NotBlank(message = "name不能为空") //v3需要

+ 1
- 1
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/ass/ResignManagerImpl.java Bestand weergeven

@@ -104,7 +104,7 @@ public class ResignManagerImpl extends AbstractCommManager implements ResignMana
AccountInfo accountInfo = findAccountInfoByToken(dto.getAccessToken());
ResignRequest request = new ResignRequest();
request.setWxOpenId(dto.getSubOpenId());
request.setAgencyId(cardInfo.getAgencyId());
request.setProductId(cardInfo.getPackageId());
request.setVehicleId(dto.getVehicleId());
request.setName(accountInfo.getUserName());
request.setIdNum(accountInfo.getIdNum());

+ 32
- 5
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/order/SignCommonManager.java Bestand weergeven

@@ -3,15 +3,20 @@ package cn.com.taiji.ias.manager.order;
import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.com.taiji.core.entity.basic.QtkVehicleInfo;
import cn.com.taiji.core.entity.comm.CommonWxSignConfig;
import cn.com.taiji.core.entity.dict.issue.FeeCategory;
import cn.com.taiji.core.entity.issue.IssueProductPay;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.*;
import cn.com.taiji.core.model.comm.protocol.ias.order.SignQueryRequest;
import cn.com.taiji.core.model.comm.protocol.ias.order.SignQueryResponse;
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError;
import cn.com.taiji.core.repo.jpa.basic.QtkVehicleInfoRepo;
import cn.com.taiji.core.repo.jpa.comm.CommonWxSignConfigRepo;
import cn.com.taiji.core.repo.jpa.issue.IssueProductPayRepo;
import cn.com.taiji.ias.manager.AbstractCommManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
* @Author:ChenChao
@@ -26,11 +31,23 @@ public class SignCommonManager extends AbstractCommManager {
private CommonWxSignConfigRepo commonWxSignConfigRepo;
@Autowired
protected QtkVehicleInfoRepo vehicleInfoRepo;
@Autowired
private IssueProductPayRepo issueProductPayRepo;


public SignQueryResponse carSignV2(String wxOpenId, String agencyId,String vehicleId) throws ServiceHandleException {
public SignQueryResponse carSignV2(String wxOpenId, String productId,String vehicleId) throws ServiceHandleException {
List<IssueProductPay> issueProductPayList = issueProductPayRepo.findByFeeCategoryAndReleaseId(FeeCategory.PASS, productId);
if (isEmpty(issueProductPayList)){
logger.error("产品编号{}未配置通行费", productId);
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("产品未配置通行费");
}
String[] split = vehicleId.split("_");
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByAgencyIdAndVersion(agencyId, 2);
// CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByAgencyIdAndVersion(productId, 2);
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findById(issueProductPayList.get(0).getPayConfigId()).orElse(null);
if (signConfig == null) {
logger.error("产品编号{}没有签约配置信息", productId);
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("产品没有签约配置信息");
}
AtsVehicleUserStateRequest request = new AtsVehicleUserStateRequest();
request.setAppId(signConfig.getAppId());
request.setSubAppId(signConfig.getSubAppId());
@@ -60,10 +77,20 @@ public class SignCommonManager extends AbstractCommManager {
}
}

public SignQueryResponse carSignV3(String wxOpenId,String agencyId,String vehicleId,String name,String idNum) throws ServiceHandleException {
public SignQueryResponse carSignV3(String wxOpenId,String productId,String vehicleId,String name,String idNum) throws ServiceHandleException {

List<IssueProductPay> issueProductPayList = issueProductPayRepo.findByFeeCategoryAndReleaseId(FeeCategory.PASS, productId);
if (isEmpty(issueProductPayList)){
logger.error("产品编号{}未配置通行费", productId);
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("产品未配置通行费");
}
String[] split = vehicleId.split("_");
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByAgencyIdAndVersion(agencyId, 3);
// CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByAgencyIdAndVersion(agencyId, 3);
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findById(issueProductPayList.get(0).getPayConfigId()).orElse(null);
if (signConfig == null) {
logger.error("产品编号{}没有签约配置信息", productId);
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("产品没有签约配置信息");
}

//查询状态
AtsVehicleSignV3ResultRequest resultRequest = new AtsVehicleSignV3ResultRequest();

+ 2
- 2
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/order/SignQueryManager.java Bestand weergeven

@@ -69,7 +69,7 @@ public class SignQueryManager extends AbstractOrderManager<SignQueryRequest> {
switch (PlateColorType.valueOfCode(vehiclePlateColor)) {
case BLUE:
case GREEN:
res = signCommonManager.carSignV2(request.getSubOpenId(), order.getAgencyId(), order.getVehicleId());
res = signCommonManager.carSignV2(request.getSubOpenId(), order.getProductId(), order.getVehicleId());
flag = !"UNAUTHORIZED".equals(res.getUserState());
break;
case YELLOW:
@@ -83,7 +83,7 @@ public class SignQueryManager extends AbstractOrderManager<SignQueryRequest> {
name = order.getAgentName();
idNum = order.getAgentIdNum();
}
res = signCommonManager.carSignV3(request.getSubOpenId(), order.getAgencyId(), order.getVehicleId(), name, idNum);
res = signCommonManager.carSignV3(request.getSubOpenId(), order.getProductId(), order.getVehicleId(), name, idNum);
flag = "OPENED".equals(res.getUserState());
break;
default:

Laden…
Annuleren
Opslaan