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
3115af61
Commit
3115af61
authored
Jul 30, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hyc-切成测试环境商险配置
parent
94ee2077
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
EkpSalaryInfoServiceImpl.java
...ud/plus/v1/ekp/service/impl/EkpSalaryInfoServiceImpl.java
+28
-3
No files found.
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpSalaryInfoServiceImpl.java
View file @
3115af61
...
...
@@ -8,6 +8,7 @@ import com.alibaba.excel.util.ListUtils;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo
;
import
com.yifu.cloud.plus.v1.ekp.mapper.EkpManagerInfoMapper
;
import
com.yifu.cloud.plus.v1.ekp.mapper.EkpSalaryInfoMapper
;
import
com.yifu.cloud.plus.v1.ekp.service.EkpSalaryInfoService
;
import
com.yifu.cloud.plus.v1.ekp.vo.ClaimInfotVO
;
...
...
@@ -16,6 +17,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -34,8 +36,11 @@ import java.util.stream.Collectors;
*/
@Log4j2
@Service
@RequiredArgsConstructor
public
class
EkpSalaryInfoServiceImpl
extends
ServiceImpl
<
EkpSalaryInfoMapper
,
EkpSalaryInfo
>
implements
EkpSalaryInfoService
{
private
final
EkpManagerInfoMapper
managerInfoMapper
;
/**
//@Description: 工资明细推送至ekp
//@Author: huyc
...
...
@@ -327,6 +332,7 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
String
deptName
;
BigDecimal
money
;
ClaimRebackInfotVO
info
;
EkpDeptInfoVo
deptInfo
;
// 执行数据插入操作 组装 PostDto
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
excel
=
excelVOList
.
get
(
i
);
...
...
@@ -335,6 +341,16 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
deptName
=
excel
.
getDeptName
();
ClaimRebackInfotVO
backInfo
=
new
ClaimRebackInfotVO
();
//根据项目编码获取ekp所有项目信息
deptInfo
=
managerInfoMapper
.
getEkpDeptInfoByNo
(
deptNo
);
if
(
Common
.
isNotNull
(
deptInfo
)
&&
!
deptName
.
equals
(
deptInfo
.
getDeptName
()))
{
backInfo
.
setDeptName
(
deptName
);
backInfo
.
setDeptNo
(
deptNo
);
backInfo
.
setErrorInfo
(
"系统中的项目编码对应的项目名称和模板中不一致!"
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
backInfo
.
getErrorInfo
(),
backInfo
));
continue
;
}
if
(
money
.
compareTo
(
BigDecimal
.
ZERO
)
>=
0
)
{
//先找到彭超创建的款项认领明细
info
=
baseMapper
.
getClaimInfoByDeptNo
(
deptNo
,
"1"
);
...
...
@@ -371,17 +387,17 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
info
.
setAfterAdjustMoney
(
BigDecimal
.
ZERO
);
money
=
info
.
getSurMoney
().
add
(
money
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
info
.
getErrorInfo
(),
info
));
this
.
subSwitch
(
deptNo
,
backInfo
,
errorMessageList
,
money
,
deptName
,
excel
);
this
.
subSwitch
(
deptNo
,
backInfo
,
errorMessageList
,
money
,
deptName
,
excel
,
"2"
);
}
}
else
{
this
.
subSwitch
(
deptNo
,
backInfo
,
errorMessageList
,
money
,
deptName
,
excel
);
this
.
subSwitch
(
deptNo
,
backInfo
,
errorMessageList
,
money
,
deptName
,
excel
,
"1"
);
}
}
}
}
public
void
subSwitch
(
String
deptNo
,
ClaimRebackInfotVO
backInfo
,
List
<
ErrorMessage
>
errorMessageList
,
BigDecimal
money
,
String
deptName
,
ClaimInfotVO
excel
)
{
BigDecimal
money
,
String
deptName
,
ClaimInfotVO
excel
,
String
flag
)
{
List
<
ClaimRebackInfotVO
>
infoList
=
baseMapper
.
getClaimBigInfoByDeptNoAndUser
(
deptNo
);
if
(
Optional
.
ofNullable
(
infoList
).
isPresent
())
{
for
(
ClaimRebackInfotVO
subInfo
:
infoList
)
{
...
...
@@ -399,6 +415,15 @@ public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, E
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
subInfo
.
getErrorInfo
(),
subInfo
));
}
}
}
else
{
if
(
"1"
.
equals
(
flag
))
{
backInfo
.
setDeptName
(
deptName
);
backInfo
.
setDeptNo
(
deptNo
);
backInfo
.
setAdjustMoney
(
money
);
backInfo
.
setErrorInfo
(
"未找到该项目对应的款项认领明细"
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
backInfo
.
getErrorInfo
(),
backInfo
));
return
;
}
}
if
(
BigDecimal
.
ZERO
.
compareTo
(
money
)
>
0
)
{
backInfo
.
setDeptNo
(
deptNo
);
...
...
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