| | |
| | | if(orderLogistics.getState() != 1){ |
| | | return ResultUtil.error(language == 1 ? "手速有点慢哦,订单已被抢啦" : language == 2 ? "Too slow, order was snatched!" : "Trop lent, l’ordre a été arraché!"); |
| | | } |
| | | |
| | | Driver driver = driverService.selectById(uid); |
| | | orderLogistics.setDriverId(uid); |
| | | orderLogistics.setCarId(driver.getCarId()); |
| | |
| | | orderLogistics.setSnatchOrderTime(new Date()); |
| | | |
| | | this.updateById(orderLogistics); |
| | | |
| | | //修改司机为服务中 |
| | | driver.setState(3); |
| | | driverService.updateById(driver); |
| | | |
| | | //todo 待翻译 |
| | | //添加定时任务(普通任务) |
| | |
| | | jobDataMap.put("driverId", uid); |
| | | jobDataMap.put("orderId", orderLogistics.getId()); |
| | | jobDataMap.put("orderType", 4); |
| | | jobDataMap.put("describe", "您的打车订单已超时" + m + "分钟,请抓紧!"); |
| | | jobDataMap.put("describe", "您的包裹订单已超时" + m + "分钟,请抓紧!"); |
| | | QuartzUtil.addSimpleQuartzTask( |
| | | new OrderTimeOutJob().buildQuartzJob(UUIDUtil.getRandomCode(5) + "_" + orderLogistics.getId() + "_4", "ORDER_TIME_OUT", jobDataMap) |
| | | , new Date(packageTimeoutReminderInterval), packageTimeoutReminderInterval, -1); |
| | |
| | | } |
| | | amount = num25 + (d1 * num26) + (t1 * num27) + (w1 * num7) + yt1 + yt2 + yt3; |
| | | orderLogistics.setStartMileage(num2); |
| | | orderLogistics.setStartDuration((int)(num3.doubleValue())); |
| | | orderLogistics.setStartMoney(num25);//起步价 |
| | | orderLogistics.setMileageKilometers(new BigDecimal(d1).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | orderLogistics.setMileageMoney(new BigDecimal(d1 * num26).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());//里程费 |
| | |
| | | orderLogistics.setPayMoney(0D);//支付金额 |
| | | orderLogistics.setOrderMoney(new BigDecimal(amount + parkingFee + crossingFee).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | |
| | | orderLogistics.setMoneyType(3); |
| | | if((date.getTime() > s1.getTimeInMillis() && date.getTime() < e1.getTimeInMillis())){ |
| | | orderLogistics.setMoneyTime(num23); |
| | | }else{ |
| | | orderLogistics.setMoneyTime(num24); |
| | | } |
| | | |
| | | return orderLogistics; |
| | | } |
| | |
| | | } |
| | | amount = num1 + (d1 * num4) + (t1 * num5) + (w1 * num7) + yt1 + yt2 + yt3; |
| | | orderLogistics.setStartMileage(num2); |
| | | orderLogistics.setStartDuration((int)(num3.doubleValue())); |
| | | orderLogistics.setStartMoney(num1);//起步价 |
| | | orderLogistics.setMileageKilometers(new BigDecimal(d1).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | orderLogistics.setMileageMoney(new BigDecimal(d1 * num4).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());//里程费 |
| | |
| | | orderLogistics.setPayMoney(0D);//支付金额 |
| | | orderLogistics.setOrderMoney(new BigDecimal(amount + parkingFee + crossingFee).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | |
| | | orderLogistics.setMoneyType(1); |
| | | return orderLogistics; |
| | | } |
| | | |
| | |
| | | if(userInfo.getFreeMoney().doubleValue()>0d){ |
| | | if(orderLogistics.getOrderMoney()<=userInfo.getFreeMoney().doubleValue()){ |
| | | orderLogistics.setState(8); |
| | | orderLogistics.setIsFree(2); |
| | | //添加已收入明细 |
| | | Company company = companyService.selectById(orderLogistics.getCompanyId()); |
| | | Double speMoney = company.getSpeMoney(); |