增加充电失败订单入库
This commit is contained in:
parent
bf1b6f7049
commit
e284cee23d
@ -375,6 +375,11 @@ public class XhpcPileOrderController extends BaseController {
|
||||
if(cacheOrderData.getTotalPowerQuantity()==0 || totalPowerQuantity.compareTo(new BigDecimal(0.1))<1 || money.compareTo(new BigDecimal(0.1))<1){
|
||||
xhpcChargeOrder.setStatus(3);
|
||||
xhpcChargeOrder.setUpdateTime(new Date());
|
||||
int startSoc1 = cacheOrderData.getStartSoc();
|
||||
int endSoc1 = cacheOrderData.getEndSoc();
|
||||
|
||||
xhpcChargeOrder.setStartSoc(startSoc1 + "");
|
||||
xhpcChargeOrder.setEndSoc(endSoc1 + "");
|
||||
xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder);
|
||||
xhpcRealTimeOrderService.addZeroHistoryOrder(xhpcChargeOrder);
|
||||
logger.info("*********************电量为0订单号>>>>>orderNo:" + orderNo);
|
||||
|
||||
@ -1313,13 +1313,19 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>");
|
||||
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>>>>");
|
||||
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>>>>");
|
||||
if(!"40".equals(xhpcHistoryOrder.getStopReasonEvcs())){
|
||||
XhpcWorkHistoryOrderDto xhpcWorkHistoryOrderDto =new XhpcWorkHistoryOrderDto();
|
||||
BeanUtils.copyProperties(xhpcHistoryOrder,xhpcWorkHistoryOrderDto);
|
||||
String nameByCode = StopReasonEnum.getNameByCode(xhpcHistoryOrder.getStopReasonEvcs());
|
||||
xhpcWorkHistoryOrderDto.setStopReasonEvcsName(nameByCode);
|
||||
xhpcHistoryOrderService.insertXhpcWorkHistoryOrderDto(xhpcWorkHistoryOrderDto);
|
||||
logger.info("<<<<<<<<<<<<<<<<入库成功>>>>>>>>>订单号:>>>");
|
||||
try {
|
||||
int startSoc = Integer.parseInt(xhpcHistoryOrder.getStartSoc());
|
||||
int endSoc = Integer.parseInt(xhpcHistoryOrder.getEndSoc());
|
||||
if(!"40".equals(xhpcHistoryOrder.getStopReasonEvcs()) || startSoc>95 || endSoc>95){
|
||||
XhpcWorkHistoryOrderDto xhpcWorkHistoryOrderDto =new XhpcWorkHistoryOrderDto();
|
||||
BeanUtils.copyProperties(xhpcHistoryOrder,xhpcWorkHistoryOrderDto);
|
||||
String nameByCode = StopReasonEnum.getNameByCode(xhpcHistoryOrder.getStopReasonEvcs());
|
||||
xhpcWorkHistoryOrderDto.setStopReasonEvcsName(nameByCode);
|
||||
xhpcHistoryOrderService.insertXhpcWorkHistoryOrderDto(xhpcWorkHistoryOrderDto);
|
||||
logger.info("<<<<<<<<<<<<<<<<入库成功>>>>>>>>>订单号:>>>");
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1482,6 +1488,8 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
||||
xhpcHistoryOrder.setInternetSerialNumber(xhpcChargeOrder.getInternetSerialNumber());
|
||||
xhpcHistoryOrder.setType(2);
|
||||
xhpcHistoryOrder.setStatus(0);
|
||||
xhpcHistoryOrder.setStartSoc(xhpcChargeOrder.getStartSoc());
|
||||
xhpcHistoryOrder.setEndSoc(xhpcChargeOrder.getEndSoc());
|
||||
Date date = new Date();
|
||||
xhpcHistoryOrder.setCreateTime(date);
|
||||
Map<String, Object> pushOrder = redisService.getCacheMap("pushOrder:"+xhpcChargeOrder.getSerialNumber());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user