diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java index 669af46b..cc699745 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java @@ -311,6 +311,10 @@ public class XhpcPileOrderController extends BaseController { xhpcChargeOrder.setErroRemark(stopReason); xhpcChargeOrder.setUpdateTime(date); xhpcChargeOrder.setStatus(status); + //停止原因 + try{ + xhpcChargeOrder.setType(Integer.parseInt(cacheOrderData.getStopReason())); + }catch (Exception e){} //历史订单 Long userId = xhpcChargeOrder.getUserId(); //生成一条历史订单 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 8ae38d70..296bba9d 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 @@ -204,6 +204,7 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService { xhpcChargeOrder.setChargingMode("小华充电支付宝"); } xhpcChargeOrder.setCreateTime(date); + xhpcChargeOrder.setType(40); xhpcChargeOrderMapper.addXhpcChargeOrder(xhpcChargeOrder); return AjaxResult.success(); @@ -223,9 +224,6 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService { if (xhpcTerminal == null || xhpcTerminal.getTerminalId() == null || xhpcTerminal.getChargingPileId() == null || xhpcTerminal.getPileSerialNumber() == null) { return AjaxResult.error(1104, "无效的终端编号"); } - XhpcChargeOrder serialNumberMessage = xhpcChargeOrderMapper.getChargingOrderId(chargingOrderId); - serialNumberMessage.setType(1); - xhpcChargeOrderMapper.updateXhpcChargeOrder(serialNumberMessage); R oa = powerPileService.stopCharging(xhpcTerminal.getPileSerialNumber(), xhpcTerminal.getSerialNumber(), "OA"); logger.info("<<<<<<<<<<<<<<<<<<<<<<<<停止充电返回>>>>>>>>>>>>>>>>>"); logger.info("<<<<<<<<<<<<<<<<<<<<<<<<"+oa.getCode()+">>>>>>>>>>>>>>>>>"); diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml index 2c7a7b41..df0e3182 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml @@ -347,7 +347,18 @@ DATE_FORMAT(co.end_time,'%m月%d日') as daysTwo, DATE_FORMAT(co.end_time,'%H:%i:%s') as timeTwo, co.status as status, - co.type as type + co.type as type, + case when co.type=40 then "APP远程停止" + when co.type=41 then "SOC达到100%" + when co.type=42 then "充电电量满足设定条件" + when co.type=43 then "充电金额满足设定条件" + when co.type=44 then "充电时间满足设定条件" + when co.type=45 then "手动停止充电" + when co.type=46 then "手动停止充电." + when co.type=47 then "手动停止充电.." + when co.type=48 then "急停停止充电" + when co.type=49 then "手动停止充电..." + end typeName FROM xhpc_history_order as ho LEFT JOIN xhpc_charging_station as cs on cs.charging_station_id = ho.charging_station_id LEFT JOIN xhpc_terminal as te on te.terminal_id = ho.terminal_id