获取三方信息失败,删除相关任务
This commit is contained in:
parent
e694d53eea
commit
8cf9688862
|
|
@ -10,6 +10,7 @@ import com.engine.salary.entity.taxpayment.dto.TaxAgreementBankFormDTO;
|
|||
import com.engine.salary.entity.taxpayment.dto.TaxAgreementFormDTO;
|
||||
import com.engine.salary.entity.taxpayment.dto.TaxFeedbackResultDTO;
|
||||
import com.engine.salary.entity.taxpayment.param.TaxPaymentQueryParam;
|
||||
import com.engine.salary.entity.taxpayment.po.TaxPaymentRequestPO;
|
||||
import com.engine.salary.entity.taxpayment.response.AgreementQueryFeedbackResponse;
|
||||
import com.engine.salary.entity.taxpayment.response.BaseResponse;
|
||||
import com.engine.salary.enums.taxdeclaration.TaxPaymentServiceTypeEnum;
|
||||
|
|
@ -39,13 +40,17 @@ public class TaxPaymentAgreementServiceImpl extends AbstractTaxPaymentService {
|
|||
String responseCode = Optional.ofNullable(feedbackResponse).map(AgreementQueryFeedbackResponse::getHead).map(SzyhResponseHead::getCode).orElse(null);
|
||||
String msg = Optional.ofNullable(feedbackResponse).map(AgreementQueryFeedbackResponse::getHead).map(SzyhResponseHead::getMsg).orElse(null);
|
||||
TaxAgreementFormDTO agreementFormDTO = new TaxAgreementFormDTO();
|
||||
if (SzyhApiConstant.HANDLING_CODE.equals(responseCode)||SzyhApiConstant.TASK_HANDLING_CODE.equals(responseCode)) {
|
||||
if (SzyhApiConstant.HANDLING_CODE.equals(responseCode) || SzyhApiConstant.TASK_HANDLING_CODE.equals(responseCode)) {
|
||||
// 如果接口仍在处理中,则继续轮询
|
||||
return agreementFormDTO.setFinish(false);
|
||||
}
|
||||
// 获取返回的人员信息列表
|
||||
if (!SzyhApiConstant.SUCCESS_CODE.equals(responseCode)) {
|
||||
log.error("getAgreementQueryFeedbackResponse not success: {}", JSON.toJSONString(feedbackResponse));
|
||||
TaxPaymentRequestPO taxPaymentRequestPO = getTaxPaymentRequestPO(param);
|
||||
if (taxPaymentRequestPO != null && taxPaymentRequestPO.getId() != null) {
|
||||
getTaxPaymentRequestMapper().delete(taxPaymentRequestPO);
|
||||
}
|
||||
throw new SalaryRunTimeException(msg);
|
||||
}
|
||||
List<AgreementQueryFeedbackResponse.Feedback> feedbacks = Optional.of(feedbackResponse)
|
||||
|
|
@ -54,6 +59,10 @@ public class TaxPaymentAgreementServiceImpl extends AbstractTaxPaymentService {
|
|||
.orElse(new ArrayList<>());
|
||||
if (feedbacks.isEmpty()) {
|
||||
log.error("getAgreementQueryFeedbackResponse empty data error: {}", JSON.toJSONString(feedbackResponse));
|
||||
TaxPaymentRequestPO taxPaymentRequestPO = getTaxPaymentRequestPO(param);
|
||||
if (taxPaymentRequestPO != null && taxPaymentRequestPO.getId() != null) {
|
||||
getTaxPaymentRequestMapper().delete(taxPaymentRequestPO);
|
||||
}
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(175338, "税局接口错误,未返回有效数据"));
|
||||
}
|
||||
// 更新缴款请求为已反馈
|
||||
|
|
|
|||
Loading…
Reference in New Issue