无关风月
7 天以前 53d014edd19f57125c355abe71ec5b478500e610
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLocationController.java
@@ -45,6 +45,8 @@
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.util.*;
import java.util.stream.Collectors;
@@ -141,6 +143,9 @@
        List<String> collect = list.stream().map(TTask::getId).collect(Collectors.toList());
        List<LocationListTaskVO> res = new ArrayList<>();
        if (collect.isEmpty()){
            return R.ok(pageInfo);
        }
        List<TTaskDetail> taskDetails = tTaskDetailService.list(Wrappers.lambdaQuery(TTaskDetail.class)
                        .in(TTaskDetail::getTaskId,collect)
                .eq(TTaskDetail::getClearStatus, 2)
@@ -388,6 +393,9 @@
        for (TLocationImportExcel locationExcel : locationExcelList) {
            System.err.println(locationExcel);
            if (locationExcel.getLocationName()==null){
                continue;
            }
            TLocation location = new TLocation();
            location.setLocationCode(locationExcel.getLocationCode());
            location.setLocationName(locationExcel.getLocationName());
@@ -396,11 +404,11 @@
                location.setLocationType(tLocationType.getId());
            }
            location.setLocationAddress(locationExcel.getLocationAddress());
            String[] addressLonLat = locationExcel.getLocationAddressLonLat().split(",");
            String[] addressLonLat = locationExcel.getLocationAddressLonLat().split("/");
            location.setLocationLon(addressLonLat[0]);
            location.setLocationLat(addressLonLat[1]);
            location.setLocationAddressEnd(locationExcel.getLocationAddressEnd());
            String[] addressEndLonLat = locationExcel.getLocationAddressEndLonLat().split(",");
            String[] addressEndLonLat = locationExcel.getLocationAddressEndLonLat().split("/");
            location.setLocationLonEnd(addressEndLonLat[0]);
            location.setLocationLatEnd(addressEndLonLat[1]);
            TProjectDept projectDept = deptList.stream().filter(dept -> dept.getCode().equals(locationExcel.getDeptCode())).findFirst().orElse(null);
@@ -436,5 +444,10 @@
        return R.ok();
    }
    public static void main(String[] args) {
        BigDecimal divide = new BigDecimal("-23").divide(new BigDecimal("40"),2, RoundingMode.HALF_UP);
        System.err.println(divide);
    }
}