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
099726a9
Commit
099726a9
authored
Feb 20, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险优化修改
parent
f499bdf4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
106 additions
and
46 deletions
+106
-46
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+46
-45
DoJointInsuranceTask.java
...ud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
+60
-1
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
099726a9
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
View file @
099726a9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
util
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
...
...
@@ -30,6 +34,7 @@ import org.springframework.stereotype.Component;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -69,7 +74,11 @@ public class DoJointInsuranceTask {
@Autowired
private
TUpdateStatusErrorMapper
updateStatusErrorMapper
;
/**
@Autowired
private
ArchivesDaprUtil
archivesDaprUtil
;
/**
* @Description: 商险明细推送
* @Author: huyc
* @Date: 2022-11-30
...
...
@@ -470,4 +479,54 @@ public class DoJointInsuranceTask {
log
.
error
(
"薪资结算状态更新异常"
,
e
);
}
}
/**
* @param sourceList
* @Description: // 同步操作档案的 商险状态为:3失效(0无2正常3失效4处理中)
* @Author: hgw
* @Date: 2022/11/23 15:46
* @return: void
**/
@Async
public
void
updateEmpInfp
(
List
<
TInsuranceDetail
>
sourceList
,
String
status
)
{
EmpStatusVo
empStatusVo
=
new
EmpStatusVo
();
EmpIdCardAndDeptVo
empIdCardAndDeptVo
;
List
<
EmpIdCardAndDeptVo
>
voList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
d
:
sourceList
)
{
empIdCardAndDeptVo
=
new
EmpIdCardAndDeptVo
();
empIdCardAndDeptVo
.
setIdCard
(
d
.
getEmpIdcardNo
());
empIdCardAndDeptVo
.
setDeptNo
(
d
.
getDeptNo
());
empIdCardAndDeptVo
.
setStatus
(
status
);
voList
.
add
(
empIdCardAndDeptVo
);
}
empStatusVo
.
setEmpInfo
(
voList
);
archivesDaprUtil
.
updateEmployeeInsuranceStatus
(
empStatusVo
);
archivesDaprUtil
.
updateEmployeeInfoInsuranceStatus
(
empStatusVo
);
}
/**
* @Description: 商险明细推送
* @Author: huyc
* @Date: 2022-11-30
* @return: void
**/
@Async
public
void
pushEstime
(
List
<
TInsuranceDetail
>
successList
)
{
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
for
(
TInsuranceDetail
tInsuranceDetail
:
successList
)
{
//如果是合并计算则推送至EKP
if
(
CommonConstants
.
ZERO_INT
==
tInsuranceDetail
.
getSettleType
())
{
//存储成功后发送给EKP
String
s
=
pushEstimate
(
tInsuranceDetail
,
CommonConstants
.
ONE_INT
);
if
(
StringUtils
.
isNotBlank
(
s
))
{
LambdaUpdateWrapper
<
TInsuranceSettle
>
settleWrapper
=
new
LambdaUpdateWrapper
<>();
settleWrapper
.
eq
(
TInsuranceSettle:
:
getId
,
tInsuranceDetail
.
getDefaultSettleId
())
.
set
(
TInsuranceSettle:
:
getIsEstimatePush
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceSettle:
:
getEstimatePushTime
,
LocalDateTime
.
now
());
//更新结算信息表
tInsuranceSettleService
.
update
(
settleWrapper
);
}
}
}
}
}
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