|
|
@@ -122,10 +122,10 @@ public class UploadAttachImpl implements UploadAttach {
|
|
|
}
|
|
|
private void uploadAttachFtp(Statement statement,String sob,String attach,FTPClient client,String ip,
|
|
|
String folder,String attachName,String dateString,String cd_id) throws SQLException {
|
|
|
- ResultSet results = statement.executeQuery("select fp_path from " + sob + ".filepath where " +
|
|
|
+ ResultSet res = statement.executeQuery("select fp_path from " + sob + ".filepath where " +
|
|
|
"fp_id in (" + attach + ")");
|
|
|
- while (results.next()) {
|
|
|
- String path = results.getString("fp_path");
|
|
|
+ while (res.next()) {
|
|
|
+ String path = res.getString("fp_path");
|
|
|
String substring = path.substring(path.lastIndexOf("."));
|
|
|
File file = new File(path);
|
|
|
if (client != null) {
|
|
|
@@ -136,6 +136,7 @@ public class UploadAttachImpl implements UploadAttach {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ res.close();
|
|
|
}
|
|
|
|
|
|
private boolean upload(FTPClient client,String ip,String folder,File file,String name){
|