|
@@ -2,6 +2,9 @@ package org.jeecg.modules.hlwpayment.task;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import com.xxl.job.core.biz.model.ReturnT;
|
|
|
|
|
+import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
|
|
+import com.xxl.job.core.log.XxlJobLogger;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
import org.jeecg.common.util.DateUtils;
|
|
@@ -18,9 +21,6 @@ import org.jeecg.modules.hlwsubcontractor.entity.HlwSubcontractor;
|
|
|
import org.jeecg.modules.hlwsubcontractor.service.IHlwSubcontractorService;
|
|
import org.jeecg.modules.hlwsubcontractor.service.IHlwSubcontractorService;
|
|
|
import org.jeecg.modules.utils.HlwConstant;
|
|
import org.jeecg.modules.utils.HlwConstant;
|
|
|
import org.jeecg.modules.utils.PayCommon;
|
|
import org.jeecg.modules.utils.PayCommon;
|
|
|
-import org.quartz.Job;
|
|
|
|
|
-import org.quartz.JobExecutionContext;
|
|
|
|
|
-import org.quartz.JobExecutionException;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -39,7 +39,7 @@ import java.util.List;
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
@Component
|
|
@Component
|
|
|
@Service
|
|
@Service
|
|
|
-public class PaymentJob implements Job {
|
|
|
|
|
|
|
+public class PaymentJob {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IHlwPayRecordService hlwPayRecordService;
|
|
private IHlwPayRecordService hlwPayRecordService;
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -52,10 +52,12 @@ public class PaymentJob implements Job {
|
|
|
private IHlwDutyApplyService hlwDutyApplyService;
|
|
private IHlwDutyApplyService hlwDutyApplyService;
|
|
|
|
|
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
|
|
+ @XxlJob("paymentJobHandler")
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
|
|
|
|
|
+ public ReturnT<String> paymentJobHandler(String param) throws Exception {
|
|
|
log.info(String.format(" 支付查询定时器! 时间:" + DateUtils.getTimestamp()));
|
|
log.info(String.format(" 支付查询定时器! 时间:" + DateUtils.getTimestamp()));
|
|
|
|
|
+ XxlJobLogger.log(String.format(" 支付查询定时器! 时间:" + DateUtils.getTimestamp()));
|
|
|
|
|
+
|
|
|
//查询所有没结果的付款批次(终态包括:VD,CL,WF,UF,OF,SY)
|
|
//查询所有没结果的付款批次(终态包括:VD,CL,WF,UF,OF,SY)
|
|
|
List<HlwPayRecord> hlwPayRecordList = hlwPayRecordService.findNoPayList();
|
|
List<HlwPayRecord> hlwPayRecordList = hlwPayRecordService.findNoPayList();
|
|
|
//完税金额
|
|
//完税金额
|
|
@@ -164,6 +166,7 @@ public class PaymentJob implements Job {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ return ReturnT.SUCCESS;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|