| | |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/order/addAppeal") |
| | | @ApiOperation(value = "发起申诉", tags = {"用户端-服务中"}, notes = "",response = OrderInfoWarpper.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "申诉描述", name = "abnormalIntro", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "申诉图片", name = "abnormalImg", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<OrderInfoWarpper> addAppeal(Integer orderId, Integer orderType,String abnormalIntro, String abnormalImg, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = userInfoService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | switch (orderType){ |
| | | case 1://专车 |
| | | orderPrivateCarService.addAppeal(uid, orderId,abnormalIntro,abnormalImg); |
| | | break; |
| | | case 2://出租车 |
| | | orderTaxiService.addAppeal(uid,orderId,abnormalIntro,abnormalImg); |
| | | break; |
| | | case 3://跨城 |
| | | orderCrossCityService.addAppeal(uid,orderId,abnormalIntro,abnormalImg); |
| | | break; |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取服务中的详情数据 |
| | |
| | | h.remark as cancelRemark, |
| | | CONCAT(j.startTime, '-', j.endTime) as lineShiftTime, |
| | | a.holidayFee, |
| | | a.discountAmount as taxiCardMoney |
| | | a.discountAmount as taxiCardMoney, |
| | | a.responsibilityType, |
| | | a.abnormalStatus, |
| | | a.abnormalRemark, |
| | | a.abnormalIntro, |
| | | a.abnormalImg |
| | | from t_order_cross_city a |
| | | left join t_driver b on (a.driverId = b.id) |
| | | left join t_car c on (a.carId = c.id) |
| | |
| | | @TableField("billNo") |
| | | private String billNo; |
| | | |
| | | /** |
| | | * 是否异常订单 1否 2是 |
| | | */ |
| | | @TableField("abnormal") |
| | | private Integer abnormal; |
| | | |
| | | |
| | | /** |
| | | * 乘客反馈情况 |
| | | */ |
| | | @TableField("abnormalIntro") |
| | | private String abnormalIntro; |
| | | |
| | | /** |
| | | * 乘客反馈图片 |
| | | */ |
| | | @TableField("abnormalImg") |
| | | private String abnormalImg; |
| | | |
| | | private String splitAllocation; |
| | | |
| | | public Integer getAbnormal() { |
| | | return abnormal; |
| | | } |
| | | |
| | | public void setAbnormal(Integer abnormal) { |
| | | this.abnormal = abnormal; |
| | | } |
| | | |
| | | public String getAbnormalIntro() { |
| | | return abnormalIntro; |
| | | } |
| | | |
| | | public void setAbnormalIntro(String abnormalIntro) { |
| | | this.abnormalIntro = abnormalIntro; |
| | | } |
| | | |
| | | public String getAbnormalImg() { |
| | | return abnormalImg; |
| | | } |
| | | |
| | | public void setAbnormalImg(String abnormalImg) { |
| | | this.abnormalImg = abnormalImg; |
| | | } |
| | | |
| | | public String getBillNo() { |
| | | return billNo; |
| | | } |
| | |
| | | * 获取未支付的跨城订单 |
| | | */ |
| | | List<UnPayOrderVO> getUnpayCrossCityOrders(Integer uid) throws Exception; |
| | | |
| | | /** |
| | | * 添加申诉 |
| | | */ |
| | | void addAppeal(Integer uid, Integer orderId,String abnormalIntro, String abnormalImg); |
| | | |
| | | } |
| | |
| | | if(Integer.valueOf(String.valueOf(map.get("state"))) == 11){ |
| | | map.put("state", map.get("oldState")); |
| | | } |
| | | 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<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()); |
| | |
| | | } |
| | | return unPayOrderVOList; |
| | | } |
| | | |
| | | @Override |
| | | public void addAppeal(Integer uid, Integer orderId, String abnormalIntro, String abnormalImg) { |
| | | OrderCrossCity orderCrossCity = this.selectById(orderId); |
| | | if(orderCrossCity.getState()!=7 || orderCrossCity.getAbnormalIntro()!=null){ |
| | | throw new RuntimeException("此订单无法申诉"); |
| | | } |
| | | orderCrossCity.setAbnormalIntro(abnormalIntro); |
| | | orderCrossCity.setAbnormalImg(abnormalImg); |
| | | orderCrossCity.setAbnormal(1); |
| | | this.baseMapper.updateById(orderCrossCity); |
| | | } |
| | | } |
| | |
| | | a.waitRule, |
| | | a.chargeRule, |
| | | a.chargeRules, |
| | | a.discountAmount as taxiCardMoney |
| | | a.discountAmount as taxiCardMoney, |
| | | a.responsibilityType, |
| | | a.abnormalStatus, |
| | | a.abnormalRemark, |
| | | a.abnormalIntro, |
| | | a.abnormalImg |
| | | from t_order_private_car a |
| | | left join t_driver b on (a.driverId = b.id) |
| | | left join t_car c on (a.carId = c.id) |
| | |
| | | @TableField("pid") |
| | | private Integer pid; |
| | | |
| | | /** |
| | | * 是否异常订单 1否 2是 |
| | | */ |
| | | @TableField("abnormal") |
| | | private Integer abnormal; |
| | | |
| | | |
| | | /** |
| | | * 乘客反馈情况 |
| | | */ |
| | | @TableField("abnormalIntro") |
| | | private String abnormalIntro; |
| | | |
| | | /** |
| | | * 乘客反馈图片 |
| | | */ |
| | | @TableField("abnormalImg") |
| | | private String abnormalImg; |
| | | |
| | | private Integer totalPeopleNum; |
| | | /** |
| | | * 预估里程(米) |
| | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | public Integer getAbnormal() { |
| | | return abnormal; |
| | | } |
| | | |
| | | public void setAbnormal(Integer abnormal) { |
| | | this.abnormal = abnormal; |
| | | } |
| | | |
| | | public String getAbnormalIntro() { |
| | | return abnormalIntro; |
| | | } |
| | | |
| | | public void setAbnormalIntro(String abnormalIntro) { |
| | | this.abnormalIntro = abnormalIntro; |
| | | } |
| | | |
| | | public String getAbnormalImg() { |
| | | return abnormalImg; |
| | | } |
| | | |
| | | public void setAbnormalImg(String abnormalImg) { |
| | | this.abnormalImg = abnormalImg; |
| | | } |
| | | |
| | | public Integer getSpellSuccess() { |
| | | return spellSuccess; |
| | | } |
| | |
| | | * 获取专车未支付的订单 |
| | | */ |
| | | List<UnPayOrderVO> getUnpayPrivateOrders(Integer uid); |
| | | |
| | | /** |
| | | * 添加申诉 |
| | | */ |
| | | void addAppeal(Integer uid, Integer orderId,String abnormalIntro, String abnormalImg); |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyun.oss.ServiceException; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | if(Integer.valueOf(String.valueOf(map.get("state"))) == 11){ |
| | | map.put("state", map.get("oldState")); |
| | | } |
| | | 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); |
| | | } |
| | | |
| | | |
| | | 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); |
| | |
| | | //添加司机信息 |
| | | DriverInfoWarpper driverInfoWarpper = new DriverInfoWarpper(); |
| | | Driver driver = driverService.selectById(order.getDriverId()); |
| | | BeanUtils.copyProperties(driver, driverInfoWarpper); vo.setDriverInfoWarpper(driverInfoWarpper); |
| | | BeanUtils.copyProperties(driver, driverInfoWarpper); |
| | | vo.setDriverInfoWarpper(driverInfoWarpper); |
| | | //其余信息 |
| | | BeanUtils.copyProperties(order, vo); |
| | | unPayOrderVOList.add(vo); |
| | |
| | | |
| | | return unPayOrderVOList; |
| | | } |
| | | |
| | | @Override |
| | | public void addAppeal(Integer uid, Integer orderId,String abnormalIntro, String abnormalImg) { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | if(orderPrivateCar.getState()!=7 || orderPrivateCar.getAbnormalIntro()!=null){ |
| | | throw new RuntimeException("此订单无法申诉"); |
| | | } |
| | | orderPrivateCar.setAbnormalIntro(abnormalIntro); |
| | | orderPrivateCar.setAbnormalImg(abnormalImg); |
| | | orderPrivateCar.setAbnormal(1); |
| | | this.baseMapper.updateById(orderPrivateCar); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | private String time; |
| | | |
| | | |
| | | @ApiModelProperty("申诉按钮 1显示 0不显示") |
| | | private Integer appealButton=0; |
| | | |
| | | @ApiModelProperty("申诉状态 0未申诉 1申诉中") |
| | | private Integer appealStatus=0; |
| | | |
| | | |
| | | @ApiModelProperty("处理状态 1审核中 2已处理") |
| | | private Integer abnormalStatus; |
| | | @ApiModelProperty("处理结果") |
| | | private String abnormalRemark; |
| | | @ApiModelProperty("乘客反馈情况") |
| | | private String abnormalIntro; |
| | | @ApiModelProperty("乘客反馈情况图片") |
| | | private String abnormalImg; |
| | | @ApiModelProperty("1平台全责 2司机全责 3乘客全责 4平台部分 5司机部分") |
| | | private String responsibilityType; |
| | | |
| | | |
| | | public Integer getAbnormalStatus() { |
| | | return abnormalStatus; |
| | | } |
| | | |
| | | public void setAbnormalStatus(Integer abnormalStatus) { |
| | | this.abnormalStatus = abnormalStatus; |
| | | } |
| | | |
| | | public String getAbnormalRemark() { |
| | | return abnormalRemark; |
| | | } |
| | | |
| | | public void setAbnormalRemark(String abnormalRemark) { |
| | | this.abnormalRemark = abnormalRemark; |
| | | } |
| | | |
| | | public String getAbnormalIntro() { |
| | | return abnormalIntro; |
| | | } |
| | | |
| | | public void setAbnormalIntro(String abnormalIntro) { |
| | | this.abnormalIntro = abnormalIntro; |
| | | } |
| | | |
| | | public String getAbnormalImg() { |
| | | return abnormalImg; |
| | | } |
| | | |
| | | public void setAbnormalImg(String abnormalImg) { |
| | | this.abnormalImg = abnormalImg; |
| | | } |
| | | |
| | | public String getResponsibilityType() { |
| | | return responsibilityType; |
| | | } |
| | | |
| | | public void setResponsibilityType(String responsibilityType) { |
| | | this.responsibilityType = responsibilityType; |
| | | } |
| | | |
| | | public Integer getAppealStatus() { |
| | | return appealStatus; |
| | | } |
| | | |
| | | public void setAppealStatus(Integer appealStatus) { |
| | | this.appealStatus = appealStatus; |
| | | } |
| | | |
| | | public Integer getAppealButton() { |
| | | return appealButton; |
| | | } |
| | | |
| | | public void setAppealButton(Integer appealButton) { |
| | | this.appealButton = appealButton; |
| | | } |
| | | |
| | | public String getTime() { |
| | | return time; |
| | | } |
| | |
| | | @ApiModelProperty("订单状态(1=待接单,2=待出发,3=待到达预约地点,4=待乘客上车,5=服务中,6=完成服务,7=待支付,8=待评价,9=已完成,10=已取消,11=改派中,12=取消待支付)") |
| | | private Integer state; |
| | | |
| | | |
| | | |
| | | public Integer getOrderId() { |
| | | return orderId; |
| | | } |
| | |
| | | h.reason as cancelReason, |
| | | h.remark as cancelRemark, |
| | | a.holidayFee, |
| | | a.discountAmount as taxiCardMoney |
| | | a.discountAmount as taxiCardMoney, |
| | | a.responsibilityType, |
| | | a.abnormalStatus, |
| | | a.abnormalRemark, |
| | | a.abnormalIntro, |
| | | a.abnormalImg |
| | | from t_order_taxi a |
| | | left join t_driver b on (a.driverId = b.id) |
| | | left join t_car c on (a.carId = c.id) |
| | |
| | | @TableField("bindId") |
| | | private String bindId; |
| | | |
| | | /** |
| | | * 是否异常订单 1否 2是 |
| | | */ |
| | | @TableField("abnormal") |
| | | private Integer abnormal; |
| | | |
| | | |
| | | /** |
| | | * 乘客反馈情况 |
| | | */ |
| | | @TableField("abnormalIntro") |
| | | private String abnormalIntro; |
| | | |
| | | /** |
| | | * 乘客反馈图片 |
| | | */ |
| | | @TableField("abnormalImg") |
| | | private String abnormalImg; |
| | | |
| | | private String splitAllocation; |
| | | |
| | | |
| | | public Integer getAbnormal() { |
| | | return abnormal; |
| | | } |
| | | |
| | | public void setAbnormal(Integer abnormal) { |
| | | this.abnormal = abnormal; |
| | | } |
| | | |
| | | public String getAbnormalIntro() { |
| | | return abnormalIntro; |
| | | } |
| | | |
| | | public void setAbnormalIntro(String abnormalIntro) { |
| | | this.abnormalIntro = abnormalIntro; |
| | | } |
| | | |
| | | public String getAbnormalImg() { |
| | | return abnormalImg; |
| | | } |
| | | |
| | | public void setAbnormalImg(String abnormalImg) { |
| | | this.abnormalImg = abnormalImg; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | |
| | | */ |
| | | List<UnPayOrderVO> getUnpayTaxiOrders(Integer uid); |
| | | |
| | | |
| | | /** |
| | | * 添加申诉 |
| | | * @param uid |
| | | * @param orderId |
| | | */ |
| | | void addAppeal(Integer uid, Integer orderId,String abnormalIntro, String abnormalImg); |
| | | } |
| | |
| | | if(Integer.valueOf(String.valueOf(map.get("state"))) == 11){ |
| | | map.put("state", map.get("oldState")); |
| | | } |
| | | |
| | | 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); |
| | | } |
| | | |
| | | String driverId = (String) redisTemplate.opsForValue().get("DEVICE_" + map.get("driverId")); |
| | | map.put("device", ToolUtil.isNotEmpty(driverId) ? 2 : 1); |
| | | map.put("orderType", 2); |
| | |
| | | |
| | | return unPayOrderVOList; |
| | | } |
| | | |
| | | @Override |
| | | public void addAppeal(Integer uid, Integer orderId, String abnormalIntro, String abnormalImg) { |
| | | OrderTaxi orderTaxi = this.selectById(orderId); |
| | | if(orderTaxi.getState()!=7 || orderTaxi.getAbnormalIntro()!=null){ |
| | | throw new RuntimeException("此订单无法申诉"); |
| | | } |
| | | orderTaxi.setAbnormalIntro(abnormalIntro); |
| | | orderTaxi.setAbnormalImg(abnormalImg); |
| | | orderTaxi.setAbnormal(1); |
| | | this.baseMapper.updateById(orderTaxi); |
| | | } |
| | | } |