|
|
@@ -100,7 +100,9 @@ public class DownloadServiceImpl implements DownloadService {
|
|
|
}
|
|
|
Statement statement = connect.createStatement();
|
|
|
sqls = parseXmlFileToSqls(file, statement);
|
|
|
+ String s = file.getName().substring(0, file.getName().indexOf(".")) + ".xml";
|
|
|
if (sqls == null) {
|
|
|
+ sftp.rename(ftpMap.get("downloadpath").toString() + "/" + s, "goodsreceipt/backup/" + s);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
@@ -108,12 +110,18 @@ public class DownloadServiceImpl implements DownloadService {
|
|
|
|
|
|
if (executeRes) {
|
|
|
if ("N_YITOA_LHCT-SF".equals(depot)) {
|
|
|
- String s = file.getName().substring(0, file.getName().indexOf(".")) + ".xml";
|
|
|
Boolean rename = sftp.rename(ftpMap.get("downloadpath").toString() + "/" + s, "goodsreceipt/backup/" + s);
|
|
|
} else {
|
|
|
//移动处理完的文件到bak文件夹下
|
|
|
client.rename(file.getName(), "bak/" + file.getName());
|
|
|
}
|
|
|
+ }else{
|
|
|
+ if ("N_YITOA_LHCT-SF".equals(depot)) {
|
|
|
+ Boolean rename = sftp.rename(ftpMap.get("downloadpath").toString() + "/" + s, "goodsreceipt/backup/" + s);
|
|
|
+ } else {
|
|
|
+ //移动处理完的文件到failed文件夹下
|
|
|
+ client.rename(file.getName(), "failed/" + file.getName());
|
|
|
+ }
|
|
|
}
|
|
|
statement.close();
|
|
|
} catch (Exception e) {
|