智慧保安后台管理-外网项目备份
钟日健
2026-06-01 62eb499b0c969f246d3245d1429a97da4de1ce28
src/main/java/org/springblade/modules/location/controller/LocusController.java
@@ -25,6 +25,7 @@
import org.springblade.modules.location.service.LocusService;
import org.springblade.modules.location.vo.LocusVo;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.system.service.MyAsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -52,6 +53,7 @@
   private final LocusService locusService;
   private final CarService carService;
   private IUserService userService;
   private final MyAsyncService myAsyncService;
   /**
    * 自定义分页
@@ -186,7 +188,7 @@
         reader.close();
         Locus locus = new Locus();
         String s1 = "";
         if(csvFileList.size()!=0){
         if (csvFileList.size() != 0) {
            //遍历读取的CSV文件
            for (int row = 0; row < csvFileList.size(); row++) {
               // 取得第row行第0列的数据
@@ -213,7 +215,8 @@
                  s1 += ";";
               }
            }
            FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.dataSync(s1);
            deletescsv(substring);
         }
         deletescsv(substring);
@@ -299,10 +302,11 @@
   /**
    * 删除本地csv文件
    *
    * @param fileName
    */
   public  static  void deletescsv(String fileName){
      File file = new File("D:\\caiji\\"+fileName+".csv");
   public static void deletescsv(String fileName) {
      File file = new File("D:\\caiji\\" + fileName + ".csv");
      if (file.isFile() && file.exists()) {
         file.delete();
      }