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
523ffe01
Commit
523ffe01
authored
Feb 20, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.1' into MVP1.5.1
parents
724c1d6e
9b58c4ca
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
67 deletions
+142
-67
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+1
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+65
-50
DoJointInsuranceTask.java
...ud/plus/v1/yifu/insurances/util/DoJointInsuranceTask.java
+76
-17
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
523ffe01
...
...
@@ -17,6 +17,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
523ffe01
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 @
523ffe01
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,6 +74,10 @@ public class DoJointInsuranceTask {
@Autowired
private
TUpdateStatusErrorMapper
updateStatusErrorMapper
;
@Autowired
private
ArchivesDaprUtil
archivesDaprUtil
;
/**
* @Description: 商险明细推送
* @Author: huyc
...
...
@@ -96,6 +105,22 @@ public class DoJointInsuranceTask {
log
.
info
(
"推送商险明细到EKP结束"
);
}
/**
* 保存失败信息
*
* @author zhaji
* @param
* @return {@link String}
*/
private
void
saveInsuranceEkp
(
EkpInteractiveParam
param
,
Integer
pushType
){
TInsuranceEkp
ekp
=
new
TInsuranceEkp
();
BeanCopyUtils
.
copyProperties
(
param
,
ekp
);
ekp
.
setId
(
null
);
ekp
.
setCreateTime
(
LocalDateTime
.
now
());
ekp
.
setPushType
(
pushType
);
tInsuranceEkpService
.
save
(
ekp
);
}
/**
* 推送EKP
*
...
...
@@ -188,22 +213,6 @@ public class DoJointInsuranceTask {
}
}
/**
* 保存失败信息
*
* @author zhaji
* @param
* @return {@link String}
*/
private
void
saveInsuranceEkp
(
EkpInteractiveParam
param
,
Integer
pushType
){
TInsuranceEkp
ekp
=
new
TInsuranceEkp
();
BeanCopyUtils
.
copyProperties
(
param
,
ekp
);
ekp
.
setId
(
null
);
ekp
.
setCreateTime
(
LocalDateTime
.
now
());
ekp
.
setPushType
(
pushType
);
tInsuranceEkpService
.
save
(
ekp
);
}
@Async
public
void
updateInsuranceSettleStatus
(
EkpStatusParamVo
vo
)
{
try
{
...
...
@@ -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