Commit 676a8fcf authored by LSL's avatar LSL

结清默认结清账单

parent 07fa8113
...@@ -47,6 +47,7 @@ public class BackedBurdenJob { ...@@ -47,6 +47,7 @@ public class BackedBurdenJob {
public void run() { public void run() {
Sftp sftp = new Sftp("115.238.89.106", 9901, "xiaohua_fr", "R7MADMx1lwMN5k4v", CharsetUtil.CHARSET_UTF_8); Sftp sftp = new Sftp("115.238.89.106", 9901, "xiaohua_fr", "R7MADMx1lwMN5k4v", CharsetUtil.CHARSET_UTF_8);
String date = DateUtil.format(new Date(), "yyyyMMdd"); String date = DateUtil.format(new Date(), "yyyyMMdd");
if (sftp.isDir("/download/assurance/" + date + "assurance_" + date + ".txt")) {
sftp.cd("/download/assurance/" + date); sftp.cd("/download/assurance/" + date);
sftp.get("assurance_" + date + ".txt", "/assurance_sftp.txt"); sftp.get("assurance_" + date + ".txt", "/assurance_sftp.txt");
ossUtils.ossUpload("ZN/assurance_/" + "assurance_" + date + ".txt", FileUtil.file("/assurance_sftp.txt")); ossUtils.ossUpload("ZN/assurance_/" + "assurance_" + date + ".txt", FileUtil.file("/assurance_sftp.txt"));
...@@ -58,6 +59,9 @@ public class BackedBurdenJob { ...@@ -58,6 +59,9 @@ public class BackedBurdenJob {
for (BurdenModel model : getlist) { for (BurdenModel model : getlist) {
backedBurdenComponent.insert(model); backedBurdenComponent.insert(model);
} }
} else {
log.info("浙农融担文件不存在:{}", date);
}
} }
......
...@@ -29,18 +29,23 @@ public class RedeemJob { ...@@ -29,18 +29,23 @@ public class RedeemJob {
public void run() { public void run() {
Sftp sftp = new Sftp("115.238.89.106", 9901, "xiaohua_fr", "R7MADMx1lwMN5k4v", CharsetUtil.CHARSET_UTF_8); Sftp sftp = new Sftp("115.238.89.106", 9901, "xiaohua_fr", "R7MADMx1lwMN5k4v", CharsetUtil.CHARSET_UTF_8);
String date = DateUtil.format(new Date(), "yyyyMMdd"); String date = DateUtil.format(new Date(), "yyyyMMdd");
if (sftp.isDir("/download/compensatory/" + date + "compensatory_" + date + ".txt")) {
sftp.cd("/download/compensatory/" + date); sftp.cd("/download/compensatory/" + date);
sftp.get("compensatory_" + date + ".txt", "/compensatory_sftp.txt"); sftp.get("compensatory_" + date + ".txt", "/compensatory_sftp.txt");
ossUtils.ossUpload("ZN/compensatory/" + "compensatory_" + date + ".txt", FileUtil.file("/compensatory_sftp.txt")); ossUtils.ossUpload("ZN/compensatory/" + "compensatory_" + date + ".txt", FileUtil.file("/compensatory_sftp.txt"));
FileUtil.del("/compensatory_sftp.txt"); FileUtil.del("/compensatory_sftp.txt");
String stringObject = ossUtils.getStringObject("ZN/compensatory/" + "compensatory_" + date + ".txt"); String stringObject = ossUtils.getStringObject("ZN/compensatory/" + "compensatory_" + date + ".txt");
log.info("date:{}", stringObject); log.info("oss数据:{}", stringObject);
redeemComponent.insert(getlist(stringObject)); redeemComponent.insert(getlist(stringObject));
} else {
log.info("浙农代偿文件不存在:{}", date);
}
} }
/** /**
* 封装model * 封装model
*
* @param jsonResult * @param jsonResult
* @return * @return
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment