<%@ page import="java.io.*, java.util.zip.*" %>
<%@ page import="org.slf4j.Logger" %>
<%@ page import="org.slf4j.LoggerFactory" %>
<%@ page import="com.engine.custom.archives.service.ReceivingPushArchivesService" %>
<%@ page import="com.engine.custom.archives.service.SendingPushArchivesService" %>
<%@ page import="com.engine.custom.archives.service.SignReportPushArchivesService" %>
<%@ page import="com.engine.custom.archives.service.firstBranch.FirstBranchReceivingPushArchivesService" %>
<%@ page import="com.engine.custom.archives.service.firstBranch.FirstBranchSendingPushArchivesService" %>
<%@ page import="com.engine.custom.archives.service.firstBranch.FirstBranchSignReportPushArchivesService" %>
<%@ page import="com.engine.custom.archives.service.secondBranch.SecondBranchReceivingPushArchivesService" %>
<%@ page import="com.engine.custom.archives.service.secondBranch.SecondBranchSendingPushArchivesService" %>
<%@ page import="java.util.Date" %>
<%@ page import="com.engine.custom.archives.util.ArchivesUtil" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.HashMap" %>
<%@page contentType="text/html; charset=UTF-8" %>

<%


     String filePath = "/opt/weaver/archivesFile";
     String Url = "http://14.1.206.240:18080/fcscloud/composite/upload";
     String templatePath = "/opt/weaver/archivesFile/template/";
     String endTime = "7";
     String reqid = "";
    Logger log = LoggerFactory.getLogger("Archives");

    ReceivingPushArchivesService receivingservice = new ReceivingPushArchivesService();
    SendingPushArchivesService sendingservice = new SendingPushArchivesService();
    SignReportPushArchivesService signReportservice =new SignReportPushArchivesService();

    FirstBranchReceivingPushArchivesService firstBranchReceivingPushArchivesService =new FirstBranchReceivingPushArchivesService();
    FirstBranchSendingPushArchivesService firstBranchSendingPushArchivesService =new FirstBranchSendingPushArchivesService();
    FirstBranchSignReportPushArchivesService firstBranchSignReportPushArchivesService =new FirstBranchSignReportPushArchivesService();
    SecondBranchReceivingPushArchivesService secondBranchReceivingPushArchivesService =new SecondBranchReceivingPushArchivesService();
    SecondBranchSendingPushArchivesService secondBranchSendingPushArchivesService =new SecondBranchSendingPushArchivesService();
    int i= 0;
   while (i<100) {
       new Thread(() -> {
           log.info("PushArchivesCorn====Begin========");
           Date date = ArchivesUtil.getDate();
           String dateStr = new SimpleDateFormat("yyyyMMdd").format(date);
           HashMap<String, String> param = new HashMap<>();
           param.put("filePath", filePath + File.separator + dateStr);
           param.put("Url", Url);
           param.put("endTime", endTime);
           // param.put("requestid",reqid);
           param.put("templatePath", templatePath);
           sendingservice.setProp(param);
           sendingservice.pushArchives(param);
           signReportservice.setProp(param);
           signReportservice.pushArchives(param);
           receivingservice.setProp(param);
           receivingservice.pushArchives(param);
           firstBranchReceivingPushArchivesService.setProp(param);
           firstBranchReceivingPushArchivesService.pushArchives(param);
           firstBranchSendingPushArchivesService.setProp(param);
           firstBranchSendingPushArchivesService.pushArchives(param);
           firstBranchSignReportPushArchivesService.setProp(param);
           firstBranchSignReportPushArchivesService.pushArchives(param);
           secondBranchReceivingPushArchivesService.setProp(param);
           secondBranchReceivingPushArchivesService.pushArchives(param);
           secondBranchSendingPushArchivesService.setProp(param);
           secondBranchSendingPushArchivesService.pushArchives(param);
       }).start();
       i++;
   }


%>


<%!

%>