|
|
|
@ -1,11 +1,8 @@
|
|
|
|
|
package com.docus.server.report.listener;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.net.Ipv4Util;
|
|
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
|
import cn.hutool.http.HttpResponse;
|
|
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
|
import com.docus.server.report.config.ApplicationBusinessConfig;
|
|
|
|
|
import com.docus.server.report.dto.ReportDownDto;
|
|
|
|
@ -15,14 +12,12 @@ import com.docus.server.report.dto.ReportDto;
|
|
|
|
|
import com.docus.server.report.event.ReportDownEvent;
|
|
|
|
|
import com.docus.server.report.mapper.AfReportRecordMapper;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.context.event.EventListener;
|
|
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -60,7 +55,8 @@ public class ReportDownListener {
|
|
|
|
|
reportDownDto.setScanfiles(reportDownScanFileDtos);
|
|
|
|
|
|
|
|
|
|
// 下面是调用下载服务
|
|
|
|
|
String requestParam = JSON.toJSONString(reportDownDto);
|
|
|
|
|
|
|
|
|
|
String requestParam = Func.toJson(reportDownDto);
|
|
|
|
|
try {
|
|
|
|
|
HttpRequest post = HttpUtil.createPost(applicationBusinessConfig.getDownUrl());
|
|
|
|
|
post.timeout(5*1000);
|
|
|
|
|