Commit cc55aeba authored by LSL's avatar LSL

结清默认结清账单

parent 340ca639
......@@ -13,9 +13,11 @@ import com.jqtx.windows.component.impl.BackedBurdenComponentImpl;
import com.jqtx.windows.component.model.*;
import com.jqtx.windows.infrastructure.feign.enums.DebtInfoStatusEnum;
import com.jqtx.windows.infrastructure.feign.enums.DebtPlanStatusEnum;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -45,15 +47,19 @@ public class BackedBurdenJob {
@XxlJob("backedBurdenJob")
public void run() {
String param = XxlJobHelper.getJobParam();
Sftp sftp = new Sftp("115.238.89.106", 9901, "xiaohua_fr", "R7MADMx1lwMN5k4v", CharsetUtil.CHARSET_UTF_8);
String date = DateUtil.format(new Date(), "yyyyMMdd");
if (sftp.isDir("/download/assurance/" + date + "/assurance_" + date + ".txt")) {
if (StringUtils.isNotEmpty(param)) {
date = param;
}
if (sftp.isDir("/download/assurance/" + date)) {
sftp.cd("/download/assurance/" + date);
sftp.get("assurance_" + date + ".txt", "/assurance_sftp.txt");
ossUtils.ossUpload("ZN/assurance_/" + "assurance_" + date + ".txt", FileUtil.file("/assurance_sftp.txt"));
FileUtil.del("/sftp.txt");
String stringObject = ossUtils.getStringObject("ZN/assurance_/" + "assurance_" + date + ".txt");
log.info("date:{}", stringObject);
log.info("oss融担数据:{}", stringObject);
//存储并去平账
List<BurdenModel> getlist = getlist(stringObject);
for (BurdenModel model : getlist) {
......
......@@ -7,8 +7,10 @@ import cn.hutool.extra.ssh.Sftp;
import com.jqtx.infrastructure.oss.starter.config.OssUtils;
import com.jqtx.windows.component.RedeemComponent;
import com.jqtx.windows.component.model.RedeemModel;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -27,18 +29,19 @@ public class RedeemJob {
@XxlJob("redeemJob")
public void run() {
String param = XxlJobHelper.getJobParam();
Sftp sftp = new Sftp("115.238.89.106", 9901, "xiaohua_fr", "R7MADMx1lwMN5k4v", CharsetUtil.CHARSET_UTF_8);
String date = DateUtil.format(new Date(), "yyyyMMdd");
if (sftp.isDir("/download/compensatory/" + date )) {
log.info("浙农代偿文件目录:{}", date);
if (StringUtils.isNotEmpty(param)) {
date = param;
}
if (sftp.isDir("/download/compensatory/" + date + "/compensatory_" + date + ".txt")) {
if (sftp.isDir("/download/compensatory/" + date)) {
sftp.cd("/download/compensatory/" + date);
sftp.get("compensatory_" + date + ".txt", "/compensatory_sftp.txt");
ossUtils.ossUpload("ZN/compensatory/" + "compensatory_" + date + ".txt", FileUtil.file("/compensatory_sftp.txt"));
FileUtil.del("/compensatory_sftp.txt");
String stringObject = ossUtils.getStringObject("ZN/compensatory/" + "compensatory_" + date + ".txt");
log.info("oss数据:{}", stringObject);
log.info("oss代偿数据:{}", stringObject);
redeemComponent.insert(getlist(stringObject));
} else {
log.info("浙农代偿文件不存在:{}", date);
......
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