个税字段配置
This commit is contained in:
parent
3e11d7240b
commit
6a8c2dd8ac
|
|
@ -0,0 +1,12 @@
|
|||
package com.engine.salary.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target({ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface TaxField {
|
||||
String name();
|
||||
|
||||
String taxIndex();
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.engine.salary.entity.salarysob.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 薪资账套的个税规则
|
||||
* <p>Copyright: Copyright (c) 2024</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class SalarySobTaxRuleDTO {
|
||||
|
||||
//所得项目的id
|
||||
private String incomeCategoryId;
|
||||
|
||||
//所得项目的名称
|
||||
private String incomeCategoryName;
|
||||
|
||||
//个税的对应关系
|
||||
private List<TaxRuleDTO> taxRules;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public static class TaxRuleDTO {
|
||||
|
||||
//个税字段
|
||||
private String name;
|
||||
|
||||
//个税索引
|
||||
private String taxIndex;
|
||||
|
||||
//个税字段和薪资项目的对应关系
|
||||
private Map<String, Object> salaryItem;
|
||||
|
||||
//个税字段的值
|
||||
private String value;
|
||||
|
||||
//对应关系是否可以编辑
|
||||
private boolean canEdit;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.engine.salary.entity.salarysob.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资账套的个税规则
|
||||
* <p>Copyright: Copyright (c) 2023</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class SalarySobTaxRuleSaveParam {
|
||||
|
||||
//薪资账套的id
|
||||
private Long salarySobId;
|
||||
|
||||
//不同所得项目的个税的对应关系
|
||||
private List<TaxReportRuleIncomeCategoryParam> incomeCategoryParams;
|
||||
|
||||
@Data
|
||||
public static class TaxReportRuleIncomeCategoryParam {
|
||||
|
||||
//所得项目
|
||||
private String incomeCategory;
|
||||
|
||||
//个税的对应关系
|
||||
private List<TaxRuleParam> taxRuleParams;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class TaxRuleParam {
|
||||
|
||||
//个税的列索引
|
||||
private String taxIndex;
|
||||
|
||||
//薪资项目的id
|
||||
private Long salaryItemId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.engine.salary.entity.salarysob.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalarySobTaxRulePO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
/**
|
||||
* 租户KEY
|
||||
*/
|
||||
private String tenantKey;
|
||||
/**
|
||||
* 薪资账套的id
|
||||
*/
|
||||
private Long salarySobId;
|
||||
/**
|
||||
* 所得项目
|
||||
*/
|
||||
private String incomeCategory;
|
||||
/**
|
||||
* 个税列索引
|
||||
*/
|
||||
private String taxIndex;
|
||||
/**
|
||||
* 薪资项目id
|
||||
*/
|
||||
private Long salaryItemId;
|
||||
|
||||
//主键id集合
|
||||
private Collection<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +1,14 @@
|
|||
package com.engine.salary.enums.salarysob;
|
||||
|
||||
|
||||
import com.engine.salary.annotation.TaxField;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobTaxRuleDTO;
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
import com.engine.salary.remote.tax.response.calculate.GetASynIndividualIncomeTaxFeedbackResponse;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
|
@ -14,10 +20,30 @@ import java.util.Objects;
|
|||
* @version 1.0
|
||||
**/
|
||||
public enum DeclareReportTypeEnum implements BaseEnum<Integer> {
|
||||
COMPREHENSIVE_INCOME(1, "综合所得", 100133),
|
||||
CLASSIFIED_INCOME(2, "分类所得", 86185),
|
||||
NONRESIDENT_INCOME(3, "非居民所得", 107369),
|
||||
RESTRICTED_SHARES_INCOME(4, "限售股所得", 90633);
|
||||
COMPREHENSIVE_INCOME(1, "综合所得", 100133) {
|
||||
@Override
|
||||
public List<SalarySobTaxRuleDTO.TaxRuleDTO> getTaxRules() {
|
||||
return buildRules(GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result.class);
|
||||
}
|
||||
},
|
||||
CLASSIFIED_INCOME(2, "分类所得", 86185) {
|
||||
@Override
|
||||
public List<SalarySobTaxRuleDTO.TaxRuleDTO> getTaxRules() {
|
||||
return buildRules(null);
|
||||
}
|
||||
},
|
||||
NONRESIDENT_INCOME(3, "非居民所得", 107369) {
|
||||
@Override
|
||||
public List<SalarySobTaxRuleDTO.TaxRuleDTO> getTaxRules() {
|
||||
return buildRules(GetASynIndividualIncomeTaxFeedbackResponse.Body.fjmsd.ssjgdx.result.class);
|
||||
}
|
||||
},
|
||||
RESTRICTED_SHARES_INCOME(4, "限售股所得", 90633) {
|
||||
@Override
|
||||
public List<SalarySobTaxRuleDTO.TaxRuleDTO> getTaxRules() {
|
||||
return buildRules(null);
|
||||
}
|
||||
};
|
||||
|
||||
private int value;
|
||||
|
||||
|
|
@ -47,6 +73,28 @@ public enum DeclareReportTypeEnum implements BaseEnum<Integer> {
|
|||
return defaultLabel;
|
||||
}
|
||||
|
||||
public abstract List<SalarySobTaxRuleDTO.TaxRuleDTO> getTaxRules();
|
||||
|
||||
public static List<SalarySobTaxRuleDTO.TaxRuleDTO> buildRules(Class clazz) {
|
||||
if (clazz == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<SalarySobTaxRuleDTO.TaxRuleDTO> rules = new ArrayList<>();
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
for (Field f : fields) {
|
||||
boolean isanno = f.isAnnotationPresent(TaxField.class);
|
||||
if (isanno) {
|
||||
TaxField annotation = f.getAnnotation(TaxField.class);
|
||||
String name = annotation.name();
|
||||
String taxIndex = annotation.taxIndex();
|
||||
SalarySobTaxRuleDTO.TaxRuleDTO taxRuleDTO = SalarySobTaxRuleDTO.TaxRuleDTO.builder().name(name).taxIndex(taxIndex).build();
|
||||
rules.add(taxRuleDTO);
|
||||
}
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
|
||||
|
||||
public static DeclareReportTypeEnum parseByValue(Integer value) {
|
||||
for (DeclareReportTypeEnum targetTypeEnum : DeclareReportTypeEnum.values()) {
|
||||
if (Objects.equals(targetTypeEnum.getValue(), value)) {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,19 @@
|
|||
package com.engine.salary.enums.salarysob;
|
||||
|
||||
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobTaxRuleDTO;
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
import com.engine.salary.remote.tax.response.calculate.GetASynIndividualIncomeTaxFeedbackResponse;
|
||||
import com.engine.salary.remote.tax.response.declare.GetDeclareTaxResultFeedbackResponse;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -19,6 +24,7 @@ import java.util.*;
|
|||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Slf4j
|
||||
public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
||||
|
||||
// todo 多语言
|
||||
|
|
@ -31,12 +37,27 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getZcgzxj().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
SalarySobTaxRuleDTO salarySobTaxRuleDTO = SalarySobTaxRuleDTO.builder().incomeCategoryId(this.getValue().toString()).incomeCategoryName(this.getDefaultLabel()).build();
|
||||
List<SalarySobTaxRuleDTO.TaxRuleDTO> taxRules = this.getReportType().getTaxRules();
|
||||
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getZcgzxj().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result::getZzhm);
|
||||
Map<Long,SalarySobTaxRuleDTO> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
GetASynIndividualIncomeTaxFeedbackResponse.Body.zhsd.ssjgdx.result result = idNoResultMap.get(employeeDeclare.getCardNum());
|
||||
taxRules.forEach(rule->{
|
||||
String getter = "get" + rule.getTaxIndex().substring(0, 1).toUpperCase() + rule.getTaxIndex().substring(1);
|
||||
try {
|
||||
Method method = rule.getClass().getMethod(getter);
|
||||
Object invoke = method.invoke(rule);
|
||||
rule.setValue(Util.null2String(invoke));
|
||||
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
|
||||
log.error("no such method", ex);
|
||||
}
|
||||
});
|
||||
salarySobTaxRuleDTO.setTaxRules(taxRules);
|
||||
resultMap.put(employeeDeclare.getEmployeeId(),salarySobTaxRuleDTO );
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
|
@ -50,15 +71,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getLwbclb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
ONETIME_ANNUAL_BONUS(2, "0103", "全年一次性奖金收入", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 160489) {
|
||||
@Override
|
||||
|
|
@ -69,15 +85,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getQnycxjjsslb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
COMPENSATION_FOR_RETIRE(107, "0107", "内退一次性补偿金", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181936) {
|
||||
@Override
|
||||
|
|
@ -88,15 +99,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getNtycxbcjlb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
COMPENSATION_FOR_DISMISS(108, "0108", "解除劳动合同一次性补偿金", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181937) {
|
||||
@Override
|
||||
|
|
@ -107,15 +113,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getJcldhtycxbcjlb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
INCOME_FOR_INDIVIDUAL_EQUITY_INCENTIVE(109, "0109", "个人股权激励收入", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181938) {
|
||||
@Override
|
||||
|
|
@ -126,15 +127,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getGrgqjl().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
ANNUITY_RECEIPT(110, "0110", "年金领取", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181939) {
|
||||
@Override
|
||||
|
|
@ -145,15 +141,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getQynj().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
INCOME_FOR_INSURANCE_SALESMAN(402, "0402", "保险营销员佣金收入", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181940) {
|
||||
@Override
|
||||
|
|
@ -164,15 +155,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getBxyxy().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
INCOME_FOR_SECURITIES_BROKER(403, "0403", "证券经纪人佣金收入", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181942) {
|
||||
@Override
|
||||
|
|
@ -183,15 +169,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getZqjjr().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
REMUNERATION_FOR_OTHER_CONTINUOUS_LABOR(489, "0489", "其他连续劳务报酬所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181943) {
|
||||
@Override
|
||||
|
|
@ -202,15 +183,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getQtlxlwbc().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
REMUNERATION_FOR_OTHER_LABOR(499, "0499", "其他非连续劳务报酬所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 175330) {
|
||||
@Override
|
||||
|
|
@ -221,15 +197,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getQtflxlwbc().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
REMUNERATION_FOR_AUTHOR(500, "0500", "稿酬所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181944) {
|
||||
@Override
|
||||
|
|
@ -240,15 +211,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getGcsdlb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
ROYALTIES(600, "0600", "特许权使用费所得", DeclareReportTypeEnum.COMPREHENSIVE_INCOME, 181945) {
|
||||
@Override
|
||||
|
|
@ -259,15 +225,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getZhsd().getTxq().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
NON_RESIDENT_INCOME_WAGES_AND_SALARIES(700, "0700", "无住所个人正常工资薪金", DeclareReportTypeEnum.NONRESIDENT_INCOME, 181945) {
|
||||
@Override
|
||||
|
|
@ -278,15 +239,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getFjmsd().getWjgzxjlb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
NON_RESIDENT_INCOME_MONTHLY_BONUS(710, "0710", "无住所个人数月奖金", DeclareReportTypeEnum.NONRESIDENT_INCOME, 181945) {
|
||||
@Override
|
||||
|
|
@ -297,15 +253,10 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getFjmsd().getWjrysyjjlb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
|
||||
},
|
||||
NON_RESIDENT_INCOME_REMUNERATION_FOR_LABOR(720, "0720", "一般劳务报酬所得", DeclareReportTypeEnum.NONRESIDENT_INCOME, 181945) {
|
||||
@Override
|
||||
|
|
@ -314,17 +265,11 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
List<List<Object>> sheetData = ExcelUtil.getExcelSheetData(GetDeclareTaxResultFeedbackResponse.Body.fjmsd.fjmsdssjgdx.fjmsdscbw.class, fjmsd);
|
||||
result.put(this.getDefaultLabel(), sheetData);
|
||||
}
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getFjmsd().getLwbclb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
NON_RESIDENT_INCOME_COMPENSATION_FOR_DISMISS(730, "0730", "解除劳动合同一次性补偿金", DeclareReportTypeEnum.NONRESIDENT_INCOME, 181945) {
|
||||
@Override
|
||||
|
|
@ -335,14 +280,8 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
List<GetASynIndividualIncomeTaxFeedbackResponse.Body.result> sscglb = declareTaxResultFeedbackResponse.getBody().getFjmsd().getJcldhtycxbcjlb().getSscglb();
|
||||
Map<String, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> idNoResultMap = SalaryEntityUtil.convert2Map(sscglb, GetASynIndividualIncomeTaxFeedbackResponse.Body.result::getZzhm);
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> resultMap = new HashMap<>();
|
||||
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
|
||||
resultMap.put(employeeDeclare.getEmployeeId(), idNoResultMap.get(employeeDeclare.getCardNum()));
|
||||
}
|
||||
return resultMap;
|
||||
public Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -368,7 +307,7 @@ public enum IncomeCategoryEnum implements BaseEnum<Integer> {
|
|||
public abstract void parseGetDeclareTaxResultFeedbackResponse(Map<String, List<List<Object>>> result, GetDeclareTaxResultFeedbackResponse declareTaxResultFeedbackResponse);
|
||||
|
||||
|
||||
public abstract Map<Long,GetASynIndividualIncomeTaxFeedbackResponse.Body.result> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares);
|
||||
public abstract Map<Long, SalarySobTaxRuleDTO> parseGetASynIndividualIncomeTaxFeedbackResponse(GetASynIndividualIncomeTaxFeedbackResponse declareTaxResultFeedbackResponse, List<EmployeeDeclarePO> employeeDeclares);
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
package com.engine.salary.mapper.salarysob;
|
||||
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobTaxRulePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface SalarySobTaxRuleMapper {
|
||||
|
||||
/**
|
||||
* 查询所有记录
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<SalarySobTaxRulePO> listAll();
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
*
|
||||
* @return 返回集合,没有返回空List
|
||||
*/
|
||||
List<SalarySobTaxRulePO> listSome(SalarySobTaxRulePO sobTaxRule);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 返回记录,没有返回null
|
||||
*/
|
||||
SalarySobTaxRulePO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增,忽略null字段
|
||||
*
|
||||
* @param sobTaxRule 新增的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int insertIgnoreNull(SalarySobTaxRulePO sobTaxRule);
|
||||
|
||||
/**
|
||||
* 修改,修改所有字段
|
||||
*
|
||||
* @param sobTaxRule 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int update(SalarySobTaxRulePO sobTaxRule);
|
||||
|
||||
/**
|
||||
* 修改,忽略null字段
|
||||
*
|
||||
* @param sobTaxRule 修改的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(SalarySobTaxRulePO sobTaxRule);
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
* @param sobTaxRule 待删除的记录
|
||||
* @return 返回影响行数
|
||||
*/
|
||||
int delete(SalarySobTaxRulePO sobTaxRule);
|
||||
|
||||
/**
|
||||
* 批量删除记录
|
||||
* @param ids 主键id集合
|
||||
*/
|
||||
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
void deleteBySalarySobIds(@Param("salarySobIds") Collection<Long> salarySobIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,249 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.salary.mapper.salarysob.SalarySobTaxRuleMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salarysob.po.SalarySobTaxRulePO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="tenant_key" property="tenantKey"/>
|
||||
<result column="salary_sob_id" property="salarySobId"/>
|
||||
<result column="income_category" property="incomeCategory"/>
|
||||
<result column="tax_index" property="taxIndex"/>
|
||||
<result column="salary_item_id" property="salaryItemId"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t
|
||||
.
|
||||
id
|
||||
, t.create_time
|
||||
, t.update_time
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.tenant_key
|
||||
, t.salary_sob_id
|
||||
, t.income_category
|
||||
, t.tax_index
|
||||
, t.salary_item_id
|
||||
</sql>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_sob_tax_rule t
|
||||
WHERE delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_sob_tax_rule t
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="listSome" resultMap="BaseResultMap"
|
||||
parameterType="com.engine.salary.entity.salarysob.po.SalarySobTaxRulePO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM hrsa_sob_tax_rule t
|
||||
WHERE delete_type = 0
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND creator = #{creator}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="salarySobId != null">
|
||||
AND salary_sob_id = #{salarySobId}
|
||||
</if>
|
||||
<if test="incomeCategory != null">
|
||||
AND income_category = #{incomeCategory}
|
||||
</if>
|
||||
<if test="taxIndex != null">
|
||||
AND tax_index = #{taxIndex}
|
||||
</if>
|
||||
<if test="salaryItemId != null">
|
||||
AND salary_item_id = #{salaryItemId}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobTaxRulePO">
|
||||
INSERT INTO hrsa_sob_tax_rule
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key,
|
||||
</if>
|
||||
<if test="salarySobId != null">
|
||||
salary_sob_id,
|
||||
</if>
|
||||
<if test="incomeCategory != null">
|
||||
income_category,
|
||||
</if>
|
||||
<if test="taxIndex != null">
|
||||
tax_index,
|
||||
</if>
|
||||
<if test="salaryItemId != null">
|
||||
salary_item_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
#{tenantKey},
|
||||
</if>
|
||||
<if test="salarySobId != null">
|
||||
#{salarySobId},
|
||||
</if>
|
||||
<if test="incomeCategory != null">
|
||||
#{incomeCategory},
|
||||
</if>
|
||||
<if test="taxIndex != null">
|
||||
#{taxIndex},
|
||||
</if>
|
||||
<if test="salaryItemId != null">
|
||||
#{salaryItemId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 更新,更新全部字段 -->
|
||||
<update id="update" parameterType="com.engine.salary.entity.salarysob.po.SalarySobTaxRulePO">
|
||||
UPDATE hrsa_sob_tax_rule
|
||||
<set>
|
||||
create_time=#{createTime},
|
||||
update_time=#{updateTime},
|
||||
creator=#{creator},
|
||||
delete_type=#{deleteType},
|
||||
tenant_key=#{tenantKey},
|
||||
salary_sob_id=#{salarySobId},
|
||||
income_category=#{incomeCategory},
|
||||
tax_index=#{taxIndex},
|
||||
salary_item_id=#{salaryItemId},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 更新不为NULL的字段 -->
|
||||
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobTaxRulePO">
|
||||
UPDATE hrsa_sob_tax_rule
|
||||
<set>
|
||||
<if test="createTime != null">
|
||||
create_time=#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time=#{updateTime},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator=#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type=#{deleteType},
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
tenant_key=#{tenantKey},
|
||||
</if>
|
||||
<if test="salarySobId != null">
|
||||
salary_sob_id=#{salarySobId},
|
||||
</if>
|
||||
<if test="incomeCategory != null">
|
||||
income_category=#{incomeCategory},
|
||||
</if>
|
||||
<if test="taxIndex != null">
|
||||
tax_index=#{taxIndex},
|
||||
</if>
|
||||
<if test="salaryItemId != null">
|
||||
salary_item_id=#{salaryItemId},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete">
|
||||
UPDATE hrsa_sob_tax_rule
|
||||
SET delete_type=1
|
||||
WHERE id = #{id}
|
||||
AND delete_type = 0
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
UPDATE hrsa_sob_tax_rule
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteBySalarySobIds">
|
||||
UPDATE hrsa_sob_tax_rule
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND salary_sob_id IN
|
||||
<foreach collection="salarySobIds" open="(" item="salarySobId" separator="," close=")">
|
||||
#{salarySobId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.remote.tax.response.calculate;
|
||||
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.annotation.TaxField;
|
||||
import com.engine.salary.entity.taxpayment.response.BaseResponse;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
|
@ -210,6 +211,291 @@ public class GetASynIndividualIncomeTaxFeedbackResponse extends BaseResponse {
|
|||
* 企业上月是否已申报 0:上月未申报 1:上月已申报 2:上上月未申报
|
||||
*/
|
||||
private String qysysfysb;
|
||||
|
||||
|
||||
@Data
|
||||
public static class result {
|
||||
/**
|
||||
* 是否明细申报 必填:否 是或者否
|
||||
*/
|
||||
private String sfmxsb;
|
||||
/**
|
||||
* 姓名 必填:否 如果是汇总申报返回空
|
||||
*/
|
||||
private String xm;
|
||||
/**
|
||||
* 证件类型 必填:否 见证件类型字典 如果是汇总申报返回空
|
||||
*/
|
||||
private String zzlx;
|
||||
/**
|
||||
* 证件号码 必填:否 如果是汇总申报返回空
|
||||
*/
|
||||
private String zzhm;
|
||||
/**
|
||||
* 任职受雇日期 必填:是 格式YYYY-MM-DD
|
||||
*/
|
||||
private String rzsgrq;
|
||||
/**
|
||||
* 离职日期 必填:否 格式YYYY-MM-DD
|
||||
*/
|
||||
private String lzrq;
|
||||
/**
|
||||
* 当期收入额 必填:是 不填写默认为0
|
||||
*/
|
||||
private BigDecimal sre;
|
||||
/**
|
||||
* 当期免税收入 必填:否
|
||||
*/
|
||||
private BigDecimal mssd;
|
||||
/**
|
||||
* 基本养老保险 必填:否
|
||||
*/
|
||||
private BigDecimal jbylaobxf;
|
||||
/**
|
||||
* 基本医疗保险 必填:否
|
||||
*/
|
||||
private BigDecimal jbylbxf;
|
||||
/**
|
||||
* 失业保险 必填:否
|
||||
*/
|
||||
private BigDecimal sybxf;
|
||||
/**
|
||||
* 住房公积金 必填:否
|
||||
*/
|
||||
private BigDecimal zfgjj;
|
||||
/**
|
||||
* 子女教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal znjyzc;
|
||||
/**
|
||||
* 赡养老人支出 必填:否
|
||||
*/
|
||||
private BigDecimal sylrzc;
|
||||
/**
|
||||
* 住房贷款利息支出 必填:否
|
||||
*/
|
||||
private BigDecimal zfdklxzc;
|
||||
/**
|
||||
* 住房租金支出 必填:否
|
||||
*/
|
||||
private BigDecimal zfzjzc;
|
||||
/**
|
||||
* 继续教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal jxjyzc;
|
||||
/**
|
||||
* 非学历继续教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal fxljxjyzc;
|
||||
/**
|
||||
* 3岁以下婴幼儿照护支出 必填:否
|
||||
*/
|
||||
private BigDecimal yyezhzc;
|
||||
/**
|
||||
* 年金 必填:否
|
||||
*/
|
||||
private BigDecimal nj;
|
||||
/**
|
||||
* 商业健康保险 必填:否
|
||||
*/
|
||||
private BigDecimal syjkbx;
|
||||
/**
|
||||
* 税延养老保险 必填:否
|
||||
*/
|
||||
private BigDecimal syylbx;
|
||||
/**
|
||||
* 其他 必填:否 按法律规定可以在税前扣除的项目
|
||||
*/
|
||||
private BigDecimal qt;
|
||||
/**
|
||||
* 准予扣除的捐赠额 必填:否
|
||||
*/
|
||||
private BigDecimal zykcjze;
|
||||
/**
|
||||
* 减免税额 必填:否
|
||||
*/
|
||||
private BigDecimal jmse;
|
||||
/**
|
||||
* 备注 必填:否
|
||||
*/
|
||||
private String bz;
|
||||
/**
|
||||
* 减除费用 必填:否 正常工资薪金的减除费用。 对应保险营销员、证券经纪人的费用
|
||||
*/
|
||||
private BigDecimal jcfy;
|
||||
/**
|
||||
* 其他扣除合计 必填:否
|
||||
*/
|
||||
private BigDecimal qtckhj;
|
||||
/**
|
||||
* 应纳税所得额 必填:否 正常工资薪金返回否
|
||||
*/
|
||||
private BigDecimal ynssde;
|
||||
/**
|
||||
* 应纳税额 必填:否 正常工资薪金返回否
|
||||
*/
|
||||
private BigDecimal ynse;
|
||||
/**
|
||||
* 已缴税额 必填:否 正常工资薪金返回否
|
||||
*/
|
||||
private BigDecimal ykjse;
|
||||
/**
|
||||
* 应扣缴税额 必填:否 正常工资薪金返回否
|
||||
*/
|
||||
private BigDecimal yingkjse;
|
||||
/**
|
||||
* 税率 必填:否
|
||||
*/
|
||||
private BigDecimal sl;
|
||||
/**
|
||||
* 速算扣除数 必填:否
|
||||
*/
|
||||
private BigDecimal sskcs;
|
||||
/**
|
||||
* 所得项目名称 必填:是 正常工资薪金;全年一次性奖金收入;稿酬所得;劳务报酬
|
||||
*/
|
||||
private String sdxm;
|
||||
/**
|
||||
* 应补退税额 必填:否 应补退税额=累计应扣缴税额-累计已缴税额
|
||||
*/
|
||||
@TaxField(name = "应补退税额", taxIndex = "ybtse")
|
||||
private BigDecimal ybtse;
|
||||
/**
|
||||
* 累计收入额 必填:否
|
||||
*/
|
||||
private BigDecimal ljsre;
|
||||
/**
|
||||
* 累计免税收入额 必填:否
|
||||
*/
|
||||
private BigDecimal ljmssd;
|
||||
/**
|
||||
* 累计专项扣除额 必填:否 三险一金合计
|
||||
*/
|
||||
private BigDecimal ljzxkce;
|
||||
/**
|
||||
* 累计专项附加扣除额 必填:否 专项附加合计
|
||||
*/
|
||||
private BigDecimal ljzxfjkce;
|
||||
/**
|
||||
* 累计其他扣除额 必填:否
|
||||
*/
|
||||
private BigDecimal ljqtkce;
|
||||
/**
|
||||
* 累计减免税额 必填:否
|
||||
*/
|
||||
private BigDecimal ljjmse;
|
||||
/**
|
||||
* 累计减除费用额 必填:否 正常工资薪金累计减除费用 必填:否 对应保险营销员、证券经纪人累计费用
|
||||
*/
|
||||
private BigDecimal ljjcfye;
|
||||
/**
|
||||
* 累计月减除费用 必填:否 保险营销员、证券经纪人,其他连续劳务报酬的减除费用
|
||||
*/
|
||||
private BigDecimal ljyjcfy;
|
||||
/**
|
||||
* 允许扣除税费 必填:否 保险营销员、证券经纪人
|
||||
*/
|
||||
private BigDecimal yxkcsf;
|
||||
/**
|
||||
* 展业成本 必填:否 保险营销员、证券经纪人
|
||||
*/
|
||||
private BigDecimal zycb;
|
||||
/**
|
||||
* 月减除费用 必填:否 保险营销员、证券经纪人,其他连续劳务报酬的减除费用
|
||||
*/
|
||||
private BigDecimal yjcfy;
|
||||
/**
|
||||
* 累计应纳税所得额 必填:否
|
||||
*/
|
||||
@TableTitle(title = "累计应纳税所得额", dataIndex = "ljynssde", key = "ljynssde")
|
||||
private BigDecimal ljynssde;
|
||||
/**
|
||||
* 累计应纳税额 必填:否
|
||||
*/
|
||||
private BigDecimal ljynse;
|
||||
/**
|
||||
* 累计应扣缴税额 必填:否 累计应扣缴税额 = 累计应纳税额 - 累计减免税额
|
||||
*/
|
||||
private BigDecimal ljyingkjse;
|
||||
/**
|
||||
* 累计已缴税额 必填:否
|
||||
*/
|
||||
private BigDecimal ljykjse;
|
||||
/**
|
||||
* 累计子女教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljznjyzc;
|
||||
/**
|
||||
* 累计继续教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljjxjyzc;
|
||||
/**
|
||||
* 累计非学历继续教育支持 必填:否
|
||||
*/
|
||||
private BigDecimal ljfxljxjyzc;
|
||||
/**
|
||||
* 累计学历继续教育支持 必填:否
|
||||
*/
|
||||
private BigDecimal ljxljxjyzc;
|
||||
/**
|
||||
* 累计住房租金支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljzfzjzc;
|
||||
/**
|
||||
* 累计房屋贷款支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljzfdklxzc;
|
||||
/**
|
||||
* 累计赡养老人支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljsylrzc;
|
||||
/**
|
||||
* 累计3岁以下婴幼儿照护支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljyyezhzc;
|
||||
/**
|
||||
* 累计准予扣除的捐赠额 必填:否
|
||||
*/
|
||||
private BigDecimal ljzykcjze;
|
||||
/**
|
||||
* 累计个人养老金 必填:否
|
||||
*/
|
||||
private BigDecimal ljgrylj;
|
||||
/**
|
||||
* 累计个人养老金校验码 必填:否
|
||||
*/
|
||||
private String ljgryljjym;
|
||||
/**
|
||||
* 仅在两个月算税场景时使用,当前月分为N月:
|
||||
* 0表示N-1月(上月)未申报
|
||||
* 1表示N-1月(上月)已申报
|
||||
* 2表示N-2月(上上个月)未申报
|
||||
*/
|
||||
private String qysysfysb;
|
||||
|
||||
/**
|
||||
* 当前月分为N,如果N-1(上月)已申报,则返回N-1月员工在税局累计已扣缴的税额;
|
||||
* 如果N-1月未申报,则返回N-2月工在税局累计已扣缴的税额;
|
||||
*/
|
||||
private BigDecimal ygzsjljykjse;
|
||||
/**
|
||||
* 本月已累计扣除税额 必填:否 针对一月多次算税的场景字段
|
||||
*/
|
||||
private BigDecimal byyljkjse;
|
||||
/**
|
||||
* 本次应扣缴税额 必填:否 针对一月多次算税的场景字段,本次应扣缴税额=本月应扣缴税额-本月已累计税额
|
||||
*/
|
||||
private BigDecimal bcykjse;
|
||||
/**
|
||||
* 分摊年度数 必填:否
|
||||
*/
|
||||
private Integer ftnds;
|
||||
/**
|
||||
* 年减除费用 必填:否 默认为60000
|
||||
*/
|
||||
private BigDecimal njcfy;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -296,410 +582,122 @@ public class GetASynIndividualIncomeTaxFeedbackResponse extends BaseResponse {
|
|||
* 非居民算税失败总人数
|
||||
*/
|
||||
private int sssbrs;
|
||||
|
||||
@Data
|
||||
public static class result {
|
||||
|
||||
/**
|
||||
* 姓名 必填:是
|
||||
*/
|
||||
private String xm;
|
||||
/**
|
||||
* 证件类型名称 必填:是
|
||||
*/
|
||||
private String zzlx;
|
||||
/**
|
||||
* 证件号码 必填:是
|
||||
*/
|
||||
private String zzhm;
|
||||
/**
|
||||
* 收入额 必填:是
|
||||
*/
|
||||
private String sre;
|
||||
/**
|
||||
* 累计收入(不含本次) 必填:是
|
||||
*/
|
||||
private String ljsre;
|
||||
/**
|
||||
* 免税收入 必填:是
|
||||
*/
|
||||
private String mssd;
|
||||
/**
|
||||
* 财产原值 必填:是
|
||||
*/
|
||||
private String ccyz;
|
||||
/**
|
||||
* 允许扣除的税费 必填:是
|
||||
*/
|
||||
private String yxkcsf;
|
||||
/**
|
||||
* 投资抵扣 必填:是
|
||||
*/
|
||||
private String tzdk;
|
||||
/**
|
||||
* 其他 必填:是
|
||||
*/
|
||||
private String qt;
|
||||
/**
|
||||
* 备注 必填:是
|
||||
*/
|
||||
private String bz;
|
||||
/**
|
||||
* 实际工作年限 必填:是
|
||||
*/
|
||||
private String sjgznxs;
|
||||
/**
|
||||
* 减除费用 必填:是
|
||||
*/
|
||||
private String jcfy;
|
||||
/**
|
||||
* 准予扣除的捐赠额 必填:是
|
||||
*/
|
||||
private String zykcjze;
|
||||
/**
|
||||
* 税前扣除项目合计 必填:是
|
||||
*/
|
||||
private String sqkcxmhj;
|
||||
/**
|
||||
* 应纳税额所得额 必填:是
|
||||
*/
|
||||
private String ynssde;
|
||||
/**
|
||||
* 应纳税额 必填:是
|
||||
*/
|
||||
private String ynse;
|
||||
/**
|
||||
* 减免税额 必填:是
|
||||
*/
|
||||
private String jmse;
|
||||
/**
|
||||
* 应扣缴税额 必填:是
|
||||
*/
|
||||
private String yingkjse;
|
||||
/**
|
||||
* 已扣缴税额 必填:是 无需填写该值,按0处理
|
||||
*/
|
||||
private String ykjse;
|
||||
/**
|
||||
* 税率 必填:是
|
||||
*/
|
||||
private String sl;
|
||||
/**
|
||||
* 速算扣除数 必填:是
|
||||
*/
|
||||
private String sskcs;
|
||||
/**
|
||||
* 代报方式 必填:是
|
||||
*/
|
||||
private String sbfs;
|
||||
/**
|
||||
* 应补退税额 必填:是
|
||||
*/
|
||||
private String ybtse;
|
||||
/**
|
||||
* 非居民所得项目名字 必填:是 非居民所得薪金类别-无住所个人正常工资薪金、全年一次性奖金收入
|
||||
*/
|
||||
private String sdxm;
|
||||
/**
|
||||
* 所得期间起 必填:是 YYYY-MM
|
||||
*/
|
||||
private String sdqjq;
|
||||
/**
|
||||
* 所得期间止 必填:是 YYYY-MM
|
||||
*/
|
||||
private String sdqjz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class result {
|
||||
|
||||
//--------------综合所得输出结果报文------------------------------
|
||||
|
||||
/**
|
||||
* 是否明细申报 必填:否 是或者否
|
||||
*/
|
||||
private String sfmxsb;
|
||||
/**
|
||||
* 姓名 必填:否 如果是汇总申报返回空
|
||||
*/
|
||||
@TableTitle(title = "姓名", dataIndex = "xm",key = "xm")
|
||||
private String xm;
|
||||
/**
|
||||
* 证件类型 必填:否 见证件类型字典 如果是汇总申报返回空
|
||||
*/
|
||||
private String zzlx;
|
||||
/**
|
||||
* 证件号码 必填:否 如果是汇总申报返回空
|
||||
*/
|
||||
private String zzhm;
|
||||
/**
|
||||
* 任职受雇日期 必填:是 格式YYYY-MM-DD
|
||||
*/
|
||||
private String rzsgrq;
|
||||
/**
|
||||
* 离职日期 必填:否 格式YYYY-MM-DD
|
||||
*/
|
||||
private String lzrq;
|
||||
/**
|
||||
* 当期收入额 必填:是 不填写默认为0
|
||||
*/
|
||||
@TableTitle(title = "当期收入额", dataIndex = "sre",key = "sre")
|
||||
private BigDecimal sre;
|
||||
/**
|
||||
* 当期免税收入 必填:否
|
||||
*/
|
||||
private BigDecimal mssd;
|
||||
/**
|
||||
* 基本养老保险 必填:否
|
||||
*/
|
||||
private BigDecimal jbylaobxf;
|
||||
/**
|
||||
* 基本医疗保险 必填:否
|
||||
*/
|
||||
private BigDecimal jbylbxf;
|
||||
/**
|
||||
* 失业保险 必填:否
|
||||
*/
|
||||
private BigDecimal sybxf;
|
||||
/**
|
||||
* 住房公积金 必填:否
|
||||
*/
|
||||
private BigDecimal zfgjj;
|
||||
/**
|
||||
* 子女教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal znjyzc;
|
||||
/**
|
||||
* 赡养老人支出 必填:否
|
||||
*/
|
||||
private BigDecimal sylrzc;
|
||||
/**
|
||||
* 住房贷款利息支出 必填:否
|
||||
*/
|
||||
private BigDecimal zfdklxzc;
|
||||
/**
|
||||
* 住房租金支出 必填:否
|
||||
*/
|
||||
private BigDecimal zfzjzc;
|
||||
/**
|
||||
* 继续教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal jxjyzc;
|
||||
/**
|
||||
* 非学历继续教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal fxljxjyzc;
|
||||
/**
|
||||
* 3岁以下婴幼儿照护支出 必填:否
|
||||
*/
|
||||
private BigDecimal yyezhzc;
|
||||
/**
|
||||
* 年金 必填:否
|
||||
*/
|
||||
private BigDecimal nj;
|
||||
/**
|
||||
* 商业健康保险 必填:否
|
||||
*/
|
||||
private BigDecimal syjkbx;
|
||||
/**
|
||||
* 税延养老保险 必填:否
|
||||
*/
|
||||
private BigDecimal syylbx;
|
||||
/**
|
||||
* 其他 必填:否 按法律规定可以在税前扣除的项目
|
||||
*/
|
||||
private BigDecimal qt;
|
||||
/**
|
||||
* 准予扣除的捐赠额 必填:否
|
||||
*/
|
||||
private BigDecimal zykcjze;
|
||||
/**
|
||||
* 减免税额 必填:否
|
||||
*/
|
||||
private BigDecimal jmse;
|
||||
/**
|
||||
* 备注 必填:否
|
||||
*/
|
||||
private String bz;
|
||||
/**
|
||||
* 减除费用 必填:否 正常工资薪金的减除费用。 对应保险营销员、证券经纪人的费用
|
||||
*/
|
||||
private BigDecimal jcfy;
|
||||
/**
|
||||
* 其他扣除合计 必填:否
|
||||
*/
|
||||
private BigDecimal qtckhj;
|
||||
/**
|
||||
* 应纳税所得额 必填:否 正常工资薪金返回否
|
||||
*/
|
||||
@TableTitle(title = "应纳税所得额", dataIndex = "ynssde",key = "ynssde")
|
||||
private BigDecimal ynssde;
|
||||
/**
|
||||
* 应纳税额 必填:否 正常工资薪金返回否
|
||||
*/
|
||||
private BigDecimal ynse;
|
||||
/**
|
||||
* 已缴税额 必填:否 正常工资薪金返回否
|
||||
*/
|
||||
private BigDecimal ykjse;
|
||||
/**
|
||||
* 应扣缴税额 必填:否 正常工资薪金返回否
|
||||
*/
|
||||
private BigDecimal yingkjse;
|
||||
/**
|
||||
* 税率 必填:否
|
||||
*/
|
||||
private BigDecimal sl;
|
||||
/**
|
||||
* 速算扣除数 必填:否
|
||||
*/
|
||||
private BigDecimal sskcs;
|
||||
/**
|
||||
* 所得项目名称 必填:是 正常工资薪金;全年一次性奖金收入;稿酬所得;劳务报酬
|
||||
*/
|
||||
private String sdxm;
|
||||
/**
|
||||
* 应补退税额 必填:否 应补退税额=累计应扣缴税额-累计已缴税额
|
||||
*/
|
||||
@TableTitle(title = "应补退税额", dataIndex = "ybtse",key = "ybtse")
|
||||
private BigDecimal ybtse;
|
||||
/**
|
||||
* 累计收入额 必填:否
|
||||
*/
|
||||
private BigDecimal ljsre;
|
||||
/**
|
||||
* 累计免税收入额 必填:否
|
||||
*/
|
||||
private BigDecimal ljmssd;
|
||||
/**
|
||||
* 累计专项扣除额 必填:否 三险一金合计
|
||||
*/
|
||||
private BigDecimal ljzxkce;
|
||||
/**
|
||||
* 累计专项附加扣除额 必填:否 专项附加合计
|
||||
*/
|
||||
private BigDecimal ljzxfjkce;
|
||||
/**
|
||||
* 累计其他扣除额 必填:否
|
||||
*/
|
||||
private BigDecimal ljqtkce;
|
||||
/**
|
||||
* 累计减免税额 必填:否
|
||||
*/
|
||||
private BigDecimal ljjmse;
|
||||
/**
|
||||
* 累计减除费用额 必填:否 正常工资薪金累计减除费用 必填:否 对应保险营销员、证券经纪人累计费用
|
||||
*/
|
||||
private BigDecimal ljjcfye;
|
||||
/**
|
||||
* 累计月减除费用 必填:否 保险营销员、证券经纪人,其他连续劳务报酬的减除费用
|
||||
*/
|
||||
private BigDecimal ljyjcfy;
|
||||
/**
|
||||
* 允许扣除税费 必填:否 保险营销员、证券经纪人
|
||||
*/
|
||||
private BigDecimal yxkcsf;
|
||||
/**
|
||||
* 展业成本 必填:否 保险营销员、证券经纪人
|
||||
*/
|
||||
private BigDecimal zycb;
|
||||
/**
|
||||
* 月减除费用 必填:否 保险营销员、证券经纪人,其他连续劳务报酬的减除费用
|
||||
*/
|
||||
private BigDecimal yjcfy;
|
||||
/**
|
||||
* 累计应纳税所得额 必填:否
|
||||
*/
|
||||
@TableTitle(title = "累计应纳税所得额", dataIndex = "ljynssde",key = "ljynssde")
|
||||
private BigDecimal ljynssde;
|
||||
/**
|
||||
* 累计应纳税额 必填:否
|
||||
*/
|
||||
private BigDecimal ljynse;
|
||||
/**
|
||||
* 累计应扣缴税额 必填:否 累计应扣缴税额 = 累计应纳税额 - 累计减免税额
|
||||
*/
|
||||
private BigDecimal ljyingkjse;
|
||||
/**
|
||||
* 累计已缴税额 必填:否
|
||||
*/
|
||||
private BigDecimal ljykjse;
|
||||
/**
|
||||
* 累计子女教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljznjyzc;
|
||||
/**
|
||||
* 累计继续教育支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljjxjyzc;
|
||||
/**
|
||||
* 累计非学历继续教育支持 必填:否
|
||||
*/
|
||||
private BigDecimal ljfxljxjyzc;
|
||||
/**
|
||||
* 累计学历继续教育支持 必填:否
|
||||
*/
|
||||
private BigDecimal ljxljxjyzc;
|
||||
/**
|
||||
* 累计住房租金支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljzfzjzc;
|
||||
/**
|
||||
* 累计房屋贷款支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljzfdklxzc;
|
||||
/**
|
||||
* 累计赡养老人支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljsylrzc;
|
||||
/**
|
||||
* 累计3岁以下婴幼儿照护支出 必填:否
|
||||
*/
|
||||
private BigDecimal ljyyezhzc;
|
||||
/**
|
||||
* 累计准予扣除的捐赠额 必填:否
|
||||
*/
|
||||
private BigDecimal ljzykcjze;
|
||||
/**
|
||||
* 累计个人养老金 必填:否
|
||||
*/
|
||||
private BigDecimal ljgrylj;
|
||||
/**
|
||||
* 累计个人养老金校验码 必填:否
|
||||
*/
|
||||
private String ljgryljjym;
|
||||
/**
|
||||
* 仅在两个月算税场景时使用,当前月分为N月:
|
||||
* 0表示N-1月(上月)未申报
|
||||
* 1表示N-1月(上月)已申报
|
||||
* 2表示N-2月(上上个月)未申报
|
||||
*/
|
||||
private String qysysfysb;
|
||||
|
||||
/**
|
||||
* 当前月分为N,如果N-1(上月)已申报,则返回N-1月员工在税局累计已扣缴的税额;
|
||||
* 如果N-1月未申报,则返回N-2月工在税局累计已扣缴的税额;
|
||||
*/
|
||||
private BigDecimal ygzsjljykjse;
|
||||
/**
|
||||
* 本月已累计扣除税额 必填:否 针对一月多次算税的场景字段
|
||||
*/
|
||||
private BigDecimal byyljkjse;
|
||||
/**
|
||||
* 本次应扣缴税额 必填:否 针对一月多次算税的场景字段,本次应扣缴税额=本月应扣缴税额-本月已累计税额
|
||||
*/
|
||||
private BigDecimal bcykjse;
|
||||
/**
|
||||
* 分摊年度数 必填:否
|
||||
*/
|
||||
private Integer ftnds;
|
||||
/**
|
||||
* 年减除费用 必填:否 默认为60000
|
||||
*/
|
||||
private BigDecimal njcfy;
|
||||
|
||||
|
||||
//----------非居民所得输出结果报文-------------------------------
|
||||
|
||||
/*
|
||||
* 姓名 必填:是
|
||||
*/
|
||||
// private String xm;
|
||||
/*
|
||||
* 证件类型名称 必填:是
|
||||
*/
|
||||
// private String zzlx;
|
||||
/*
|
||||
* 证件号码 必填:是
|
||||
*/
|
||||
// private String zzhm;
|
||||
/*
|
||||
* 收入额 必填:是
|
||||
*/
|
||||
// private String sre;
|
||||
/*
|
||||
* 累计收入(不含本次) 必填:是
|
||||
*/
|
||||
// private String ljsre;
|
||||
/*
|
||||
* 免税收入 必填:是
|
||||
*/
|
||||
// private String mssd;
|
||||
/**
|
||||
* 财产原值 必填:是
|
||||
*/
|
||||
private String ccyz;
|
||||
/*
|
||||
* 允许扣除的税费 必填:是
|
||||
*/
|
||||
// private String yxkcsf;
|
||||
/**
|
||||
* 投资抵扣 必填:是
|
||||
*/
|
||||
private String tzdk;
|
||||
/*
|
||||
* 其他 必填:是
|
||||
*/
|
||||
// private String qt;
|
||||
/*
|
||||
* 备注 必填:是
|
||||
*/
|
||||
// private String bz;
|
||||
/**
|
||||
* 实际工作年限 必填:是
|
||||
*/
|
||||
private String sjgznxs;
|
||||
/*
|
||||
* 减除费用 必填:是
|
||||
*/
|
||||
// private String jcfy;
|
||||
/*
|
||||
* 准予扣除的捐赠额 必填:是
|
||||
*/
|
||||
// private String zykcjze;
|
||||
/*
|
||||
* 税前扣除项目合计 必填:是
|
||||
*/
|
||||
// private String sqkcxmhj;
|
||||
/*
|
||||
* 应纳税额所得额 必填:是
|
||||
*/
|
||||
// private String ynssde;
|
||||
/*
|
||||
* 应纳税额 必填:是
|
||||
*/
|
||||
// private String ynse;
|
||||
/*
|
||||
* 减免税额 必填:是
|
||||
*/
|
||||
// private String jmse;
|
||||
/*
|
||||
* 应扣缴税额 必填:是
|
||||
*/
|
||||
// private String yingkjse;
|
||||
/*
|
||||
* 已扣缴税额 必填:是 无需填写该值,按0处理
|
||||
*/
|
||||
// private String ykjse;
|
||||
/*
|
||||
* 税率 必填:是
|
||||
*/
|
||||
// private String sl;
|
||||
/*
|
||||
* 速算扣除数 必填:是
|
||||
*/
|
||||
// private String sskcs;
|
||||
/**
|
||||
* 代报方式 必填:是
|
||||
*/
|
||||
private String sbfs;
|
||||
/*
|
||||
* 应补退税额 必填:是
|
||||
*/
|
||||
// private String ybtse;
|
||||
/*
|
||||
* 非居民所得项目名字 必填:是 非居民所得薪金类别-无住所个人正常工资薪金、全年一次性奖金收入
|
||||
*/
|
||||
// private String sdxm;
|
||||
/**
|
||||
* 所得期间起 必填:是 YYYY-MM
|
||||
*/
|
||||
private String sdqjq;
|
||||
/**
|
||||
* 所得期间止 必填:是 YYYY-MM
|
||||
*/
|
||||
private String sdqjz;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 算税失败原因对象
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobTaxRuleDTO;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobTaxRuleSaveParam;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobTaxRulePO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资账套的个税规则
|
||||
* <p>Copyright: Copyright (c) 2023</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public interface SalarySobTaxRuleService {
|
||||
|
||||
/**
|
||||
* 根据薪资账套id查询薪资账套的个税规则
|
||||
*
|
||||
* @param salarySobIds
|
||||
* @return
|
||||
*/
|
||||
List<SalarySobTaxRulePO> listBySalarySobId(Long salarySobIds);
|
||||
|
||||
/**
|
||||
* 根据薪资账套id查询薪资账套的个税规则
|
||||
*
|
||||
* @param salarySobId
|
||||
* @return
|
||||
*/
|
||||
List<SalarySobTaxRuleDTO> getSalarySobTaxRuleDTO(Long salarySobId);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param saveParam
|
||||
*/
|
||||
void saveByParam(SalarySobTaxRuleSaveParam saveParam);
|
||||
|
||||
/**
|
||||
* 按薪资账套id删除
|
||||
*
|
||||
* @param salarySobIds
|
||||
*/
|
||||
void deleteBySalarySobIds(Collection<Long> salarySobIds);
|
||||
|
||||
void saveBatch(List<SalarySobTaxRulePO> salarySobTaxReportRules);
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ public class SalaryCalcTaxServiceImpl extends Service implements SalaryCalcTaxSe
|
|||
continue;
|
||||
}
|
||||
|
||||
Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> empIdResult = incomeCategoryEnum.parseGetASynIndividualIncomeTaxFeedbackResponse(feedbackResponse, subEmployeeDeclares);
|
||||
// Map<Long, GetASynIndividualIncomeTaxFeedbackResponse.Body.result> empIdResult = incomeCategoryEnum.parseGetASynIndividualIncomeTaxFeedbackResponse(feedbackResponse, subEmployeeDeclares);
|
||||
|
||||
|
||||
Map<String, Object> dataMap = null;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,160 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobTaxRuleDTO;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobTaxRuleSaveParam;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobTaxRulePO;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
|
||||
import com.engine.salary.mapper.salarysob.SalarySobTaxRuleMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 薪资账套的个税申报表规则
|
||||
* <p>Copyright: Copyright (c) 2023</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public class SalarySobTaxRuleServiceImpl extends Service implements SalarySobTaxRuleService {
|
||||
|
||||
|
||||
private SalarySobTaxRuleMapper salarySobTaxRuleMapper() {
|
||||
return MapperProxyFactory.getProxy(SalarySobTaxRuleMapper.class);
|
||||
}
|
||||
|
||||
private SalarySobService getSalarySobService(User user) {
|
||||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private TaxReportColumnService getTaxReportColumnService(User user) {
|
||||
return ServiceUtil.getService(TaxReportColumnServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryItemService getSalaryItemService(User user) {
|
||||
return ServiceUtil.getService(SalaryItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySobItemService getSalarySobItemService(User user) {
|
||||
return ServiceUtil.getService(SalarySobItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySobBackItemService getSalarySobBackItemService(User user) {
|
||||
return ServiceUtil.getService(SalarySobBackItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalarySobTaxRulePO> listBySalarySobId(Long salarySobId) {
|
||||
if (salarySobId == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return salarySobTaxRuleMapper().listSome(SalarySobTaxRulePO.builder().salarySobId(salarySobId).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalarySobTaxRuleDTO> getSalarySobTaxRuleDTO(Long salarySobId) {
|
||||
List<SalarySobTaxRuleDTO> resultList = Lists.newArrayList();
|
||||
// 查询薪资账套
|
||||
SalarySobPO salarySob = getSalarySobService(user).getById(salarySobId);
|
||||
Integer incomeCategory = salarySob.getIncomeCategory();
|
||||
List<Integer> incomeCategoryIds = Collections.singletonList(incomeCategory);
|
||||
// 薪资账套的薪资项目
|
||||
List<SalarySobItemPO> salarySobItems = getSalarySobItemService(user).listBySalarySobId(salarySobId);
|
||||
// 薪资账套的回算薪资项目
|
||||
List<SalarySobBackItemPO> salarySobBackItems = getSalarySobBackItemService(user).listBySalarySobId(salarySobId);
|
||||
// 薪资项目
|
||||
Set<Long> salaryItemIds = Sets.newHashSet();
|
||||
salaryItemIds.addAll(SalaryEntityUtil.properties(salarySobItems, SalarySobItemPO::getSalaryItemId));
|
||||
salaryItemIds.addAll(SalaryEntityUtil.properties(salarySobBackItems, SalarySobBackItemPO::getSalaryItemId));
|
||||
List<SalaryItemPO> salaryItems = getSalaryItemService(user).listByIds(salaryItemIds);
|
||||
Map<Long, SalaryItemPO> idKeySalaryItemMap = SalaryEntityUtil.convert2Map(salaryItems, SalaryItemPO::getId);
|
||||
// 薪资账套中已经存在的对应关系
|
||||
List<SalarySobTaxRulePO> salarySobTaxReportRules = listBySalarySobId(salarySobId);
|
||||
Map<String, Long> salarySobTaxReportRuleMap = SalaryEntityUtil.convert2Map(salarySobTaxReportRules,
|
||||
e -> e.getIncomeCategory() + "-" + e.getTaxIndex(), SalarySobTaxRulePO::getSalaryItemId);
|
||||
|
||||
for (Integer incomeCategoryId : incomeCategoryIds) {
|
||||
IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(incomeCategoryId);
|
||||
List<SalarySobTaxRuleDTO.TaxRuleDTO> taxRules = incomeCategoryEnum.getReportType().getTaxRules();
|
||||
for (SalarySobTaxRuleDTO.TaxRuleDTO taxRule : taxRules) {
|
||||
Long salaryItemId = salarySobTaxReportRuleMap.get(incomeCategoryId + "-" + taxRule.getTaxIndex());
|
||||
SalaryItemPO salaryItem = idKeySalaryItemMap.get(salaryItemId);
|
||||
if (Objects.nonNull(salaryItem)) {
|
||||
Map<String, Object> dataMap = Maps.newHashMap();
|
||||
dataMap.put("id", salaryItem.getId().toString());
|
||||
dataMap.put("name", salaryItem.getName());
|
||||
taxRule.setSalaryItem(dataMap);
|
||||
}
|
||||
}
|
||||
|
||||
SalarySobTaxRuleDTO salarySobTaxReportRuleDTO = new SalarySobTaxRuleDTO();
|
||||
salarySobTaxReportRuleDTO.setIncomeCategoryId(incomeCategoryId.toString());
|
||||
salarySobTaxReportRuleDTO.setIncomeCategoryName(SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()));
|
||||
salarySobTaxReportRuleDTO.setTaxRules(taxRules);
|
||||
resultList.add(salarySobTaxReportRuleDTO);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveByParam(SalarySobTaxRuleSaveParam saveParam) {
|
||||
// 校验参数是否合法
|
||||
// 构建po
|
||||
Date now = new Date();
|
||||
List<SalarySobTaxRulePO> salarySobTaxReportRules = Lists.newArrayList();
|
||||
for (SalarySobTaxRuleSaveParam.TaxReportRuleIncomeCategoryParam incomeCategoryParam : saveParam.getIncomeCategoryParams()) {
|
||||
for (SalarySobTaxRuleSaveParam.TaxRuleParam taxReportRuleParam : incomeCategoryParam.getTaxRuleParams()) {
|
||||
SalarySobTaxRulePO salarySobTaxRule = new SalarySobTaxRulePO();
|
||||
salarySobTaxRule.setId(IdGenerator.generate());
|
||||
salarySobTaxRule.setSalarySobId(saveParam.getSalarySobId());
|
||||
salarySobTaxRule.setIncomeCategory(incomeCategoryParam.getIncomeCategory());
|
||||
salarySobTaxRule.setTaxIndex(taxReportRuleParam.getTaxIndex());
|
||||
salarySobTaxRule.setSalaryItemId(taxReportRuleParam.getSalaryItemId());
|
||||
salarySobTaxRule.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
salarySobTaxRule.setCreator((long) user.getUID());
|
||||
salarySobTaxRule.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
salarySobTaxRule.setCreateTime(now);
|
||||
salarySobTaxRule.setUpdateTime(now);
|
||||
salarySobTaxReportRules.add(salarySobTaxRule);
|
||||
}
|
||||
}
|
||||
deleteBySalarySobIds(Collections.singleton(saveParam.getSalarySobId()));
|
||||
if (CollectionUtils.isNotEmpty(salarySobTaxReportRules)) {
|
||||
salarySobTaxReportRules.forEach(salarySobTaxRuleMapper()::insertIgnoreNull);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBySalarySobIds(Collection<Long> salarySobIds) {
|
||||
if (CollectionUtils.isEmpty(salarySobIds)) {
|
||||
return;
|
||||
}
|
||||
salarySobTaxRuleMapper().deleteBySalarySobIds(salarySobIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveBatch(List<SalarySobTaxRulePO> salarySobTaxReportRules) {
|
||||
if (CollectionUtils.isEmpty(salarySobTaxReportRules)) {
|
||||
return;
|
||||
}
|
||||
// salarySobTaxReportRules.forEach(salarySobTaxReportRuleMapper()::insertIgnoreNull);
|
||||
}
|
||||
}
|
||||
|
|
@ -81,6 +81,11 @@ public class SalarySobController {
|
|||
private SalarySobAddUpRuleWrapper getSalarySobAddUpRuleWrapper(User user) {
|
||||
return ServiceUtil.getService(SalarySobAddUpRuleWrapper.class, user);
|
||||
}
|
||||
|
||||
private SalarySobTaxRuleWrapper getSalarySobTaxRuleWrapper(User user) {
|
||||
return ServiceUtil.getService(SalarySobTaxRuleWrapper.class, user);
|
||||
}
|
||||
|
||||
/**********************************薪资账套 start*********************************/
|
||||
|
||||
/**
|
||||
|
|
@ -548,6 +553,40 @@ public class SalarySobController {
|
|||
|
||||
/**********************************薪资账套的个税申报表规则 end*********************************/
|
||||
|
||||
/**********************************薪资账套的个税申报表规则 start*********************************/
|
||||
|
||||
/**
|
||||
* 薪资账套下的个税规则的详情
|
||||
*
|
||||
* @param id 薪资账套id
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/taxrule/getForm")
|
||||
@ApiOperation("薪资账套下的个税规则的详情")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getSalarySobTaxRuleForm(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "id") Long id) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Long, List<SalarySobTaxRuleDTO>>(user).run(getSalarySobTaxRuleWrapper(user)::getForm, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存薪资账套下的个税规则
|
||||
*
|
||||
* @param saveParam 保存参数
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/taxrule/save")
|
||||
@ApiOperation("保存薪资账套下的个税规则的")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String saveSalarySobTaxRule(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySobTaxRuleSaveParam saveParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalarySobTaxRuleSaveParam, String>(user).run(getSalarySobTaxRuleWrapper(user)::save, saveParam);
|
||||
}
|
||||
|
||||
/**********************************薪资账套的个税申报表规则 end*********************************/
|
||||
|
||||
|
||||
/**********************************调薪计薪规则 start*********************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package com.engine.salary.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobTaxRuleDTO;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobTaxRuleSaveParam;
|
||||
import com.engine.salary.service.SalarySobTaxRuleService;
|
||||
import com.engine.salary.service.impl.SalarySobTaxRuleServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 薪资账套的个税规则
|
||||
* <p>Copyright: Copyright (c) 2023</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public class SalarySobTaxRuleWrapper extends Service {
|
||||
|
||||
private SalarySobTaxRuleService getSalarySobTaxRuleService(User user) {
|
||||
return ServiceUtil.getService(SalarySobTaxRuleServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 薪资账套的个税规则
|
||||
*
|
||||
* @param salarySobId
|
||||
* @return
|
||||
*/
|
||||
public List<SalarySobTaxRuleDTO> getForm(Long salarySobId) {
|
||||
return getSalarySobTaxRuleService(user).getSalarySobTaxRuleDTO(salarySobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存薪资账套的个税规则
|
||||
*
|
||||
* @param saveParam
|
||||
*/
|
||||
public void save(SalarySobTaxRuleSaveParam saveParam) {
|
||||
getSalarySobTaxRuleService(user).saveByParam(saveParam);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue