| | |
| | | model.addAttribute("ptCancel3",ptCancel3); |
| | | |
| | | // 司机超时 |
| | | JSONObject jsonObject = JSON.parseObject(ptCancel1.getContent()); |
| | | model.addAttribute("driverTimeout",jsonObject.getIntValue("driverTimeout")); |
| | | // 订单取消规则 |
| | | JSONObject order = jsonObject.getJSONObject("order"); |
| | | String orderAcceptanceTime = order.getString("orderAcceptanceTime"); |
| | | String money = order.getString("money"); |
| | | String mileageFee = order.getString("mileageFee"); |
| | | String durationFee = order.getString("durationFee"); |
| | | // 接单xx分钟后 |
| | | model.addAttribute("orderAcceptanceTime",orderAcceptanceTime); |
| | | // 取消订单金额 |
| | | model.addAttribute("money",money); |
| | | // 时长费 |
| | | model.addAttribute("mileageFee",mileageFee); |
| | | // 分钟 |
| | | model.addAttribute("durationFee",durationFee); |
| | | // 预约单取消规则 |
| | | JSONObject reservationOrder = jsonObject.getJSONObject("reservationOrder"); |
| | | String orderAcceptanceTime1 = reservationOrder.getString("orderAcceptanceTime"); |
| | | String money1 = reservationOrder.getString("money"); |
| | | String mileageFee1 = reservationOrder.getString("mileageFee"); |
| | | String durationFee1 = reservationOrder.getString("durationFee"); |
| | | String reservationFee = reservationOrder.getString("reservationFee"); |
| | | // 预约单接单xx分钟后 |
| | | model.addAttribute("orderAcceptanceTime1",orderAcceptanceTime1); |
| | | // 预约单取消订单金额 |
| | | model.addAttribute("money1",money1); |
| | | // 预约单时长费 |
| | | model.addAttribute("mileageFee1",mileageFee1); |
| | | // 预约单分钟 |
| | | model.addAttribute("durationFee1",durationFee1); |
| | | // 预定费用 |
| | | model.addAttribute("reservationFee",reservationFee); |
| | | if(null != ptCancel1){ |
| | | JSONObject jsonObject = JSON.parseObject(ptCancel1.getContent()); |
| | | model.addAttribute("driverTimeout",jsonObject.getIntValue("driverTimeout")); |
| | | // 订单取消规则 |
| | | JSONObject order = jsonObject.getJSONObject("order"); |
| | | String orderAcceptanceTime = order.getString("orderAcceptanceTime"); |
| | | String money = order.getString("money"); |
| | | String mileageFee = order.getString("mileageFee"); |
| | | String durationFee = order.getString("durationFee"); |
| | | // 接单xx分钟后 |
| | | model.addAttribute("orderAcceptanceTime",orderAcceptanceTime); |
| | | // 取消订单金额 |
| | | model.addAttribute("money",money); |
| | | // 时长费 |
| | | model.addAttribute("mileageFee",mileageFee); |
| | | // 分钟 |
| | | model.addAttribute("durationFee",durationFee); |
| | | // 预约单取消规则 |
| | | JSONObject reservationOrder = jsonObject.getJSONObject("reservationOrder"); |
| | | String orderAcceptanceTime1 = reservationOrder.getString("orderAcceptanceTime"); |
| | | String money1 = reservationOrder.getString("money"); |
| | | String mileageFee1 = reservationOrder.getString("mileageFee"); |
| | | String durationFee1 = reservationOrder.getString("durationFee"); |
| | | String reservationFee = reservationOrder.getString("reservationFee"); |
| | | // 预约单接单xx分钟后 |
| | | model.addAttribute("orderAcceptanceTime1",orderAcceptanceTime1); |
| | | // 预约单取消订单金额 |
| | | model.addAttribute("money1",money1); |
| | | // 预约单时长费 |
| | | model.addAttribute("mileageFee1",mileageFee1); |
| | | // 预约单分钟 |
| | | model.addAttribute("durationFee1",durationFee1); |
| | | // 预定费用 |
| | | model.addAttribute("reservationFee",reservationFee); |
| | | }else{ |
| | | model.addAttribute("driverTimeout", ""); |
| | | // 接单xx分钟后 |
| | | model.addAttribute("orderAcceptanceTime", ""); |
| | | // 取消订单金额 |
| | | model.addAttribute("money",""); |
| | | // 时长费 |
| | | model.addAttribute("mileageFee",""); |
| | | // 分钟 |
| | | model.addAttribute("durationFee",""); |
| | | // 预约单取消规则 |
| | | // 预约单接单xx分钟后 |
| | | model.addAttribute("orderAcceptanceTime1",""); |
| | | // 预约单取消订单金额 |
| | | model.addAttribute("money1",""); |
| | | // 预约单时长费 |
| | | model.addAttribute("mileageFee1",""); |
| | | // 预约单分钟 |
| | | model.addAttribute("durationFee1",""); |
| | | // 预定费用 |
| | | model.addAttribute("reservationFee",""); |
| | | } |
| | | // 超时设置 |
| | | |
| | | TSysOverTime overTime = sysOverTimeService.selectOne(new EntityWrapper<TSysOverTime>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITCarService; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ITUserService; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.FleetEngineUtil; |
| | |
| | | |
| | | @Resource |
| | | private OrderCancelMapper orderCancelMapper; |
| | | |
| | | @Resource |
| | | private ITCarService carService; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到小件物流订单首页 |
| | |
| | | orderCancelMapper.insert(orderCancel); |
| | | |
| | | //修改行程信息 |
| | | boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null); |
| | | TCar car = carService.selectById(tOrderLogistics.getCarId()); |
| | | //修改行程信息 |
| | | boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderLogistics.getTripId(), null, null, null, null); |
| | | if(!updateTrip){ |
| | | for (int i = 0; i < 5; i++) { |
| | | updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null); |
| | | updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderLogistics.getTripId(), null, null, null, null); |
| | | if(updateTrip){ |
| | | break; |
| | | } |
| | | try { |
| | | Thread.sleep(3000L); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | @Resource |
| | | private ITUserService userService; |
| | | |
| | | @Resource |
| | | private ITCarService carService; |
| | | |
| | | |
| | | |
| | |
| | | orderCancelMapper.insert(orderCancel); |
| | | |
| | | //修改行程信息 |
| | | boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderPrivateCar.getTripId(), null, null, null, null); |
| | | TCar car = carService.selectById(tOrderPrivateCar.getCarId()); |
| | | //修改行程信息 |
| | | boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderPrivateCar.getTripId(), null, null, null, null); |
| | | if(!updateTrip){ |
| | | for (int i = 0; i < 5; i++) { |
| | | updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderPrivateCar.getTripId(), null, null, null, null); |
| | | updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderPrivateCar.getTripId(), null, null, null, null); |
| | | if(updateTrip){ |
| | | break; |
| | | } |
| | | try { |
| | | Thread.sleep(3000L); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | case when income1.type = 1 then income1.money else 0 end as platIncome, |
| | | case when income1.type = 2 then income1.money else 0 end as companyIncome, |
| | | case when income1.type = 3 then income1.money else 0 end as franchiseeIncome, |
| | | IFNULL(sd.price, 0) as settlementPrice, |
| | | IFNULL(income2.money,0) as driverIncome, |
| | | CONCAT(di.firstName, " ", di.lastName,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | '市内小件物流' as typeStr, |
| | | cc.type as companyType, |
| | | dd.name as companyName, |
| | | ot.*, |
| | | oc.money as cancelMoney, |
| | |
| | | where ii.userType = 1 and ii.type != 1 and ii.orderType = 4 |
| | | ) as income1 on income1.incomeId = ot.id |
| | | LEFT JOIN (SELECT incomeId, money FROM t_income where userType = 2 and type != 1 and orderType = 4) as income2 on income2.incomeId = ot.id |
| | | LEFT JOIN t_settlement_detail sd on ot.id = sd.orderId and sd.orderType = 4 |
| | | where ot.id = #{orderId} |
| | | </select> |
| | | |
| | |
| | | when ot.orderSource = 4 then '司机下单' |
| | | when ot.orderSource = 5 then '调度下单' else '' end orderSourceStr, |
| | | ui.nickName as userName,ui.phone as userPhone, |
| | | ot.payType, |
| | | case when ot.payType = 1 then '手机支付' |
| | | when ot.payType = 2 then '银行卡支付' |
| | | when ot.payType = 3 then '余额支付' else '现金支付' end as payTypeStr, |
| | | |
| | | |
| | | case when ot.isFree = 2 then ot.orderMoney |
| | | when ot.freeMoney > ot.orderMoney then ot.orderMoney else ot.freeMoney end as freeMoney1, |
| | | sc.chineseName as serverCarModel, |
| | | case when income1.type = 1 then income1.money else 0 end as platIncome, |
| | | case when income1.type = 2 then income1.money else 0 end as companyIncome, |
| | | case when income1.type = 3 then income1.money else 0 end as franchiseeIncome, |
| | | IFNULL(sd.price, 0) as settlementPrice, |
| | | IFNULL(income2.money,0) as driverIncome, |
| | | CONCAT(di.firstName, " ", di.lastName,'-',di.phone) as driver, |
| | | CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | cc.type as companyType, |
| | | cc.`name` as companyName,ot.*, |
| | | oc.money as cancelMoney, |
| | | case when oc.payType = 1 then '手机支付' |
| | |
| | | where ii.userType = 1 and ii.type != 1 and ii.orderType = 1 |
| | | ) as income1 on income1.incomeId = ot.id |
| | | LEFT JOIN (SELECT incomeId, money FROM t_income where userType = 2 and type != 1 and orderType = 1) as income2 on income2.incomeId = ot.id |
| | | LEFT JOIN t_settlement_detail sd on ot.id = sd.orderId and sd.orderType = 1 |
| | | where ot.id = #{orderId} |
| | | </select> |
| | | |
| | |
| | | */ |
| | | @TableField("driverId") |
| | | private Integer driverId; |
| | | /** |
| | | * google车辆id |
| | | */ |
| | | @TableField("vehicleId") |
| | | private String vehicleId; |
| | | |
| | | public Integer getAuthState() { |
| | | return authState; |
| | |
| | | this.insurancePhoto = insurancePhoto; |
| | | } |
| | | |
| | | public String getVehicleId() { |
| | | return vehicleId; |
| | | } |
| | | |
| | | public void setVehicleId(String vehicleId) { |
| | | this.vehicleId = vehicleId; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | <select class="form-control" id="phoneOperator" name="phoneOperator"> |
| | | <option value="GH-MTN-B2C">MTN</option> |
| | | <option value="GH-TIGO-B2C">TIGO</option> |
| | | <option value="GH-VODAFONE-B2C">VODAFONE</option> |
| | | <option value="GH-VODAFONE-B2C">TELECEL</option> |
| | | <option value="GH-AIRTEL-B2C">AIRTEL</option> |
| | | </select> |
| | | </div> |
| | |
| | | <select class="form-control" id="phoneOperator" name="phoneOperator"> |
| | | <option value="GH-MTN-B2C" ${item.phoneOperator == 'GH-MTN-B2C' ? 'selected' : ''}>MTN</option> |
| | | <option value="GH-TIGO-B2C" ${item.phoneOperator == 'GH-TIGO-B2C' ? 'selected' : ''}>TIGO</option> |
| | | <option value="GH-VODAFONE-B2C" ${item.phoneOperator == 'GH-VODAFONE-B2C' ? 'selected' : ''}>VODAFONE</option> |
| | | <option value="GH-VODAFONE-B2C" ${item.phoneOperator == 'GH-VODAFONE-B2C' ? 'selected' : ''}>TELECEL</option> |
| | | <option value="GH-AIRTEL-B2C" ${item.phoneOperator == 'GH-AIRTEL-B2C' ? 'selected' : ''}>AIRTEL</option> |
| | | </select> |
| | | </div> |
| | |
| | | <#label id="discountMoney" name="折扣优惠金额" value="${item.discountMoney}GHS------折扣(${item.discount}折)"/> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | @if(item.payType != 4){ |
| | | <#label id="platIncome" name="平台收益" value="${item.platIncome}GHS"/> |
| | | <#label id="companyIncome" name="分公司收益" value="${item.companyIncome}GHS"/> |
| | | <#label id="franchiseeIncome" name="加盟商收益" value="${item.franchiseeIncome}GHS"/> |
| | | <#label id="driverIncome" name="司机收益" value="${item.driverIncome}GHS"/> |
| | | @}else{ |
| | | <#label id="platIncome" name="平台收益" value="${item.companyType == 1 ? item.settlementPrice : 0}GHS"/> |
| | | <#label id="companyIncome" name="分公司收益" value="${item.companyType == 2 ? item.settlementPrice : 0}GHS"/> |
| | | <#label id="franchiseeIncome" name="加盟商收益" value="${item.companyType == 3 ? item.settlementPrice : 0}GHS"/> |
| | | <#label id="driverIncome" name="司机收益" value="${item.driverIncome + (item.payMoney - item.settlementPrice)}GHS"/> |
| | | @} |
| | | </div> |
| | | @}else if(isNotEmpty(item.cancelMoney) && item.cancelMoney > 0){ |
| | | <div class="col-sm-6"> |
| | |
| | | <#label id="discountMoney" name="折扣优惠金额" value="${item.discountMoney}GHS------折扣(${item.discount}折)"/> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <#label id="platIncome" name="平台收益" value="${item.platIncome}GHS"/> |
| | | <#label id="companyIncome" name="分公司收益" value="${item.companyIncome}GHS"/> |
| | | <#label id="franchiseeIncome" name="加盟商收益" value="${item.franchiseeIncome}GHS"/> |
| | | <#label id="driverIncome" name="司机收益" value="${item.driverIncome}GHS"/> |
| | | @if(item.payType != 4){ |
| | | <#label id="platIncome" name="平台收益" value="${item.platIncome}GHS"/> |
| | | <#label id="companyIncome" name="分公司收益" value="${item.companyIncome}GHS"/> |
| | | <#label id="franchiseeIncome" name="加盟商收益" value="${item.franchiseeIncome}GHS"/> |
| | | <#label id="driverIncome" name="司机收益" value="${item.driverIncome}GHS"/> |
| | | @}else{ |
| | | <#label id="platIncome" name="平台收益" value="${item.companyType == 1 ? item.settlementPrice : 0}GHS"/> |
| | | <#label id="companyIncome" name="分公司收益" value="${item.companyType == 2 ? item.settlementPrice : 0}GHS"/> |
| | | <#label id="franchiseeIncome" name="加盟商收益" value="${item.companyType == 3 ? item.settlementPrice : 0}GHS"/> |
| | | <#label id="driverIncome" name="司机收益" value="${item.driverIncome + (item.payMoney - item.settlementPrice)}GHS"/> |
| | | @} |
| | | </div> |
| | | @}else if(isNotEmpty(item.cancelMoney) && item.cancelMoney > 0){ |
| | | <div class="col-sm-6"> |