|
|
|
@ -19,8 +19,7 @@ import com.dxhy.order.model.*; |
|
|
|
|
import com.dxhy.order.utils.CommonUtils; |
|
|
|
|
import com.dxhy.order.utils.JsonUtils; |
|
|
|
|
import com.xxl.job.core.biz.model.ReturnT; |
|
|
|
|
import com.xxl.job.core.handler.IJobHandler; |
|
|
|
|
import com.xxl.job.core.handler.annotation.JobHandler; |
|
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.slf4j.MDC; |
|
|
|
@ -39,9 +38,8 @@ import java.util.stream.Collectors; |
|
|
|
|
*/ |
|
|
|
|
@SuppressWarnings("AlibabaMethodTooLong") |
|
|
|
|
@Slf4j |
|
|
|
|
@JobHandler(value = "fangGeInvoiceResendMsgTask") |
|
|
|
|
@Component |
|
|
|
|
public class FangGeInvoiceResendMsgTask extends IJobHandler { |
|
|
|
|
public class FangGeInvoiceResendMsgTask { |
|
|
|
|
|
|
|
|
|
private static final String LOGGER_MSG = "(开票中的数据重新发送消息)"; |
|
|
|
|
|
|
|
|
@ -60,7 +58,7 @@ public class FangGeInvoiceResendMsgTask extends IJobHandler { |
|
|
|
|
@Resource |
|
|
|
|
private FangGeInterfaceService fangGeInterfaceService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@XxlJob("fangGeInvoiceResendMsgTask") |
|
|
|
|
public ReturnT<String> execute(String param) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
@ -84,7 +82,7 @@ public class FangGeInvoiceResendMsgTask extends IJobHandler { |
|
|
|
|
log.debug("========>{}定时任务开始!!!!参数:{}", LOGGER_MSG, param); |
|
|
|
|
if (StringUtils.isEmpty(param)) { |
|
|
|
|
log.warn("请输入参数,要重发多少分钟之前的开票信息"); |
|
|
|
|
return FAIL; |
|
|
|
|
return ReturnT.FAIL; |
|
|
|
|
} |
|
|
|
|
Calendar beforeTime = Calendar.getInstance(); |
|
|
|
|
int minute = Integer.parseInt(param); |
|
|
|
@ -103,7 +101,7 @@ public class FangGeInvoiceResendMsgTask extends IJobHandler { |
|
|
|
|
List<OrderProcessInfo> orderProcessInfos = orderProcessService.selectOrderProcessByFpqqlshDdhNsrsbh(paraMap, shList); |
|
|
|
|
log.debug("===========》需要开票的数据:{}", JsonUtils.getInstance().toJsonString(orderProcessInfos)); |
|
|
|
|
if (ObjectUtil.isEmpty(orderProcessInfos)) { |
|
|
|
|
return SUCCESS; |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
for (OrderProcessInfo info : orderProcessInfos) { |
|
|
|
|
OrderInvoiceInfo orderInvoiceInfo = orderInvoiceInfoService.selectOrderInvoiceInfoByFpqqlsh(info.getFpqqlsh(), shList); |
|
|
|
@ -183,9 +181,9 @@ public class FangGeInvoiceResendMsgTask extends IJobHandler { |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("{}定时任务执行异常:{}", LOGGER_MSG, e); |
|
|
|
|
return FAIL; |
|
|
|
|
return ReturnT.FAIL; |
|
|
|
|
} |
|
|
|
|
return SUCCESS; |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|