| | |
| | | FtpUtil.downloadFtpFile(ftpHost, ftpUserNameIn, ftpPasswordIn, ftpPort, ftpPath, localPath, fileName); |
| | | // 解析数据 |
| | | String s = OutJson.TestJson(fileName); |
| | | System.out.println("s = " + s); |
| | | //数据处理 |
| | | Result result = DataHandler.handler(s,uuid); |
| | | //匹配上了删除文件 |
| | |
| | | //删除 ftp 文件 |
| | | FtpUtil.deleteFile(ftpHost, ftpPort, ftpUserNameIn, ftpPasswordIn, ftpPath, fileName); |
| | | // ftp.dele(fileName); |
| | | ftp.completePendingCommand(); |
| | | ftp.logout(); |
| | | //返回 |
| | | return result; |
| | | return result.getData().get(0); |
| | | } |
| | | ftp.completePendingCommand(); |
| | | ftp.logout(); |
| | | } |
| | | } |
| | | if (!flag){ |
| | | ftp.logout(); |
| | | } |
| | | // if (!flag){ |
| | | // ftp.logout(); |
| | | // } |
| | | return new Result(400,null,"未读取到对应的文件",null); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | //删除 ftp 文件 |
| | | FtpUtil.deleteFile(ftpHost, ftpPort, ftpUserNameIn, ftpPasswordIn, ftpPath, fileName); |
| | | // ftp.dele(fileName); |
| | | ftp.completePendingCommand(); |
| | | ftp.logout(); |
| | | |
| | | //返回 |
| | | return result; |
| | | } |
| | | ftp.completePendingCommand(); |
| | | ftp.logout(); |
| | | } |
| | | } |
| | | if (!flag){ |
| | | ftp.logout(); |
| | | } |
| | | // if (!flag){ |
| | | // ftp.logout(); |
| | | // } |
| | | return new Result(400,null,"未读取到对应的文件",null); |
| | | } |
| | | } catch (Exception e) { |