修改订单,增加刷卡逻辑
This commit is contained in:
parent
8bd1aa2e06
commit
749bfd102c
@ -346,19 +346,21 @@ public class XhpcPileOrderController extends BaseController {
|
||||
if(!"".equals(stopReason) && stopReason!=null){
|
||||
xhpcChargeOrder.setType(Integer.parseInt(stopReason));
|
||||
if("40".equals(stopReason)){
|
||||
xhpcHistoryOrder.setStopReasonEvcs(40);
|
||||
xhpcChargeOrder.setStopReasonEvcs(40);
|
||||
}else if("42".equals(stopReason)){
|
||||
xhpcHistoryOrder.setStopReasonEvcs(42);
|
||||
xhpcChargeOrder.setStopReasonEvcs(42);
|
||||
}else if("43".equals(stopReason)){
|
||||
xhpcHistoryOrder.setStopReasonEvcs(43);
|
||||
xhpcChargeOrder.setStopReasonEvcs(43);
|
||||
}else if("44".equals(stopReason)){
|
||||
xhpcHistoryOrder.setStopReasonEvcs(44);
|
||||
xhpcChargeOrder.setStopReasonEvcs(44);
|
||||
}else if("41".equals(stopReason)){
|
||||
xhpcHistoryOrder.setStopReasonEvcs(41);
|
||||
xhpcChargeOrder.setStopReasonEvcs(41);
|
||||
}else if("48".equals(stopReason)){
|
||||
xhpcHistoryOrder.setStopReasonEvcs(48);
|
||||
xhpcChargeOrder.setStopReasonEvcs(48);
|
||||
}else if("45".equals(stopReason)){
|
||||
xhpcChargeOrder.setStopReasonEvcs(45);
|
||||
}else{
|
||||
xhpcHistoryOrder.setStopReasonEvcs(49);
|
||||
xhpcChargeOrder.setStopReasonEvcs(49);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){}
|
||||
|
||||
@ -324,6 +324,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
}
|
||||
xhpcChargeOrder.setStatus(3);
|
||||
xhpcChargeOrder.setAmountCharged(money);
|
||||
xhpcChargeOrder.setStopReasonEvcs(45);
|
||||
Long userId = xhpcChargeOrder.getUserId();
|
||||
Integer source = xhpcChargeOrder.getSource();
|
||||
String tenantId = xhpcChargeOrder.getTenantId();
|
||||
@ -530,11 +531,16 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
if("支付宝".equals(xhpcChargeOrder.getChargingMode())){
|
||||
xhpcHistoryOrder.setChargingMode("支付宝");
|
||||
}
|
||||
if("刷卡".equals(xhpcChargeOrder.getChargingMode())){
|
||||
xhpcHistoryOrder.setChargingMode("刷卡");
|
||||
}
|
||||
}else{
|
||||
//订单异常
|
||||
xhpcChargeOrder.setStatus(2);
|
||||
//异常原因
|
||||
xhpcChargeOrder.setErroRemark("运营商数据为空");
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return R.fail();
|
||||
}
|
||||
}
|
||||
Long chargeOrderId = xhpcChargeOrder.getChargeOrderId();
|
||||
@ -543,8 +549,13 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
xhpcHistoryOrder.setUserId(userId);
|
||||
xhpcHistoryOrder.setTerminalId(xhpcChargeOrder.getTerminalId());
|
||||
xhpcHistoryOrder.setStartTime(xhpcChargeOrder.getStartTime());
|
||||
xhpcHistoryOrder.setStopReasonEvcs(xhpcChargeOrder.getStopReasonEvcs());//todo 从头开始设置所有evcs字段
|
||||
xhpcHistoryOrder.setChargeModelEvcs(xhpcChargeOrder.getChargeModelEvcs());
|
||||
//todo 从头开始设置所有evcs字段
|
||||
if(UserTypeUtil.COMMUNIT_TYPE.equals(source) || UserTypeUtil.CUSTOMERS_TYPE.equals(source)){
|
||||
xhpcHistoryOrder.setChargeModelEvcs(2);
|
||||
}else{
|
||||
xhpcHistoryOrder.setChargeModelEvcs(xhpcChargeOrder.getChargeModelEvcs());
|
||||
}
|
||||
xhpcHistoryOrder.setStopReasonEvcs(xhpcChargeOrder.getStopReasonEvcs());
|
||||
xhpcHistoryOrder.setSerialNumber(xhpcChargeOrder.getSerialNumber());
|
||||
xhpcHistoryOrder.setRateModelId(xhpcChargeOrder.getRateModelId());
|
||||
xhpcHistoryOrder.setStartSoc(xhpcChargeOrder.getStartSoc());
|
||||
|
||||
@ -574,10 +574,10 @@
|
||||
ho.act_power_price as actPowerPrice,
|
||||
co.charging_time as chargingTime,
|
||||
co.charging_degree as chargingDegree,
|
||||
DATE_FORMAT(co.start_time,'%m月%d日') as daysOne,
|
||||
DATE_FORMAT(co.start_time,'%H:%i:%s') as timeOne,
|
||||
DATE_FORMAT(co.end_time,'%m月%d日') as daysTwo,
|
||||
DATE_FORMAT(co.end_time,'%H:%i:%s') as timeTwo,
|
||||
DATE_FORMAT(ho.start_time,'%m月%d日') as daysOne,
|
||||
DATE_FORMAT(ho.start_time,'%H:%i:%s') as timeOne,
|
||||
DATE_FORMAT(ho.end_time,'%m月%d日') as daysTwo,
|
||||
DATE_FORMAT(ho.end_time,'%H:%i:%s') as timeTwo,
|
||||
co.status as status,
|
||||
co.type as type,
|
||||
case when co.type=40 then "APP远程停止"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user