外籍人员

This commit is contained in:
钱涛 2024-04-12 17:46:53 +08:00
parent 4aa66ea587
commit 0e6449e1e2
14 changed files with 177 additions and 25 deletions

View File

@ -0,0 +1,18 @@
CREATE TABLE hrsa_tax_declare_status (
id NUMBER(38,0) primary key NOT NULL,
tax_declare_record_id NUMBER(38,0) NULL ,
report_type number NULL ,
request_id varchar2(100) ,
tax_declare_type number NULL ,
tax_declare_status number NULL ,
display_update_icon number NULL ,
tax_declare_error_msg varchar2(1000) ,
person_num number NULL ,
tax_pay_amount varchar2(255) ,
tax_paid_amount varchar2(255) ,
tax_pure_paid_amount varchar2(255) ,
declare_request_id varchar2(100) ,
delete_type number NULL
);
/

View File

@ -0,0 +1,18 @@
CREATE TABLE hrsa_tax_declare_status (
id NUMBER(38,0) primary key NOT NULL,
tax_declare_record_id NUMBER(38,0) NULL ,
report_type number NULL ,
request_id varchar2(100) ,
tax_declare_type number NULL ,
tax_declare_status number NULL ,
display_update_icon number NULL ,
tax_declare_error_msg varchar2(1000) ,
person_num number NULL ,
tax_pay_amount varchar2(255) ,
tax_paid_amount varchar2(255) ,
tax_pure_paid_amount varchar2(255) ,
declare_request_id varchar2(100) ,
delete_type number NULL
);
/

View File

@ -0,0 +1,18 @@
CREATE TABLE hrsa_tax_declare_status (
id NUMBER(38,0) primary key NOT NULL,
tax_declare_record_id NUMBER(38,0) NULL ,
report_type number NULL ,
request_id varchar2(100) ,
tax_declare_type number NULL ,
tax_declare_status number NULL ,
display_update_icon number NULL ,
tax_declare_error_msg varchar2(1000) ,
person_num number NULL ,
tax_pay_amount varchar2(255) ,
tax_paid_amount varchar2(255) ,
tax_pure_paid_amount varchar2(255) ,
declare_request_id varchar2(100) ,
delete_type number NULL
);
/

View File

@ -0,0 +1,17 @@
CREATE TABLE hrsa_tax_declare_status (
id bigint(0) NOT NULL ,
tax_declare_record_id bigint(0) NULL ,
report_type int(0) NULL ,
request_id varchar(100) ,
tax_declare_type tinyint(0) NULL ,
tax_declare_status tinyint(0) NULL ,
display_update_icon tinyint(0) NULL ,
tax_declare_error_msg varchar(1000) ,
person_num int(0) NULL ,
tax_pay_amount varchar(255) ,
tax_paid_amount varchar(255) ,
tax_pure_paid_amount varchar(255) ,
declare_request_id varchar(100) ,
delete_type int(0) NULL,
PRIMARY KEY (id)
);

View File

@ -0,0 +1,17 @@
CREATE TABLE hrsa_tax_declare_status (
id NUMBER(38,0) primary key NOT NULL,
tax_declare_record_id NUMBER(38,0) NULL ,
report_type number NULL ,
request_id varchar2(100) ,
tax_declare_type number NULL ,
tax_declare_status number NULL ,
display_update_icon number NULL ,
tax_declare_error_msg varchar2(1000) ,
person_num number NULL ,
tax_pay_amount varchar2(255) ,
tax_paid_amount varchar2(255) ,
tax_pure_paid_amount varchar2(255) ,
declare_request_id varchar2(100) ,
delete_type number NULL
)
/

View File

@ -0,0 +1,17 @@
CREATE TABLE hrsa_tax_declare_status (
id bigserial NOT NULL ,
tax_declare_record_id bigint NULL ,
report_type int NULL ,
request_id varchar(100) ,
tax_declare_type int NULL ,
tax_declare_status int NULL ,
display_update_icon int NULL ,
tax_declare_error_msg varchar(1000) ,
person_num int NULL ,
tax_pay_amount varchar(255) ,
tax_paid_amount varchar(255) ,
tax_pure_paid_amount varchar(255) ,
declare_request_id varchar(100) ,
delete_type int NULL,
PRIMARY KEY (id)
);

View File

