Commit 676a8fcf authored by LSL's avatar LSL

结清默认结清账单

parent 07fa8113
...@@ -47,16 +47,20 @@ public class BackedBurdenJob { ...@@ -47,16 +47,20 @@ 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");
sftp.cd("/download/assurance/" + date); if (sftp.isDir("/download/assurance/" + date + "assurance_" + date + ".txt")) {
sftp.get("assurance_" + date + ".txt", "/assurance_sftp.txt"); sftp.cd("/download/assurance/" + date);
ossUtils.ossUpload("ZN/assurance_/" + "assurance_" + date + ".txt", FileUtil.file("/assurance_sftp.txt")); sftp.get("assurance_" + date + ".txt", "/assurance_sftp.txt");
FileUtil.del("/sftp.txt"); ossUtils.ossUpload("ZN/assurance_/" + "assurance_" + date + ".txt", FileUtil.file("/assurance_sftp.txt"));
String stringObject = ossUtils.getStringObject("ZN/assurance_/" + "assurance_" + date + ".txt"); FileUtil.del("/sftp.txt");
log.info("date:{}", stringObject); String stringObject = ossUtils.getStringObject("ZN/assurance_/" + "assurance_" + date + ".txt");
//存储并去平账 log.info("date:{}", stringObject);
List<BurdenModel> getlist = getlist(stringObject); //存储并去平账
for (BurdenModel model : getlist) { List<BurdenModel> getlist = getlist(stringObject);
backedBurdenComponent.insert(model); for (BurdenModel model : getlist) {
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");
sftp.cd("/download/compensatory/" + date); if (sftp.isDir("/download/compensatory/" + date + "compensatory_" + date + ".txt")) {
sftp.get("compensatory_" + date + ".txt", "/compensatory_sftp.txt"); sftp.cd("/download/compensatory/" + date);
ossUtils.ossUpload("ZN/compensatory/" + "compensatory_" + date + ".txt", FileUtil.file("/compensatory_sftp.txt")); sftp.get("compensatory_" + date + ".txt", "/compensatory_sftp.txt");
FileUtil.del("/compensatory_sftp.txt"); ossUtils.ossUpload("ZN/compensatory/" + "compensatory_" + date + ".txt", FileUtil.file("/compensatory_sftp.txt"));
String stringObject = ossUtils.getStringObject("ZN/compensatory/" + "compensatory_" + date + ".txt"); FileUtil.del("/compensatory_sftp.txt");
log.info("date:{}", stringObject); String stringObject = ossUtils.getStringObject("ZN/compensatory/" + "compensatory_" + date + ".txt");
redeemComponent.insert(getlist(stringObject)); log.info("oss数据:{}", 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