yanderong
2026-07-09 0b59f96a3e1fb1f16ee3fa662a5d6ca0600d8842
DriverYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java
@@ -1,6 +1,5 @@
package com.stylefeng.guns.modular.api;
import cn.hutool.core.io.FileUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
@@ -33,6 +32,7 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.geo.Circle;
@@ -49,8 +49,6 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
@@ -1870,8 +1868,20 @@
            ArrayList<CompanyVo> companyVos = new ArrayList<>();
            List<CompanyCity> companyCities = companyCityService.selectList(new EntityWrapper<CompanyCity>().eq("areaCode", areaCode).eq("state", 1));
            if(companyCities.isEmpty()){
                // 最后两位替换为0
                String cityCode = areaCode.substring(0, areaCode.length() - 2) + "00";
                companyCities = companyCityService.selectList(new EntityWrapper<CompanyCity>().eq("cityCode", cityCode).eq("state", 1));
            }
            if(CollectionUtils.isEmpty(companyCities)) {
                // 最后四位替换为0
                String provinceCode = areaCode.substring(0, areaCode.length() - 4) + "0000";
                companyCities = companyCityService.selectList(new EntityWrapper<CompanyCity>().eq("provinceCode", provinceCode).eq("state", 1));
            }
            if(CollectionUtils.isEmpty(companyCities)) {
                return ResultUtil.success(companyVos);
            }
            Wrapper<Company> in = new EntityWrapper<Company>().ne("type", 1).ne("flag", 3).in("id", companyCities.stream().map(CompanyCity::getCompanyId).collect(Collectors.toList()));
            if(ToolUtil.isNotEmpty( name)){