无关风月
2 天以前 1fd6775420288be4dce934fe845328e9501bf023
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLocationController.java
@@ -27,6 +27,7 @@
import com.ruoyi.system.service.*;
import com.ruoyi.system.utils.CustomerImportFailedData;
import com.ruoyi.system.vo.system.*;
import com.ruoyi.web.controller.tool.HighPrecisionCoordinateTransformUtil;
import com.sun.org.apache.bcel.internal.generic.NEW;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -405,12 +406,15 @@
            }
            location.setLocationAddress(locationExcel.getLocationAddress());
            String[] addressLonLat = locationExcel.getLocationAddressLonLat().split("/");
            location.setLocationLon(addressLonLat[0]);
            location.setLocationLat(addressLonLat[1]);
            double[] start = HighPrecisionCoordinateTransformUtil.wgs84ToGcj02ViaGaode(Double.parseDouble(addressLonLat[1]), Double.parseDouble(addressLonLat[0]));
            location.setLocationLon(String.valueOf(start[1]));
            location.setLocationLat(String.valueOf(start[0]));
            location.setLocationAddressEnd(locationExcel.getLocationAddressEnd());
            String[] addressEndLonLat = locationExcel.getLocationAddressEndLonLat().split("/");
            location.setLocationLonEnd(addressEndLonLat[0]);
            location.setLocationLatEnd(addressEndLonLat[1]);
            double[] end = HighPrecisionCoordinateTransformUtil.wgs84ToGcj02ViaGaode(Double.parseDouble(addressEndLonLat[1]), Double.parseDouble(addressEndLonLat[0]));
            location.setLocationLonEnd(String.valueOf(end[1]));
            location.setLocationLatEnd(String.valueOf(end[0]));
            TProjectDept projectDept = deptList.stream().filter(dept -> dept.getCode().equals(locationExcel.getDeptCode())).findFirst().orElse(null);
            if(Objects.nonNull(projectDept)){
                location.setProjectId(projectDept.getId());
@@ -425,7 +429,8 @@
                result.append("路段名:[", locationExcel.getLocationName()+"]未查询到点位负责人");
                continue;
            }
            TCleaner tCleaner = cleaners.stream().filter(cleaner -> cleaner.getCleanerCode().equals(locationExcel.getCleanerCodeClear())
            TCleaner tCleaner = cleaners.stream().filter(cleaner -> cleaner.getCleanerCode().equals(
                    locationExcel.getCleanerCodeClear())
                    && cleaner.getDeptCode().equals(locationExcel.getDeptCodeClear())
                    && cleaner.getProjectCode().equals(locationExcel.getProjectCodeClear())
                    && cleaner.getCleanerName().equals(locationExcel.getCleanerName())).findFirst().orElse(null);