diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/util/UserTypeUtil.java b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/util/UserTypeUtil.java
index bee86d05..ceff4234 100644
--- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/util/UserTypeUtil.java
+++ b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/util/UserTypeUtil.java
@@ -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;
diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/domain/XhpcChargeOrder.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/domain/XhpcChargeOrder.java
index 1fa845b6..6bcd924c 100644
--- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/domain/XhpcChargeOrder.java
+++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/domain/XhpcChargeOrder.java
@@ -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;
+ }
}
diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java
index 3b523e0e..b9e2e975 100644
--- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java
+++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java
@@ -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() {
diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcChargeOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcChargeOrderMapper.xml
index c5d0396e..ae1e9405 100644
--- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcChargeOrderMapper.xml
+++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcChargeOrderMapper.xml
@@ -252,6 +252,9 @@
evcs_order_no,
+
+ vin_normal,
+
@@ -332,6 +335,9 @@
#{evcsOrderNo},
+
+ #{vinNormal},
+