@ -0,0 +1,18 @@
create table hrsa_tax_declare_status
(
id bigint primary key ,
tax_declare_record_id bigint NULL ,
report_type int NULL ,
request_id varchar(100) ,
tax_declare_type tinyint NULL ,
tax_declare_status tinyint NULL ,
display_update_icon tinyint NULL ,
tax_declare_error_msg varchar(1000) ,
person_num int NULL ,
tax_pay_amount varchar(255) ,
tax_paid_amount varchar(255) ,
tax_pure_paid_amount varchar(255) ,
declare_request_id varchar(100) ,
delete_type int NULL
)
GO

View File

@ -0,0 +1,18 @@
CREATE TABLE hrsa_tax_declare_status (
id NUMBER(38,0) primary key NOT NULL,
tax_declare_record_id NUMBER(38,0) NULL ,
report_type number NULL ,
request_id varchar2(100) ,
tax_declare_type number NULL ,
tax_declare_status number NULL ,
display_update_icon number NULL ,
tax_declare_error_msg varchar2(1000) ,
person_num number NULL ,
tax_pay_amount varchar2(255) ,
tax_paid_amount varchar2(255) ,
tax_pure_paid_amount varchar2(255) ,
declare_request_id varchar2(100) ,
delete_type number NULL
);
/

View File

