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
694b7e9d
Commit
694b7e9d
authored
Nov 25, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目档案问题优化
parent
8b50aa99
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
24 deletions
+16
-24
EmployeeConstants.java
...ud/plus/v1/yifu/archives/constants/EmployeeConstants.java
+2
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+10
-5
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+4
-19
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java
View file @
694b7e9d
...
...
@@ -52,6 +52,8 @@ public class EmployeeConstants {
public
static
final
String
CONTRACT_REDUCE_INFO_NOT_EMPTY
=
"合同终止时离职日期和减少原因必填"
;
public
static
final
String
CONTRACT_REDUCE_REASON_NOT_EMPTY
=
"终止原因为其他时原因说明必填"
;
/**
* 无数据可更新
**/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
694b7e9d
...
...
@@ -858,11 +858,16 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
EmployeeConstants
.
SITUATION_SIX
.
equals
(
insert
.
getSituation
())
||
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
insert
.
getSituation
()))
{
// 终止 离职日期 和减少原因必填
if
(
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
insert
.
getSituation
())
&&
(
Common
.
isEmpty
(
insert
.
getReduceReason
())
||
Common
.
isEmpty
(
insert
.
getLeaveDate
()))){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CONTRACT_REDUCE_INFO_NOT_EMPTY
));
return
;
if
(
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
insert
.
getSituation
()))
{
if
(
Common
.
isEmpty
(
insert
.
getReduceReason
())
||
Common
.
isEmpty
(
insert
.
getLeaveDate
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CONTRACT_REDUCE_INFO_NOT_EMPTY
));
return
;
}
if
(
EmployeeConstants
.
OTHERS
.
equals
(
insert
.
getReduceReason
())
&&
Common
.
isEmpty
(
insert
.
getReason
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CONTRACT_REDUCE_REASON_NOT_EMPTY
));
return
;
}
}
TEmployeeContractInfo
contractInfo
=
this
.
getOne
(
Wrappers
.<
TEmployeeContractInfo
>
query
().
lambda
()
.
eq
(
TEmployeeContractInfo:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
694b7e9d
...
...
@@ -1506,7 +1506,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List
<
TSalaryAccount
>
aList
=
new
ArrayList
<>();
TSalaryAccount
a
;
//定库:
BigDecimal
relaySalarySum
=
BigDecimal
.
ZERO
;
//工资应发
List
<
TSalaryAccountItem
>
asList
;
//累计扣税
int
size
=
savList
.
size
();
// 自有员工人数
int
ownNum
=
0
;
...
...
@@ -1518,16 +1517,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 是否重复金额false:否;true:是
boolean
repeatFlag
=
false
;
List
<
String
>
idCardList
=
new
ArrayList
<>();
for
(
TSalaryAccountVo
vo
:
savList
)
{
if
(
Common
.
isNotNull
(
vo
.
getEmpIdcard
()))
{
idCardList
.
add
(
vo
.
getEmpIdcard
());
}
}
// 工资查询所需的全部list,组装Map来使用
Map
<
String
,
List
<
TSalaryAccountItem
>>
itemMap
=
tSalaryAccountItemService
.
getAllItemVoList
(
idCardList
,
invoiceTitle
);
TSalaryAccountItem
sai
;
for
(
int
i
=
CommonConstants
.
ZERO_INT
;
i
<
size
;
i
++)
{
a
=
new
TSalaryAccount
();
...
...
@@ -1549,14 +1538,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
//累计扣税list
asList
=
this
.
getLaborAsList
(
itemMap
.
get
(
a
.
getEmpIdcard
()),
a
.
getSettlementMonth
());
// 实发劳务费,按月累计扣税
this
.
saveNewItems
(
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculationLabor
(
saiList
,
asList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
calculationLabor
(
saiList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
// 自有员工以及自有员工应发金额
if
(
Common
.
isNotNull
(
a
.
getOwnFlag
())
&&
a
.
getOwnFlag
()
==
1
)
{
...
...
@@ -1584,6 +1569,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
salary
.
setSalaryMonth
(
DateUtil
.
getThisMonth
());
if
(
haveSalaryFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
...
...
@@ -1612,6 +1598,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
account
.
setSaiList
(
null
);
account
.
setOrderId
(
salary
.
getOrderId
());
account
.
setSalaryFormId
(
salary
.
getId
());
account
.
setSalaryMonth
(
DateUtil
.
getThisMonth
());
tSalaryAccountService
.
save
(
account
);
for
(
TSalaryAccountItem
item
:
saiList
)
{
item
.
setSalaryAccountId
(
account
.
getId
());
...
...
@@ -1629,15 +1616,13 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/**
* @param itemList
* @param itemHistoryList
* @param saiList
* @Description: 计算劳务费个税、应发
* @Author: hgw
* @Date: 2022/3/3 11:30
* @return: java.math.BigDecimal
**/
private
BigDecimal
calculationLabor
(
List
<
TSalaryAccountItem
>
itemList
,
List
<
TSalaryAccountItem
>
itemHistoryList
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccount
a
)
{
private
BigDecimal
calculationLabor
(
List
<
TSalaryAccountItem
>
itemList
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccount
a
)
{
// B7 = 当月实发合计
// 税=ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2)
// 本次实发
...
...
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