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
a6545edc
Commit
a6545edc
authored
Nov 19, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.17-商险待续签
parent
7e265cac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
157 additions
and
28 deletions
+157
-28
TEmpContractAlertController.java
...yifu/archives/controller/TEmpContractAlertController.java
+7
-0
TEmpContractAlertService.java
...us/v1/yifu/archives/service/TEmpContractAlertService.java
+3
-0
TEmpContractAlertServiceImpl.java
...u/archives/service/impl/TEmpContractAlertServiceImpl.java
+20
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+124
-8
TInsurancePreRenewDetailServiceImpl.java
...e/insurance/impl/TInsurancePreRenewDetailServiceImpl.java
+3
-20
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpContractAlertController.java
View file @
a6545edc
...
@@ -33,6 +33,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
...
@@ -33,6 +33,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAlertSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -87,6 +88,12 @@ public class TEmpContractAlertController {
...
@@ -87,6 +88,12 @@ public class TEmpContractAlertController {
setAuth
(
searchVo
);
setAuth
(
searchVo
);
return
R
.
ok
(
tEmpContractAlertService
.
getAutoPage
(
page
,
searchVo
));
return
R
.
ok
(
tEmpContractAlertService
.
getAutoPage
(
page
,
searchVo
));
}
}
@Operation
(
description
=
"合同待续签数量查询"
)
@PostMapping
(
"/getAutoContractCount"
)
public
R
<
Long
>
getAutoContractCount
(
@RequestBody
ContractAlertSearchVo
searchVo
)
{
setAuth
(
searchVo
);
return
R
.
ok
(
tEmpContractAlertService
.
getAutoContractCount
(
searchVo
));
}
/**
/**
* 不分页查询
* 不分页查询
* @param searchVo 员工合同续签待办
* @param searchVo 员工合同续签待办
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmpContractAlertService.java
View file @
a6545edc
...
@@ -41,7 +41,10 @@ import java.util.List;
...
@@ -41,7 +41,10 @@ import java.util.List;
public
interface
TEmpContractAlertService
extends
IService
<
TEmpContractAlert
>
{
public
interface
TEmpContractAlertService
extends
IService
<
TEmpContractAlert
>
{
IPage
<
TEmpContractAlert
>
pageDiy
(
Page
page
,
ContractAlertSearchVo
searchVo
);
IPage
<
TEmpContractAlert
>
pageDiy
(
Page
page
,
ContractAlertSearchVo
searchVo
);
// 给自动化用的-合同待续签-分页查询
IPage
<
TEmpContractAlert
>
getAutoPage
(
Page
page
,
ContractAlertSearchVo
searchVo
);
IPage
<
TEmpContractAlert
>
getAutoPage
(
Page
page
,
ContractAlertSearchVo
searchVo
);
// 合同待续签数量查询
long
getAutoContractCount
(
ContractAlertSearchVo
searchVo
);
List
<
TEmpContractAlert
>
listDiy
(
ContractAlertSearchVo
searchVo
);
List
<
TEmpContractAlert
>
listDiy
(
ContractAlertSearchVo
searchVo
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpContractAlertServiceImpl.java
View file @
a6545edc
...
@@ -122,6 +122,26 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
...
@@ -122,6 +122,26 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}
}
return
baseMapper
.
selectPage
(
page
,
wrapper
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
}
}
@Override
public
long
getAutoContractCount
(
ContractAlertSearchVo
searchVo
)
{
List
<
String
>
deptList
=
tAutoMainRelMapper
.
getAutoDeptNo
();
LambdaQueryWrapper
<
TEmpContractAlert
>
wrapper
=
buildQueryWrapper
(
searchVo
);
wrapper
.
isNotNull
(
TEmpContractAlert:
:
getId
);
if
(
deptList
!=
null
&&
!
deptList
.
isEmpty
())
{
wrapper
.
in
(
TEmpContractAlert:
:
getProjectNo
,
deptList
);
}
if
(
Common
.
isNotNull
(
searchVo
.
getContractEndStart
())){
wrapper
.
ge
(
TEmpContractAlert:
:
getContractEnd
,
searchVo
.
getContractEndStart
());
}
if
(
Common
.
isNotNull
(
searchVo
.
getContractEndEnd
())){
wrapper
.
le
(
TEmpContractAlert:
:
getContractEnd
,
searchVo
.
getContractEndEnd
());
}
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
wrapper
.
last
(
searchVo
.
getAuthSql
());
}
return
baseMapper
.
selectCount
(
wrapper
);
}
@Override
@Override
public
IPage
<
TEmpContractAlert
>
pageDiy
(
Page
page
,
ContractAlertSearchVo
searchVo
)
{
public
IPage
<
TEmpContractAlert
>
pageDiy
(
Page
page
,
ContractAlertSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TEmpContractAlert
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TEmpContractAlert
>
wrapper
=
buildQueryWrapper
(
searchVo
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
a6545edc
...
@@ -16,6 +16,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -16,6 +16,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
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.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
...
@@ -30,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
...
@@ -30,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.config.WxConfig
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.*
;
...
@@ -53,9 +56,11 @@ import org.apache.commons.lang.ArrayUtils;
...
@@ -53,9 +56,11 @@ import org.apache.commons.lang.ArrayUtils;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
...
@@ -144,6 +149,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -144,6 +149,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
@Resource
private
TInsuranceWarnMapper
tInsuranceWarnMapper
;
private
TInsuranceWarnMapper
tInsuranceWarnMapper
;
@Resource
private
TInsurancePreRenewDetailQwService
tInsurancePreRenewDetailQwService
;
@Resource
private
TInsurancePreRenewDetailQwDetailService
tInsurancePreRenewDetailQwDetailService
;
@Autowired
private
UpmsDaprUtils
upmsDaprUtils
;
@Autowired
private
WxConfig
wxConfig
;
/***********************商险办理********************************/
/***********************商险办理********************************/
/**
/**
* 每日定时刷新商险到期数据
* 每日定时刷新商险到期数据
...
@@ -1161,7 +1178,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1161,7 +1178,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
,
false
);
}
}
}
}
}
}
...
@@ -1327,7 +1344,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1327,7 +1344,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
,
false
);
}
}
}
}
}
}
...
@@ -1629,7 +1646,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1629,7 +1646,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
});
});
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"3"
,
"4"
,
"6"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FIVE_STRING
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"3"
,
"4"
,
"6"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FIVE_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"3"
,
"4"
,
"6"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FIVE_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"3"
,
"4"
,
"6"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FIVE_STRING
,
true
);
}
}
//更新状态
//更新状态
this
.
updateBatchById
(
successList
);
this
.
updateBatchById
(
successList
);
...
@@ -1758,7 +1775,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1758,7 +1775,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
successOne
.
add
(
detail
);
successOne
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
,
false
);
//查找被替换人信息
//查找被替换人信息
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
...
@@ -1816,7 +1833,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1816,7 +1833,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setDefaultSettleId
(
settle
.
getId
());
detail
.
setDefaultSettleId
(
settle
.
getId
());
successTwo
.
add
(
detail
);
successTwo
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
,
false
);
//生成收入数据
//生成收入数据
createInsuranceInfo
(
detail
,
settleDomain
);
createInsuranceInfo
(
detail
,
settleDomain
);
}
else
{
}
else
{
...
@@ -1854,7 +1871,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1854,7 +1871,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setDefaultSettleId
(
settle
.
getId
());
detail
.
setDefaultSettleId
(
settle
.
getId
());
successTwo
.
add
(
detail
);
successTwo
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
,
false
);
//生成收入数据
//生成收入数据
createInsuranceInfo
(
detail
,
settleDomain
);
createInsuranceInfo
(
detail
,
settleDomain
);
}
}
...
@@ -1875,7 +1892,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1875,7 +1892,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setUpdateBy
(
user
.
getId
());
successOne
.
add
(
detail
);
successOne
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
,
false
);
}
}
}
}
}
}
...
@@ -8798,7 +8815,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -8798,7 +8815,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
// hgw-3商险待续签-商险各个入口更新待购买列表状态更新
// hgw-3商险待续签-商险各个入口更新待购买列表状态更新
private
void
updateEmployeeInsurancePreRenewById
(
TInsuranceDetail
insuranceDetail
,
List
<
String
>
preStatusList
,
String
status
)
{
// handleFailToSendQwFlag - 办理失败发送企微
private
void
updateEmployeeInsurancePreRenewById
(
TInsuranceDetail
insuranceDetail
,
List
<
String
>
preStatusList
,
String
status
,
boolean
handleFailToSendQwFlag
)
{
TInsurancePreRenewDetail
pre
=
tInsurancePreRenewDetailMapper
.
selectOne
(
Wrappers
.<
TInsurancePreRenewDetail
>
query
().
lambda
()
TInsurancePreRenewDetail
pre
=
tInsurancePreRenewDetailMapper
.
selectOne
(
Wrappers
.<
TInsurancePreRenewDetail
>
query
().
lambda
()
.
eq
(
TInsurancePreRenewDetail:
:
getInsurancesIdNew
,
insuranceDetail
.
getId
())
.
eq
(
TInsurancePreRenewDetail:
:
getInsurancesIdNew
,
insuranceDetail
.
getId
())
.
in
(
TInsurancePreRenewDetail:
:
getProcessStatus
,
preStatusList
)
.
in
(
TInsurancePreRenewDetail:
:
getProcessStatus
,
preStatusList
)
...
@@ -8806,6 +8825,103 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -8806,6 +8825,103 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isNotNull
(
pre
))
{
if
(
Common
.
isNotNull
(
pre
))
{
pre
.
setProcessStatus
(
status
);
pre
.
setProcessStatus
(
status
);
tInsurancePreRenewDetailMapper
.
updateById
(
pre
);
tInsurancePreRenewDetailMapper
.
updateById
(
pre
);
if
(
handleFailToSendQwFlag
)
{
handleFailToSendQw
(
pre
.
getCustomerUserLoginname
(),
pre
.
getCustomerUsername
(),
pre
.
getId
(),
pre
.
getEmpName
()
,
pre
.
getEmpIdcardNo
(),
insuranceDetail
.
getBackRemark
());
}
}
}
/**
* @Description: 自动化续签的商险办理失败,发送企微
* @Author: hgw
* @Date: 2025/11/19 18:02
* @return: void
**/
private
void
handleFailToSendQw
(
String
customerUserLoginname
,
String
customerUsername
,
String
preRenewId
,
String
empName
,
String
empIdCard
,
String
errorrMessage
)
{
TInsurancePreRenewDetailQw
qw
=
new
TInsurancePreRenewDetailQw
();
String
qwUuId
=
String
.
valueOf
(
UUID
.
randomUUID
()).
replace
(
"-"
,
""
);
qw
.
setId
(
qwUuId
);
qw
.
setCreateTime
(
LocalDateTime
.
now
());
qw
.
setCustomerUserLoginname
(
customerUserLoginname
);
qw
.
setCustomerUsername
(
customerUsername
);
qw
.
setDescription
(
"张三-"
+
empIdCard
+
",商险续保办理失败 <br>请及时处理,以免产生用工风险!"
);
// 派单失败,组装需要推送企微的明细
TInsurancePreRenewDetailQwDetail
qwDetail
=
new
TInsurancePreRenewDetailQwDetail
();
qwDetail
.
setPreId
(
preRenewId
);
qwDetail
.
setMainId
(
qwUuId
);
qwDetail
.
setEmpName
(
empName
);
qwDetail
.
setEmpIdcard
(
empIdCard
);
qwDetail
.
setErrorInfo
(
errorrMessage
);
qwDetail
.
setErrorTime
(
LocalDateTime
.
now
());
tInsurancePreRenewDetailQwService
.
save
(
qw
);
tInsurancePreRenewDetailQwDetailService
.
save
(
qwDetail
);
if
(
Common
.
isNotNull
(
customerUserLoginname
))
{
Map
<
String
,
String
>
sysUserMap
=
getUserQiWeiInfo
(
customerUserLoginname
);
String
qwInfo
;
if
(!
sysUserMap
.
isEmpty
())
{
qwInfo
=
sysUserMap
.
get
(
customerUserLoginname
);
if
(
Common
.
isNotNull
(
qwInfo
))
{
sendMessageToWx
(
qwInfo
,
qw
.
getDescription
(),
qw
.
getId
());
}
}
}
}
/**
* @param userLoginNames 登录名,逗号拼接
* @Description: 获取客服的企微信息
* @Author: hgw
* @Date: 2025/8/8 17:59
* @return: java.util.Map<java.lang.String, java.lang.String>
**/
private
Map
<
String
,
String
>
getUserQiWeiInfo
(
String
userLoginNames
)
{
Map
<
String
,
String
>
sysUserMap
=
new
HashMap
<>();
// 获取项目对应的前端客服用户信息--客服账号需要正常
if
(
Common
.
isNotKong
(
userLoginNames
))
{
R
<
SysUserListVo
>
res
=
upmsDaprUtils
.
getUserIdsByUserNames
(
userLoginNames
);
List
<
SysUser
>
users
=
null
;
if
(
Common
.
isNotNull
(
res
)
&&
Common
.
isNotNull
(
res
.
getData
())
&&
Common
.
isNotNull
(
res
.
getData
().
getUserList
()))
{
users
=
res
.
getData
().
getUserList
();
}
if
(
Common
.
isNotKong
(
users
))
{
for
(
SysUser
user
:
users
)
{
if
(
Common
.
isNotNull
(
user
.
getWxMessage
()))
{
sysUserMap
.
put
(
user
.
getUsername
(),
user
.
getWxMessage
());
}
}
}
}
return
sysUserMap
;
}
//发送企业微信待办
private
void
sendMessageToWx
(
String
useruserWx
,
String
content
,
String
mainId
)
{
if
(
Common
.
isEmpty
(
useruserWx
)
||
Common
.
isEmpty
(
content
))
{
return
;
}
StringBuilder
sendUser
=
null
;
if
(
Common
.
isNotKong
(
useruserWx
))
{
sendUser
=
new
StringBuilder
(
useruserWx
);
}
if
(
sendUser
!=
null
)
{
RestTemplate
restTemplate
=
new
RestTemplate
();
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
textcard
=
new
HashMap
<>();
textcard
.
put
(
"title"
,
"【作业自动化——商险续保办理失败提醒】"
);
textcard
.
put
(
"url"
,
String
.
format
(
SecurityConstants
.
WX_GET_MESSAGE_AUTH_URL
,
wxConfig
.
getCorpid
(),
wxConfig
.
getDomainName
()
+
"/auth/oauth/wxLogin"
,
"77"
+
mainId
));
textcard
.
put
(
"description"
,
content
);
requestMap
.
put
(
"touser"
,
sendUser
);
requestMap
.
put
(
"agentid"
,
wxConfig
.
getAgentid
());
requestMap
.
put
(
"msgtype"
,
"textcard"
);
requestMap
.
put
(
"textcard"
,
textcard
);
// 必须加上header说明
if
(!
wxConfig
.
sendTextCard
(
restTemplate
,
requestMap
))
{
wxConfig
.
sendTextCard
(
restTemplate
,
requestMap
);
}
}
}
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsurancePreRenewDetailServiceImpl.java
View file @
a6545edc
...
@@ -391,7 +391,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
...
@@ -391,7 +391,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
errorMessageMap
.
put
(
info
.
getInsurancePreRenewId
(),
info
.
getErrorMessage
());
errorMessageMap
.
put
(
info
.
getInsurancePreRenewId
(),
info
.
getErrorMessage
());
}
}
Map
<
String
,
Set
<
String
>>
deptNumMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
allNumMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
allNumMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
failNumMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
failNumMap
=
new
HashMap
<>();
Map
<
String
,
TInsurancePreRenewDetailQw
>
preQwMap
=
new
HashMap
<>();
Map
<
String
,
TInsurancePreRenewDetailQw
>
preQwMap
=
new
HashMap
<>();
...
@@ -400,7 +399,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
...
@@ -400,7 +399,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
TInsurancePreRenewDetail
updatePre
;
TInsurancePreRenewDetail
updatePre
;
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
String
errorrMessage
;
String
errorrMessage
;
Set
<
String
>
tempSet
;
Integer
nums
;
Integer
nums
;
String
customerUserLoginname
;
String
customerUserLoginname
;
...
@@ -411,14 +409,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
...
@@ -411,14 +409,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
for
(
TInsurancePreRenewDetail
pre
:
insurancePreList
)
{
for
(
TInsurancePreRenewDetail
pre
:
insurancePreList
)
{
customerUserLoginname
=
pre
.
getCustomerUserLoginname
();
customerUserLoginname
=
pre
.
getCustomerUserLoginname
();
if
(
Common
.
isNotNull
(
customerUserLoginname
))
{
tempSet
=
deptNumMap
.
get
(
customerUserLoginname
);
if
(
tempSet
==
null
)
{
tempSet
=
new
HashSet
<>();
}
tempSet
.
add
(
pre
.
getDeptNo
());
deptNumMap
.
put
(
customerUserLoginname
,
tempSet
);
}
updatePre
=
new
TInsurancePreRenewDetail
();
updatePre
=
new
TInsurancePreRenewDetail
();
updatePre
.
setId
(
pre
.
getId
());
updatePre
.
setId
(
pre
.
getId
());
String
qwUuId
;
String
qwUuId
;
...
@@ -483,7 +473,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
...
@@ -483,7 +473,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
// pushQiWeiFlag 推送企微的flag,true表示推送企微
// pushQiWeiFlag 推送企微的flag,true表示推送企微
if
(
pushQiWeiFlag
&&
!
preQwMap
.
isEmpty
())
{
if
(
pushQiWeiFlag
&&
!
preQwMap
.
isEmpty
())
{
List
<
TInsurancePreRenewDetailQw
>
qwList
=
new
ArrayList
<>();
List
<
TInsurancePreRenewDetailQw
>
qwList
=
new
ArrayList
<>();
int
deptNum
;
int
allNum
;
int
allNum
;
int
failNum
;
int
failNum
;
StringBuilder
description
;
StringBuilder
description
;
...
@@ -496,12 +485,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
...
@@ -496,12 +485,6 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
userLoginNames
=
customerUserLoginname
;
userLoginNames
=
customerUserLoginname
;
}
}
qw
=
entry
.
getValue
();
qw
=
entry
.
getValue
();
tempSet
=
deptNumMap
.
get
(
customerUserLoginname
);
if
(
Common
.
isNotNull
(
tempSet
))
{
deptNum
=
tempSet
.
size
();
}
else
{
deptNum
=
0
;
}
allNum
=
allNumMap
.
get
(
customerUserLoginname
);
allNum
=
allNumMap
.
get
(
customerUserLoginname
);
if
(
Common
.
isEmpty
(
allNum
))
{
if
(
Common
.
isEmpty
(
allNum
))
{
allNum
=
0
;
allNum
=
0
;
...
@@ -510,8 +493,8 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
...
@@ -510,8 +493,8 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
if
(
Common
.
isEmpty
(
failNum
))
{
if
(
Common
.
isEmpty
(
failNum
))
{
failNum
=
0
;
failNum
=
0
;
}
}
description
=
new
StringBuilder
(
"
项目数:"
).
append
(
deptNum
).
append
(
"个;自动化派单人数:"
)
description
=
new
StringBuilder
(
"
商险派单数:"
).
append
(
allNum
).
append
(
"份,【失败份数:"
).
append
(
failNum
)
.
append
(
allNum
).
append
(
"个,【失败人数:"
).
append
(
failNum
).
append
(
"个】<br>请及时至HRO系统处理,以免人员漏保
!"
);
.
append
(
"份】<br>点击查看详情!<br>请及时至HRO系统处理,以免耽误购买进度
!"
);
qw
.
setDescription
(
description
.
toString
());
qw
.
setDescription
(
description
.
toString
());
qwList
.
add
(
qw
);
qwList
.
add
(
qw
);
}
}
...
@@ -649,7 +632,7 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
...
@@ -649,7 +632,7 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
RestTemplate
restTemplate
=
new
RestTemplate
();
RestTemplate
restTemplate
=
new
RestTemplate
();
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
textcard
=
new
HashMap
<>();
Map
<
String
,
Object
>
textcard
=
new
HashMap
<>();
textcard
.
put
(
"title"
,
"【
商险自动化派单——
失败提醒】"
);
textcard
.
put
(
"title"
,
"【
作业自动化——商险续保发起
失败提醒】"
);
textcard
.
put
(
"url"
,
String
.
format
(
SecurityConstants
.
WX_GET_MESSAGE_AUTH_URL
,
wxConfig
.
getCorpid
(),
wxConfig
.
getDomainName
()
+
"/auth/oauth/wxLogin"
,
"76"
+
mainId
));
textcard
.
put
(
"url"
,
String
.
format
(
SecurityConstants
.
WX_GET_MESSAGE_AUTH_URL
,
wxConfig
.
getCorpid
(),
wxConfig
.
getDomainName
()
+
"/auth/oauth/wxLogin"
,
"76"
+
mainId
));
textcard
.
put
(
"description"
,
content
);
textcard
.
put
(
"description"
,
content
);
requestMap
.
put
(
"touser"
,
sendUser
);
requestMap
.
put
(
"touser"
,
sendUser
);
...
...
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