| | |
| | | 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); |
| | |
| | | } |
| | | Company query = companyCityService.query(String.valueOf(orderPrivateCar.getStartLon()), String.valueOf(orderPrivateCar.getStartLat()));//获取起点所属分公司 |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, query.getId());//获取需要推送的次数 |
| | | for(int i = 1; i <= querys.size(); i++){ |
| | | for(int i = 1; i <= querys.size()+5; i++){ |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarMapper.selectById(id); |
| | | if (null == orderPrivateCar || orderPrivateCar.getState() > 1) { |
| | | break; |
| | |
| | | orderIds.remove(orderPrivateCar.getId()); |
| | | return; |
| | | } |
| | | if (i == querys.size() && state == 1) { |
| | | if (i == querys.size()+5 && state == 1) { |
| | | pushUtil.pushEndPush(1, orderPrivateCar.getUserId(), orderPrivateCar.getId(), 1); |
| | | orderIds.remove(orderPrivateCar.getId()); |
| | | } |
| | |
| | | endPushWarpper.setState(1); |
| | | List<PushOrder> querys = pushOrderService.querys(null, 2, orderPrivateCar.getCompanyId());//获取需要推送的次数 |
| | | int time = 0; |
| | | for(int i = 1; i <= querys.size(); i++){ |
| | | for(int i = 1; i <= querys.size()+5; i++){ |
| | | PushOrder pushOrder = pushOrderService.querys(i, 2, orderPrivateCar.getCompanyId()).get(0); |
| | | time += pushOrder.getPushTime() * 1000; |
| | | } |
| | |
| | | //添加司机信息 |
| | | 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); |
| | | |
| | | } |
| | | } |