Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
a645bdd5
Commit
a645bdd5
authored
Jun 12, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.7.24 - 年终奖、实发
parent
64940e92
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
6 deletions
+63
-6
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+42
-6
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+21
-0
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
a645bdd5
...
...
@@ -606,6 +606,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 年终奖是否已存在 (true:已存在,不可导入)
boolean
yearEndError
=
false
;
// 薪资数据校验失败
boolean
salaryValidateError
=
false
;
// 年终奖错误信息合计:
List
<
ErrorMessage
>
errorInfo
=
new
ArrayList
<>();
// 劳务费、稿酬是否含有发薪false:否;true:是
...
...
@@ -859,13 +861,47 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(!
isActual
)
{
//导入应发,顺推实发
// 个人实发合计
BigDecimal
actualSalaryCalc
=
calculation
(
a
,
relaySalary
,
saiList
);
if
(
actualSalaryCalc
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
if
(!
salaryValidateError
)
{
salaryValidateError
=
true
;
}
errorInfo
.
add
(
new
ErrorMessage
((
i
+
2
),
"第"
+
(
i
+
2
)
+
"行:"
+
(
Common
.
isNotNull
(
a
.
getEmpIdcard
())
?
a
.
getEmpIdcard
()
:
a
.
getEmpName
())
+
"实发工资不能小于0"
));
}
else
{
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
ACTUAL_SALARY_SUM
,
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
,
calculation
(
a
,
relaySalary
,
saiList
),
CommonConstants
.
ZERO_INT
);
actualSalaryCalc
,
CommonConstants
.
ZERO_INT
);
}
}
else
{
for
(
TSalaryAccountItem
actualItem
:
saiList
)
{
if
(
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
.
equals
(
actualItem
.
getJavaFiedName
())
&&
actualItem
.
getSalaryMoney
()
!=
null
&&
actualItem
.
getSalaryMoney
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
if
(!
salaryValidateError
)
{
salaryValidateError
=
true
;
}
errorInfo
.
add
(
new
ErrorMessage
((
i
+
2
),
"第"
+
(
i
+
2
)
+
"行:"
+
(
Common
.
isNotNull
(
a
.
getEmpIdcard
())
?
a
.
getEmpIdcard
()
:
a
.
getEmpName
())
+
"实发工资不能小于0"
));
break
;
}
}
}
if
(
relaySalary
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
relaySalary
=
a
.
getRelaySalary
();
}
if
(
annualBonus
!=
null
&&
annualBonus
.
compareTo
(
SalaryConstants
.
B_ZERO
)
!=
SalaryConstants
.
EQUAL
&&
relaySalary
!=
null
&&
relaySalary
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
annualBonus
.
compareTo
(
relaySalary
)
>
0
)
{
if
(!
salaryValidateError
)
{
salaryValidateError
=
true
;
}
errorInfo
.
add
(
new
ErrorMessage
((
i
+
2
),
"第"
+
(
i
+
2
)
+
"行:"
+
(
Common
.
isNotNull
(
a
.
getEmpIdcard
())
?
a
.
getEmpIdcard
()
:
a
.
getEmpName
())
+
"年终奖不能大于工资应发"
));
}
//计算个人社保、公积金欠款————工资不够扣缴社保的
if
(
relaySalary
.
compareTo
(
personalDebt
)
<
SalaryConstants
.
EQUAL
)
{
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
PERSONAL_DEBT
,
...
...
@@ -881,6 +917,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
yearEndError
)
{
return
new
R
<>(
CommonConstants
.
TWO_INT
,
"年终奖重复"
,
errorInfo
);
}
if
(
salaryValidateError
)
{
return
new
R
<>(
CommonConstants
.
TWO_INT
,
"薪资数据校验失败"
,
errorInfo
);
}
salary
.
setOwnNums
(
ownNum
);
salary
.
setOwnMoney
(
ownMoney
);
TSalaryDetailVo
salaryDetailVo
=
new
TSalaryDetailVo
();
...
...
@@ -1091,9 +1130,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
sum
=
realSalary
.
subtract
(
sum
).
setScale
(
SalaryConstants
.
PLACES
,
RoundingMode
.
HALF_UP
);
if
(
sum
.
compareTo
(
SalaryConstants
.
B_ZERO
)
<
SalaryConstants
.
EQUAL
)
{
sum
=
SalaryConstants
.
B_ZERO
;
}
a
.
setActualSalary
(
sum
);
return
sum
;
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
a645bdd5
...
...
@@ -135,6 +135,7 @@ public class SalaryAccountUtil implements Serializable {
BigDecimal
money3500
=
new
BigDecimal
(
"3500"
);
//特殊金额3500
BigDecimal
money5000
=
new
BigDecimal
(
"5000"
);
//特殊金额5000
BigDecimal
actualSalarySum
;
//实发工资
BigDecimal
annualBonus
;
//年终奖
// 当前年月
String
nowMonth
=
DateUtil
.
addMonth
(
CommonConstants
.
ZERO_INT
);
String
must
;
...
...
@@ -181,6 +182,7 @@ public class SalaryAccountUtil implements Serializable {
relaySalary
=
null
;
phoneSubsidy
=
null
;
actualSalarySum
=
null
;
annualBonus
=
null
;
entity
.
setSettlementMonth
(
nowMonth
);
for
(
Map
.
Entry
<
String
,
TSalaryConfigStandard
>
entry
:
salaryConfigMap
.
entrySet
())
{
cellValueObj
=
getFieldValueByName
(
entry
.
getKey
(),
temp
);
...
...
@@ -199,6 +201,14 @@ public class SalaryAccountUtil implements Serializable {
}
if
(
SalaryConstants
.
ANNUAL_BONUS_JAVA
.
equals
(
scs
.
getJavaFiedName
())
&&
Common
.
isNotNull
(
cellValueStr
))
{
annualBonusFlag
=
true
;
try
{
annualBonus
=
new
BigDecimal
(
cellValueStr
.
replace
(
","
,
""
));
}
catch
(
Exception
e
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
dataRow
)
+
"行:年终奖:'"
+
cellValueStr
+
"'错误,请检查数据"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
dataRow
),
error
));
continue
;
}
}
if
(
SalaryConstants
.
PHONE_SUBSIDY_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
phoneSubsidyMoney
=
NumberUtils
.
createBigDecimal
(
cellValueStr
);
...
...
@@ -416,6 +426,17 @@ public class SalaryAccountUtil implements Serializable {
errorList
.
add
(
new
ErrorMessage
((
i
+
dataRow
),
error
));
continue
;
}
if
(
annualBonus
!=
null
&&
relaySalary
!=
null
&&
annualBonus
.
compareTo
(
relaySalary
)
>
0
)
{
error
=
"第"
+
(
i
+
dataRow
)
+
"行:年终奖不能大于工资应发,请修改"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
dataRow
),
error
));
continue
;
}
if
(
actualSalarySum
!=
null
&&
actualSalarySum
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
error
=
"第"
+
(
i
+
dataRow
)
+
"行:实发工资不能小于0"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
dataRow
),
error
));
continue
;
}
if
(
"3"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
error
=
"第"
+
(
i
+
dataRow
)
+
"行:【劳务费】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
dataRow
),
error
));
...
...
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