增加充电失败订单入库

This commit is contained in:
yuyang 2022-08-08 17:05:12 +08:00
parent bf1b6f7049
commit e284cee23d
2 changed files with 20 additions and 7 deletions

View File

@ -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){ if(cacheOrderData.getTotalPowerQuantity()==0 || totalPowerQuantity.compareTo(new BigDecimal(0.1))<1 || money.compareTo(new BigDecimal(0.1))<1){
xhpcChargeOrder.setStatus(3); xhpcChargeOrder.setStatus(3);
xhpcChargeOrder.setUpdateTime(new Date()); xhpcChargeOrder.setUpdateTime(new Date());
int startSoc1 = cacheOrderData.getStartSoc();
int endSoc1 = cacheOrderData.getEndSoc();
xhpcChargeOrder.setStartSoc(startSoc1 + "");
xhpcChargeOrder.setEndSoc(endSoc1 + "");
xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder); xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder);
xhpcRealTimeOrderService.addZeroHistoryOrder(xhpcChargeOrder); xhpcRealTimeOrderService.addZeroHistoryOrder(xhpcChargeOrder);
logger.info("*********************电量为0订单号>>>>>orderNo" + orderNo); logger.info("*********************电量为0订单号>>>>>orderNo" + orderNo);

View File

@ -1313,7 +1313,10 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>"); logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>");
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>>>>"); logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>>>>");
logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>>>>"); logger.info("<<<<<<<<<<<<<<<<订单结束回调成功>>>>>>>>>订单号:>>>"+orderNo+">>>>>>>>");
if(!"40".equals(xhpcHistoryOrder.getStopReasonEvcs())){ 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(); XhpcWorkHistoryOrderDto xhpcWorkHistoryOrderDto =new XhpcWorkHistoryOrderDto();
BeanUtils.copyProperties(xhpcHistoryOrder,xhpcWorkHistoryOrderDto); BeanUtils.copyProperties(xhpcHistoryOrder,xhpcWorkHistoryOrderDto);
String nameByCode = StopReasonEnum.getNameByCode(xhpcHistoryOrder.getStopReasonEvcs()); String nameByCode = StopReasonEnum.getNameByCode(xhpcHistoryOrder.getStopReasonEvcs());
@ -1321,6 +1324,9 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
xhpcHistoryOrderService.insertXhpcWorkHistoryOrderDto(xhpcWorkHistoryOrderDto); xhpcHistoryOrderService.insertXhpcWorkHistoryOrderDto(xhpcWorkHistoryOrderDto);
logger.info("<<<<<<<<<<<<<<<<入库成功>>>>>>>>>订单号:>>>"); logger.info("<<<<<<<<<<<<<<<<入库成功>>>>>>>>>订单号:>>>");
} }
}catch (Exception e){
}
} }
@ -1482,6 +1488,8 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
xhpcHistoryOrder.setInternetSerialNumber(xhpcChargeOrder.getInternetSerialNumber()); xhpcHistoryOrder.setInternetSerialNumber(xhpcChargeOrder.getInternetSerialNumber());
xhpcHistoryOrder.setType(2); xhpcHistoryOrder.setType(2);
xhpcHistoryOrder.setStatus(0); xhpcHistoryOrder.setStatus(0);
xhpcHistoryOrder.setStartSoc(xhpcChargeOrder.getStartSoc());
xhpcHistoryOrder.setEndSoc(xhpcChargeOrder.getEndSoc());
Date date = new Date(); Date date = new Date();
xhpcHistoryOrder.setCreateTime(date); xhpcHistoryOrder.setCreateTime(date);
Map<String, Object> pushOrder = redisService.getCacheMap("pushOrder:"+xhpcChargeOrder.getSerialNumber()); Map<String, Object> pushOrder = redisService.getCacheMap("pushOrder:"+xhpcChargeOrder.getSerialNumber());