@@ -95,7 +95,7 @@ public class ResignManagerImpl extends AbstractCommManager implements ResignMana | |||
ResignRequest request = new ResignRequest(); | |||
request.setWxOpenId(dto.getSubOpenId()); | |||
request.setAgencyId(cardInfo.getAgencyId()); | |||
request.setAgencyId(dto.getVehicleId()); | |||
request.setVehicleId(dto.getVehicleId()); | |||
request.setName(accountInfo.getUserName()); | |||
request.setIdNum(accountInfo.getIdNum()); | |||
SignQueryResponse response = jsonPostRepeat(request); |
@@ -72,7 +72,7 @@ class InvwEnterApplyController extends MyValidController { | |||
@ApiOperation("07-号段校验") | |||
@PostMapping("/codeValid") | |||
public ApiResponse<InvwEnterApplyCodeValidResponseDTO> codeValid(@Valid @RequestBody InvwEnterApplyCodeValidRequestDTO dto) throws ManagerException { | |||
return ApiResponse.of(manager.codeValid(dto)).setMessage("号段校验完成"); | |||
return ApiResponse.of(manager.codeValid(dto)).setMessage("号段校验通过!"); | |||
} | |||
@ApiOperation("08-解析excel获取号段") |
@@ -14,11 +14,10 @@ import lombok.Getter; | |||
import lombok.Setter; | |||
import org.apache.commons.lang3.StringUtils; | |||
import javax.persistence.EnumType; | |||
import javax.persistence.Enumerated; | |||
import javax.validation.Valid; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import java.math.BigInteger; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
/** | |||
@@ -70,7 +69,7 @@ public class InvwEnterApplyAddRequestDTO extends AbstractStaffBizRequestDTO { | |||
private String filePath; | |||
@ApiModelProperty(value = "起始-结束号段list") | |||
@NotNull | |||
@Valid | |||
private List<EnterApplyDetailModel> enterApplyDetailModels; | |||
public void valid() throws ManagerException { | |||
@@ -83,7 +82,7 @@ public class InvwEnterApplyAddRequestDTO extends AbstractStaffBizRequestDTO { | |||
throw new ManagerException("卡号长度必须为20"); | |||
} | |||
} | |||
validateCode(enterApplyDetailModels); | |||
}else if (InventoryType.OBU.equals(inventoryType)){ | |||
if (obuType == null){ | |||
throw new ManagerException("未选择签类型"); | |||
@@ -97,6 +96,7 @@ public class InvwEnterApplyAddRequestDTO extends AbstractStaffBizRequestDTO { | |||
throw new ManagerException("签号长度必须为16"); | |||
} | |||
} | |||
validateCode(enterApplyDetailModels); | |||
// if (ObuType.SINGLE_CHIP.equals(obuType)){ | |||
// if (cardType == null){ | |||
@@ -118,4 +118,28 @@ public class InvwEnterApplyAddRequestDTO extends AbstractStaffBizRequestDTO { | |||
// } | |||
} | |||
} | |||
private void validateCode(List<EnterApplyDetailModel> details) throws ManagerException { | |||
// 检查每个对象的endId >= startId | |||
for (EnterApplyDetailModel detail : details) { | |||
if (detail.getStartId().compareTo(detail.getEndId()) > 0) { | |||
throw new ManagerException("结束号段"+detail.getEndId()+"要大于等于起始号段"); | |||
} | |||
} | |||
// 排序并检查区间重叠 | |||
details.sort(Comparator.comparing(EnterApplyDetailModel::getStartId)); | |||
for (int i = 1; i < details.size(); i++) { | |||
EnterApplyDetailModel prev = details.get(i - 1); | |||
EnterApplyDetailModel current = details.get(i); | |||
if (current.getStartId().compareTo(prev.getEndId()) <= 0){ | |||
throw new ManagerException("起始号段("+current.getStartId()+")与其他的号段有重叠"); // 区间重叠 | |||
} | |||
} | |||
} | |||
} |
@@ -14,11 +14,10 @@ import lombok.Getter; | |||
import lombok.Setter; | |||
import org.apache.commons.lang3.StringUtils; | |||
import javax.persistence.EnumType; | |||
import javax.persistence.Enumerated; | |||
import javax.validation.Valid; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import java.math.BigInteger; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
/** | |||
@@ -74,7 +73,7 @@ public class InvwEnterApplyUpdateRequestDTO extends AbstractStaffBizRequestDTO { | |||
private String filePath; | |||
@ApiModelProperty(value = "起始-结束号段list") | |||
@NotNull | |||
@Valid | |||
private List<EnterApplyDetailModel> enterApplyDetailModels; | |||
@@ -88,7 +87,7 @@ public class InvwEnterApplyUpdateRequestDTO extends AbstractStaffBizRequestDTO { | |||
throw new ManagerException("卡号长度必须为20"); | |||
} | |||
} | |||
validateCode(enterApplyDetailModels); | |||
}else if (InventoryType.OBU.equals(inventoryType)){ | |||
if (obuType == null){ | |||
throw new ManagerException("未选择签类型"); | |||
@@ -99,9 +98,10 @@ public class InvwEnterApplyUpdateRequestDTO extends AbstractStaffBizRequestDTO { | |||
throw new ManagerException("起始或结束号段未填写完整"); | |||
} | |||
if (detailModel.getStartId().length() != 16 || detailModel.getEndId().length() != 16){ | |||
throw new ManagerException("卡号长度必须为16"); | |||
throw new ManagerException("签号长度必须为16"); | |||
} | |||
} | |||
validateCode(enterApplyDetailModels); | |||
// if (ObuType.SINGLE_CHIP.equals(obuType)){ | |||
// if (cardType == null){ | |||
@@ -124,4 +124,25 @@ public class InvwEnterApplyUpdateRequestDTO extends AbstractStaffBizRequestDTO { | |||
} | |||
} | |||
private void validateCode(List<EnterApplyDetailModel> details) throws ManagerException { | |||
// 检查每个对象的endId >= startId | |||
for (EnterApplyDetailModel detail : details) { | |||
if (detail.getStartId().compareTo(detail.getEndId()) > 0) { | |||
throw new ManagerException("结束号段"+detail.getEndId()+"要大于等于起始号段"); | |||
} | |||
} | |||
// 排序并检查区间重叠 | |||
details.sort(Comparator.comparing(EnterApplyDetailModel::getStartId)); | |||
for (int i = 1; i < details.size(); i++) { | |||
EnterApplyDetailModel prev = details.get(i - 1); | |||
EnterApplyDetailModel current = details.get(i); | |||
if (current.getStartId().compareTo(prev.getEndId()) <= 0){ | |||
throw new ManagerException("起始号段("+current.getStartId()+")要大于结束号段("+prev.getEndId()+")"); // 区间重叠 | |||
} | |||
} | |||
} | |||
} |
@@ -5,6 +5,9 @@ import com.alibaba.excel.annotation.ExcelProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.Pattern; | |||
/** | |||
* @Auther: humh | |||
* @Description: | |||
@@ -16,10 +19,14 @@ import lombok.Setter; | |||
@Setter | |||
public class EnterApplyDetailModel extends BaseModel { | |||
@NotBlank | |||
@ExcelProperty(index = 0) | |||
@Pattern(regexp = "^[0-9]+$", message = "起始编码必须为纯数字") | |||
private String startId; //起始编码 | |||
@NotBlank | |||
@ExcelProperty(index = 1) | |||
@Pattern(regexp = "^[0-9]+$", message = "起始编码必须为纯数字") | |||
private String endId; //结束编码 | |||
// @ExcelProperty(index = 2) |
@@ -16,13 +16,13 @@ public class InvwTransferApplyDetailsModel { | |||
@ApiModelProperty(value = "起始号段") | |||
@NotBlank(message = "开始号段不能为空") | |||
@Pattern(regexp = "^[0-9]*$", message = "号段只能由0-9组成") | |||
@Pattern(regexp = "^[0-9]+$", message = "号段只能由0-9组成") | |||
@ExcelProperty(index = 0, value = "起始号段") | |||
private String startId;//开始编号 | |||
@ApiModelProperty(value = "结束号段") | |||
@NotBlank(message = "结束号段不能为空") | |||
@Pattern(regexp = "^[0-9]*$", message = "号段只能由0-9组成") | |||
@Pattern(regexp = "^[0-9]+$", message = "号段只能由0-9组成") | |||
@ExcelProperty(index = 1, value = "结束号段") | |||
private String endId;//结束编号 | |||
@@ -1,8 +1,10 @@ | |||
package cn.com.taiji.managew.model.basic; | |||
import cn.com.taiji.common.model.BaseModel; | |||
import cn.com.taiji.core.entity.dict.basic.CardStatus; | |||
import cn.com.taiji.core.entity.dict.basic.CardType; | |||
import cn.com.taiji.core.entity.dict.basic.DeviceVersion; | |||
import cn.com.taiji.core.entity.dict.basic.SecretKeyType; | |||
import lombok.Data; | |||
import java.time.LocalDateTime; | |||
@@ -22,7 +24,8 @@ public class BasicInfoCardModel extends BaseModel { | |||
private LocalDateTime cardEnableTime;//卡启用时间; | |||
private LocalDateTime cardExpireTime;//卡过期时间; | |||
private String channelId;//网点编号; | |||
private Integer cardIssuedType;//开卡方式 1-线上 2-线下 订单表的promotionModesrivate CardStatus cardStatus;//卡状态; | |||
private Integer cardIssuedType;//开卡方式 1-线上 2-线下 订单表的promotionModes | |||
private CardStatus cardStatus;//卡状态; | |||
private LocalDateTime cardStatusChangeTime;//卡状态变更时间; | |||
private String packageId;//套餐编号(产品编号); | |||
private Integer packageType;//套餐类型 当前全都默认是0 | |||
@@ -33,7 +36,9 @@ public class BasicInfoCardModel extends BaseModel { | |||
private String agreementId;//签约协议号-上传部里的协议?; | |||
private Long balance;//卡金额; | |||
private Integer debitType;//记账卡的基础上,0是记账卡,1是预存卡 | |||
private Integer isMigrateData = 0;//是否迁移数据0_否,1_是rivate SecretKeyType deviceType;//设备类型rivate CardType cardTypeNew;//卡类型(上面那个卡类型太乱了) | |||
private Integer isMigrateData = 0;//是否迁移数据0_否,1_是 | |||
private SecretKeyType deviceType;//设备类型 | |||
// private CardType cardTypeNew;//卡类型(上面那个卡类型太乱了) | |||
private LocalDateTime warrantyDate;//质保期(之前从库存里面取,后续数据迁移注意转换); | |||
//VEHICLE_PLATE;车牌号 |
@@ -1,125 +1,71 @@ | |||
package cn.com.taiji.managew.model.basic; | |||
import cn.com.taiji.common.model.BaseModel; | |||
import cn.com.taiji.core.entity.dict.basic.IdType; | |||
import cn.com.taiji.core.entity.dict.basic.UseUserType; | |||
import cn.com.taiji.core.entity.dict.basic.VehicleUseCharacter; | |||
import lombok.Data; | |||
import java.time.LocalDateTime; | |||
import java.util.Date; | |||
@Data | |||
public class BasicInfoVehicleModel extends BaseModel { | |||
// 创建时间 | |||
private LocalDateTime insertTime; | |||
// 更新时间 | |||
private LocalDateTime updateTime; | |||
//应急车辆标识 0-非应急车辆 1-应急车辆 | |||
private Integer emergencyFlag; | |||
// 车辆ID | |||
private String vehicleId; | |||
// 车牌号 | |||
private String vehiclePlate; | |||
// 车牌颜色 | |||
private Integer vehiclePlateColor; | |||
// 用户编号 | |||
private String customerId; | |||
// 车型 | |||
private Integer type; | |||
// 使用用户类型 | |||
private Integer useUserType; | |||
// 车辆签约 | |||
private Integer vehicleSign; | |||
// 车辆识别代号 | |||
private String vin; | |||
// 发动机编号 | |||
private String engineNum; | |||
// 行驶证车辆类型 | |||
private String vehicleType; | |||
// 行驶证品牌型号 | |||
private String vehicleModel; | |||
// 核定载人数 | |||
private Integer approvedCount; | |||
// 总质量 | |||
private Integer totalMass; | |||
// 整备质量 | |||
private Integer maintenaceMass; | |||
// 核定载质量 | |||
private Integer permittedWeight; | |||
// 车辆尺寸 | |||
private String vehicleDimensions; | |||
// 准牵引总质量 | |||
private Integer permittedTowWeight; | |||
// 车轴数 | |||
private Integer axleCount; | |||
// 发证日期 | |||
private String issueDate; | |||
// 行驶证正面图片地址 | |||
private String vehPosImgUrl; | |||
// 行驶证反面图片地址 | |||
private String vehNegImgUrl; | |||
// 车主姓名 | |||
private String ownerName; | |||
// 车主证件类型 | |||
private Integer ownerIdType; | |||
// 车主证件号码 | |||
private String ownerIdNum; | |||
// 车主证件正面图片的BASE64编码 | |||
private String ownerPosImgUrl; | |||
// 车主证件反面图片的BASE64编码 | |||
private String ownerNegImgUrl; | |||
// 签约编号 | |||
private String agreementId; | |||
// 添加渠道编号 | |||
private String channelId; | |||
// 代扣协议支撑服务场景(签约渠道(银行、微信支付宝等)和用户签定的协议) | |||
private String scenePayType; | |||
// 道路运输证编号 | |||
private String transportIdNum; | |||
// 经营许可证编号 | |||
private String licenseIdNum; | |||
// 车身45°照片 | |||
private String vehBodyUrl; | |||
// 委托书地址 | |||
private String proxyUrl; | |||
// 指定联系人列表 | |||
private String contacts; | |||
// 所有人联系地址 | |||
private String ownerAddress; | |||
// 轴型 | |||
private String axisType; | |||
// 检验记录 | |||
private String testRecord; | |||
// 档案编号 | |||
private String fileNum; | |||
// 录入时间 | |||
private String registeredTime; | |||
// 所有人联系方式 | |||
private String ownerTel; | |||
// 车辆使用性质 | |||
private Integer useCharacter; | |||
// 注册日期 | |||
private String registerDate; | |||
// 轴距 | |||
private Integer axleDistance; | |||
// 迁移新增:车辆用户类型 | |||
private Integer vehicleCustomerType; | |||
//车脸识别特征版本号 版本号(YYYYMMDD+2位顺序码)+算法类型(2位) | |||
private String vehicleFeatureVersion; | |||
//车脸识别特征码 | |||
private String vehicleFeatureCode; | |||
//预付费/代扣账户编码 | |||
private String payAccountNum; | |||
//车轮数 | |||
private Integer wheelCount; | |||
//上传状态 | |||
private Integer uploadStatus; | |||
//认证监管平台车辆编号 | |||
private String daspVehicleId; | |||
//是否认证监管平台 0-不是 1-是" | |||
private String daspSign; | |||
//认证监管平台接收时间 | |||
private Date daspAccept; | |||
// 牵引车标识:0否 1 是 | |||
private String tractorSign; | |||
// 道路运输许可证图片地址 | |||
private String roadTransportPermitPicUrl; | |||
private LocalDateTime insertTime;//创建时间; | |||
private LocalDateTime updateTime;//更新时间; | |||
private String vehicleId;//车辆ID; | |||
private String vehiclePlate;//车牌号; | |||
private Integer vehiclePlateColor;//车牌颜色; | |||
private String customerId;//用户编号; | |||
private Integer type;//车型;对应VehicleType枚举 | |||
private UseUserType useUserType;//车辆使用类型; | |||
private Integer vehicleSign;//前/后装标识,1-前装 2-后装 | |||
private String vin;//车辆识别代号; | |||
private String engineNum;//发动机编号; | |||
private String vehicleType;//行驶证车辆类型; | |||
private String vehicleModel;//行驶证品牌型号; | |||
private Integer approvedCount;//核定载人数; | |||
private Integer totalMass;//总质量; | |||
private Integer maintenaceMass;//整备质量; | |||
private Integer permittedWeight;//核定载质量; | |||
private String vehicleDimensions;//车辆尺寸; | |||
private Integer permittedTowWeight;//准牵引总质量; | |||
private Integer axleCount;//车轴数; | |||
private String issueDate;//发证日期; | |||
private String vehPosImgUrl;//行驶证正面图片地址; | |||
private String vehNegImgUrl;//行驶证反面图片地址; | |||
private String ownerName;//车主姓名; | |||
private IdType ownerIdType;//车主证件类型; | |||
private String ownerIdNum;//车主证件号码; | |||
private String ownerPosImgUrl;//车主证件正面图片的BASE64编码; | |||
private String ownerNegImgUrl;//车主证件反面图片的BASE64编码; | |||
private String agreementId;//签约编号; | |||
private String channelId;//添加渠道编号; | |||
private String transportIdNum;//道路运输证编号-牵引车; | |||
private String licenseIdNum;//经营许可证编号; | |||
private String vehBodyUrl;//车身45°照片; | |||
private String proxyUrl;//委托书地址; | |||
private Integer emergencyFlag;////应急车辆标识 0-非应急车辆 1-应急车辆; | |||
private String contacts;//指定联系人列表; | |||
private String ownerAddress;//所有人联系地址; | |||
private String axisType;//轴型; | |||
private String testRecord;//检验记录; | |||
private String fileNum;//档案编号; | |||
private LocalDateTime registeredTime;//录入时间; | |||
private String ownerTel;//所有人联系方式; | |||
private VehicleUseCharacter useCharacter;//车辆使用性质; | |||
private int useCharacterCode;//车辆使用性质; | |||
private String registerDate;//注册日期-行驶证; | |||
private Integer axleDistance;//轴距 | |||
private Integer vehicleWheelCount;//车轮数 | |||
private Integer uploadStatus;//上传状态 | |||
private Integer customerType;//车辆用户类型 | |||
private String daspVehicleId;//认证监管平台车辆编号 | |||
private Integer tractorSign;//牵引车标识:0否1是 | |||
private String roadTransportPermitPicUrl;//道路运输许可证图片地址 | |||
private String contractId;//微信侧ETC绑定号 V3签约成功后 微信返回 | |||
public int getUseCharacterCode() { | |||
return useCharacter.getCode(); | |||
} | |||
} |