|
|
@ -151,34 +151,28 @@ public class YpyjTask extends IJobHandler { |
|
|
|
fpfs, invoiceWarningInfo.getYjfs()); |
|
|
|
fpfs, invoiceWarningInfo.getYjfs()); |
|
|
|
String mc = CommonUtils.getFpzlDmMc(fpzldm); |
|
|
|
String mc = CommonUtils.getFpzlDmMc(fpzldm); |
|
|
|
String message = ""; |
|
|
|
String message = ""; |
|
|
|
|
|
|
|
|
|
|
|
message = String.format(RedisConstant.ERROR_MESSAGE_INVOICE, invoiceWarningInfo.getXhfNsrsbh(), invoiceWarningInfo.getSbbh(), fpfs, mc, invoiceWarningInfo.getYjfs()) + "\n" + message; |
|
|
|
message = String.format(RedisConstant.ERROR_MESSAGE_INVOICE, invoiceWarningInfo.getXhfNsrsbh(), invoiceWarningInfo.getSbbh(), fpfs, mc, invoiceWarningInfo.getYjfs()) + "\n" + message; |
|
|
|
|
|
|
|
|
|
|
|
log.info("向i-tax系统推送消息开始了。。。"); |
|
|
|
log.info("向i-tax系统推送消息开始了。。。"); |
|
|
|
if (emailNum < 1) { |
|
|
|
if (emailNum < 1) { |
|
|
|
itaxMsgService.sessMessageToTax("余票预警", message, "2", |
|
|
|
itaxMsgService.sessMessageToTax("余票预警", message, "2", |
|
|
|
invoiceWarningInfo.getUserId(), invoiceWarningInfo.getEntId()); |
|
|
|
invoiceWarningInfo.getUserId(), invoiceWarningInfo.getEntId()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (OrderInfoEnum.ORDER_WARNING_OPEN.getKey().equals(invoiceWarningInfo.getSfyj())) { |
|
|
|
if (OrderInfoEnum.ORDER_WARNING_OPEN.getKey().equals(invoiceWarningInfo.getSfyj())) { |
|
|
|
|
|
|
|
|
|
|
|
log.info("邮件预警次数{}", emailNum); |
|
|
|
log.info("邮件预警次数{}", emailNum); |
|
|
|
if (emailNum < 1) { |
|
|
|
if (emailNum < 1) { |
|
|
|
emailService.sendInvoiceWarningInfoEmail(invoiceWarningInfo.getSbMc(), invoiceWarningInfo.getSfyj(), invoiceWarningInfo.getSbbh(), invoiceWarningInfo.getEMail(), fpfs.toString(), mc); |
|
|
|
emailService.sendInvoiceWarningInfoEmail(invoiceWarningInfo.getSbMc(), invoiceWarningInfo.getSfyj(), invoiceWarningInfo.getSbbh(), invoiceWarningInfo.getEMail(), fpfs.toString(), mc); |
|
|
|
emailNum = 1; |
|
|
|
emailNum = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (ConfigureConstant.INT_1 == emailNum) { |
|
|
|
if (ConfigureConstant.INT_1 == emailNum) { |
|
|
|
emailNum = ConfigureConstant.INT_0; |
|
|
|
emailNum = ConfigureConstant.INT_0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
invoiceWarningInfo.setYjcs(String.valueOf(emailNum)); |
|
|
|
invoiceWarningInfo.setYjcs(String.valueOf(emailNum)); |
|
|
|
log.info("更新发票预警信息。。。"); |
|
|
|
log.info("更新发票预警信息。。。"); |
|
|
|
int reslut = ypWarningService.updateYpWarnInfo(invoiceWarningInfo, NsrsbhUtils.transShListByNsrsbh(invoiceWarningInfo.getXhfNsrsbh())); |
|
|
|
int reslut = ypWarningService.updateYpWarnInfo(invoiceWarningInfo, NsrsbhUtils.transShListByNsrsbh(invoiceWarningInfo.getXhfNsrsbh())); |
|
|
|
log.info("更新发票预警信息结果 {}", reslut > 0); |
|
|
|
log.info("更新发票预警信息结果 {}", reslut > 0); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -187,7 +181,6 @@ public class YpyjTask extends IJobHandler { |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("{}ypyjTask 余票预警 业务处理异常 异常信息:{}", LOGGER_MSG, e); |
|
|
|
log.error("{}ypyjTask 余票预警 业务处理异常 异常信息:{}", LOGGER_MSG, e); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -198,8 +191,5 @@ public class YpyjTask extends IJobHandler { |
|
|
|
return FAIL; |
|
|
|
return FAIL; |
|
|
|
} |
|
|
|
} |
|
|
|
return ReturnT.SUCCESS; |
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|