增加VIN码判断

This commit is contained in:
yuyang 2022-09-19 12:06:54 +08:00
parent d2e4df685b
commit e0d3af5069
4 changed files with 26 additions and 3 deletions

View File

@ -30,7 +30,10 @@ public class UserTypeUtil {
//重新登录 //重新登录
public static final Integer LOGIN_TYPE = 1999; public static final Integer LOGIN_TYPE = 1999;
//VIN码为空
public static final Integer INVALID_VIN = 1888;
//无效VIN码
public static final Integer NULL_VIN = 1880;
/** /**
* 微信操作渠道 * 微信操作渠道
*/ */
@ -102,7 +105,7 @@ public class UserTypeUtil {
public static final String CHARGING_MODE_WX = "微信"; public static final String CHARGING_MODE_WX = "微信";
public static final String CHARGING_MODE_ZFB = "支付宝"; public static final String CHARGING_MODE_ZFB = "支付宝";
public static final String CHARGING_MODE_CARD = "刷卡"; public static final String CHARGING_MODE_CARD = "刷卡";
public static final String CHARGING_MODE_VIN = "VIN码";
public static final Long SYS_USER_TYPE_ADMIN = 1L; public static final Long SYS_USER_TYPE_ADMIN = 1L;

View File

@ -154,6 +154,7 @@ public class XhpcChargeOrder extends BaseEntity {
//符合Evcs标准的订单号,并非来自第三方的订单号 //符合Evcs标准的订单号,并非来自第三方的订单号
private String evcsOrderNo; private String evcsOrderNo;
private String vinNormal;
public Integer getStopReasonEvcs() { public Integer getStopReasonEvcs() {
@ -476,4 +477,12 @@ public class XhpcChargeOrder extends BaseEntity {
public void setEvcsOrderNo(String evcsOrderNo) { public void setEvcsOrderNo(String evcsOrderNo) {
this.evcsOrderNo = evcsOrderNo; this.evcsOrderNo = evcsOrderNo;
} }
public String getVinNormal() {
return vinNormal;
}
public void setVinNormal(String vinNormal) {
this.vinNormal = vinNormal;
}
} }

View File

@ -865,7 +865,11 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
public R pileVin(String serialNumber, String vinNumber) { public R pileVin(String serialNumber, String vinNumber) {
try{ try{
if("".equals(vinNumber) || vinNumber ==null ){
return R.fail(1888, "VIN码为空");
}else if (vinNumber.length()!=17){
return R.fail(1880, "无效VIN码");
}
//Vin码表获取 用户id,用户类型 //Vin码表获取 用户id,用户类型
Long userId = 1L; Long userId = 1L;
Integer userType = 0; Integer userType = 0;
@ -1018,6 +1022,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
xhpcChargeOrder.setChargingMode("VIN码"); xhpcChargeOrder.setChargingMode("VIN码");
xhpcChargeOrder.setCreateTime(Calendar.getInstance().getTime()); xhpcChargeOrder.setCreateTime(Calendar.getInstance().getTime());
xhpcChargeOrder.setType("91"); xhpcChargeOrder.setType("91");
xhpcChargeOrder.setVinNormal(vinNumber);
xhpcChargeOrderMapper.addXhpcChargeOrder(xhpcChargeOrder); xhpcChargeOrderMapper.addXhpcChargeOrder(xhpcChargeOrder);
executorService.execute(new Runnable() { executorService.execute(new Runnable() {

View File

@ -252,6 +252,9 @@
<if test="null != evcsOrderNo and evcsOrderNo !=''"> <if test="null != evcsOrderNo and evcsOrderNo !=''">
evcs_order_no, evcs_order_no,
</if> </if>
<if test="null != vinNormal and vinNormal !=''">
vin_normal,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null != chargingStationId "> <if test="null != chargingStationId ">
@ -332,6 +335,9 @@
<if test="null != evcsOrderNo and evcsOrderNo !=''"> <if test="null != evcsOrderNo and evcsOrderNo !=''">
#{evcsOrderNo}, #{evcsOrderNo},
</if> </if>
<if test="null != vinNormal and vinNormal !=''">
#{vinNormal},
</if>
</trim> </trim>
</insert> </insert>