浏览代码

ias 增加用户校验接口

master
chenchaod 3 周前
父节点
当前提交
c58266d594

+ 69
- 69
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/ass/releasePlate/PlateOccupyQueryManager.java 查看文件

@@ -29,73 +29,73 @@ import java.util.Map;
@Service
public class PlateOccupyQueryManager extends AbstractCommManager {

public PlateOccupyQueryManager() {
super(DataType.PLATE_OCCUPY_QUERY);
}
@Override
protected String getDataId(PlateOccupyQueryRequest req) {
return "";
}
@Override
protected void formatValidateInternal(ErrorMsgBuilder builder, PlateOccupyQueryRequest req, ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException {
}
@Override
protected void businessValidateInternal(ErrorMsgBuilder builder, PlateOccupyQueryRequest req, ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException {
}
@Override
protected PlateOccupyQueryResponse getRes(PlateOccupyQueryRequest req, ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException, IOException {
PlateOccupyQueryResponse response = new PlateOccupyQueryResponse();
List<String> msgs = new ArrayList<>();
String vehicleId = req.getVehiclePlate() + "_" + req.getVehiclePlateColor();
// 双系统查询在用卡
List<QtkCardInfo> qtkCardInfos = queryCardInUse(vehicleId);
// 双系统查询在用签
List<QtkObuInfo> qtkObuInfos = queryObuInUse(vehicleId);
//当前车辆牌照是否被占用
VehiclePlateCheckRequest request = new VehiclePlateCheckRequest();
request.setVehiclePlate(req.getVehiclePlate());
request.setVehiclePlateColor(req.getVehiclePlateColor());
// 1-发行方已办理 2-统一平台办理 3-未关联 4-未办理 5办理中
VehiclePlateCheckResponse res = jsonPostRepeat(request);
//部中心校验本地系统也校验
if (res.getResult() == 4 && CollectionUtils.isEmpty(qtkCardInfos) && CollectionUtils.isEmpty(qtkObuInfos)) {
msgs.add("此车牌没有占用情况");
return response;
}
//外省发行方占用
if (!res.getInfo().contains("贵州")) {
msgs.add(res.getInfo());
return response;
}
if (!CollectionUtils.isEmpty(qtkCardInfos)){
response.setCardInfo(qtkCardInfos.get(0));
//双系统查询卡黑名单
List<QtkBlackCard> qtkBlackCards = queryBlackCard(qtkCardInfos.get(0).getCardId());
if (!CollectionUtils.isEmpty(qtkBlackCards)){
msgs.add("此卡存在黑名单");
response.setBlackCard(qtkBlackCards);
}
}
if (!CollectionUtils.isEmpty(qtkObuInfos)){
response.setObuInfo(qtkObuInfos.get(0));
//双系统查询签黑名单
List<QtkBlackObu> qtkBlackObs = queryBlackObu(qtkObuInfos.get(0).getObuId());
if (!CollectionUtils.isEmpty(qtkBlackObs)) {
msgs.add("此OBU存在黑名单");
response.setBlackObu(qtkBlackObs);
}
}
//todo 欠费情况
return response;
}
// public PlateOccupyQueryManager() {
// super(DataType.PLATE_OCCUPY_QUERY);
// }
// @Override
// protected String getDataId(PlateOccupyQueryRequest req) {
// return "";
// }
//
// @Override
// protected void formatValidateInternal(ErrorMsgBuilder builder, PlateOccupyQueryRequest req, ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException {
//
// }
//
// @Override
// protected void businessValidateInternal(ErrorMsgBuilder builder, PlateOccupyQueryRequest req, ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException {
//
// }
//
// @Override
// protected PlateOccupyQueryResponse getRes(PlateOccupyQueryRequest req, ServiceLogEvent event, Map<String, Object> dataStream) throws ServiceHandleException, IOException {
// PlateOccupyQueryResponse response = new PlateOccupyQueryResponse();
// List<String> msgs = new ArrayList<>();
// String vehicleId = req.getVehiclePlate() + "_" + req.getVehiclePlateColor();
// // 双系统查询在用卡
// List<QtkCardInfo> qtkCardInfos = queryCardInUse(vehicleId);
// // 双系统查询在用签
// List<QtkObuInfo> qtkObuInfos = queryObuInUse(vehicleId);
// //当前车辆牌照是否被占用
// VehiclePlateCheckRequest request = new VehiclePlateCheckRequest();
// request.setVehiclePlate(req.getVehiclePlate());
// request.setVehiclePlateColor(req.getVehiclePlateColor());
// // 1-发行方已办理 2-统一平台办理 3-未关联 4-未办理 5办理中
// VehiclePlateCheckResponse res = jsonPostRepeat(request);
// //部中心校验本地系统也校验
// if (res.getResult() == 4 && CollectionUtils.isEmpty(qtkCardInfos) && CollectionUtils.isEmpty(qtkObuInfos)) {
// msgs.add("此车牌没有占用情况");
// return response;
// }
// //外省发行方占用
// if (!res.getInfo().contains("贵州")) {
// msgs.add(res.getInfo());
// return response;
// }
//
// if (!CollectionUtils.isEmpty(qtkCardInfos)){
// response.setCardInfo(qtkCardInfos.get(0));
// //双系统查询卡黑名单
// List<QtkBlackCard> qtkBlackCards = queryBlackCard(qtkCardInfos.get(0).getCardId());
// if (!CollectionUtils.isEmpty(qtkBlackCards)){
// msgs.add("此卡存在黑名单");
// response.setBlackCard(qtkBlackCards);
// }
// }
//
// if (!CollectionUtils.isEmpty(qtkObuInfos)){
// response.setObuInfo(qtkObuInfos.get(0));
// //双系统查询签黑名单
// List<QtkBlackObu> qtkBlackObs = queryBlackObu(qtkObuInfos.get(0).getObuId());
// if (!CollectionUtils.isEmpty(qtkBlackObs)) {
// msgs.add("此OBU存在黑名单");
// response.setBlackObu(qtkBlackObs);
// }
// }
//
// //todo 欠费情况
//
//
// return response;
// }
}

正在加载...
取消
保存