|  |  |  | 
|---|
|  |  |  | ){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if( (Constants.equalsInteger(orders.getType(),Constants.ZERO) && Constants.equalsInteger(orders.getWorkType(),Constants.TWO) && | 
|---|
|  |  |  | ( Constants.equalsInteger(orders.getCarType(),Constants.ZERO) || Constants.equalsInteger(orders.getCarType(),Constants.ONE) )) | 
|---|
|  |  |  | || (Constants.equalsInteger(orders.getType(),Constants.ZERO) && Constants.equalsInteger(orders.getWorkType(),Constants.ONE)) | 
|---|
|  |  |  | if( (Constants.equalsInteger(orders.getType(),Constants.ZERO) | 
|---|
|  |  |  | && Constants.equalsInteger(orders.getWorkType(),Constants.TWO) && | 
|---|
|  |  |  | ( Constants.equalsInteger(orders.getCarType(),Constants.ZERO) | 
|---|
|  |  |  | || Constants.equalsInteger(orders.getCarType(),Constants.ONE) )) | 
|---|
|  |  |  | || (Constants.equalsInteger(orders.getType(),Constants.ZERO) | 
|---|
|  |  |  | && Constants.equalsInteger(orders.getWorkType(),Constants.ONE)) | 
|---|
|  |  |  | ){ | 
|---|
|  |  |  | if(Objects.isNull(orders.getPriceNum2())){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
|---|
|  |  |  | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if( | 
|---|
|  |  |  | (Constants.equalsInteger(orders.getType(),Constants.ZERO) && Constants.equalsInteger(orders.getWorkType(),Constants.ZERO )) | 
|---|
|  |  |  | || Constants.equalsInteger(orders.getType(),Constants.ONE) | 
|---|
|  |  |  | (Constants.equalsInteger(orders.getType(),Constants.ZERO) | 
|---|
|  |  |  | && Constants.equalsInteger(orders.getWorkType(),Constants.ZERO )) | 
|---|
|  |  |  | || Constants.equalsInteger(orders.getType(),Constants.ONE) | 
|---|
|  |  |  | || Constants.equalsInteger(orders.getType(),Constants.TWO) | 
|---|
|  |  |  | ){ | 
|---|
|  |  |  | orders.setPriceNum2(Constants.ONE); | 
|---|
|  |  |  | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | BigDecimal bigDecimalPrice = orders.getPrice().multiply(new BigDecimal(orders.getPriceNum1().toString())).multiply(new BigDecimal(orders.getPriceNum2().toString())); | 
|---|
|  |  |  | BigDecimal bigDecimalPrice = orders.getPrice(). | 
|---|
|  |  |  | multiply(new BigDecimal(orders.getPriceNum1().toString())) | 
|---|
|  |  |  | .multiply(new BigDecimal(orders.getPriceNum2().toString())); | 
|---|
|  |  |  | return bigDecimalPrice.divide(new BigDecimal("1"),0,BigDecimal.ROUND_HALF_UP).longValue();//orders.getPrice() * orders.getPriceNum1() * orders.getPriceNum2(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | .set(Orders::getConfirmFeeRemark,confirmUpdOrderDTO.getConfirmFeeRemark()) | 
|---|
|  |  |  | .set(Orders::getConfirmOtherFee,confirmUpdOrderDTO.getConfirmOtherFee()) | 
|---|
|  |  |  | .set(Orders::getEstimatedAccount,totalFee) | 
|---|
|  |  |  | .set(Orders::getStatus,Constants.ordersStatus.feeconfirm.getKey()) | 
|---|
|  |  |  | .set(Orders::getPayAccount,payFee) | 
|---|
|  |  |  | .set(Orders::getReceiveAccount,recFee.longValue()) | 
|---|
|  |  |  | .set(Orders::getUpdateTime,new Date()) | 
|---|
|  |  |  | .eq(Orders::getId,orders.getId()) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | //记录同意修改的日志 | 
|---|
|  |  |  | Constants.OrdersLog ordersLog = Constants.OrdersLog.UPD_AGREE; | 
|---|
|  |  |  | Constants.OrdersLog ordersLog = Constants.OrdersLog.FEE_CONFIRM; | 
|---|
|  |  |  | this.saveOrderLog(orders,ordersLog, | 
|---|
|  |  |  | ordersLog.getInfo(),confirmUpdOrderDTO.getMember().getId(),null); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | Member releaseMember = memberMapper.selectById(orders.getReleaseMemberId()); | 
|---|
|  |  |  | //自动派单 | 
|---|
|  |  |  | Orders model = ordersMapper.selectById(orders.getId()); | 
|---|
|  |  |  | if(!Constants.equalsInteger(model.getStatus(),Constants.ONE)){ | 
|---|
|  |  |  | if(!Constants.equalsInteger(model.getStatus(),Constants.ONE) || Constants.equalsInteger(model.getId(),model.getReleaseMemberId())){ | 
|---|
|  |  |  | //如果订单已删除 并且非发布方 | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ordersMapper.update(new UpdateWrapper<Orders>().lambda().eq(Orders::getId,model.getId()) | 
|---|