Commit 44d05d95 authored by 郑建's avatar 郑建

增加文件报送生成文件接口

parent 9e0ccc01
package cn.quantgroup.report.controller;
import cn.quantgroup.report.response.GlobalResponse;
import cn.quantgroup.report.service.baihang.BaiHangFileReportService;
import cn.quantgroup.report.service.baihang.BaiHangZhuDaiService;
import cn.quantgroup.report.service.common.CommonQueryService;
import cn.quantgroup.report.service.manualTool.CleanningTransactionLogService;
......@@ -29,11 +30,10 @@ public class ManualToolController {
@Autowired
BaiHangZhuDaiService zhuDaiService;
@Autowired
private CommonQueryService queryService;
@Autowired
private CleanningTransactionLogService cleanningTransactionLogService;
@Autowired
private BaiHangFileReportService fileReportService;
@RequestMapping("/send/baihang")
......@@ -159,43 +159,8 @@ public class ManualToolController {
}
@RequestMapping("/createFile")
public void testD2Repost(){
Stopwatch stopwatch = Stopwatch.createStarted();
D2();
log.info("跑了 {}",stopwatch.elapsed(TimeUnit.MILLISECONDS));
}
//2020-07-01
private void D2(){
String startTime = "2020-06-12",endTime = "2020-07-01";
Date startDate;
Date endDate = DateUtils.parseDate("yyyy-MM-dd",endTime);
while (endDate.getTime() < System.currentTimeMillis()){
log.info("开始报送D2----- {} -- {}",startTime,endTime);
zhuDaiService.apiSend("D2",startTime+"T00:00:00",endTime+"T00:00:00");
log.info("报送D2结束----- {} -- {}",startTime,endTime);
startDate = new Date(endDate.getTime());
endDate = org.apache.commons.lang3.time.DateUtils.addMonths(endDate,1);
startTime = DateUtils.formatDate(startDate,"yyyy-MM-dd");
endTime = DateUtils.formatDate(endDate,"yyyy-MM-dd");
}
public void testD2Repost(String type, String startDate, String endDate){
fileReportService.createReportFile(type,startDate+"T00:00:00",endDate+"T00:00:00");
}
private void D3(){
String startTime = "2020-06-12",endTime = "2020-07-01";
Date startDate;
Date endDate = DateUtils.parseDate("yyyy-MM-dd",endTime);
while (endDate.getTime() < System.currentTimeMillis()){
log.info("开始报送D3----- {} -- {}",startTime,endTime);
zhuDaiService.apiSend("D3",startTime+"T00:00:00",endTime+"T00:00:00");
log.info("报送D3结束----- {} -- {}",startTime,endTime);
startDate = new Date(endDate.getTime());
endDate = org.apache.commons.lang3.time.DateUtils.addDays(endDate,10);
startTime = DateUtils.formatDate(startDate,"yyyy-MM-dd");
endTime = DateUtils.formatDate(endDate,"yyyy-MM-dd");
}
}
}
......@@ -45,7 +45,7 @@ public class QuantGroupZhuDaiReportToBaiHang {
// @Async
//@Scheduled(cron = "0 0 05 * * ?")
// @Scheduled(cron = "0 0 03 * * ?")
@Scheduled(cron = "0 0 03 * * ?")
public void startZhuDaiReport(){
if(increment()){
redisTemplate.expire(Constant.QG_ZHU_DAI_REPORT_LOCK_KEY, 10, TimeUnit.SECONDS);
......
......@@ -59,7 +59,6 @@ public interface LoanInfoMapper {
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.23 <br/>
*/
@Deprecated
List<LoanInfoZhuDai> queryStockLoanInfoZhuDai(BaiHangTimeRecord baiHangTimeRecord);
......
......@@ -32,7 +32,7 @@ public interface RepaymentLoanInfoMapper {
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.23 <br/>
*/
@Deprecated
List<RepaymentInfoZhuDai> queryStockRepayMentInfoOverdueZhuDai(BaiHangTimeRecord baiHangTimeRecord);
......@@ -43,7 +43,6 @@ public interface RepaymentLoanInfoMapper {
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.23 <br/>
*/
@Deprecated
List<RepaymentInfoZhuDai> queryStockRepayMentInfoZhuDai(BaiHangTimeRecord baiHangTimeRecord);
......
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