增加VIN码判断
This commit is contained in:
parent
d2e4df685b
commit
e0d3af5069
@ -30,7 +30,10 @@ public class UserTypeUtil {
|
||||
//重新登录
|
||||
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_ZFB = "支付宝";
|
||||
public static final String CHARGING_MODE_CARD = "刷卡";
|
||||
|
||||
public static final String CHARGING_MODE_VIN = "VIN码";
|
||||
|
||||
public static final Long SYS_USER_TYPE_ADMIN = 1L;
|
||||
|
||||
|
||||
@ -154,6 +154,7 @@ public class XhpcChargeOrder extends BaseEntity {
|
||||
//符合Evcs标准的订单号,并非来自第三方的订单号
|
||||
private String evcsOrderNo;
|
||||
|
||||
private String vinNormal;
|
||||
|
||||
public Integer getStopReasonEvcs() {
|
||||
|
||||
@ -476,4 +477,12 @@ public class XhpcChargeOrder extends BaseEntity {
|
||||
public void setEvcsOrderNo(String evcsOrderNo) {
|
||||
this.evcsOrderNo = evcsOrderNo;
|
||||
}
|
||||
|
||||
public String getVinNormal() {
|
||||
return vinNormal;
|
||||
}
|
||||
|
||||
public void setVinNormal(String vinNormal) {
|
||||
this.vinNormal = vinNormal;
|
||||
}
|
||||
}
|
||||
|
||||
@ -865,7 +865,11 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
public R pileVin(String serialNumber, String vinNumber) {
|
||||
|
||||
try{
|
||||
|
||||
if("".equals(vinNumber) || vinNumber ==null ){
|
||||
return R.fail(1888, "VIN码为空");
|
||||
}else if (vinNumber.length()!=17){
|
||||
return R.fail(1880, "无效VIN码");
|
||||
}
|
||||
//Vin码表获取 用户id,用户类型
|
||||
Long userId = 1L;
|
||||
Integer userType = 0;
|
||||
@ -1018,6 +1022,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
xhpcChargeOrder.setChargingMode("VIN码");
|
||||
xhpcChargeOrder.setCreateTime(Calendar.getInstance().getTime());
|
||||
xhpcChargeOrder.setType("91");
|
||||
xhpcChargeOrder.setVinNormal(vinNumber);
|
||||
xhpcChargeOrderMapper.addXhpcChargeOrder(xhpcChargeOrder);
|
||||
|
||||
executorService.execute(new Runnable() {
|
||||
|
||||
@ -252,6 +252,9 @@
|
||||
<if test="null != evcsOrderNo and evcsOrderNo !=''">
|
||||
evcs_order_no,
|
||||
</if>
|
||||
<if test="null != vinNormal and vinNormal !=''">
|
||||
vin_normal,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="null != chargingStationId ">
|
||||
@ -332,6 +335,9 @@
|
||||
<if test="null != evcsOrderNo and evcsOrderNo !=''">
|
||||
#{evcsOrderNo},
|
||||
</if>
|
||||
<if test="null != vinNormal and vinNormal !=''">
|
||||
#{vinNormal},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user