| | |
| | | baseWarpper.setName("邀请用户注册"); |
| | | break; |
| | | case 3: |
| | | baseWarpper.setName("快车累计在线"); |
| | | baseWarpper.setName("网约车累计在线"); |
| | | break; |
| | | case 4: |
| | | baseWarpper.setName("车租车累计在线"); |
| | |
| | | baseWarpper.setAmount(Double.valueOf(String.valueOf(null != map.get("money") ? map.get("money") : 0))); |
| | | switch (Integer.valueOf(String.valueOf(null != map.get("orderType") ? map.get("orderType") : 0))){ |
| | | case 1: |
| | | baseWarpper.setName("快车"); |
| | | baseWarpper.setName("网约车"); |
| | | break; |
| | | case 2: |
| | | baseWarpper.setName("出租车"); |
| | | break; |
| | | case 3: |
| | | baseWarpper.setName("城际出行"); |
| | | baseWarpper.setName("出租专线"); |
| | | break; |
| | | case 4: |
| | | baseWarpper.setName("同城小件物流"); |
| | |
| | | select |
| | | id as id, |
| | | (1) as type, |
| | | ('快车订单') as `name`, |
| | | ('网约车订单') as `name`, |
| | | DATE_FORMAT(travelTime, '%Y-%m-%d %H:%i:%s') as time, |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | |
| | | select |
| | | id as orderId, |
| | | state as orderState, |
| | | ('快车订单') as orderName, |
| | | ('网约车订单') as orderName, |
| | | DATE_FORMAT(travelTime, '%m月%d日 %H:%i') as travelTime, |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | |
| | | <if test="null != companyId"> |
| | | <choose> |
| | | <when test="companyId != 1"> |
| | | and companyId = #{companyId} or franchiseeId = #{companyId} |
| | | and (companyId = #{companyId} or franchiseeId = #{companyId}) |
| | | </when> |
| | | <otherwise> |
| | | and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0 |
| | | and (companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0) |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | </if> |
| | | and id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and FIND_IN_SET(#{type}, `type`) |
| | | ) |
| | | <if test="8>type"> |
| | | and id in (select driverId from t_driver_orders where `type` = #{type}) |
| | |
| | | <if test="null != companyId"> |
| | | <choose> |
| | | <when test="companyId != 1"> |
| | | and companyId = #{companyId} or franchiseeId = #{companyId} |
| | | and (companyId = #{companyId} or franchiseeId = #{companyId}) |
| | | </when> |
| | | <otherwise> |
| | | and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0 |
| | | and (companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0) |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | </if> |
| | | and id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and FIND_IN_SET(#{type}, `type`) |
| | | ) |
| | | <if test="8>type"> |
| | | and id in (select driverId from t_driver_orders where `type` = #{type}) |
| | |
| | | from t_driver where flag != 3 and authState = 2 and taxiAptitudeCard = #{taxiAptitudeCard} |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | select |
| | | (money * -1) as money, |
| | | DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time, |
| | | CONCAT(if(orderType = 1, '快车', if(orderType = 2, '出租车', if(orderType = 3, '跨城', if(orderType = 4, '同城小件物流', if(orderType = 5, '跨城小件物流', '包车'))))), '订单取消') as name, |
| | | CONCAT(if(orderType = 1, '网约车', if(orderType = 2, '出租车', if(orderType = 3, '跨城', if(orderType = 4, '同城小件物流', if(orderType = 5, '跨城小件物流', '包车'))))), '订单取消') as name, |
| | | UNIX_TIMESTAMP(insertTime) as insertTime |
| | | from t_order_cancel where state = 2 and userType = 1 and money is not null and userId = #{uid} |
| | | <choose> |
| | |
| | | |
| | | List<DriverService> list = driverServiceMapper.queryMyBusiness(uid); |
| | | List<BaseWarpper> maps = new ArrayList<>(); |
| | | Set<Integer> addedTypes = new HashSet<>(); |
| | | for (DriverService d : list){ |
| | | if(d.getType() == 6){ |
| | | continue; |
| | | } |
| | | if (!addedTypes.add(d.getType())) { |
| | | continue; |
| | | } |
| | | if (!isBusinessOpen(company, d.getType())) { |
| | |
| | | baseWarpper.setId(d.getType()); |
| | | switch (d.getType()){ |
| | | case 1: |
| | | baseWarpper.setName("快车"); |
| | | baseWarpper.setName("网约车"); |
| | | break; |
| | | case 2: |
| | | baseWarpper.setName("出租车"); |
| | | break; |
| | | case 3: |
| | | baseWarpper.setName("跨城出行"); |
| | | baseWarpper.setName("出租专线"); |
| | | break; |
| | | case 4: |
| | | baseWarpper.setName("同城小件物流"); |
| | |
| | | } |
| | | switch (driverActivityOnline.getType()){ |
| | | case 1: |
| | | sb.append("快车"); |
| | | sb.append("网约车"); |
| | | break; |
| | | case 2: |
| | | sb.append("出租车"); |
| | | |
| | | break; |
| | | case 3: |
| | | sb.append("城际出行"); |
| | | sb.append("出租专线"); |
| | | break; |
| | | case 4: |
| | | break; |
| | |
| | | @Override |
| | | public DriverIndexVo queryHomeDataFromDriver(Integer uid) { |
| | | DriverIndexVo driverIndexVo = new DriverIndexVo(); |
| | | // 获取快车订单 |
| | | // 获取网约车订单 |
| | | List<OrderPrivateCar> orderPrivateCars = orderPrivateCarMapper.selectList(new EntityWrapper<OrderPrivateCar>().in("state", Arrays.asList(7, 8, 9)).eq("driverId", uid).like("insertTime", LocalDate.now().toString())); |
| | | // 跨城订单 |
| | | List<OrderCrossCity> orderCrossCities = orderCrossCityMapper.selectList(new EntityWrapper<OrderCrossCity>().in("state", Arrays.asList(7, 8, 9)).eq("driverId", uid).like("insertTime", LocalDate.now().toString())); |
| | |
| | | zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false |
| | | }); |
| | | map.addControl(geolocation); |
| | | geolocation.getCurrentPosition(); |
| | | // 后台录单不依赖浏览器当前位置,避免无定位权限时页面加载即弹窗。 |
| | | AMap.event.addListener(geolocation, 'complete', onComplete); |
| | | //返回定位信息 |
| | | AMap.event.addListener(geolocation, 'error', onError); |
| | |
| | | }) |
| | | } //解析定位错误信息 |
| | | function onError(data) { |
| | | alert('定位失败,原因:' + data.message); |
| | | if (window.console) { |
| | | console.warn('定位失败,原因:' + data.message); |
| | | } |
| | | } |
| | | |
| | | //输入搜索点信息 |
| | |
| | | zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false |
| | | }); |
| | | mapp.addControl(geolocation); |
| | | geolocation.getCurrentPosition(); |
| | | // 后台录单不依赖浏览器当前位置,避免无定位权限时页面加载即弹窗。 |
| | | AMap.event.addListener(geolocation, 'complete', onComplete); |
| | | //返回定位信息 |
| | | AMap.event.addListener(geolocation, 'error', onError); |
| | |
| | | }) |
| | | } //解析定位错误信息 |
| | | function onError(data) { |
| | | alert('定位失败,原因:' + data.message); |
| | | if (window.console) { |
| | | console.warn('定位失败,原因:' + data.message); |
| | | } |
| | | } |
| | | |
| | | //输入搜索点信息 |
| | |
| | | <if test="null != companyId"> |
| | | <choose> |
| | | <when test="companyId != 1"> |
| | | and companyId = #{companyId} or franchiseeId = #{companyId} |
| | | and (companyId = #{companyId} or franchiseeId = #{companyId}) |
| | | </when> |
| | | <otherwise> |
| | | and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0 |
| | | and (companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0) |
| | | </otherwise> |
| | | </choose> |
| | | |
| | |
| | | <if test="null != type"> |
| | | and id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and FIND_IN_SET(#{type}, `type`) |
| | | ) |
| | | </if> |
| | | |
| | |
| | | <if test="null != companyId"> |
| | | <choose> |
| | | <when test="companyId != 1"> |
| | | and companyId = #{companyId} or franchiseeId = #{companyId} |
| | | and (companyId = #{companyId} or franchiseeId = #{companyId}) |
| | | </when> |
| | | <otherwise> |
| | | and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0 |
| | | and (companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0) |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | </if> |
| | | and id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and FIND_IN_SET(#{type}, `type`) |
| | | ) |
| | | <if test="8>type"> |
| | | and id in (select driverId from t_driver_orders where `type` = #{type}) |
| | |
| | | ) |
| | | and id in (select driverId from t_driver_orders where `type` = #{type}) |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | if(null == o || "null".equals(o.toString())){ |
| | | return null; |
| | | } |
| | | return Integer.valueOf(o.toString()); |
| | | Integer userId = Integer.valueOf(o.toString()); |
| | | UserInfo userInfo = this.selectById(userId); |
| | | if (userInfo == null || userInfo.getState() == null || userInfo.getState() != 1) { |
| | | return null; |
| | | } |
| | | return userId; |
| | | }else{ |
| | | return null; |
| | | } |