Przeglądaj źródła

core 增加解除车牌占用申请协议

master
chenchaod 3 tygodni temu
rodzic
commit
c289ee1291

+ 31
- 0
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/constraint/VehiclePlate.java Wyświetl plik

@@ -0,0 +1,31 @@
package cn.com.taiji.core.model.comm.protocol.constraint;



import cn.com.taiji.core.model.comm.protocol.constraintvalidators.VehicleValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Target(ElementType.FIELD) // 只能注解成员变量
@Retention(RetentionPolicy.RUNTIME) // 注解的生命周期 为运行时
@Constraint(validatedBy = VehicleValidator.class)
@Documented
public @interface VehiclePlate {

public String message() default "车牌格式错误";


// public boolean mtc() default false;//mtc是最严的车牌格式校验
// 是否只校验长度和颜色
public StrictLevel strictLevel() default StrictLevel.MISS;

Class<?>[] groups() default {};

Class<? extends Payload>[] payload() default {};

public enum StrictLevel {
LENGTH, MISS, MISS_LENGTH
}
}

+ 39
- 0
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/constraintvalidators/VehicleValidator.java Wyświetl plik

@@ -0,0 +1,39 @@
package cn.com.taiji.core.model.comm.protocol.constraintvalidators;

import cn.com.taiji.core.model.comm.protocol.constraint.VehiclePlate;
import cn.com.taiji.core.model.comm.protocol.valid.RegexConstant;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;


public class VehicleValidator implements ConstraintValidator<VehiclePlate, String> {

public VehiclePlate.StrictLevel strictLevel;

@Override
public void initialize(VehiclePlate constraintAnnotation) {
this.strictLevel = constraintAnnotation.strictLevel();
}

@Override
public boolean isValid(String value, ConstraintValidatorContext context) {
if (value == null) {
return true;
}

String regex = RegexConstant.VehiclePlateRegexp;
if (strictLevel == VehiclePlate.StrictLevel.LENGTH) {
regex = RegexConstant.lengthVehiclePlateRegexp;
}
//2020年5月8日修改车牌号校验
if (strictLevel == VehiclePlate.StrictLevel.MISS_LENGTH) {
regex = RegexConstant.missLengthVehiclePlateRegex;
}
if (!value.matches(regex)) {
return false;
}
return true;
}

}

+ 1
- 0
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/ass/AssServiceCmd.java Wyświetl plik