@ -8,7 +8,6 @@ import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
import com.engine.salary.entity.taxdeclaration.param.TaxDeclareRecordParam;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationPO;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareRecordPO;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareStatusPO;
import com.engine.salary.util.page.PageInfo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@ -134,8 +133,6 @@ public interface TaxDeclareRecordService {
*/
void declare(Long id, Integer reportType);
List<TaxDeclareStatusPO> getTaxDeclareStatusByTaxDeclareRecordId(Long taxDeclareRecordId);
/**
* 个税申报获取反馈
*

View File

@ -14,6 +14,9 @@ import java.util.List;
**/
public interface TaxDeclareStatusService {
List<TaxDeclareStatusPO> getTaxDeclareStatusByTaxDeclareRecordId(Long taxDeclareRecordId);
/**
* 获取申报记录状态
* @param taxDeclareRecordId

View File

@ -740,10 +740,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
SalaryElogConfig.taxDeclarationLoggerTemplate.write(loggerContext);
}
@Override
public List<TaxDeclareStatusPO> getTaxDeclareStatusByTaxDeclareRecordId(Long taxDeclareRecordId) {
return getTaxDeclareStatusMapper().listSome(TaxDeclareStatusPO.builder().taxDeclareRecordId(taxDeclareRecordId).build());
}
@Override
public void getDeclareFeedback(Long id, Integer reportType, TaxDeclarationRateDTO taxDeclarationRate) {

View File

@ -49,6 +49,11 @@ public class TaxDeclareStatusServiceImpl extends Service implements TaxDeclareSt
return ServiceUtil.getService(TaxDeclarationServiceImpl.class, user);
}
@Override
public List<TaxDeclareStatusPO> getTaxDeclareStatusByTaxDeclareRecordId(Long taxDeclareRecordId) {
return getTaxDeclareStatusMapper().listSome(TaxDeclareStatusPO.builder().taxDeclareRecordId(taxDeclareRecordId).build());
}
@Override
public TaxDeclareStatusPO getTaxDeclareStatus(Long taxDeclareRecordId, Integer reportType) {
return getTaxDeclareStatusMapper().getDeclareStatus(taxDeclareRecordId, reportType);

View File

@ -55,7 +55,7 @@ public class TaxPaymentWithholdingServiceImpl extends AbstractTaxPaymentService
throw new SalaryRunTimeException(msg);
}
List<TaxDeclareStatusPO> statuses = getTaxDeclareRecordService(user).getTaxDeclareStatusByTaxDeclareRecordId(param.getTaxDeclareRecordId());
List<TaxDeclareStatusPO> statuses = getTaxDeclareStatusService(user).getTaxDeclareStatusByTaxDeclareRecordId(param.getTaxDeclareRecordId());
for (TaxDeclareStatusPO status : statuses) {
WithholdingFeedbackResponse.Feedback feedback = Optional.of(feedbackResponse)
.map(WithholdingFeedbackResponse::getBody)
@ -141,7 +141,6 @@ public class TaxPaymentWithholdingServiceImpl extends AbstractTaxPaymentService
protected TempWrapper checkBeforeGetRequestIdResponse(TaxPaymentQueryParam param) {
TempWrapper tempWrapper = super.checkBeforeGetRequestIdResponse(param);
Map<String, Object> requestParam = DataCollectionBO.getApiBaseQueryParams(tempWrapper.getTaxReturnPO(), tempWrapper.getTaxAgentPO().getName(), SalaryDateUtil.getFormatYYYYMM(param.getTaxYearMonth()));
requestParam.put("sblx", param.getReportType());
cancelWithholdingVoucher(tempWrapper.getApiConfigPO(), tempWrapper.getTaxDeclareRecord(), requestParam);
return tempWrapper;
}
@ -156,12 +155,14 @@ public class TaxPaymentWithholdingServiceImpl extends AbstractTaxPaymentService
.build());
// if (paymentRequestPO != null) {
List<TaxDeclareStatusPO> statuses = getTaxDeclareStatusService(user).getTaxDeclareStatusByTaxDeclareRecordId(taxDeclareRecord.getId());
statuses.forEach(status -> {
requestParam.put("sblx", status.getReportType());
String url = apiConfig.getHost() + SzyhApiConstant.CANCEL_WITHHOLDING_VOUCHER;
QuerySpecialAmountResponse cancelResponse = postRequest(apiConfig, url, requestParam, QuerySpecialAmountResponse.class);
SzyhResponseHead head = Optional.ofNullable(cancelResponse).map(QuerySpecialAmountResponse::getHead)
.orElse(new SzyhResponseHead("0", SalaryI18nUtil.getI18nLabel(183785, "银联缴款凭证作废失败,请稍后重试")));
SalaryAssert.isTrue(SzyhApiConstant.SUCCESS_CODE.equals(head.getCode())
|| SzyhApiConstant.NONE_VOUCHER_CODE.equals(head.getCode()), head.getMsg());
SalaryAssert.isTrue(SzyhApiConstant.SUCCESS_CODE.equals(head.getCode()) || SzyhApiConstant.NONE_VOUCHER_CODE.equals(head.getCode()), head.getMsg());
getTaxPaymentRequestMapper().updateFeedbackByRequestTypeTaxAgentIdTaxYearMonth(TaxPaymentRequestPO
.builder()
@ -170,6 +171,8 @@ public class TaxPaymentWithholdingServiceImpl extends AbstractTaxPaymentService
.taxAgentId(taxDeclareRecord.getTaxAgentId())
.taxYearMonth(taxDeclareRecord.getTaxCycle())
.build());
});
// }
}

View File

@ -8,6 +8,7 @@ import com.engine.salary.entity.taxagent.po.TaxAgentTaxReturnPO;
import com.engine.salary.entity.taxagent.response.SzyhResponseHead;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationApiConfigPO;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareRecordPO;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareStatusPO;
import com.engine.salary.entity.taxpayment.bo.TaxPaymentBO;
import com.engine.salary.entity.taxpayment.dto.TaxFeedbackResultDTO;
import com.engine.salary.entity.taxpayment.dto.TaxWithholdingVoucherFeedbackDTO;
@ -112,6 +113,11 @@ public class TaxPaymentWithholdingVoucherServiceImpl extends AbstractTaxPaymentS
.taxYearMonth(taxDeclareRecord.getTaxCycle())
.build());
// if (paymentRequestPO != null) {
List<TaxDeclareStatusPO> statuses = getTaxDeclareStatusService(user).getTaxDeclareStatusByTaxDeclareRecordId(taxDeclareRecord.getId());
statuses.forEach(status -> {
requestParam.put("sblx", status.getReportType());
String url = apiConfig.getHost() + SzyhApiConstant.CANCEL_WITHHOLDING_VOUCHER;
QuerySpecialAmountResponse cancelResponse = postRequest(apiConfig, url, requestParam, QuerySpecialAmountResponse.class);
SzyhResponseHead head = Optional.ofNullable(cancelResponse).map(QuerySpecialAmountResponse::getHead)
@ -124,6 +130,7 @@ public class TaxPaymentWithholdingVoucherServiceImpl extends AbstractTaxPaymentS
.taxAgentId(taxDeclareRecord.getTaxAgentId())
.taxYearMonth(taxDeclareRecord.getTaxCycle())
.build());
});
// }
}
@ -166,7 +173,6 @@ public class TaxPaymentWithholdingVoucherServiceImpl extends AbstractTaxPaymentS
public void cancelWithholdingVoucher(TaxPaymentQueryParam param) {
TempWrapper tempWrapper = checkBeforeGetRequestIdResponse(param);
Map<String, Object> requestParam = DataCollectionBO.getApiBaseQueryParams(tempWrapper.getTaxReturnPO(), tempWrapper.getTaxAgentPO().getName(), SalaryDateUtil.getFormatYYYYMM(param.getTaxYearMonth()));
requestParam.put("sblx", 1);
cancelWithholdingVoucher(tempWrapper.getApiConfigPO(), tempWrapper.getTaxDeclareRecord(), requestParam);
}