| | |
| | | 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.*; |
| | | |
| | |
| | | private final LocusService locusService; |
| | | private final CarService carService; |
| | | private IUserService userService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | 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列的数据 |
| | |
| | | s1 += ";"; |
| | | } |
| | | } |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | deletescsv(substring); |
| | | } |
| | | deletescsv(substring); |
| | |
| | | |
| | | /** |
| | | * 删除本地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(); |
| | | } |