@@ -20,6 +20,7 @@ public enum AssServiceCmd implements SignServiceCommand {
VEHICLECHANGECANCEL("信息更改取消", VehicleChangeCancelRequest.class),
VEHICLECHANGEARTIFICIAL("信息更改人工审核", VehicleChangeCancelRequest.class),
RESIGN("恢复签约", ResignRequest.class),
RELEASEPLATEAPPLY("解除车牌占用申请",ReleasePlateApplyRequest.class),
;

private final String value;

+ 90
- 0
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/ass/ReleasePlateApplyRequest.java Wyświetl plik

@@ -0,0 +1,90 @@
package cn.com.taiji.core.model.comm.protocol.ias.ass;

import cn.com.taiji.common.pub.validation.PatternFactory;
import cn.com.taiji.core.entity.dict.basic.IdType;
import cn.com.taiji.core.entity.dict.basic.PlateColorType;
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest;
import cn.com.taiji.core.model.comm.protocol.constraint.EnumInteger;
import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant;
import cn.com.taiji.core.model.comm.protocol.constraint.VehiclePlate;
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
* @Author:ChenChao
* @Date:2025/8/6 16:47
* @Filename:ReleasePlateApplyRequest
* @description:
*/
@Getter
@Setter
public class ReleasePlateApplyRequest extends AbstractSignTypeRequest<ReleasePlateApplyResponse> {
public ReleasePlateApplyRequest() {
super(AssServiceCmd.RELEASEPLATEAPPLY);
}

private String wxOpenId;//微信小程序openId
private Integer isSelf;//是否本人 1是,2否
@NotNull
@IntegerConstant(values="1,2")
private Integer applyType;//申请车辆分类:1个人,2单位
@NotBlank
@VehiclePlate
private String vehiclePlate;//车牌号
@NotNull
@EnumInteger(enumClazz = PlateColorType.class)
private Integer vehiclePlateColor;//车牌颜色
@NotBlank
@Pattern(regexp = PatternFactory.mobileRegexp, message = "手机号格式错误")
private String mobile;//手机号
@NotBlank
private String name;//身份证姓名
@NotBlank
@Pattern(regexp = PatternFactory.idCodeRegexp, message = "身份证格式错误")
private String customerIdNum;//证件号码
@NotBlank
private String userImagesUrl1;//身份证人像图片地址
@NotBlank
private String userImagesUrl2;//身份证国徽图片地址
@NotBlank
private String vehicleImagesUrl1;//行驶证正页图片地址
@NotBlank
private String vehicleImagesUrl2;//行驶证副页图片地址
@NotBlank
private String vehicleOwnerName;

//=============================单位车辆/个人授权==============================
private String orgName;//单位名称车辆所有人
@EnumInteger(enumClazz = IdType.class)
private Integer orgIdClass;//单位证件类型
private String orgId;//单位证件编号

private String personName;////非本人办理,车主名称
private String personIdNum;//非本人办理,车主证件号
private String personFrontUrl;//非本人办理,车主身份证件人面地址
private String personBackUrl;//非本人办理,车主身份证件国徽地址
private String orgImagesUrl1;//营业执照图片地址
private String authorizeImagesUrl1;//授权书图片地址

public void relatedValid(ErrorMsgBuilder builder) {
if (applyType == 2){
builder.validFieldNotBlank("orgName",orgName);
builder.validFieldNotNull("orgIdClass",orgIdClass);
builder.validFieldNotBlank("orgId",orgId);
builder.validFieldNotBlank("orgImagesUrl1",orgImagesUrl1);
builder.validFieldNotBlank("authorizeImagesUrl1",authorizeImagesUrl1);
}
//个人
if (applyType == 1 && isSelf == 2){
builder.validFieldNotBlank("personName",personName);
builder.validFieldNotBlank("personIdNum",personIdNum);
builder.validFieldNotBlank("personFrontUrl",personFrontUrl);
builder.validFieldNotBlank("personBackUrl",personBackUrl);
}
}
}

+ 13
- 0
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/ass/ReleasePlateApplyResponse.java Wyświetl plik

@@ -0,0 +1,13 @@
package cn.com.taiji.core.model.comm.protocol.ias.ass;


import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse;

/**
* @Author:ChenChao
* @Date:2025/8/6 16:48
* @Filename:ReleasePlateApplyResponse
* @description:
*/
public class ReleasePlateApplyResponse extends AbstractSignTypeResponse {
}

gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/order/GetH5UrlRequest.java → gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/issue/GetH5UrlRequest.java Wyświetl plik

@@ -1,8 +1,7 @@
package cn.com.taiji.core.model.comm.protocol.ias.order;
package cn.com.taiji.core.model.comm.protocol.ias.issue;

import cn.com.taiji.core.entity.dict.basic.PlateColorType;
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest;
import cn.com.taiji.core.model.comm.protocol.ias.issue.IssueServiceCmd;
import cn.com.taiji.core.model.comm.protocol.constraint.EnumInteger;
import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant;
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder;

gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/order/GetH5UrlResponse.java → gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/issue/GetH5UrlResponse.java Wyświetl plik

@@ -1,4 +1,4 @@
package cn.com.taiji.core.model.comm.protocol.ias.order;
package cn.com.taiji.core.model.comm.protocol.ias.issue;

import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse;
import lombok.Getter;

+ 0
- 1
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/protocol/ias/issue/IssueServiceCmd.java Wyświetl plik

@@ -4,7 +4,6 @@ import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest;
import cn.com.taiji.core.model.comm.protocol.SignServiceCommand;
import cn.com.taiji.core.model.comm.protocol.SignServiceType;
import cn.com.taiji.core.model.comm.protocol.ias.IasServiceType;
import cn.com.taiji.core.model.comm.protocol.ias.order.GetH5UrlRequest;

public enum IssueServiceCmd implements SignServiceCommand {
GETH5URL("获取ETC申办H5地址", GetH5UrlRequest.class),

zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/ass/ResignManager.java → zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/ass/resign/ResignManager.java Wyświetl plik

@@ -1,4 +1,4 @@
package cn.com.taiji.ias.manager.ass;
package cn.com.taiji.ias.manager.ass.resign;

import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.com.taiji.core.entity.dict.basic.PlateColorType;

+ 1
- 1
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/handler/AssServiceHandler.java Wyświetl plik

@@ -3,7 +3,7 @@ package cn.com.taiji.ias.manager.handler;
import cn.com.taiji.core.model.comm.protocol.ias.ass.ResignRequest;
import cn.com.taiji.core.model.comm.protocol.ias.ass.vehicleInfoChange.VehicleChangeArtificialRequest;
import cn.com.taiji.core.model.comm.protocol.ias.ass.vehicleInfoChange.VehicleChangeCancelRequest;
import cn.com.taiji.ias.manager.ass.ResignManager;
import cn.com.taiji.ias.manager.ass.resign.ResignManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zgglyun.common.model.AbstractHttpRequestInfo;

+ 2
- 3
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/issue/GetH5UrlManager.java Wyświetl plik

@@ -4,8 +4,8 @@ import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.com.taiji.common.pub.TimeTools;
import cn.com.taiji.core.entity.dict.basic.SourceType;
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse;
import cn.com.taiji.core.model.comm.protocol.ias.order.GetH5UrlRequest;
import cn.com.taiji.core.model.comm.protocol.ias.order.GetH5UrlResponse;
import cn.com.taiji.core.model.comm.protocol.ias.issue.GetH5UrlRequest;
import cn.com.taiji.core.model.comm.protocol.ias.issue.GetH5UrlResponse;
import cn.com.taiji.core.model.comm.protocol.ias.order.OrderInitRequest;
import cn.com.taiji.core.model.comm.protocol.ias.order.OrderInitResponse;
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder;
@@ -29,7 +29,6 @@ import java.util.Map;
@Service
public class GetH5UrlManager extends AbstractOrderManager<GetH5UrlRequest> {

public static final String INIT_ORDER_RES = "initOrderRes";
public GetH5UrlManager() {
super(DataType.GET_H5_URL);
}

Ładowanie…
Anuluj
Zapisz