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
c127f9f0
Commit
c127f9f0
authored
Jul 19, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hyc-项目余额调整
parent
a5ddf7c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
20 deletions
+10
-20
EkpSalaryInfoServiceImpl.java
...ud/plus/v1/ekp/service/impl/EkpSalaryInfoServiceImpl.java
+6
-16
EkpSalaryInfoMapper.xml
...ekp-biz/src/main/resources/mapper/EkpSalaryInfoMapper.xml
+4
-4
No files found.
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpSalaryInfoServiceImpl.java
View file @
c127f9f0
...
...
@@ -335,7 +335,7 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
deptName
=
excel
.
getDeptName
();
ClaimRebackInfotVO
backInfo
=
new
ClaimRebackInfotVO
();
if
(
money
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(
money
.
compareTo
(
BigDecimal
.
ZERO
)
>
=
0
)
{
//先找到彭超创建的款项认领明细
info
=
baseMapper
.
getClaimInfoByDeptNo
(
deptNo
,
"1"
);
//调整金额大于零的先找到彭超创建的款项认领明细直接加
...
...
@@ -362,7 +362,7 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
//调整金额小于零的先找到剩余金额大于零的彭超创建的款项认领明细去扣减
info
=
baseMapper
.
getClaimInfoByDeptNo
(
deptNo
,
"3"
);
if
(
Optional
.
ofNullable
(
info
).
isPresent
())
{
if
(
BigDecimalUtils
.
safeAdd
(
info
.
getSurMoney
(),
money
).
compareTo
(
BigDecimal
.
ZERO
)
>=
0
)
{
if
(
info
.
getSurMoney
().
add
(
money
).
compareTo
(
BigDecimal
.
ZERO
)
>=
0
)
{
info
.
setAdjustMoney
(
money
);
info
.
setAfterAdjustMoney
(
BigDecimalUtils
.
safeAdd
(
info
.
getSurMoney
(),
money
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
info
.
getErrorInfo
(),
info
));
...
...
@@ -376,31 +376,21 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
}
}
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public
String
dateStringInsert
(
String
month
)
{
StringBuilder
sb
=
new
StringBuilder
(
month
);
sb
.
insert
(
4
,
"-"
);
return
sb
.
toString
();
}
public
void
subSwitch
(
String
deptNo
,
ClaimRebackInfotVO
backInfo
,
List
<
ErrorMessage
>
errorMessageList
,
BigDecimal
money
,
String
deptName
,
ClaimInfotVO
excel
)
{
List
<
ClaimRebackInfotVO
>
infoList
=
baseMapper
.
getClaimBigInfoByDeptNoAndUser
(
deptNo
);
if
(
Optional
.
ofNullable
(
infoList
).
isPresent
())
{
for
(
ClaimRebackInfotVO
subInfo
:
infoList
)
{
//分批去减去金额
if
(
BigDecimalUtils
.
safeAdd
(
subInfo
.
getSurMoney
(),
money
).
compareTo
(
BigDecimal
.
ZERO
)
>=
0
)
{
if
(
subInfo
.
getSurMoney
().
add
(
money
).
compareTo
(
BigDecimal
.
ZERO
)
>=
0
)
{
subInfo
.
setAdjustMoney
(
money
);
subInfo
.
setAfterAdjustMoney
(
BigDecimalUtils
.
safe
Subtract
(
subInfo
.
getSurMoney
(),
money
));
subInfo
.
setAfterAdjustMoney
(
BigDecimalUtils
.
safe
Add
(
subInfo
.
getSurMoney
(),
money
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
subInfo
.
getErrorInfo
(),
subInfo
));
break
;
}
else
{
subInfo
.
setAdjustMoney
(
subInfo
.
getSurMoney
()
);
subInfo
.
setAdjustMoney
(
money
);
subInfo
.
setAfterAdjustMoney
(
BigDecimal
.
ZERO
);
money
=
BigDecimalUtils
.
safeAdd
(
subInfo
.
getSurMoney
(),
money
);
money
=
subInfo
.
getSurMoney
().
add
(
money
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
subInfo
.
getErrorInfo
(),
subInfo
));
}
}
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpSalaryInfoMapper.xml
View file @
c127f9f0
...
...
@@ -158,8 +158,8 @@
fd_3afb4c634ebd08 claimNo,
fd_3afb46ab98d9a8 claimMoney,
fd_3afb46ac507904 cancelMoney,
fd_3afb46d05d19ec
surMoney,
DATE_FORMAT(fd_3b5f41db9fb154,'%Y-%m-%d') claimTime
ifnull(fd_3afb46d05d19ec,0)
surMoney,
DATE_FORMAT(fd_3b5f41db9fb154,'%Y-%m-%d
%H:%i
') claimTime
from
ekp_94b6cd1535e4b34865c8
where
...
...
@@ -184,8 +184,8 @@
fd_3afb4c634ebd08 claimNo,
fd_3afb46ab98d9a8 claimMoney,
fd_3afb46ac507904 cancelMoney,
fd_3afb46d05d19ec
surMoney,
DATE_FORMAT(fd_3b5f41db9fb154,'%Y-%m-%d') claimTime
ifnull(fd_3afb46d05d19ec,0)
surMoney,
DATE_FORMAT(fd_3b5f41db9fb154,'%Y-%m-%d
%H:%i
') claimTime
from
ekp_94b6cd1535e4b34865c8
where
...
...
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