Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
cedf1238
Commit
cedf1238
authored
May 18, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop'
parents
b7a20525
6df9ea81
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
224 additions
and
171 deletions
+224
-171
EkpSalaryParamVo.java
.../com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParamVo.java
+0
-9
TSalaryAccountItem.java
.../cloud/plus/v1/yifu/salary/entity/TSalaryAccountItem.java
+6
-0
TSalaryTaxConfigMapper.java
...ud/plus/v1/yifu/salary/mapper/TSalaryTaxConfigMapper.java
+9
-0
TSalaryTaxConfigService.java
.../plus/v1/yifu/salary/service/TSalaryTaxConfigService.java
+2
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+127
-57
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+6
-6
TSalaryTaxConfigServiceImpl.java
...yifu/salary/service/impl/TSalaryTaxConfigServiceImpl.java
+12
-0
SalaryConstants.java
.../yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
+2
-0
TSalaryAccountItemMapper.xml
...iz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
+5
-2
TSalaryTaxConfigMapper.xml
...-biz/src/main/resources/mapper/TSalaryTaxConfigMapper.xml
+55
-97
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParamVo.java
View file @
cedf1238
...
@@ -19,15 +19,6 @@ public class EkpSalaryParamVo extends EkpSalaryParam {
...
@@ -19,15 +19,6 @@ public class EkpSalaryParamVo extends EkpSalaryParam {
* 公积金扣缴月份
* 公积金扣缴月份
**/
**/
private
String
deduProvidentMonth
;
private
String
deduProvidentMonth
;
/**
* 代扣单位社保
**/
private
String
unitSocial
;
/**
* 代扣单位公积金
**/
private
String
unitFund
;
/**
/**
* 代扣社保总额
* 代扣社保总额
**/
**/
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccountItem.java
View file @
cedf1238
...
@@ -113,4 +113,10 @@ public class TSalaryAccountItem extends Model<TSalaryAccountItem> {
...
@@ -113,4 +113,10 @@ public class TSalaryAccountItem extends Model<TSalaryAccountItem> {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
salaryMonth
;
private
String
salaryMonth
;
/**
* 年终奖扣税方案0:合并;1:单独
*/
@TableField
(
exist
=
false
)
private
String
annualBonusType
;
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryTaxConfigMapper.java
View file @
cedf1238
...
@@ -42,5 +42,14 @@ public interface TSalaryTaxConfigMapper extends BaseMapper<TSalaryTaxConfig> {
...
@@ -42,5 +42,14 @@ public interface TSalaryTaxConfigMapper extends BaseMapper<TSalaryTaxConfig> {
**/
**/
List
<
TSalaryTaxConfig
>
getTaxConfigByAnnualBonusList
(
@Param
(
"tSalaryTaxConfig"
)
TSalaryTaxConfig
tSalaryTaxConfig
);
List
<
TSalaryTaxConfig
>
getTaxConfigByAnnualBonusList
(
@Param
(
"tSalaryTaxConfig"
)
TSalaryTaxConfig
tSalaryTaxConfig
);
/**
* @param tSalaryTaxConfig
* @Description: 实发倒推
* @Author: hgw
* @Date: 2023/5/16 10:33
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig>
**/
List
<
TSalaryTaxConfig
>
getTaxConfigByActualList
(
@Param
(
"tSalaryTaxConfig"
)
TSalaryTaxConfig
tSalaryTaxConfig
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryTaxConfigService.java
View file @
cedf1238
...
@@ -41,5 +41,7 @@ public interface TSalaryTaxConfigService extends IService<TSalaryTaxConfig> {
...
@@ -41,5 +41,7 @@ public interface TSalaryTaxConfigService extends IService<TSalaryTaxConfig> {
**/
**/
List
<
TSalaryTaxConfig
>
getTaxConfigByAnnualBonusList
(
TSalaryTaxConfig
tSalaryTaxConfig
);
List
<
TSalaryTaxConfig
>
getTaxConfigByAnnualBonusList
(
TSalaryTaxConfig
tSalaryTaxConfig
);
List
<
TSalaryTaxConfig
>
getTaxConfigByActualList
(
TSalaryTaxConfig
tSalaryTaxConfig
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
cedf1238
...
@@ -505,6 +505,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -505,6 +505,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
String
checkYearFinalStyle
;
//薪资和年终奖扣税方案(0:合并;1:单独)
String
checkYearFinalStyle
;
//薪资和年终奖扣税方案(0:合并;1:单独)
List
<
TSalaryTaxConfig
>
personTax
=
tSalaryTaxConfigService
.
getTaxConfigByPersonList
(
new
TSalaryTaxConfig
());
List
<
TSalaryTaxConfig
>
personTax
=
tSalaryTaxConfigService
.
getTaxConfigByPersonList
(
new
TSalaryTaxConfig
());
List
<
TSalaryTaxConfig
>
annousTax
=
tSalaryTaxConfigService
.
getTaxConfigByAnnualBonusList
(
new
TSalaryTaxConfig
());
List
<
TSalaryTaxConfig
>
annousTax
=
tSalaryTaxConfigService
.
getTaxConfigByAnnualBonusList
(
new
TSalaryTaxConfig
());
List
<
TSalaryTaxConfig
>
actualTax
=
tSalaryTaxConfigService
.
getTaxConfigByActualList
(
new
TSalaryTaxConfig
());
int
size
=
savList
.
size
();
int
size
=
savList
.
size
();
TSalaryAccountItem
annousSai
;
TSalaryAccountItem
annousSai
;
// 自有员工人数
// 自有员工人数
...
@@ -725,7 +726,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -725,7 +726,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//年终奖优化方案 2:自动计算
//年终奖优化方案 2:自动计算
if
(
CommonConstants
.
TWO_STRING
.
equals
(
checkYearFinalStyle
))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
checkYearFinalStyle
))
{
checkYearFinalStyle
=
checkYearFinalStyle
(
isActual
,
asList
,
sdSum
checkYearFinalStyle
=
checkYearFinalStyle
(
isActual
,
asList
,
sdSum
,
costReduction
,
personTax
,
saiList
,
annualBonus
,
annousTax
,
a
);
,
costReduction
,
personTax
,
actualTax
,
saiList
,
annualBonus
,
annousTax
,
a
);
}
}
//年终奖单独扣税
//年终奖单独扣税
if
(
CommonConstants
.
ONE_STRING
.
equals
(
checkYearFinalStyle
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
checkYearFinalStyle
))
{
...
@@ -748,14 +749,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -748,14 +749,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
personalDebt
=
personalDebt
.
add
(
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculation2PersonSalary
(
isActual
,
saiList
,
asList
,
sdSum
calculation2PersonSalary
(
isActual
,
saiList
,
asList
,
sdSum
,
costReduction
,
personTax
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
));
,
costReduction
,
personTax
,
actualTax
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
));
}
else
{
}
else
{
// 实发倒推个税应发
// 实发倒推个税应发
if
(!
isLabor
)
{
if
(!
isLabor
)
{
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculation2PersonSalary
(
isActual
,
saiList
,
asList
,
sdSum
calculation2PersonSalary
(
isActual
,
saiList
,
asList
,
sdSum
,
costReduction
,
personTax
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
,
costReduction
,
personTax
,
actualTax
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
}
else
{
}
else
{
// 实发劳务费,按月累计扣税 2022-3-2 17:32:40 樊青青提的需求
// 实发劳务费,按月累计扣税 2022-3-2 17:32:40 樊青青提的需求
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
...
@@ -1160,53 +1161,78 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1160,53 +1161,78 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
**/
**/
private
static
BigDecimal
calculation2PersonSalary
(
boolean
isActual
,
List
<
TSalaryAccountItem
>
itemList
private
static
BigDecimal
calculation2PersonSalary
(
boolean
isActual
,
List
<
TSalaryAccountItem
>
itemList
,
List
<
TSalaryAccountItem
>
itemHistoryList
,
BigDecimal
specialDeductionSum
,
List
<
TSalaryAccountItem
>
itemHistoryList
,
BigDecimal
specialDeductionSum
,
BigDecimal
costReduction
,
List
<
TSalaryTaxConfig
>
subs
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccount
a
)
{
,
BigDecimal
costReduction
,
List
<
TSalaryTaxConfig
>
subs
,
List
<
TSalaryTaxConfig
>
actualTax
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccount
a
)
{
//本次纳税额
//本次纳税额
BigDecimal
res
=
SalaryConstants
.
B_ZERO
;
BigDecimal
res
=
SalaryConstants
.
B_ZERO
;
BigDecimal
annualBonus
=
SalaryConstants
.
B_ZERO
;
BigDecimal
sumTax
=
SalaryConstants
.
B_ZERO
;
BigDecimal
sumTax
=
SalaryConstants
.
B_ZERO
;
BigDecimal
realDeduSalary
=
SalaryConstants
.
B_ZERO
;
BigDecimal
realDeduSalary
=
SalaryConstants
.
B_ZERO
;
BigDecimal
addRelaySalary
=
SalaryConstants
.
B_ZERO
;
// 实发倒推应发后需要加上其余金额,成为应发。
BigDecimal
actualSalarySumNow
=
SalaryConstants
.
B_ZERO
;
// 本次实发。
// 实发倒推-属性:
BigDecimal
actualSalaryNow
=
SalaryConstants
.
B_ZERO
;
// 本次实发
BigDecimal
actualSalary
=
SalaryConstants
.
B_ZERO
;
// 实发
BigDecimal
annualBonus
=
SalaryConstants
.
B_ZERO
;
// -单独年终奖
BigDecimal
deduction
=
SalaryConstants
.
B_ZERO
;
// +个人代扣
BigDecimal
phoneSubsidy
=
SalaryConstants
.
B_ZERO
;
// -通讯补贴(不计税)
BigDecimal
otherDeduction
=
SalaryConstants
.
B_ZERO
;
// -其他扣除项,包含【累计个人社保(含代扣,含本期)+累计个人公积金(含代扣)
// +累计年金(个人含本期)+累计个人代扣(各类个人代扣费用,含本期)+免个税个人代扣(含本期)】
// - costReduction - specialDeductionSum
BigDecimal
relaySalaryHistory
=
SalaryConstants
.
B_ZERO
;
// 历史应发
BigDecimal
taxHistory
=
SalaryConstants
.
B_ZERO
;
// 历史个税
//本次
//本次
for
(
TSalaryAccountItem
item
:
itemList
)
{
for
(
TSalaryAccountItem
item
:
itemList
)
{
if
(
SalaryConstants
.
ANNUAL_BONUS_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
ANNUAL_BONUS_JAVA
.
equals
(
item
.
getJavaFiedName
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
a
.
getAnnualBonusType
())
)
{
annualBonus
=
item
.
getSalaryMoney
();
annualBonus
=
item
.
getSalaryMoney
();
}
}
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
res
=
res
.
add
(
item
.
getSalaryMoney
());
res
=
res
.
add
(
item
.
getSalaryMoney
());
}
}
if
(
SalaryConstants
.
PDEDUCTION_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
deduction
=
deduction
.
add
(
item
.
getSalaryMoney
());
otherDeduction
=
otherDeduction
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
PHONE_SUBSIDY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
phoneSubsidy
=
phoneSubsidy
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
realDeduSalary
=
realDeduSalary
.
add
(
item
.
getSalaryMoney
());
realDeduSalary
=
realDeduSalary
.
add
(
item
.
getSalaryMoney
());
actualSalarySumNow
=
actualSalarySumNow
.
add
(
item
.
getSalaryMoney
());
actualSalary
=
actualSalary
.
add
(
item
.
getSalaryMoney
());
actualSalaryNow
=
actualSalaryNow
.
add
(
item
.
getSalaryMoney
());
}
}
if
(
CommonConstants
.
ONE_INT
==
item
.
getIsTax
())
{
if
(
CommonConstants
.
ONE_INT
==
item
.
getIsTax
())
{
res
=
res
.
subtract
(
item
.
getSalaryMoney
());
res
=
res
.
subtract
(
item
.
getSalaryMoney
());
realDeduSalary
=
realDeduSalary
.
subtract
(
item
.
getSalaryMoney
());
realDeduSalary
=
realDeduSalary
.
subtract
(
item
.
getSalaryMoney
());
addRelaySalary
=
addRelaySalary
.
add
(
item
.
getSalaryMoney
());
}
}
otherDeduction
=
getOtherDeducation
(
otherDeduction
,
item
);
}
}
BigDecimal
realSalaryHistory
=
SalaryConstants
.
B_ZERO
;
//历史累计
//历史累计
for
(
TSalaryAccountItem
item
:
itemHistoryList
)
{
for
(
TSalaryAccountItem
item
:
itemHistoryList
)
{
if
(
SalaryConstants
.
ANNUAL_BONUS_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
ANNUAL_BONUS_JAVA
.
equals
(
item
.
getJavaFiedName
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
item
.
getAnnualBonusType
())
)
{
annualBonus
=
annualBonus
.
add
(
item
.
getSalaryMoney
());
annualBonus
=
annualBonus
.
add
(
item
.
getSalaryMoney
());
}
}
if
(
SalaryConstants
.
SALARY_TAX_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
SALARY_TAX_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
sumTax
=
sumTax
.
add
(
item
.
getSalaryMoney
());
sumTax
=
sumTax
.
add
(
item
.
getSalaryMoney
());
taxHistory
=
taxHistory
.
add
(
item
.
getSalaryMoney
());
}
}
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
res
=
res
.
add
(
item
.
getSalaryMoney
());
res
=
res
.
add
(
item
.
getSalaryMoney
());
realSalaryHistory
=
realSalaryHistory
.
add
(
item
.
getSalaryMoney
());
relaySalaryHistory
=
relaySalaryHistory
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
PHONE_SUBSIDY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
phoneSubsidy
=
phoneSubsidy
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
PDEDUCTION_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
deduction
=
deduction
.
add
(
item
.
getSalaryMoney
());
otherDeduction
=
otherDeduction
.
add
(
item
.
getSalaryMoney
());
}
}
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
realDeduSalary
=
realDeduSalary
.
add
(
item
.
getSalaryMoney
());
realDeduSalary
=
realDeduSalary
.
add
(
item
.
getSalaryMoney
());
actualSalary
=
actualSalary
.
add
(
item
.
getSalaryMoney
());
}
}
if
(
CommonConstants
.
ONE_INT
==
item
.
getIsTax
())
{
if
(
CommonConstants
.
ONE_INT
==
item
.
getIsTax
())
{
res
=
res
.
subtract
(
item
.
getSalaryMoney
());
res
=
res
.
subtract
(
item
.
getSalaryMoney
());
addRelaySalary
=
addRelaySalary
.
add
(
item
.
getSalaryMoney
());
}
}
otherDeduction
=
getOtherDeducation
(
otherDeduction
,
item
);
}
}
if
(
specialDeductionSum
!=
null
)
{
if
(
specialDeductionSum
!=
null
)
{
res
=
res
.
subtract
(
specialDeductionSum
);
res
=
res
.
subtract
(
specialDeductionSum
);
...
@@ -1215,7 +1241,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1215,7 +1241,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
costReduction
!=
null
)
{
if
(
costReduction
!=
null
)
{
res
=
res
.
subtract
(
costReduction
);
res
=
res
.
subtract
(
costReduction
);
realDeduSalary
=
realDeduSalary
.
subtract
(
costReduction
);
realDeduSalary
=
realDeduSalary
.
subtract
(
costReduction
);
addRelaySalary
=
addRelaySalary
.
add
(
costReduction
);
}
}
if
(!
isActual
)
{
if
(!
isActual
)
{
for
(
TSalaryTaxConfig
sub
:
subs
)
{
for
(
TSalaryTaxConfig
sub
:
subs
)
{
...
@@ -1229,49 +1254,62 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1229,49 +1254,62 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
}
}
}
else
{
}
else
{
BigDecimal
testArea
;
// 应发-起征点,判断计算金额范围;
// -实发倒推应发改版-2023-5-16 10:51:31-版本MVP1.5.4-王成提供的新倒推公式
//倒推公式(原先):
// 1 数据处理:报账明细中若存在“年终奖单独扣税”不为0的行时,在进行本公式计算时,应将年终奖金额从应发和实发中分别扣除后,再参与计算
//((实发合计-减除费用)/ (1-税率) - (速算/(1-税率)) + 减除费用)
// -
// 2 计算税率档(税率、速算扣除数)=(累计实发金额(去掉年终奖单独扣税的部分实发,含本期)+个人代扣(各类个人代扣费用,不包含免个税个人代扣,含本期)
// (历史应发)
// -通讯补贴(不计税)-费用扣除标准(本期)-专项附加扣除(含本期))
// =
// 本次应发
// 税率档
TSalaryAccountItem
sai
;
BigDecimal
areaMoney
=
actualSalary
.
subtract
(
annualBonus
).
add
(
deduction
).
subtract
(
phoneSubsidy
);
BigDecimal
relaySalary
;
if
(
costReduction
!=
null
)
{
areaMoney
=
areaMoney
.
subtract
(
costReduction
);
}
if
(
specialDeductionSum
!=
null
)
{
areaMoney
=
areaMoney
.
subtract
(
specialDeductionSum
);
}
// 应缴税所得额
BigDecimal
doTaxMoney
=
BigDecimal
.
ZERO
;
for
(
TSalaryTaxConfig
sub
:
actualTax
)
{
if
(
areaMoney
.
compareTo
(
sub
.
getMinIncome
())
>
SalaryConstants
.
EQUAL
&&
areaMoney
.
compareTo
(
sub
.
getMaxIncome
())
<=
SalaryConstants
.
EQUAL
)
{
// 3 计算应缴税所得额(参与计税的金额)= (税率档位-速算扣除数)/(1—税率)
doTaxMoney
=
(
areaMoney
.
subtract
(
sub
.
getQuickDeducation
())).
divide
(
SalaryConstants
.
B_ONEHUNDRED
.
subtract
(
new
BigDecimal
(
sub
.
getWithholdingRate
())).
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
),
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
break
;
}
}
// 累计个税
BigDecimal
taxAll
=
BigDecimal
.
ZERO
;
// 4 计算累计个税 =应纳税所得额×适用税率-速算扣除数
for
(
TSalaryTaxConfig
sub
:
subs
)
{
for
(
TSalaryTaxConfig
sub
:
subs
)
{
//res = realDeduSalary / (1- (double) ((sub.getTaxRate() * 1.0) / 100))
if
(
doTaxMoney
.
compareTo
(
sub
.
getMinIncome
())
>
SalaryConstants
.
EQUAL
// - (sub.getQuick()/ (1- (double) ((sub.getTaxRate() * 1.0) / 100)))
&&
doTaxMoney
.
compareTo
(
sub
.
getMaxIncome
())
<=
SalaryConstants
.
EQUAL
)
{
// + addRelaySalary
taxAll
=
doTaxMoney
.
multiply
(
new
BigDecimal
(
sub
.
getWithholdingRate
()).
divide
(
res
=
realDeduSalary
.
divide
(
new
BigDecimal
(
"1"
).
subtract
(
new
BigDecimal
(
sub
.
getWithholdingRate
()).
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
))
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
)),
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
)
.
subtract
(
sub
.
getQuickDeducation
());
// 应纳税额
.
subtract
(
sub
.
getQuickDeducation
().
divide
(
new
BigDecimal
(
"1"
).
subtract
(
new
BigDecimal
(
sub
.
getWithholdingRate
()).
divide
(
break
;
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
)),
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
))
}
.
add
(
addRelaySalary
);
}
testArea
=
res
.
subtract
(
costReduction
);
if
(
taxAll
.
compareTo
(
SalaryConstants
.
B_ZERO
)
<
SalaryConstants
.
EQUAL
)
{
if
(
testArea
.
compareTo
(
SalaryConstants
.
B_ZERO
)
<
SalaryConstants
.
EQUAL
)
{
taxAll
=
BigDecimal
.
ZERO
;
testArea
=
SalaryConstants
.
B_ZERO
;
}
}
// 5 计算应发=累计实发工资(含本期)+累计个税+累计个人社保(含代扣,含本期)+累计个人公积金(含代扣)
if
(
testArea
.
compareTo
(
sub
.
getMinIncome
())
>
SalaryConstants
.
EQUAL
// +累计年金(个人含本期)+累计个人代扣(各类个人代扣费用,含本期)+免个税个人代扣(含本期)-历史累计应发(不含本期)
&&
testArea
.
compareTo
(
sub
.
getMaxIncome
())
<=
SalaryConstants
.
EQUAL
)
{
// 本次应发
//res = res - realSalary - tf.getActualSalarySum(); //应发-历史应发=本次应发;本次应发-本次实发=税
BigDecimal
relaySalaryNow
=
actualSalary
.
add
(
taxAll
).
add
(
otherDeduction
).
subtract
(
relaySalaryHistory
);
relaySalary
=
res
.
subtract
(
realSalaryHistory
);
if
(
relaySalaryNow
.
compareTo
(
actualSalaryNow
)
<=
SalaryConstants
.
EQUAL
)
{
res
=
relaySalary
.
subtract
(
actualSalarySumNow
);
relaySalaryNow
=
actualSalaryNow
;
}
res
=
taxAll
.
subtract
(
taxHistory
);
// 本次个人应发合计
// 本次个人应发合计
sai
=
new
TSalaryAccountItem
();
TSalaryAccountItem
sai
=
new
TSalaryAccountItem
();
sai
.
setCnName
(
SalaryConstants
.
RELAY_SALARY
);
sai
.
setCnName
(
SalaryConstants
.
RELAY_SALARY
);
sai
.
setJavaFiedName
(
SalaryConstants
.
RELAY_SALARY_JAVA
);
sai
.
setJavaFiedName
(
SalaryConstants
.
RELAY_SALARY_JAVA
);
sai
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
sai
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
if
(
res
.
compareTo
(
SalaryConstants
.
B_ZERO
)
<=
SalaryConstants
.
EQUAL
)
{
sai
.
setSalaryMoney
(
relaySalaryNow
);
sai
.
setSalaryMoney
(
actualSalarySumNow
);
a
.
setRelaySalary
(
relaySalaryNow
);
a
.
setRelaySalary
(
actualSalarySumNow
);
}
else
{
sai
.
setSalaryMoney
(
relaySalary
);
a
.
setRelaySalary
(
relaySalary
);
}
saiList
.
add
(
sai
);
saiList
.
add
(
sai
);
break
;
}
}
}
}
if
(
res
.
compareTo
(
SalaryConstants
.
B_ZERO
)
<
SalaryConstants
.
EQUAL
)
{
if
(
res
.
compareTo
(
SalaryConstants
.
B_ZERO
)
<
SalaryConstants
.
EQUAL
)
{
return
SalaryConstants
.
B_ZERO
;
return
SalaryConstants
.
B_ZERO
;
...
@@ -1281,6 +1319,38 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1281,6 +1319,38 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
res
;
return
res
;
}
}
/**
* @param otherDeduction
* @param item
* @Description: 实发倒推应发,获取其他累加项
* @Author: hgw
* @Date: 2023/5/16 17:09
* @return: java.math.BigDecimal
**/
private
static
BigDecimal
getOtherDeducation
(
BigDecimal
otherDeduction
,
TSalaryAccountItem
item
)
{
if
(
SalaryConstants
.
WITHHOLIDING_PERSON_SOCIAL
.
equals
(
item
.
getJavaFiedName
()))
{
otherDeduction
=
otherDeduction
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
WITHHOLIDING_PERSON_FUND
.
equals
(
item
.
getJavaFiedName
()))
{
otherDeduction
=
otherDeduction
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
PERSONAL_SOCIAL_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
otherDeduction
=
otherDeduction
.
add
(
item
.
getSalaryMoney
());
}
if
(
SalaryConstants
.
PERSONAL_FUND_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
otherDeduction
=
otherDeduction
.
add
(
item
.
getSalaryMoney
());
}
// 企业(职业)年金
if
(
SalaryConstants
.
ENTERPRISE_ANNUITY_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
otherDeduction
=
otherDeduction
.
add
(
item
.
getSalaryMoney
());
}
// 免个税个人代扣
if
(
SalaryConstants
.
EXEMPTION_PERSION_TAX_JAVA
.
equals
(
item
.
getJavaFiedName
()))
{
otherDeduction
=
otherDeduction
.
add
(
item
.
getSalaryMoney
());
}
return
otherDeduction
;
}
/**
/**
* @param itemList
* @param itemList
...
@@ -1364,11 +1434,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1364,11 +1434,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @author hgw
* @author hgw
*/
*/
public
static
String
checkYearFinalStyle
(
boolean
isActual
,
List
<
TSalaryAccountItem
>
asList
,
BigDecimal
sdSum
public
static
String
checkYearFinalStyle
(
boolean
isActual
,
List
<
TSalaryAccountItem
>
asList
,
BigDecimal
sdSum
,
BigDecimal
costReduction
,
List
<
TSalaryTaxConfig
>
personTax
,
BigDecimal
costReduction
,
List
<
TSalaryTaxConfig
>
personTax
,
List
<
TSalaryTaxConfig
>
actualTax
,
List
<
TSalaryAccountItem
>
saiList
,
BigDecimal
annualBonus
,
List
<
TSalaryAccountItem
>
saiList
,
BigDecimal
annualBonus
,
List
<
TSalaryTaxConfig
>
annousTax
,
TSalaryAccount
a
)
{
,
List
<
TSalaryTaxConfig
>
annousTax
,
TSalaryAccount
a
)
{
BigDecimal
finalSalaryWithSalary
=
calculation2PersonSalary
(
isActual
,
saiList
,
asList
,
sdSum
BigDecimal
finalSalaryWithSalary
=
calculation2PersonSalary
(
isActual
,
saiList
,
asList
,
sdSum
,
costReduction
,
personTax
,
saiList
,
a
);
,
costReduction
,
personTax
,
actualTax
,
saiList
,
a
);
BigDecimal
finalSalaryNoSalary
=
calculation2FinalSalary
(
a
,
annualBonus
,
annousTax
);
BigDecimal
finalSalaryNoSalary
=
calculation2FinalSalary
(
a
,
annualBonus
,
annousTax
);
if
(
finalSalaryWithSalary
.
compareTo
(
finalSalaryNoSalary
)
>
SalaryConstants
.
EQUAL
)
{
if
(
finalSalaryWithSalary
.
compareTo
(
finalSalaryNoSalary
)
>
SalaryConstants
.
EQUAL
)
{
return
"1"
;
return
"1"
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
cedf1238
...
@@ -408,15 +408,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -408,15 +408,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
account
.
setId
(
sendParam
.
getFd_3b10af838eab5c
());
account
.
setId
(
sendParam
.
getFd_3b10af838eab5c
());
// 社保
// 社保
if
((
Common
.
isNotNull
(
sendParam
.
get
UnitSocial
())
if
((
Common
.
isNotNull
(
sendParam
.
get
Fd_3bcd41d857b764
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
get
UnitSocial
()))
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
get
Fd_3bcd41d857b764
()))
||(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce48a9735c
())
||(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce48a9735c
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce48a9735c
())))
{
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce48a9735c
())))
{
doSendForecastSocialToEkp
(
sendParam
,
s
);
doSendForecastSocialToEkp
(
sendParam
,
s
);
}
}
// 公积金
// 公积金
if
((
Common
.
isNotNull
(
sendParam
.
get
UnitFund
())
if
((
Common
.
isNotNull
(
sendParam
.
get
Fd_3bcd41d77e4812
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
get
UnitFund
()))
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
get
Fd_3bcd41d77e4812
()))
||
(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce4b7fc42a
())
||
(
Common
.
isNotNull
(
sendParam
.
getFd_3b16ce4b7fc42a
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce4b7fc42a
())))
{
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
sendParam
.
getFd_3b16ce4b7fc42a
())))
{
doSendForecastFundToEkp
(
sendParam
,
s
);
doSendForecastFundToEkp
(
sendParam
,
s
);
...
@@ -627,7 +627,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -627,7 +627,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 生成月份
// 生成月份
socialParam
.
setFd_3adfe8cb96c41e
(
account
.
getDeduSocialMonth
());
socialParam
.
setFd_3adfe8cb96c41e
(
account
.
getDeduSocialMonth
());
// 预估单位合计
// 预估单位合计
socialParam
.
setFd_3adfeb4e8064a8
(
account
.
get
UnitSocial
());
socialParam
.
setFd_3adfeb4e8064a8
(
account
.
get
Fd_3bcd41d857b764
());
// 预估个人合计
// 预估个人合计
socialParam
.
setFd_3adfeb52a4d2e2
(
account
.
getFd_3b16ce48a9735c
());
socialParam
.
setFd_3adfeb52a4d2e2
(
account
.
getFd_3b16ce48a9735c
());
//应收
//应收
...
@@ -764,7 +764,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -764,7 +764,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
//员工身份证
//员工身份证
socialParam
.
setFd_3adfe8c7e4cf7a
(
account
.
getFd_3adfedfb8f76d4
());
socialParam
.
setFd_3adfe8c7e4cf7a
(
account
.
getFd_3adfedfb8f76d4
());
// 预估单位代缴
// 预估单位代缴
socialParam
.
setFd_3adfeb4e8064a8
(
account
.
get
UnitFund
());
socialParam
.
setFd_3adfeb4e8064a8
(
account
.
get
Fd_3bcd41d77e4812
());
// 预估个人代缴
// 预估个人代缴
socialParam
.
setFd_3adfeb52a4d2e2
(
account
.
getFd_3b16ce4b7fc42a
());
socialParam
.
setFd_3adfeb52a4d2e2
(
account
.
getFd_3b16ce4b7fc42a
());
//应收
//应收
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryTaxConfigServiceImpl.java
View file @
cedf1238
...
@@ -55,4 +55,16 @@ public class TSalaryTaxConfigServiceImpl extends ServiceImpl<TSalaryTaxConfigMap
...
@@ -55,4 +55,16 @@ public class TSalaryTaxConfigServiceImpl extends ServiceImpl<TSalaryTaxConfigMap
return
baseMapper
.
getTaxConfigByAnnualBonusList
(
tSalaryTaxConfig
);
return
baseMapper
.
getTaxConfigByAnnualBonusList
(
tSalaryTaxConfig
);
}
}
/**
* @param tSalaryTaxConfig
* @Description: 获取年终奖配置
* @Author: hgw
* @Date: 2019/10/8 14:40
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.entity.TSalaryTaxConfig>
**/
@Override
public
List
<
TSalaryTaxConfig
>
getTaxConfigByActualList
(
TSalaryTaxConfig
tSalaryTaxConfig
)
{
return
baseMapper
.
getTaxConfigByActualList
(
tSalaryTaxConfig
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
View file @
cedf1238
...
@@ -155,6 +155,8 @@ public class SalaryConstants {
...
@@ -155,6 +155,8 @@ public class SalaryConstants {
public
static
final
String
IS_PERSON
=
"个人承担全部税费"
;
public
static
final
String
IS_PERSON
=
"个人承担全部税费"
;
//个人代扣
//个人代扣
public
static
final
String
PDEDUCTION_JAVA
=
"pdeduction"
;
public
static
final
String
PDEDUCTION_JAVA
=
"pdeduction"
;
// 通讯补贴(不计税)
public
static
final
String
PHONE_SUBSIDY_JAVA
=
"phoneSubsidy"
;
// 代扣前缀
// 代扣前缀
public
static
final
String
WITHHOLIDING
=
"withholiding"
;
public
static
final
String
WITHHOLIDING
=
"withholiding"
;
//单位代扣
//单位代扣
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountItemMapper.xml
View file @
cedf1238
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"settlementMonth"
column=
"SETTLEMENT_MONTH"
/>
<result
property=
"settlementMonth"
column=
"SETTLEMENT_MONTH"
/>
<result
property=
"formType"
column=
"FORM_TYPE"
/>
<result
property=
"formType"
column=
"FORM_TYPE"
/>
<result
property=
"annualBonusType"
column=
"ANNUAL_BONUS_TYPE"
/>
</resultMap>
</resultMap>
<!--tSalaryAccountItem简单分页查询-->
<!--tSalaryAccountItem简单分页查询-->
...
@@ -423,7 +424,8 @@
...
@@ -423,7 +424,8 @@
i.IS_TAX,
i.IS_TAX,
a.EMP_IDCARD,
a.EMP_IDCARD,
a.SETTLEMENT_MONTH,
a.SETTLEMENT_MONTH,
a.FORM_TYPE
a.FORM_TYPE,
a.ANNUAL_BONUS_TYPE
FROM
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
...
@@ -453,7 +455,8 @@
...
@@ -453,7 +455,8 @@
i.IS_TAX,
i.IS_TAX,
a.EMP_IDCARD,
a.EMP_IDCARD,
a.SETTLEMENT_MONTH,
a.SETTLEMENT_MONTH,
a.FORM_TYPE
a.FORM_TYPE,
a.ANNUAL_BONUS_TYPE
FROM
FROM
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
t_salary_account_item i left join t_salary_account a on i.SALARY_ACCOUNT_ID = a.ID
<where>
<where>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryTaxConfigMapper.xml
View file @
cedf1238
...
@@ -16,9 +16,7 @@
...
@@ -16,9 +16,7 @@
<result
property=
"startPoint"
column=
"START_POINT"
/>
<result
property=
"startPoint"
column=
"START_POINT"
/>
</resultMap>
</resultMap>
<!--tSalaryTaxConfig简单分页查询-->
<sql
id=
"Base_Column_List"
>
<select
id=
"getTSalaryTaxConfigPage"
resultMap=
"tSalaryTaxConfigMap"
>
SELECT
ID,
ID,
TAXABLE_INCOME_REMARK,
TAXABLE_INCOME_REMARK,
WITHHOLDING_RATE,
WITHHOLDING_RATE,
...
@@ -28,9 +26,9 @@
...
@@ -28,9 +26,9 @@
LEVEL,
LEVEL,
TYPE,
TYPE,
START_POINT
START_POINT
FROM t_salary_tax_config
</sql>
<where
>
<sql
id=
"tSalaryTaxConfig_where"
>
1=1
<if
test=
"tSalaryTaxConfig != null"
>
<if
test=
"tSalaryTaxConfig.id != null and tSalaryTaxConfig.id.trim() != ''"
>
<if
test=
"tSalaryTaxConfig.id != null and tSalaryTaxConfig.id.trim() != ''"
>
AND ID = #{tSalaryTaxConfig.id}
AND ID = #{tSalaryTaxConfig.id}
</if>
</if>
...
@@ -58,90 +56,50 @@
...
@@ -58,90 +56,50 @@
<if
test=
"tSalaryTaxConfig.startPoint != null"
>
<if
test=
"tSalaryTaxConfig.startPoint != null"
>
AND START_POINT = #{tSalaryTaxConfig.startPoint}
AND START_POINT = #{tSalaryTaxConfig.startPoint}
</if>
</if>
</if>
</sql>
<!--tSalaryTaxConfig简单分页查询-->
<select
id=
"getTSalaryTaxConfigPage"
resultMap=
"tSalaryTaxConfigMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_salary_tax_config
<where>
1=1
<include
refid=
"tSalaryTaxConfig_where"
/>
</where>
</where>
</select>
</select>
<!--tSalaryTaxConfig获取个税配置-->
<!--tSalaryTaxConfig获取个税配置-->
<select
id=
"getTaxConfigByPersonList"
resultMap=
"tSalaryTaxConfigMap"
>
<select
id=
"getTaxConfigByPersonList"
resultMap=
"tSalaryTaxConfigMap"
>
SELECT
SELECT
ID,
<include
refid=
"Base_Column_List"
/>
TAXABLE_INCOME_REMARK,
WITHHOLDING_RATE,
QUICK_DEDUCATION,
MIN_INCOME,
MAX_INCOME,
LEVEL,
TYPE,
START_POINT
FROM t_salary_tax_config
FROM t_salary_tax_config
<where>
<where>
TYPE = 0
TYPE = 0
<if
test=
"tSalaryTaxConfig.id != null and tSalaryTaxConfig.id.trim() != ''"
>
<include
refid=
"tSalaryTaxConfig_where"
/>
AND ID = #{tSalaryTaxConfig.id}
</if>
<if
test=
"tSalaryTaxConfig.taxableIncomeRemark != null and tSalaryTaxConfig.taxableIncomeRemark.trim() != ''"
>
AND TAXABLE_INCOME_REMARK = #{tSalaryTaxConfig.taxableIncomeRemark}
</if>
<if
test=
"tSalaryTaxConfig.withholdingRate != null"
>
AND WITHHOLDING_RATE = #{tSalaryTaxConfig.withholdingRate}
</if>
<if
test=
"tSalaryTaxConfig.quickDeducation != null"
>
AND QUICK_DEDUCATION = #{tSalaryTaxConfig.quickDeducation}
</if>
<if
test=
"tSalaryTaxConfig.minIncome != null"
>
AND MIN_INCOME = #{tSalaryTaxConfig.minIncome}
</if>
<if
test=
"tSalaryTaxConfig.maxIncome != null"
>
AND MAX_INCOME = #{tSalaryTaxConfig.maxIncome}
</if>
<if
test=
"tSalaryTaxConfig.level != null"
>
AND LEVEL = #{tSalaryTaxConfig.level}
</if>
<if
test=
"tSalaryTaxConfig.startPoint != null"
>
AND START_POINT = #{tSalaryTaxConfig.startPoint}
</if>
</where>
</where>
</select>
</select>
<!--tSalaryTaxConfig获取年终奖配置-->
<!--tSalaryTaxConfig获取年终奖配置-->
<select
id=
"getTaxConfigByAnnualBonusList"
resultMap=
"tSalaryTaxConfigMap"
>
<select
id=
"getTaxConfigByAnnualBonusList"
resultMap=
"tSalaryTaxConfigMap"
>
SELECT
SELECT
ID,
<include
refid=
"Base_Column_List"
/>
TAXABLE_INCOME_REMARK,
WITHHOLDING_RATE,
QUICK_DEDUCATION,
MIN_INCOME,
MAX_INCOME,
LEVEL,
TYPE,
START_POINT
FROM t_salary_tax_config
FROM t_salary_tax_config
<where>
<where>
TYPE = 1
TYPE = 1
<if
test=
"tSalaryTaxConfig.id != null and tSalaryTaxConfig.id.trim() != ''"
>
<include
refid=
"tSalaryTaxConfig_where"
/>
AND ID = #{tSalaryTaxConfig.id}
</where>
</if>
</select>
<if
test=
"tSalaryTaxConfig.taxableIncomeRemark != null and tSalaryTaxConfig.taxableIncomeRemark.trim() != ''"
>
AND TAXABLE_INCOME_REMARK = #{tSalaryTaxConfig.taxableIncomeRemark}
<!--tSalaryTaxConfig获取实发倒推配置-->
</if>
<select
id=
"getTaxConfigByActualList"
resultMap=
"tSalaryTaxConfigMap"
>
<if
test=
"tSalaryTaxConfig.withholdingRate != null"
>
SELECT
AND WITHHOLDING_RATE = #{tSalaryTaxConfig.withholdingRate}
<include
refid=
"Base_Column_List"
/>
</if>
FROM t_salary_tax_config
<if
test=
"tSalaryTaxConfig.quickDeducation != null"
>
<where>
AND QUICK_DEDUCATION = #{tSalaryTaxConfig.quickDeducation}
TYPE = 2
</if>
<include
refid=
"tSalaryTaxConfig_where"
/>
<if
test=
"tSalaryTaxConfig.minIncome != null"
>
AND MIN_INCOME = #{tSalaryTaxConfig.minIncome}
</if>
<if
test=
"tSalaryTaxConfig.maxIncome != null"
>
AND MAX_INCOME = #{tSalaryTaxConfig.maxIncome}
</if>
<if
test=
"tSalaryTaxConfig.level != null"
>
AND LEVEL = #{tSalaryTaxConfig.level}
</if>
<if
test=
"tSalaryTaxConfig.startPoint != null"
>
AND START_POINT = #{tSalaryTaxConfig.startPoint}
</if>
</where>
</where>
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment