@@ -24,49 +24,35 @@ import lombok.Setter; | |||
@Table(name = "MANAGEW_DEVICE_QUERY_RECORD") | |||
public class DeviceQueryRecord extends StringPropertyUUIDEntity { | |||
@NotNull | |||
@Column(name = "OPEN_ID") | |||
private String openId;//openId | |||
@NotNull | |||
@Column(name = "QUERY_TIME") | |||
private LocalDateTime queryTime;//查询时间; | |||
@NotNull | |||
@Column(name = "SOURCE_TYPE") | |||
@Enumerated(EnumType.STRING) | |||
private SourceType sourceType;//来源 | |||
// 卡信息 | |||
@NotBlank | |||
@Size(max = 20) | |||
@Column(name = "CARD_ID") | |||
private String cardId;//卡号; | |||
@NotBlank | |||
@Column(name = "CUSTOMER_NAME") | |||
private String customerName;// 用户姓名 | |||
@NotBlank | |||
@Column(name = "CUSTOMER_IDNUM") | |||
private String customerIdNum;// 身份证号 | |||
@NotBlank | |||
@Column(name = "CARD_VEHICLE_TYPE") | |||
private String cardVehicleType;// 行驶证车辆类型 | |||
@NotBlank | |||
@Column(name = "CARD_VEHICLE_PLATE") | |||
private String cardVehiclePlate;// 车牌号码 | |||
@NotNull | |||
@Column(name = "CARD_VEHICLE_PLATE_COLOR") | |||
private String cardVehiclePlateColor;// 车牌颜色 | |||
@NotNull | |||
@Column(name = "CARD_ENABLE_TIME") | |||
private String cardEnableTime;//卡启用时间; | |||
@NotNull | |||
@Column(name = "CARD_EXPIRE_TIME") | |||
private String cardExpireTime;//卡过期时间; | |||
@NotBlank | |||
@Column(name = "CHECK_SUMS") | |||
private String checksums;// 校验值 | |||
@NotBlank | |||
@Column(name = "CARD_VERSION") | |||
private String cardVersion;//卡版本号; | |||
@NotBlank | |||
@Column(name = "BINDING_FINISH_STATUS") | |||
private String bindingFinishStatus;//卡签绑定完成状态; | |||
@Column(name = "CARD_STATUS") | |||
@@ -76,56 +62,39 @@ public class DeviceQueryRecord extends StringPropertyUUIDEntity { | |||
@Column(name = "CARD_BALANCE") | |||
private Long cardBalance; | |||
// 签信息 | |||
@NotBlank | |||
@Size(max = 16) | |||
@Column(name = "OBU_ID") | |||
private String obuId;//obu编号; | |||
@NotBlank | |||
@Column(name = "OBU_VEHICLE_TYPE") | |||
private String obuVehicleType;//行驶证车辆类型 | |||
@NotNull | |||
@Column(name = "OBU_VEHICLE_CUSTOMER_TYPE") | |||
private String obuVehicleCustomerType;// 车辆用户类型不能为空 | |||
@NotBlank | |||
@Column(name = "OBU_VEHICLE_PLATE") | |||
private String obuVehiclePlate;// 车牌号码 | |||
@NotNull | |||
@Column(name = "OBU_VEHICLE_PLATE_COLOR") | |||
private String obuVehiclePlateColor;// 车牌颜色 | |||
@NotNull | |||
@Column(name = "APPROVED_COUNT") | |||
private Integer approvedCount;// 核定载人数 | |||
@NotBlank | |||
@Column(name = "VIN") | |||
private String vin;// 车辆识别代号 | |||
@NotBlank | |||
@Column(name = "VEHICLE_ENGINE_NUM") | |||
private String vehicleEngineNum;// 发动机号码 | |||
@NotNull | |||
@Column(name = "WHEEL_COUNT") | |||
private Integer wheelCount;// 车轮数 | |||
@NotNull | |||
@Column(name = "AXLE_COUNT") | |||
private Integer axleCount;// 车轴数 | |||
@NotNull | |||
@Column(name = "AXLE_DISTANCE") | |||
private Integer axleDistance; // 轴距 | |||
@NotBlank | |||
@Column(name = "VEHICLE_DIMENSIONS") | |||
private String vehicleDimensions;// 外廓尺寸 | |||
@NotNull | |||
@Column(name = "OBU_ENABLE_TIME") | |||
private String obuEnableTime;//启用时间; | |||
@NotNull | |||
@Column(name = "OBU_EXPIRE_TIME") | |||
private String obuExpireTime;//到期时间; | |||
@NotNull | |||
@Column(name = "IS_ACTIVE") | |||
private String isActive;// 是否激活 | |||
@NotNull | |||
@Column(name = "LOAD_STATUS") | |||
private String loadStatus; // 拆卸状态 | |||
@NotBlank | |||
@Column(name = "OBU_VERSION") | |||
private String obuVersion;// obu版本号; | |||
@Column(name = "OBU_STATUS") |
@@ -40,11 +40,11 @@ public enum VfjServiceCmd implements SignServiceCommand { | |||
QUERYSCOBUS("单片OBU一发列表查询", "QueryScobus", VfjQueryScobusRequest.class), | |||
QUERYTRIDESOBUS("DESOBU一发列表查询", "QueryTriDesObus", VfjQueryTriDesObusRequest.class), | |||
APPLY4UPGRADE("升级类OBU", "Apply4Upgrade", VfjQueryTriDesObusRequest.class), | |||
GETCOMMANDS("获取发行脚本指令", "GetCommands", VfjQueryTriDesObusRequest.class), | |||
EXCHANGEKEY("密钥置换", "ExchangeKey", VfjQueryTriDesObusRequest.class), | |||
UPGRADEDONE("升级成功确认", "UpgradeDone", VfjQueryTriDesObusRequest.class), | |||
EXTAUTH4ISS("外部认证指令", "ExtAuth4Iss", VfjQueryTriDesObusRequest.class), | |||
APPLY4UPGRADE("升级类OBU", "Apply4Upgrade", VfjApply4UpgradeRequest.class), | |||
GETCOMMANDS("获取发行脚本指令", "GetCommands", VfjGetCommandsRequest.class), | |||
EXCHANGEKEY("密钥置换", "ExchangeKey", VfjExchangeKeyRequest.class), | |||
UPGRADEDONE("升级成功确认", "UpgradeDone", VfjUpgradeDoneRequest.class), | |||
EXTAUTH4ISS("外部认证指令", "ExtAuth4Iss", VfjExtAuth4IssRequest.class), | |||
; |
@@ -23,93 +23,66 @@ import lombok.experimental.Accessors; | |||
@Validated | |||
public class DeviceQueryRequestDTO extends AbstractBizRequestDTO { | |||
// 卡信息 | |||
@NotBlank | |||
@Size(max = 20) | |||
@ApiModelProperty(value = "卡号") | |||
private String cardId;//卡号; | |||
@NotBlank | |||
@ApiModelProperty(value = "用户姓名") | |||
private String customerName;// 用户姓名 | |||
@NotBlank | |||
@ApiModelProperty(value = "身份证号") | |||
private String customerIdNum;// 身份证号 | |||
// @NotBlank | |||
@ApiModelProperty(value = "行驶证车辆类型") | |||
private String cardVehicleType;// 行驶证车辆类型 | |||
@NotBlank | |||
@ApiModelProperty(value = "车牌号码") | |||
private String cardVehiclePlate;// 车牌号码 | |||
@NotNull | |||
@ApiModelProperty(value = "车牌颜色") | |||
private String cardVehiclePlateColor;// 车牌颜色 | |||
@NotNull | |||
@ApiModelProperty(value = "卡启用时间") | |||
private String cardEnableTime;//卡启用时间; | |||
@NotNull | |||
@ApiModelProperty(value = "卡过期时间") | |||
private String cardExpireTime;//卡过期时间; | |||
@NotBlank | |||
@ApiModelProperty(value = "校验值") | |||
private String checksums;// 校验值 | |||
@NotBlank | |||
@ApiModelProperty(value = "卡版本号") | |||
private String cardVersion;//卡版本号; | |||
@NotBlank | |||
@ApiModelProperty(value = "卡签绑定完成状态") | |||
private String bindingFinishStatus;//卡签绑定完成状态; | |||
@ApiModelProperty(value = "卡余额") | |||
private Long cardBalance; | |||
// 签信息 | |||
@NotBlank | |||
@Size(max = 16) | |||
@ApiModelProperty(value = "obu编号") | |||
private String obuId;//obu编号; | |||
// @NotBlank | |||
@ApiModelProperty(value = "行驶证车辆类型") | |||
private String obuVehicleType;//行驶证车辆类型 | |||
@NotNull | |||
@ApiModelProperty(value = "车辆用户类型不能为空") | |||
private String obuVehicleCustomerType;// 车辆用户类型不能为空 | |||
@NotBlank | |||
@ApiModelProperty(value = "车牌号码") | |||
private String obuVehiclePlate;// 车牌号码 | |||
@NotNull | |||
@ApiModelProperty(value = "车牌颜色") | |||
private String obuVehiclePlateColor;// 车牌颜色 | |||
@NotNull | |||
@ApiModelProperty(value = "核定载人数") | |||
private Integer approvedCount;// 核定载人数 | |||
@NotBlank | |||
@ApiModelProperty(value = "车辆识别代号") | |||
private String vin;// 车辆识别代号 | |||
@NotBlank | |||
@ApiModelProperty(value = "发动机号码") | |||
private String vehicleEngineNum;// 发动机号码 | |||
@NotNull | |||
@ApiModelProperty(value = "车轮数") | |||
private Integer wheelCount;// 车轮数 | |||
@NotNull | |||
@ApiModelProperty(value = "车轴数") | |||
private Integer axleCount;// 车轴数 | |||
@NotNull | |||
@ApiModelProperty(value = "轴距") | |||
private Integer axleDistance; // 轴距 | |||
@NotBlank | |||
@ApiModelProperty(value = "外廓尺寸") | |||
private String vehicleDimensions;// 外廓尺寸 | |||
@NotNull | |||
@ApiModelProperty(value = "启用时间") | |||
private String obuEnableTime;//启用时间; | |||
@NotNull | |||
@ApiModelProperty(value = "到期时间") | |||
private String obuExpireTime;//到期时间; | |||
@NotNull | |||
@ApiModelProperty(value = "是否激活") | |||
private String isActive;// 是否激活 | |||
@NotNull | |||
@ApiModelProperty(value = "拆卸状态") | |||
private String loadStatus; // 拆卸状态 | |||
@NotBlank | |||
@ApiModelProperty(value = "obu版本号") | |||
private String obuVersion;// obu版本号; | |||
} |
@@ -1,6 +1,7 @@ | |||
package cn.com.taiji.iaw.dto.vfj; | |||
import cn.com.taiji.core.dto.AbstractBizRequestDTO; | |||
import cn.com.taiji.common.valid.BaseValidDTO; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -11,7 +12,7 @@ import javax.validation.constraints.NotBlank; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class VfjApply4UpgradeRequestDTO extends AbstractBizRequestDTO { | |||
public class VfjApply4UpgradeRequestDTO extends BaseValidDTO { | |||
private String obuMac; | |||
@NotBlank(message = "请指定obu合同序列号") | |||
@JsonProperty(value = "contractSN") | |||
@@ -26,4 +27,9 @@ public class VfjApply4UpgradeRequestDTO extends AbstractBizRequestDTO { | |||
private String cardVersion; | |||
@NotBlank(message = "请指定obu版本号") | |||
private String obuVersion; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
} | |||
} |
@@ -1,6 +1,7 @@ | |||
package cn.com.taiji.iaw.dto.vfj; | |||
import cn.com.taiji.core.dto.AbstractBizRequestDTO; | |||
import cn.com.taiji.common.valid.BaseValidDTO; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
@@ -10,11 +11,16 @@ import javax.validation.constraints.NotBlank; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class VfjExchangeKeyRequestDTO extends AbstractBizRequestDTO { | |||
public class VfjExchangeKeyRequestDTO extends BaseValidDTO { | |||
@NotBlank(message = "请指定订单号") | |||
private String issueSerialNo; | |||
@NotBlank(message = "请指定密钥类型") | |||
private String key; | |||
@NotBlank(message = "请指定随机数") | |||
private String random; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
} | |||
} |
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.iaw.dto.vfj; | |||
import cn.com.taiji.core.dto.AbstractBizRequestDTO; | |||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import cn.com.taiji.common.valid.BaseValidDTO; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
@@ -11,11 +11,16 @@ import javax.validation.constraints.NotBlank; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class VfjExtAuth4IssRequestDTO extends AbstractBizRequestDTO { | |||
public class VfjExtAuth4IssRequestDTO extends BaseValidDTO { | |||
@NotBlank(message = "请指定密钥类型") | |||
private String keyType; | |||
@NotBlank(message = "请指定随机数") | |||
private String random; | |||
@NotBlank(message = "请指定订单号") | |||
private String issueSerialNo; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
} | |||
} |
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.iaw.dto.vfj; | |||
import cn.com.taiji.core.dto.AbstractBizRequestDTO; | |||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import cn.com.taiji.common.valid.BaseValidDTO; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
@@ -11,11 +11,16 @@ import javax.validation.constraints.NotBlank; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class VfjGetCommandsRequestDTO extends AbstractBizRequestDTO { | |||
public class VfjGetCommandsRequestDTO extends BaseValidDTO { | |||
@NotBlank(message = "请指定卡片序列号") | |||
private String cardNo; | |||
@NotBlank(message = "请指定obu物料代码") | |||
private String wareId; | |||
@NotBlank(message = "请指定发行订单") | |||
private String issueSerialNo; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
} | |||
} |
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.iaw.dto.vfj; | |||
import cn.com.taiji.core.dto.AbstractBizRequestDTO; | |||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import cn.com.taiji.common.valid.BaseValidDTO; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
@@ -11,8 +11,13 @@ import javax.validation.constraints.NotBlank; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class VfjUpgradeDoneRequestDTO extends AbstractBizRequestDTO { | |||
public class VfjUpgradeDoneRequestDTO extends BaseValidDTO { | |||
private String batchNo; | |||
@NotBlank(message = "请指定发行订单号") | |||
private String issueSerialNo; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
} | |||
} |
@@ -57,7 +57,7 @@ public class MessageWxMiniAddRequestDto extends AbstractStaffBizRequestDTO { | |||
if (receiverIdList.isEmpty() && !StringTools.hasText(attachmentUrl)) { | |||
msg.append("用户列表和附件地址不能同时为空,"); | |||
} | |||
if (!(StringTools.hasText(attachmentUrl) && StringTools.hasText(attachmentUrl))) { | |||
if (!(StringTools.hasText(attachmentUrl) && StringTools.hasText(attachmentUrl)) && receiverIdList.isEmpty()) { | |||
msg.append("附件名称和附件地址不能为空,"); | |||
} | |||
if (StringTools.hasText(msg)) throw new ManagerException(msg.toString());; |
@@ -45,10 +45,8 @@ public class MessageWxMpAddRequestDto extends AbstractStaffBizRequestDTO { | |||
@NotBlank | |||
private String requestDataJson;//发送handler信息 | |||
@ApiModelProperty(value = "附件名称", required = true) | |||
@NotBlank | |||
private String attachmentName;//附件名称 | |||
@ApiModelProperty(value = "附件地址", required = true) | |||
@NotBlank | |||
private String attachmentUrl;//附件地址 | |||
@ApiModelProperty(value = "消息类型,默认OFFICIAL_ACCOUNTS", required = true) | |||
@NotNull | |||
@@ -59,7 +57,7 @@ public class MessageWxMpAddRequestDto extends AbstractStaffBizRequestDTO { | |||
if (receiverIdList.isEmpty() && !StringTools.hasText(attachmentUrl)) { | |||
msg.append("用户列表和附件地址不能同时为空,"); | |||
} | |||
if (!(StringTools.hasText(attachmentUrl) && StringTools.hasText(attachmentUrl))) { | |||
if (!(StringTools.hasText(attachmentUrl) && StringTools.hasText(attachmentUrl)) && receiverIdList.isEmpty()) { | |||
msg.append("附件名称和附件地址不能为空,"); | |||
} | |||
if (StringTools.hasText(msg)) throw new ManagerException(msg.toString());; |
@@ -137,7 +137,7 @@ public class BrzDataSendManagerImpl extends AbstractCommManager implements BrzDa | |||
} | |||
} catch (Exception e) { | |||
logger.error("部认证错误-个人上传:", e); | |||
return data.setOfflineSendResult("后台报错").setSuccess(false); | |||
return data.setOfflineSendResult(e.getMessage().length() <= 200 ? e.getMessage() : e.getMessage().substring(0, 200)).setSuccess(false); | |||
} | |||
} | |||
@@ -167,7 +167,7 @@ public class BrzDataSendManagerImpl extends AbstractCommManager implements BrzDa | |||
} | |||
} catch (Exception e) { | |||
logger.error("部认证错误-单位上传:", e); | |||
return data.setOfflineSendResult(e.getMessage()).setSuccess(false); | |||
return data.setOfflineSendResult(e.getMessage().length() <= 200 ? e.getMessage() : e.getMessage().substring(0, 200)).setSuccess(false); | |||
} | |||
} | |||
@@ -214,15 +214,10 @@ public class BrzDataSendManagerImpl extends AbstractCommManager implements BrzDa | |||
} | |||
} catch (Exception e) { | |||
logger.error("部认证错误-车辆上传:", e); | |||
return data.setOfflineSendResult(e.getMessage().substring(0, 200)).setSuccess(false); | |||
return data.setOfflineSendResult(e.getMessage().length() <= 200 ? e.getMessage() : e.getMessage().substring(0, 200)).setSuccess(false); | |||
} | |||
} | |||
public static void main(String[] args) { | |||
String str = "123"; | |||
str.substring(0,200); | |||
} | |||
private DaspOfflineHasSend cardUpload(YgzCardUploadRequest ygzRequest, DaspOfflineHasSend data) { | |||
try { | |||
List<DaspOfflineHasSend> accounts = daspOfflineHasSendRepo.listByWithSuccess(ygzRequest.getCard().getCustomerId()); | |||
@@ -251,7 +246,7 @@ public class BrzDataSendManagerImpl extends AbstractCommManager implements BrzDa | |||
} | |||
} catch (Exception e) { | |||
logger.error("部认证错误-卡上传:", e); | |||
return data.setOfflineSendResult(e.getMessage()).setSuccess(false); | |||
return data.setOfflineSendResult(e.getMessage().length() <= 200 ? e.getMessage() : e.getMessage().substring(0, 200)).setSuccess(false); | |||
} | |||
} | |||
@@ -283,7 +278,7 @@ public class BrzDataSendManagerImpl extends AbstractCommManager implements BrzDa | |||
} | |||
} catch (Exception e) { | |||
logger.error("部认证错误-OBU上传:", e); | |||
return data.setOfflineSendResult(e.getMessage()).setSuccess(false); | |||
return data.setOfflineSendResult(e.getMessage().length() <= 200 ? e.getMessage() : e.getMessage().substring(0, 200)).setSuccess(false); | |||
} | |||
} | |||
@@ -65,9 +65,7 @@ public abstract class AbstractHandleManager extends AbstractManager { | |||
redisWrapManager.delete(VFJ_SESSION_ID_KEY); | |||
return this.excute(req); | |||
} else if (vfjResponse.getCode().equals("0000")) { | |||
if (!hasText(vfjResponse.getBuzzData())) | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("接口错误:无返回信息!"); | |||
return vfjResponse.getBuzzData(); | |||
return hasText(vfjResponse.getBuzzData()) ? vfjResponse.getBuzzData() : "{}"; | |||
} else { | |||
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("接口错误:" + vfjResponse.getMsg()); | |||
} |