| | |
| | | a.endLat as endLat, |
| | | a.endAddress as endAddress, |
| | | a.driverId as driverId, |
| | | a.orderMoney as orderMoney, |
| | | a.redPacketMoney as redPacketMoney, |
| | | a.couponMoney as couponMoney, |
| | | a.discountMoney as discountMoney, |
| | | a.payMoney as payMoney, |
| | | a.orderMoney as orderMoney, |
| | | a.startMileage as startMileage, |
| | | a.mileage as mileage, |
| | | a.startMoney as startMoney, |
| | | a.mileageKilometers as mileageKilometers, |
| | | a.mileageMoney as mileageMoney, |
| | | a.duration as duration, |
| | | a.durationMoney as durationMoney, |
| | | a.wait as wait, |
| | | a.waitMoney as waitMoney, |
| | | a.longDistance as longDistance, |
| | | a.longDistanceMoney as longDistanceMoney, |
| | | a.parkMoney as parkMoney, |
| | | a.roadTollMoney as roadTollMoney, |
| | | a.redPacketMoney as redPacketMoney, |
| | | a.couponMoney as couponMoney, |
| | | a.discount as discount, |
| | | a.discountMoney as discountMoney, |
| | | a.priceDifference, |
| | | a.payType, |
| | | a.payMoney as payMoney, |
| | | a.remark as remark, |
| | | a.companyId, |
| | | b.headImgUrl as driverAvatar, |
| | |
| | | if(state == 11){ |
| | | map.put("state", map.get("oldState")); |
| | | } |
| | | if(Integer.valueOf(String.valueOf(map.get("state"))) != 8 && Integer.valueOf(String.valueOf(map.get("state"))) != 9){ |
| | | map.put("redPacketMoney", null); |
| | | map.put("couponMoney", null); |
| | | } |
| | | if(Integer.valueOf(String.valueOf(map.get("state"))) == 7){ |
| | | UserActivityDiscount1 query2 = userActivityDiscount1Mapper.query(Integer.valueOf(String.valueOf(map.get("companyId")))); |
| | | if(null != query2){ |
| | | Integer orderNum=this.selectCount(new EntityWrapper<OrderLogistics>().eq("userId",orderLogistics.getUserId()).eq("activityId",query2.getId()).last(" and to_days(getoffTime) = to_days(now())")); |
| | | if(query2.getDistance()*1000>orderLogistics.getMileage() && query2.getOrderNum()>orderNum){ |
| | | Double special = query2.getSpecial(); |
| | | orderLogistics.setDiscount(special); |
| | | Double orderMoney = orderLogistics.getOrderMoney(); |
| | | double v = new BigDecimal(orderMoney).multiply(new BigDecimal(special / 10)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | if(orderMoney.compareTo(v) > 0){ |
| | | map.put("discountMoney",orderMoney - v); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(map.get("startLon").toString(), map.get("startLat").toString()); |
| | | map.put("startCity", geocode.get("city")); |
| | | geocode = gdMapGeocodingUtil.geocode(map.get("endLon").toString(), map.get("endLat").toString()); |
| | |
| | | private Double discount; |
| | | @ApiModelProperty("折扣优惠金额") |
| | | private Double discountMoney; |
| | | @ApiModelProperty("补差价金额") |
| | | private Double priceDifference; |
| | | @ApiModelProperty("订单支付金额") |
| | | private Double payMoney; |
| | | @ApiModelProperty("订单支付方式(1=手机支付,2=银行卡支付,3=余额支付,4=现金支付)") |
| | |
| | | orderInfoWarpper.setIsFrozen(null != map.get("isFrozen") ? Integer.valueOf(map.get("isFrozen").toString()) : 1); |
| | | orderInfoWarpper.setTimeOutCancel(null != map.get("timeOutCancel") ? Integer.valueOf(map.get("timeOutCancel").toString()) : 0); |
| | | orderInfoWarpper.setSnatchOrderTime(null != map.get("snatchOrderTime") ? map.get("snatchOrderTime").toString() : ""); |
| | | orderInfoWarpper.setPriceDifference(null != map.get("priceDifference") ? Double.valueOf(map.get("priceDifference").toString()) : 0); |
| | | } |
| | | if(orderInfoWarpper.getState()==7){ |
| | | orderInfoWarpper.setOrderMoney(orderInfoWarpper.getOrderMoney()-orderInfoWarpper.getDiscountMoney()); |