Commit c180e4bb authored by huyuchen's avatar huyuchen

年终奖修改

parent 2be721da
...@@ -36,11 +36,13 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils; ...@@ -36,11 +36,13 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants; import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus; import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryTaxConfigService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryTaxConfigService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService; import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusImportVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusImportVo;
...@@ -82,6 +84,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -82,6 +84,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
private final SocialDaprUtils socialDaprUtils; private final SocialDaprUtils socialDaprUtils;
private final TSpecialDeducationSumService deducationSumService;
/** /**
* 全年一次性奖金申报表简单分页查询 * 全年一次性奖金申报表简单分页查询
* @param tStatisticsBonus 全年一次性奖金申报表 * @param tStatisticsBonus 全年一次性奖金申报表
...@@ -226,6 +230,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -226,6 +230,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} }
} }
Map<String, List<TSalaryAccountItem>> itemMap = tSalaryAccountItemService.getSalaryItemVoList(idCardList, invoiceTitle); Map<String, List<TSalaryAccountItem>> itemMap = tSalaryAccountItemService.getSalaryItemVoList(idCardList, invoiceTitle);
TSpecialDeducationSum specialDeducation;
for (TStatisticsBonusImportVo infoVo: list) { for (TStatisticsBonusImportVo infoVo: list) {
//本次纳税额 //本次纳税额
res = BigDecimal.ZERO; res = BigDecimal.ZERO;
...@@ -256,8 +262,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -256,8 +262,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
singleAnualTax = BigDecimal.ZERO; singleAnualTax = BigDecimal.ZERO;
//工资单独扣税 //工资单独扣税
singleSalaryTax = BigDecimal.ZERO; singleSalaryTax = BigDecimal.ZERO;
//专项扣除列表 // //专项扣除列表
List<BigDecimal> sdSumList = new ArrayList<>(); // List<BigDecimal> sdSumList = new ArrayList<>();
//减除费用列表 //减除费用列表
List<BigDecimal> costReductionList = new ArrayList<>(); List<BigDecimal> costReductionList = new ArrayList<>();
...@@ -286,10 +292,10 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -286,10 +292,10 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (SalaryConstants.COST_REDUCTION_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.COST_REDUCTION_JAVA.equals(item.getJavaFiedName())) {
costReductionList.add(item.getSalaryMoney()); costReductionList.add(item.getSalaryMoney());
} }
//专项扣除 // //专项扣除
if (SalaryConstants.SPECIAL_DEDU_MONEY_SUM_JAVA.equals(item.getJavaFiedName())) { // if (SalaryConstants.SPECIAL_DEDU_MONEY_SUM_JAVA.equals(item.getJavaFiedName())) {
sdSumList.add(item.getSalaryMoney()); // sdSumList.add(item.getSalaryMoney());
} // }
} }
if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) { if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) {
//12月份个税 //12月份个税
...@@ -308,8 +314,14 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -308,8 +314,14 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (CommonConstants.IS_TRUE.equals(infoVo.getIsTSend())) { if (CommonConstants.IS_TRUE.equals(infoVo.getIsTSend())) {
isSend = true; isSend = true;
} }
if (Common.isNotNull(sdSumList)) { // if (Common.isNotNull(sdSumList)) {
sdSum = Collections.max(sdSumList); // sdSum = Collections.max(sdSumList);
// }
//专项扣除从专项扣除表中直接获取
specialDeducation = deducationSumService.getOne(Wrappers.<TSpecialDeducationSum>query().lambda()
.eq(TSpecialDeducationSum::getIdNumber,infoVo.getEmpIdcard()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(specialDeducation)) {
sdSum = specialDeducation.getCostReduction();
} }
if (Common.isNotNull(costReductionList)) { if (Common.isNotNull(costReductionList)) {
costReduction = Collections.max(costReductionList); costReduction = Collections.max(costReductionList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment