| | |
| | | userInfo.setBalance(new BigDecimal(userInfo.getBalance()).subtract(new BigDecimal(orderMoney)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | OpenCity openCity = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 |
| | | if(null != query1){ |
| | | userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 |
| | | } |
| | | |
| | | //添加交易明细 |
| | | transactionDetailsService.saveData(uid, "跨城出行订单", orderMoney, 2, 1, 1, 3, orderId); |
| | |
| | | if(Integer.valueOf(String.valueOf(map.get("state"))) ==7 && (map.get("responsibilityType")==null || Integer.valueOf(String.valueOf(map.get("responsibilityType")))<4)){ |
| | | map.put("appealButton", 1); |
| | | } |
| | | if(map.get("abnormalIntro")!=null){ |
| | | map.put("appealStatus", 1); |
| | | } |
| | | //跨城不需要申诉 |
| | | map.put("appealStatus", 0); |
| | | if(map.get("travelMode")!=null &&map.get("travelMode").toString().equals("2") ){ |
| | | map.put("zwNum", 1); |
| | | }else { |
| | |
| | | BaseWarpper baseWarpper = new BaseWarpper(); |
| | | if (null == orderCrossCity) { |
| | | return ResultUtil.error("获取数据失败,订单信息有误"); |
| | | } |
| | | if (orderCrossCity.getState() == 5) { |
| | | return ResultUtil.error("订单已开始服务,不能取消订单"); |
| | | } |
| | | if (orderCrossCity.getState() == 6 || orderCrossCity.getState() == 8 || orderCrossCity.getState() == 9) { |
| | | return ResultUtil.error("订单已完成,不能取消订单"); |
| | | } |
| | | if (orderCrossCity.getState() == 10) { |
| | | return ResultUtil.error("订单已被取消,不能重复操作"); |
| | | } |
| | | OpenCity openCity = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString()); |
| | | double amount = 0; |
| | |
| | | return ResultUtil.error("取消订单失败,订单信息有误", ""); |
| | | } |
| | | if (orderCrossCity.getState() != 12) { |
| | | return ResultUtil.error("取消订单失败,不合法的操作", ""); |
| | | return ResultUtil.error("订单已取消,请刷新页面", ""); |
| | | } |
| | | OrderCancel orderCancel = null; |
| | | if (null == cancleId) { |
| | |
| | | return ResultUtil.error("取消订单失败,订单信息有误"); |
| | | } |
| | | if (orderCrossCity.getState() >= 5 && orderCrossCity.getState() != 7 && orderCrossCity.getState() != 11) { |
| | | return ResultUtil.error("取消订单失败,不合法的操作"); |
| | | return ResultUtil.error("订单已取消,请刷新页面"); |
| | | } |
| | | |
| | | //还原座位 |
| | |
| | | if (state != 1) { |
| | | //关闭其他推送线程 |
| | | Set<String> keySet = threadMap.keySet(); |
| | | datas.forEach(e->{ |
| | | threadMap.get(orderId + "_1"); |
| | | |
| | | |
| | | }); |
| | | |
| | | |
| | | |
| | | for (String key : keySet) { |
| | | if (!key.equals(orderId + "_1")) { |
| | | Thread thread1 = threadMap.get(key);//中断线程 |
| | |
| | | //所有推送完后的处理 |
| | | Boolean b = pushEndMap.get(orderPrivateCar.getCrossCityOrderId()); |
| | | if (i == querys.size() + 15 && state == 1 && (null != b && !b.booleanValue())) { |
| | | pushUtil.pushEndPush(1, orderPrivateCar.getUserId(), orderPrivateCar.getId(), 1); |
| | | pushUtil.pushEndPush(1, orderPrivateCar.getUserId(), orderPrivateCar.getId(), 1, 1); |
| | | OrderPrivateCarServiceImpl.orderIds.remove(orderPrivateCar.getId()); |
| | | pushEndMap.put(orderPrivateCar.getCrossCityOrderId(), Boolean.TRUE);//推送后添加标识 |
| | | break; |
| | |
| | | //所有推送完后的处理 |
| | | Boolean b = pushEndMap.get(orderTaxi.getCrossCityOrderId()); |
| | | if (i == querys.size() + 15 && state == 1 && (null != b && !b.booleanValue())) { |
| | | pushUtil.pushEndPush(1, orderTaxi.getUserId(), orderTaxi.getId(), 2); |
| | | pushUtil.pushEndPush(1, orderTaxi.getUserId(), orderTaxi.getId(), 2, 1); |
| | | OrderTaxiServiceImpl.orderIds.remove(orderTaxi.getId()); |
| | | pushEndMap.put(orderTaxi.getCrossCityOrderId(), Boolean.TRUE);//推送后添加标识 |
| | | } |