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
8073e452
Commit
8073e452
authored
Aug 14, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-商险自动化逻辑调整
parent
fa7fc4a8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
61 deletions
+107
-61
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+1
-1
TEmployeePreLogServiceImpl.java
...ifu/archives/service/impl/TEmployeePreLogServiceImpl.java
+26
-19
TEmployeeInsurancePreController.java
...nsurances/controller/TEmployeeInsurancePreController.java
+13
-0
TEmployeeInsurancePreService.java
...ances/service/insurance/TEmployeeInsurancePreService.java
+8
-0
TEmployeeInsurancePreServiceImpl.java
...vice/insurance/impl/TEmployeeInsurancePreServiceImpl.java
+15
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+44
-41
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
8073e452
...
...
@@ -567,7 +567,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
// 1:存在商险,判断合规性+日期+五个不同等:
if
(
Common
.
isNotNull
(
employeeRegistrationPre
.
getServerItem
())
&&
employeeRegistrationPre
.
getServerItem
().
contains
(
"商险"
))
{
//商险是否购买为
否
时增加校验
//商险是否购买为
是
时增加校验
if
(
Common
.
isNotNull
(
employeeRegistrationPre
.
getInsuranceIsBuy
())
&&
employeeRegistrationPre
.
getInsuranceIsBuy
().
equals
(
CommonConstants
.
ZERO_STRING
)
&&
!
employeeRegistrationPre
.
getExitInsuranceInfoList
().
isEmpty
())
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeePreLogServiceImpl.java
View file @
8073e452
...
...
@@ -243,26 +243,33 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
oldMap
=
new
HashMap
<>();
}
List
<
TEmployeeInsurancePre
>
saveOrUpdateList
=
new
ArrayList
<>();
// 是否修改了商险
boolean
isModifyInsurance
=
false
;
TEmployeeInsurancePre
oldInsurance
;
String
differenceInsuranceKey
;
TEmployeePreLogDetail
detailInsuranceLog
;
if
(
Common
.
isEmpty
(
isBuyOld
)
||
(
Common
.
isNotNull
(
isBuyOld
)
&&
!
isBuyOld
.
equals
(
isBuyNew
)))
{
//单独记录是否已购买商险的变更记录
differenceInsuranceKey
=
"insuranceIsBuy"
;
detailInsuranceLog
=
new
TEmployeePreLogDetail
();
detailInsuranceLog
.
setModelType
(
CommonConstants
.
TWO_STRING
);
detailInsuranceLog
.
setType
(
CommonConstants
.
TWO_STRING
);
Map
<
String
,
Object
>
old
=
new
HashMap
<>();
old
.
put
(
"insuranceIsBuy"
,
isBuyOld
);
Map
<
String
,
Object
>
simNew
=
new
HashMap
<>();
simNew
.
put
(
"insuranceIsBuy"
,
isBuyNew
);
this
.
setLogBaseInfo
(
empPreId
,
old
,
simNew
,
user
,
differenceInsuranceKey
,
logId
,
detailInsuranceLog
);
isModifyInsurance
=
true
;
detailList
.
add
(
detailInsuranceLog
);
}
//如果是否已购买商险为是,则需要处理商险明细数据
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
isBuyNew
))
{
newInfo
.
setId
(
empPreId
);
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
()
,
"/temployeeinsurancepre/inner/updateInfoSaveInsurancePreInfo"
,
newInfo
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
if
(
newList
!=
null
&&
!
newList
.
isEmpty
())
{
// 是否修改了商险
boolean
isModifyInsurance
=
false
;
TEmployeeInsurancePre
oldInsurance
;
String
differenceInsuranceKey
;
TEmployeePreLogDetail
detailInsuranceLog
;
if
(
Common
.
isEmpty
(
isBuyOld
)
||(
Common
.
isNotNull
(
isBuyOld
)
&&
!
isBuyOld
.
equals
(
isBuyNew
)))
{
//单独记录是否已购买商险的变更记录
differenceInsuranceKey
=
"insuranceIsBuy"
;
detailInsuranceLog
=
new
TEmployeePreLogDetail
();
detailInsuranceLog
.
setModelType
(
CommonConstants
.
TWO_STRING
);
detailInsuranceLog
.
setType
(
CommonConstants
.
TWO_STRING
);
Map
<
String
,
Object
>
old
=
new
HashMap
<>();
old
.
put
(
"insuranceIsBuy"
,
isBuyOld
);
Map
<
String
,
Object
>
simNew
=
new
HashMap
<>();
simNew
.
put
(
"insuranceIsBuy"
,
isBuyNew
);
this
.
setLogBaseInfo
(
empPreId
,
old
,
simNew
,
user
,
differenceInsuranceKey
,
logId
,
detailInsuranceLog
);
isModifyInsurance
=
true
;
detailList
.
add
(
detailInsuranceLog
);
}
for
(
TEmployeeInsurancePre
newInsurance
:
newList
)
{
differenceInsuranceKey
=
null
;
if
(
Common
.
isNotNull
(
newInsurance
.
getModelType
()))
{
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TEmployeeInsurancePreController.java
View file @
8073e452
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
...
...
@@ -187,6 +188,18 @@ public class TEmployeeInsurancePreController {
return
tEmployeeInsurancePreService
.
saveInsurancePreInfo
(
preVo
);
}
/**
* 信息修改入口新增商险已购买明细
* @author huych
* @date 2025-08-14 11:46:16
**/
@Operation
(
description
=
"信息修改入口新增商险已购买明细"
)
@Inner
@PostMapping
(
"/inner/updateInfoSaveInsurancePreInfo"
)
public
Boolean
updateInfoSaveInsurancePreInfo
(
@RequestBody
EmployeeRegistrationPre
pre
)
{
return
tEmployeeInsurancePreService
.
updateInfoSaveInsurancePreInfo
(
pre
);
}
/**
* 商险状态是否正常判断
* @author huych
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TEmployeeInsurancePreService.java
View file @
8073e452
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre
;
...
...
@@ -68,6 +69,13 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
*/
Boolean
saveInsurancePreInfo
(
EmployeeRegistrationPreVo
preVo
);
/**
* 信息修改入口新增商险待购买信息
* @param pre
* @return
*/
Boolean
updateInfoSaveInsurancePreInfo
(
EmployeeRegistrationPre
pre
);
Boolean
checkExitInsuanceIsProcess
(
EmployeeRegistrationPreVo
preVo
);
TEmployeeInsuranceSelectVo
selectInsurancePreInfoList
(
TEmployeeInsurancePreVo
preVo
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TEmployeeInsurancePreServiceImpl.java
View file @
8073e452
...
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainRegistListVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants
;
...
...
@@ -619,6 +620,20 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return
true
;
}
@Override
public
Boolean
updateInfoSaveInsurancePreInfo
(
EmployeeRegistrationPre
registrationPre
)
{
if
(
Common
.
isNotNull
(
registrationPre
.
getInsuranceIsBuy
())
&&
registrationPre
.
getInsuranceIsBuy
().
equals
(
CommonConstants
.
ZERO_STRING
)
&&
!
registrationPre
.
getExitInsuranceInfoList
().
isEmpty
())
{
//删除已存在的入职确认信息对应的商险明细
preDetailService
.
remove
(
Wrappers
.<
TInsurancePreDetail
>
lambdaQuery
()
.
eq
(
TInsurancePreDetail:
:
getRegisterId
,
registrationPre
.
getId
()));
//批量新增
preDetailService
.
saveBatch
(
registrationPre
.
getExitInsuranceInfoList
());
}
return
true
;
}
@Override
public
Boolean
checkExitInsuanceIsProcess
(
EmployeeRegistrationPreVo
preVo
)
{
//如果状态有变动就会拦截
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
8073e452
...
...
@@ -3254,6 +3254,50 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
}
//非自动化派单才需要进行这些校验
if
(
Common
.
isEmpty
(
param
.
getPolicyStart
())
&&
Common
.
isEmpty
(
param
.
getPolicyEnd
()))
{
//保单开始日期、结束日期,根据保单号到t_insurance_policy表查询的 1128需求调整改造
TInsurancePolicy
limitOne
=
tInsurancePolicyService
.
getOne
(
Wrappers
.<
TInsurancePolicy
>
query
().
lambda
()
.
eq
(
TInsurancePolicy:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsurancePolicy:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(!
Optional
.
ofNullable
(
limitOne
).
isPresent
())
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
//自动化派单的取自动化派单的起止日期
if
(
Common
.
isEmpty
(
param
.
getPolicyStart
())
&&
Common
.
isEmpty
(
param
.
getPolicyEnd
()))
{
param
.
setPolicyStart
(
limitOne
.
getPolicyStart
());
param
.
setPolicyEnd
(
limitOne
.
getPolicyEnd
());
}
if
(
limitOne
.
getEnableFlag
()
==
CommonConstants
.
ONE_INT
)
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_FORBIDDEN
);
listResult
.
add
(
param
);
continue
;
}
if
(!
limitOne
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
if
(!
limitOne
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isFutureDate
(
limitOne
.
getPolicyEnd
().
toString
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_SHOULD_IS_FUTURE
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
compareDate
(
limitOne
.
getPolicyStart
().
toString
(),
limitOne
.
getPolicyEnd
().
toString
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_SHOULD_LESS_THAN_POLICY_END
);
listResult
.
add
(
param
);
continue
;
}
}
}
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
...
...
@@ -3307,47 +3351,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
}
//保单开始日期、结束日期,根据保单号到t_insurance_policy表查询的 1128需求调整改造
TInsurancePolicy
limitOne
=
tInsurancePolicyService
.
getOne
(
Wrappers
.<
TInsurancePolicy
>
query
().
lambda
()
.
eq
(
TInsurancePolicy:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsurancePolicy:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(!
Optional
.
ofNullable
(
limitOne
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
if
(
limitOne
.
getEnableFlag
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_FORBIDDEN
);
listResult
.
add
(
param
);
continue
;
}
if
(!
limitOne
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
if
(!
limitOne
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isFutureDate
(
limitOne
.
getPolicyEnd
().
toString
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_SHOULD_IS_FUTURE
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
compareDate
(
limitOne
.
getPolicyStart
().
toString
(),
limitOne
.
getPolicyEnd
().
toString
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_SHOULD_LESS_THAN_POLICY_END
);
listResult
.
add
(
param
);
continue
;
}
//自动化派单的取自动化派单的起止日期
if
(
Common
.
isEmpty
(
param
.
getPolicyStart
())
&&
Common
.
isEmpty
(
param
.
getPolicyEnd
()))
{
param
.
setPolicyStart
(
limitOne
.
getPolicyStart
());
param
.
setPolicyEnd
(
limitOne
.
getPolicyEnd
());
}
}
// 保险公司-险种-购买标准 是否存在
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
...
...
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