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
f17fefc1
Commit
f17fefc1
authored
Nov 17, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.17-商险续签待办3
parent
d61a237c
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
1783 additions
and
51 deletions
+1783
-51
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+1
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+7
-0
TInsuranceAlert.java
...cloud/plus/v1/yifu/insurances/entity/TInsuranceAlert.java
+4
-0
TInsurancePreRenewDetail.java
...s/v1/yifu/insurances/entity/TInsurancePreRenewDetail.java
+4
-4
TInsurancePreRenewDetailQw.java
...v1/yifu/insurances/entity/TInsurancePreRenewDetailQw.java
+84
-0
TInsurancePreRenewDetailQwDetail.java
...u/insurances/entity/TInsurancePreRenewDetailQwDetail.java
+99
-0
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+5
-0
InsuranceAutoParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceAutoParam.java
+5
-0
InsuranceBatchParam.java
...cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
+5
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+5
-0
TInsuranceAlertExportVO.java
...d/plus/v1/yifu/insurances/vo/TInsuranceAlertExportVO.java
+1
-1
TInsuranceAlertSearchVo.java
...d/plus/v1/yifu/insurances/vo/TInsuranceAlertSearchVo.java
+3
-0
TInsurancePreRenewDetailController.java
...rances/controller/TInsurancePreRenewDetailController.java
+68
-33
TInsurancePreRenewDetailQwDetailController.java
...ontroller/TInsurancePreRenewDetailQwDetailController.java
+69
-0
TInsurancesWarnController.java
...yifu/insurances/controller/TInsurancesWarnController.java
+39
-0
TInsurancePreRenewDetailMapper.java
...ces/mapper/insurances/TInsurancePreRenewDetailMapper.java
+16
-0
TInsurancePreRenewDetailQwDetailMapper.java
...er/insurances/TInsurancePreRenewDetailQwDetailMapper.java
+44
-0
TInsurancePreRenewDetailQwMapper.java
...s/mapper/insurances/TInsurancePreRenewDetailQwMapper.java
+33
-0
TInsuranceWarnMapper.java
...fu/insurances/mapper/insurances/TInsuranceWarnMapper.java
+6
-1
TEmployeeInsurancePreService.java
...ances/service/insurance/TEmployeeInsurancePreService.java
+12
-0
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+2
-0
TInsurancePreRenewDetailQwDetailService.java
...ce/insurance/TInsurancePreRenewDetailQwDetailService.java
+41
-0
TInsurancePreRenewDetailQwService.java
.../service/insurance/TInsurancePreRenewDetailQwService.java
+31
-0
TInsurancePreRenewDetailService.java
...es/service/insurance/TInsurancePreRenewDetailService.java
+24
-0
TInsuranceWarnService.java
...u/insurances/service/insurance/TInsuranceWarnService.java
+6
-0
TEmployeeInsurancePreServiceImpl.java
...vice/insurance/impl/TEmployeeInsurancePreServiceImpl.java
+22
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+123
-4
TInsurancePreRenewDetailQwDetailServiceImpl.java
...nce/impl/TInsurancePreRenewDetailQwDetailServiceImpl.java
+49
-0
TInsurancePreRenewDetailQwServiceImpl.java
...insurance/impl/TInsurancePreRenewDetailQwServiceImpl.java
+36
-0
TInsurancePreRenewDetailServiceImpl.java
...e/insurance/impl/TInsurancePreRenewDetailServiceImpl.java
+648
-0
TInsuranceWarnServiceImpl.java
...ces/service/insurance/impl/TInsuranceWarnServiceImpl.java
+15
-4
TInsurancePreRenewDetailMapper.xml
...rces/mapper/insurances/TInsurancePreRenewDetailMapper.xml
+59
-0
TInsurancePreRenewDetailQwDetailMapper.xml
...per/insurances/TInsurancePreRenewDetailQwDetailMapper.xml
+79
-0
TInsurancePreRenewDetailQwMapper.xml
...es/mapper/insurances/TInsurancePreRenewDetailQwMapper.xml
+59
-0
TInsuranceWarnMapper.xml
...main/resources/mapper/insurances/TInsuranceWarnMapper.xml
+53
-4
UpdateOverdueTask.java
...com/yifu/cloud/plus/v1/job/compont/UpdateOverdueTask.java
+23
-0
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+3
-0
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
f17fefc1
...
...
@@ -657,6 +657,7 @@ public interface CommonConstants {
List
<
String
>
processInsurancesStatus
=
Stream
.
of
(
"1"
,
"2"
,
"5"
).
collect
(
Collectors
.
toList
());
List
<
String
>
processListPreArchivesStatus
=
Stream
.
of
(
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
).
collect
(
Collectors
.
toList
());
String
[]
INSURANCE_ALERT_STATUS
=
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
};
List
<
String
>
deptList
=
Stream
.
of
(
"安徽一册档案管理有限公司"
,
"安徽顾合企业管理咨询有限公司"
,
"安徽赤道线数字传媒科技有限公司"
,
"劳务业务中心"
,
"易服智享&研究院"
).
collect
(
Collectors
.
toList
());
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
f17fefc1
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
constants
;
import
java.util.Arrays
;
import
java.util.HashSet
;
import
java.util.Set
;
/**
* @author licancan
* @description 商险常量
...
...
@@ -1343,4 +1347,7 @@ public class InsurancesConstants {
public
static
final
String
IMPORT_POLICY_REMARK
=
"保单号维护模版导入"
;
public
static
final
String
INSURANCE_AUTO_FLAG_IS_ENABLE
=
"该项目已纳入自动化,请至作业自动化模块入职登记-接收确认后自动派单"
;
// 0待确认1待派单 可忽略
public
static
final
Set
<
String
>
ALERT_IGNORE_STATUS
=
new
HashSet
<>(
Arrays
.
asList
(
"0"
,
"1"
));
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceAlert.java
View file @
f17fefc1
...
...
@@ -263,5 +263,9 @@ public class TInsuranceAlert extends BaseEntity {
@Schema
(
description
=
"是否地市自购0是 1 否"
)
private
String
isAddress
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"预计续保发起时间"
)
private
String
expectedCollectionTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsurancePreRenewDetail.java
View file @
f17fefc1
...
...
@@ -247,12 +247,12 @@ public class TInsurancePreRenewDetail extends BaseEntity {
private
LocalDate
policyEffect
;
/**
* 预计
派单
时间
* 预计
续保发起
时间
*/
//@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@ExcelAttribute
(
name
=
"预计
派单
时间"
,
isDate
=
true
)
@ExcelProperty
(
"预计
派单
时间"
)
@Schema
(
description
=
"预计
派单
时间"
)
@ExcelAttribute
(
name
=
"预计
续保发起
时间"
,
isDate
=
true
)
@ExcelProperty
(
"预计
续保发起
时间"
)
@Schema
(
description
=
"预计
续保发起
时间"
)
private
LocalDateTime
expectedCollectionTime
;
/**
* 发送确认起始日期
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsurancePreRenewDetailQw.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.time.LocalDateTime
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
@Data
@TableName
(
"t_insurance_pre_renew_detail_qw"
)
@Schema
(
description
=
"商险待续保企微消息"
)
public
class
TInsurancePreRenewDetailQw
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 前端客服
*/
@ExcelAttribute
(
name
=
"前端客服"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"前端客服不能超过30个字符"
)
@ExcelProperty
(
"前端客服"
)
@Schema
(
description
=
"前端客服"
)
private
String
customerUsername
;
/**
* 前端客服登录名
*/
@ExcelAttribute
(
name
=
"前端客服登录名"
,
isNotEmpty
=
true
,
errorInfo
=
"前端客服登录名不能为空"
,
maxLength
=
30
)
@NotBlank
(
message
=
"前端客服登录名不能为空"
)
@Length
(
max
=
30
,
message
=
"前端客服登录名不能超过30个字符"
)
@ExcelProperty
(
"前端客服登录名"
)
@Schema
(
description
=
"前端客服登录名"
)
private
String
customerUserLoginname
;
/**
* 内容
*/
@ExcelAttribute
(
name
=
"内容"
,
isNotEmpty
=
true
,
errorInfo
=
"内容不能为空"
,
maxLength
=
200
)
@NotBlank
(
message
=
"内容不能为空"
)
@Length
(
max
=
200
,
message
=
"内容不能超过200个字符"
)
@ExcelProperty
(
"内容"
)
@Schema
(
description
=
"内容"
)
private
String
description
;
/**
* 创建时间
*/
@ExcelAttribute
(
name
=
"创建时间"
,
isDate
=
true
)
@ExcelProperty
(
"创建时间"
)
@Schema
(
description
=
"创建时间"
)
private
LocalDateTime
createTime
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsurancePreRenewDetailQwDetail.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.time.LocalDateTime
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
@Data
@TableName
(
"t_insurance_pre_renew_detail_qw_detail"
)
@Schema
(
description
=
"商险待续保企微消息"
)
public
class
TInsurancePreRenewDetailQwDetail
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 关联主键(t_employee_insurance_pre_qw表的ID)
*/
@ExcelAttribute
(
name
=
"关联主键(t_employee_insurance_pre_qw表的ID)"
,
isNotEmpty
=
true
,
errorInfo
=
"关联主键(t_employee_insurance_pre_qw表的ID)不能为空"
,
maxLength
=
36
)
@NotBlank
(
message
=
"关联主键(t_employee_insurance_pre_qw表的ID)不能为空"
)
@Length
(
max
=
36
,
message
=
"关联主键(t_employee_insurance_pre_qw表的ID)不能超过36个字符"
)
@ExcelProperty
(
"关联主键(t_employee_insurance_pre_qw表的ID)"
)
@Schema
(
description
=
"关联主键(t_employee_insurance_pre_qw表的ID)"
)
private
String
mainId
;
/**
* 姓名
*/
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"姓名不能超过30个字符"
)
@ExcelProperty
(
"姓名"
)
@Schema
(
description
=
"姓名"
)
private
String
empName
;
/**
* 身份证
*/
@ExcelAttribute
(
name
=
"身份证"
,
maxLength
=
18
)
@Length
(
max
=
18
,
message
=
"身份证不能超过18个字符"
)
@ExcelProperty
(
"身份证"
)
@Schema
(
description
=
"身份证"
)
private
String
empIdcard
;
/**
* 失败原因
*/
@ExcelAttribute
(
name
=
"失败原因"
,
maxLength
=
200
)
@Length
(
max
=
200
,
message
=
"失败原因不能超过200个字符"
)
@ExcelProperty
(
"失败原因"
)
@Schema
(
description
=
"失败原因"
)
private
String
errorInfo
;
/**
* 失败时间
*/
@ExcelAttribute
(
name
=
"失败时间"
,
isDate
=
true
)
@ExcelProperty
(
"失败时间"
)
@Schema
(
description
=
"失败时间"
)
private
LocalDateTime
errorTime
;
/**
* 商险待派单ID(t_employee_insurance_pre的ID)
*/
@ExcelAttribute
(
name
=
"商险待派单ID(t_employee_insurance_pre的ID)"
,
maxLength
=
36
)
@Length
(
max
=
36
,
message
=
"商险待派单ID(t_employee_insurance_pre的ID)不能超过36个字符"
)
@ExcelProperty
(
"商险待派单ID(t_employee_insurance_pre的ID)"
)
@Schema
(
description
=
"商险待派单ID(t_employee_insurance_pre的ID)"
)
private
String
preId
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
f17fefc1
...
...
@@ -125,6 +125,11 @@ public class InsuranceAddParam implements Serializable {
*/
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 商险待续保id
*/
@Schema
(
description
=
"商险待续保id"
)
private
String
insurancePreRenewId
;
/**
* 前端客服姓名
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAutoParam.java
View file @
f17fefc1
...
...
@@ -162,6 +162,11 @@ public class InsuranceAutoParam implements Serializable {
*/
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 商险待续保id
*/
@Schema
(
description
=
"商险待续保id"
)
private
String
insurancePreRenewId
;
/**
* 前端客服姓名
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
View file @
f17fefc1
...
...
@@ -120,6 +120,11 @@ public class InsuranceBatchParam implements Serializable {
*/
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 商险待续保id
*/
@Schema
(
description
=
"商险待续保id"
)
private
String
insurancePreRenewId
;
/**
* 前端客服姓名
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
f17fefc1
...
...
@@ -108,6 +108,11 @@ public class InsuranceReplaceParam implements Serializable {
*/
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 商险待购买id
*/
@Schema
(
description
=
"商险待续保id"
)
private
String
insurancePreRenewId
;
/**
* 前端客服姓名
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/TInsuranceAlertExportVO.java
View file @
f17fefc1
...
...
@@ -30,7 +30,7 @@ import lombok.Data;
*/
@Data
@ColumnWidth
(
10
)
public
class
TInsuranceAlertExportVO
extends
BaseEntity
{
public
class
TInsuranceAlertExportVO
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/TInsuranceAlertSearchVo.java
View file @
f17fefc1
...
...
@@ -72,4 +72,7 @@ public class TInsuranceAlertSearchVo extends TInsuranceAlert {
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
@Schema
(
description
=
"列表查询类型 1 待办 2监控 3入职确认信息"
)
private
String
type
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsurancePreRenewDetailController.java
View file @
f17fefc1
...
...
@@ -21,16 +21,20 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.R
;
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.insurances.entity.TInsurancePreRenewDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.BatchIgnoreVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAutoParam
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 商险续签待办
...
...
@@ -84,20 +88,24 @@ public class TInsurancePreRenewDetailController {
@Operation
(
summary
=
"单个确认-商险续签待办"
,
description
=
"单个确认-商险续签待办"
)
@SysLog
(
"单个确认-商险续签待办"
)
@PostMapping
(
"/doSure"
)
public
R
<
Boolean
>
doSure
(
@RequestBody
TInsurancePreRenewDetail
tInsurancePreRenewDetail
)
{
if
(
tInsurancePreRenewDetail
!=
null
&&
Common
.
isNotNull
(
tInsurancePreRenewDetail
.
getId
()))
{
TInsurancePreRenewDetail
old
=
tInsurancePreRenewDetailService
.
getById
(
tInsurancePreRenewDetail
.
getId
());
if
(
old
==
null
||
Common
.
isEmpty
(
old
.
getId
())
||
Common
.
isEmpty
(
old
.
getProcessStatus
()))
{
return
R
.
failed
(
"根据ID未找到续签待办信息"
);
}
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
old
.
getProcessStatus
()))
{
return
R
.
failed
(
"状态非待确认,请检查"
);
}
}
else
{
return
R
.
failed
(
"请传参ID"
);
public
R
<
String
>
doSure
(
@RequestBody
TInsurancePreRenewDetail
tInsurancePreRenewDetail
)
{
return
tInsurancePreRenewDetailService
.
doSure
(
tInsurancePreRenewDetail
);
}
/**
* @Description: 批量确认
* @Author: hgw
* @Date: 2025/11/17 10:53
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
@Operation
(
summary
=
"批量确认-商险续签待办"
,
description
=
"批量确认-商险续签待办"
)
@SysLog
(
"批量确认-商险续签待办(与单个确认分开,是因为单个确认还有编辑功能,批量仅改状态"
)
@PostMapping
(
"/doSureBatch"
)
public
R
<
String
>
doSureBatch
(
@RequestBody
BatchIgnoreVo
vo
)
{
if
(
null
==
vo
||
vo
.
getIds
()
==
null
||
vo
.
getIds
().
isEmpty
()){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
tInsurancePreRenewDetail
.
setProcessStatus
(
CommonConstants
.
ONE_STRING
);
return
R
.
ok
(
tInsurancePreRenewDetailService
.
updateById
(
tInsurancePreRenewDetail
));
return
tInsurancePreRenewDetailService
.
doSureBatch
(
vo
);
}
/**
...
...
@@ -109,25 +117,52 @@ public class TInsurancePreRenewDetailController {
@Operation
(
summary
=
"编辑商险续签待办"
,
description
=
"编辑商险续签待办"
)
@SysLog
(
"编辑商险续签待办"
)
@PutMapping
public
R
<
Boolean
>
updateById
(
@RequestBody
TInsurancePreRenewDetail
tInsurancePreRenewDetail
)
{
if
(
tInsurancePreRenewDetail
!=
null
&&
Common
.
isNotNull
(
tInsurancePreRenewDetail
.
getId
()))
{
TInsurancePreRenewDetail
old
=
tInsurancePreRenewDetailService
.
getById
(
tInsurancePreRenewDetail
.
getId
());
if
(
old
==
null
||
Common
.
isEmpty
(
old
.
getId
())
||
Common
.
isEmpty
(
old
.
getProcessStatus
()))
{
return
R
.
failed
(
"根据ID未找到续签待办信息"
);
}
if
(!(
CommonConstants
.
ONE_STRING
.
equals
(
old
.
getProcessStatus
())
||
CommonConstants
.
TWO_STRING
.
equals
(
old
.
getProcessStatus
())
||
CommonConstants
.
FIVE_STRING
.
equals
(
old
.
getProcessStatus
())))
{
return
R
.
failed
(
"该状态不可编辑,请刷新后重试"
);
}
if
(
Common
.
isNotNull
(
tInsurancePreRenewDetail
.
getProcessStatus
())
&&
!
old
.
getProcessStatus
().
equals
(
tInsurancePreRenewDetail
.
getProcessStatus
()))
{
return
R
.
failed
(
"状态在编辑保存前发生改变,请刷新后重试"
);
}
}
else
{
return
R
.
failed
(
"请传参ID"
);
}
return
R
.
ok
(
tInsurancePreRenewDetailService
.
updateById
(
tInsurancePreRenewDetail
));
public
R
<
String
>
updateById
(
@RequestBody
TInsurancePreRenewDetail
tInsurancePreRenewDetail
)
{
return
tInsurancePreRenewDetailService
.
doEdit
(
tInsurancePreRenewDetail
);
}
/**
* @Description: 商险待续保单个/批量派单
* @Author: hgw
* @Date: 2025/11/17 14:17
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R
**/
@Operation
(
description
=
"商险待续保单个/批量派单"
)
@PostMapping
(
"/batchDoInsurancePreRenew"
)
public
R
<
List
<
InsuranceAutoParam
>>
batchDoInsurancePreRenew
(
@RequestBody
List
<
String
>
idList
,
@RequestParam
(
required
=
false
)
String
isExit
)
{
return
tInsurancePreRenewDetailService
.
batchDoInsurancePreRenew
(
idList
,
isExit
,
false
);
}
/**
* @Description: 每天下午三点、三点二十推送续保待派单数
* @Author: hgw
* @Date: 2025/11/17 16:18
* @return: void
**/
@SysLog
(
"每天下午三点、三点二十推送续保待派单数据"
)
@Inner
@PostMapping
(
"/inner/autoDoInsurancePreRenew"
)
public
void
autoDoInsurancePreRenew
()
{
tInsurancePreRenewDetailService
.
autoDoInsurancePreRenew
();
}
/**
* @Description: 每日9点统一推送确认信息
* @Author: hgw
* @Date: 2025/11/17 16:18
* @return: void
**/
@SysLog
(
"每日9点统一推送确认信息(确认日到派单日之间的数据且今天是工作日)"
)
@Inner
@PostMapping
(
"/inner/autoDoWxSureMessage"
)
public
void
autoDoWxSureMessage
()
{
tInsurancePreRenewDetailService
.
autoDoWxSureMessage
();
}
@Operation
(
summary
=
"测试今天是否为工作日"
,
description
=
"测试今天是否为工作日"
)
@PostMapping
(
"/isWorkDayTest"
)
public
boolean
isWorkDayTest
()
{
return
tInsurancePreRenewDetailService
.
isWorkDayTest
();
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsurancePreRenewDetailQwDetailController.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
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.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.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQwDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailQwDetailService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tinsuranceprerenewdetailqwdetail"
)
@Tag
(
name
=
"商险待续保企微消息管理"
)
public
class
TInsurancePreRenewDetailQwDetailController
{
private
final
TInsurancePreRenewDetailQwDetailService
tInsurancePreRenewDetailQwDetailService
;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tInsurancePreRenewDetailQwDetail 商险待续保企微消息
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TInsurancePreRenewDetailQwDetail
>>
getTInsurancePreRenewDetailQwDetailPage
(
Page
<
TInsurancePreRenewDetailQwDetail
>
page
,
TInsurancePreRenewDetailQwDetail
tInsurancePreRenewDetailQwDetail
)
{
if
(
tInsurancePreRenewDetailQwDetail
==
null
)
{
tInsurancePreRenewDetailQwDetail
=
new
TInsurancePreRenewDetailQwDetail
();
}
if
(
Common
.
isEmpty
(
tInsurancePreRenewDetailQwDetail
.
getMainId
()))
{
tInsurancePreRenewDetailQwDetail
.
setMainId
(
CommonConstants
.
ZERO_STRING
);
}
return
new
R
<>(
tInsurancePreRenewDetailQwDetailService
.
getTInsurancePreRenewDetailQwDetailPage
(
page
,
tInsurancePreRenewDetailQwDetail
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsurancesWarnController.java
View file @
f17fefc1
...
...
@@ -58,6 +58,29 @@ public class TInsurancesWarnController {
return
R
.
ok
(
insuranceWarnService
.
getTInsuranceAlertPage
(
page
,
tInsuranceAlert
));
}
// 用来批量确认,批量派单等
@Operation
(
description
=
"商险待续保列表查询2000条"
)
@PostMapping
(
"/getTInsuranceAlertList2000"
)
public
R
<
List
<
TInsuranceAlert
>>
getTInsuranceAlertList2000
(
@RequestBody
TInsuranceAlertSearchVo
tInsuranceAlert
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
tInsuranceAlert
);
return
R
.
ok
(
insuranceWarnService
.
getTInsuranceAlertList2000
(
tInsuranceAlert
));
}
/**
* @Description: 商险待续签保数量查询
* @Author: hgw
* @Date: 2025/11/17 9:48
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R
**/
@Operation
(
description
=
"商险待续签保数量查询"
)
@PostMapping
(
"/getInsuranceAlertCount"
)
public
R
<
Long
>
getInsuranceAlertCount
(
@RequestBody
TInsuranceAlertSearchVo
tInsuranceAlert
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
tInsuranceAlert
);
return
R
.
ok
(
insuranceWarnService
.
getInsuranceAlertCount
(
tInsuranceAlert
));
}
@Operation
(
summary
=
"商险待续保导出"
,
description
=
"商险待续保导出"
)
@SysLog
(
"商险待续保导出"
)
@PostMapping
(
"/exportTInsuranceAlert"
)
...
...
@@ -150,6 +173,22 @@ public class TInsurancesWarnController {
return
insuranceDetailService
.
batchexpireIgnore
(
vo
.
getIds
(),
vo
.
getRemark
());
}
/**
* @Description: 商险待续保的批量忽略
* @Author: hgw
* @Date: 2025/11/17 10:05
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Object>
**/
@Operation
(
description
=
"商险待续保的批量忽略"
)
@SysLog
(
"商险待续保的批量忽略"
)
@PostMapping
(
"/batchIgnoreInsuranceAlert"
)
public
R
<
Object
>
batchIgnoreInsuranceAlert
(
@RequestBody
BatchIgnoreVo
vo
)
{
if
(
null
==
vo
||
vo
.
getIds
()
==
null
||
vo
.
getIds
().
isEmpty
()){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
return
insuranceDetailService
.
batchIgnoreInsuranceAlert
(
vo
.
getIds
(),
vo
.
getRemark
());
}
/**
* @Author fxj
* @Description 工作台消息提醒:商险到期总数通知提醒
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsurancePreRenewDetailMapper.java
View file @
f17fefc1
...
...
@@ -20,10 +20,13 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 商险续签待办
*
...
...
@@ -39,4 +42,17 @@ public interface TInsurancePreRenewDetailMapper extends BaseMapper<TInsurancePre
*/
IPage
<
TInsurancePreRenewDetail
>
getTInsurancePreRenewDetailPage
(
Page
<
TInsurancePreRenewDetail
>
page
,
@Param
(
"tInsurancePreRenewDetail"
)
TInsurancePreRenewDetail
tInsurancePreRenewDetail
);
void
doBatchSure
(
@Param
(
"idList"
)
List
<
String
>
idList
);
List
<
TInsurancePreRenewDetail
>
selectPreRenewDetailListByDispatch
(
@Param
(
"idList"
)
List
<
String
>
idList
);
// 获取所有需要派单的数据
List
<
String
>
getAllNeedDispatchData
();
// 获取所有待确认的数据
List
<
IdNameNoVo
>
getAllUnconfimData
();
void
updateRenewBatchById
(
@Param
(
"idList"
)
List
<
String
>
idList
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsurancePreRenewDetailQwDetailMapper.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQwDetail
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
@Mapper
public
interface
TInsurancePreRenewDetailQwDetailMapper
extends
BaseMapper
<
TInsurancePreRenewDetailQwDetail
>
{
/**
* 商险待续保企微消息简单分页查询
*
* @param tInsurancePreRenewDetailQwDetail 商险待续保企微消息
* @return
*/
IPage
<
TInsurancePreRenewDetailQwDetail
>
getTInsurancePreRenewDetailQwDetailPage
(
Page
<
TInsurancePreRenewDetailQwDetail
>
page
,
@Param
(
"tInsurancePreRenewDetailQwDetail"
)
TInsurancePreRenewDetailQwDetail
tInsurancePreRenewDetailQwDetail
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsurancePreRenewDetailQwMapper.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQw
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
@Mapper
public
interface
TInsurancePreRenewDetailQwMapper
extends
BaseMapper
<
TInsurancePreRenewDetailQw
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceWarnMapper.java
View file @
f17fefc1
...
...
@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAlertWx
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAlertExportVO
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAlertSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -24,6 +23,8 @@ public interface TInsuranceWarnMapper extends BaseMapper<TInsuranceAlert> {
IPage
<
TInsuranceAlert
>
getTInsuranceAlertPage
(
Page
<
TInsuranceAlert
>
page
,
@Param
(
"tInsuranceAlert"
)
TInsuranceAlertSearchVo
tInsuranceAlert
);
List
<
TInsuranceAlert
>
getTInsuranceAlertList2000
(
@Param
(
"tInsuranceAlert"
)
TInsuranceAlertSearchVo
tInsuranceAlert
);
int
getTInsuranceAlertExportCount
(
@Param
(
"tInsuranceAlert"
)
TInsuranceAlertSearchVo
tInsuranceAlert
);
List
<
TInsuranceAlertExportVO
>
getTInsuranceAlertExport
(
@Param
(
"tInsuranceAlert"
)
TInsuranceAlertSearchVo
tInsuranceAlert
);
...
...
@@ -40,4 +41,8 @@ public interface TInsuranceWarnMapper extends BaseMapper<TInsuranceAlert> {
List
<
TInsuranceAlert
>
selectInsuranceAlertIgnore
();
// 查找ID与状态,用作忽略等
List
<
TInsuranceAlert
>
selectInsuranceAlertList
(
@Param
(
"idList"
)
List
<
String
>
idList
);
TInsuranceAlert
selectInsuranceAlertOne
(
@Param
(
"id"
)
String
id
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TEmployeeInsurancePreService.java
View file @
f17fefc1
...
...
@@ -119,4 +119,16 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail>>
**/
EmployeePreInsuranceListVo
getExitInsuranceListByEmpPreId
(
String
empPreId
);
/**
* @param addParamList 新增
* @param batchParamList 批增
* @param replaceParamList 替换
* @Description: 将商险组装成一个
* @Author: hgw
* @Date: 2025/11/17 15:52
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAutoParam>
**/
List
<
InsuranceAutoParam
>
getInsuranceAutoParamList
(
List
<
InsuranceAddParam
>
addParamList
,
List
<
InsuranceBatchParam
>
batchParamList
,
List
<
InsuranceReplaceParam
>
replaceParamList
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
View file @
f17fefc1
...
...
@@ -536,6 +536,8 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
R
<
Object
>
batchexpireIgnore
(
List
<
String
>
ids
,
String
remark
);
R
<
Object
>
batchIgnoreInsuranceAlert
(
List
<
String
>
ids
,
String
remark
);
R
<
Object
>
expireIgnore
(
TBusinessInsuranceVo
vo
);
R
<
List
<
ErrorMessage
>>
remarkBatchAdd
(
InputStream
inputStream
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsurancePreRenewDetailQwDetailService.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
;
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.yifu.insurances.entity.TInsurancePreRenewDetailQwDetail
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
public
interface
TInsurancePreRenewDetailQwDetailService
extends
IService
<
TInsurancePreRenewDetailQwDetail
>
{
/**
* 商险待续保企微消息简单分页查询
*
* @param tInsurancePreRenewDetailQwDetail 商险待续保企微消息
* @return
*/
IPage
<
TInsurancePreRenewDetailQwDetail
>
getTInsurancePreRenewDetailQwDetailPage
(
Page
<
TInsurancePreRenewDetailQwDetail
>
page
,
TInsurancePreRenewDetailQwDetail
tInsurancePreRenewDetailQwDetail
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsurancePreRenewDetailQwService.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQw
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
public
interface
TInsurancePreRenewDetailQwService
extends
IService
<
TInsurancePreRenewDetailQw
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsurancePreRenewDetailService.java
View file @
f17fefc1
...
...
@@ -20,7 +20,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
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.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.BatchIgnoreVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAutoParam
;
import
java.util.List
;
/**
* 商险续签待办
...
...
@@ -37,4 +42,23 @@ public interface TInsurancePreRenewDetailService extends IService<TInsurancePreR
*/
IPage
<
TInsurancePreRenewDetail
>
getTInsurancePreRenewDetailPage
(
Page
<
TInsurancePreRenewDetail
>
page
,
TInsurancePreRenewDetail
tInsurancePreRenewDetail
);
// 单个编辑
R
<
String
>
doEdit
(
TInsurancePreRenewDetail
tInsurancePreRenewDetail
);
// 单个确认(含编辑功能)
R
<
String
>
doSure
(
TInsurancePreRenewDetail
tInsurancePreRenewDetail
);
// 批量确认(不含编辑)
R
<
String
>
doSureBatch
(
BatchIgnoreVo
vo
);
// 每天下午三点、三点二十推送续保待派单数据
void
autoDoInsurancePreRenew
();
void
autoDoWxSureMessage
();
// 批量派单
// pushQiWeiFlag : 是否推送企微 true:推送(当前仅下午3点与3点20的定时任务,需要推送企微),false:不推送
R
<
List
<
InsuranceAutoParam
>>
batchDoInsurancePreRenew
(
List
<
String
>
idList
,
String
sameFlag
,
boolean
pushQiWeiFlag
);
boolean
isWorkDayTest
();
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceWarnService.java
View file @
f17fefc1
...
...
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceAlertSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* @author huych
...
...
@@ -19,6 +21,10 @@ public interface TInsuranceWarnService extends IService<TInsuranceAlert> {
IPage
<
TInsuranceAlert
>
getTInsuranceAlertPage
(
Page
<
TInsuranceAlert
>
page
,
TInsuranceAlertSearchVo
tInsuranceAlert
);
List
<
TInsuranceAlert
>
getTInsuranceAlertList2000
(
TInsuranceAlertSearchVo
tInsuranceAlert
);
long
getInsuranceAlertCount
(
TInsuranceAlertSearchVo
tInsuranceAlert
);
// 商险待续保导出
void
exportTInsuranceAlert
(
TInsuranceAlertSearchVo
searchVo
,
HttpServletResponse
response
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TEmployeeInsurancePreServiceImpl.java
View file @
f17fefc1
...
...
@@ -790,6 +790,28 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return
false
;
}
@Override
public
List
<
InsuranceAutoParam
>
getInsuranceAutoParamList
(
List
<
InsuranceAddParam
>
addParamList
,
List
<
InsuranceBatchParam
>
batchParamList
,
List
<
InsuranceReplaceParam
>
replaceParamList
)
{
if
(
addParamList
!=
null
)
{
addParamList
=
new
ArrayList
<>();
}
if
(
batchParamList
!=
null
)
{
batchParamList
=
new
ArrayList
<>();
}
if
(
replaceParamList
!=
null
)
{
replaceParamList
=
new
ArrayList
<>();
}
// 使用Stream合并三个列表
return
Stream
.
concat
(
addParamList
.
stream
().
map
(
this
::
convertAddParam
),
Stream
.
concat
(
batchParamList
.
stream
().
map
(
this
::
convertBatchParam
),
replaceParamList
.
stream
().
map
(
this
::
convertReplaceParam
)
)
).
collect
(
Collectors
.
toList
());
}
private
InsuranceAutoParam
convertAddParam
(
InsuranceAddParam
addParam
)
{
InsuranceAutoParam
autoParam
=
new
InsuranceAutoParam
();
// 复制InsuranceAddParam的字段
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
f17fefc1
...
...
@@ -32,10 +32,7 @@ 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.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TEmployeeInsurancePreMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceAreaResMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TUpdateStatusErrorMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceAreaResService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*
;
...
...
@@ -142,6 +139,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private
TInsuranceAreaResMapper
insuranceAreaResMapper
;
@Resource
private
TEmployeeInsurancePreMapper
employeeInsurancePreMapper
;
@Resource
private
TInsurancePreRenewDetailMapper
tInsurancePreRenewDetailMapper
;
@Resource
private
TInsuranceWarnMapper
tInsuranceWarnMapper
;
/***********************商险办理********************************/
/**
...
...
@@ -379,6 +380,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
baseMapper
.
insert
(
detail
);
updateEmployeeInsurancePre
(
success
.
getInsurancePreId
(),
detail
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePreRenew
(
success
.
getInsurancePreRenewId
(),
detail
,
CommonConstants
.
THREE_STRING
);
}
List
<
String
>
replaceIdList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
d
:
detailList
)
{
...
...
@@ -395,14 +397,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
listUpdateResult
))
{
List
<
String
>
idList
=
new
ArrayList
<>();
List
<
String
>
idRenewList
=
new
ArrayList
<>();
for
(
InsuranceAddParam
addParam
:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
}
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreRenewId
()))
{
idRenewList
.
add
(
addParam
.
getInsurancePreRenewId
());
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
if
(!
idRenewList
.
isEmpty
())
{
updateEmployeeInsurancePreRenew
(
idRenewList
);
}
}
return
R
.
other
(
listResult
,
InsurancesConstants
.
ADD_SUCCESS
,
CommonConstants
.
TWO_INT
);
}
else
{
...
...
@@ -460,6 +469,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replaceIdList
.
add
(
detail
.
getId
());
baseMapper
.
insert
(
detail
);
updateEmployeeInsurancePre
(
success
.
getInsurancePreId
(),
detail
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePreRenew
(
success
.
getInsurancePreRenewId
(),
detail
,
CommonConstants
.
THREE_STRING
);
}
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this
.
doFailInfo
(
detailList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
FOUR_STRING
);
...
...
@@ -472,14 +482,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
listUpdateResult
))
{
List
<
String
>
idList
=
new
ArrayList
<>();
List
<
String
>
idRenewList
=
new
ArrayList
<>();
for
(
InsuranceBatchParam
addParam
:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
}
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreRenewId
()))
{
idRenewList
.
add
(
addParam
.
getInsurancePreRenewId
());
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
if
(!
idRenewList
.
isEmpty
())
{
updateEmployeeInsurancePreRenew
(
idRenewList
);
}
}
return
R
.
other
(
listResult
,
InsurancesConstants
.
BATCH_SUCCESS
,
CommonConstants
.
TWO_INT
);
}
else
{
...
...
@@ -604,6 +621,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceReplaceService
.
save
(
replace
);
updateEmployeeInsurancePre
(
success
.
getInsurancePreId
(),
newDetail
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePreRenew
(
success
.
getInsurancePreRenewId
(),
newDetail
,
CommonConstants
.
THREE_STRING
);
}
detailList
.
add
(
newDetail
);
}
...
...
@@ -616,14 +634,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
listUpdateResult
))
{
List
<
String
>
idList
=
new
ArrayList
<>();
List
<
String
>
idRenewList
=
new
ArrayList
<>();
for
(
InsuranceReplaceParam
addParam
:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
}
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreRenewId
()))
{
idRenewList
.
add
(
addParam
.
getInsurancePreRenewId
());
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
if
(!
idRenewList
.
isEmpty
())
{
updateEmployeeInsurancePreRenew
(
idRenewList
);
}
}
return
R
.
other
(
listResult
,
InsurancesConstants
.
REPLACE_SUCCESS
,
CommonConstants
.
TWO_INT
);
}
else
{
...
...
@@ -827,6 +852,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
byId
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
byId
);
updateEmployeeInsurancePre
(
null
,
byId
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePreRenew
(
null
,
byId
,
CommonConstants
.
THREE_STRING
);
// 同步档案
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
detailList
.
add
(
byId
);
...
...
@@ -888,6 +914,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
byId
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
byId
);
updateEmployeeInsurancePre
(
null
,
byId
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePreRenew
(
null
,
byId
,
CommonConstants
.
THREE_STRING
);
// 同步档案
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
...
...
@@ -1134,6 +1161,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
detailList
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
}
}
}
...
...
@@ -1299,6 +1327,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
detailList
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"3"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
FOUR_STRING
);
}
}
}
...
...
@@ -1600,6 +1629,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
});
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
);
}
//更新状态
this
.
updateBatchById
(
successList
);
...
...
@@ -1728,6 +1758,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
successOne
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
//查找被替换人信息
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
...
...
@@ -1785,6 +1816,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setDefaultSettleId
(
settle
.
getId
());
successTwo
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
//生成收入数据
createInsuranceInfo
(
detail
,
settleDomain
);
}
else
{
...
...
@@ -1822,6 +1854,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setDefaultSettleId
(
settle
.
getId
());
successTwo
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
//生成收入数据
createInsuranceInfo
(
detail
,
settleDomain
);
}
...
...
@@ -1842,6 +1875,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setUpdateBy
(
user
.
getId
());
successOne
.
add
(
detail
);
updateEmployeeInsurancePreById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
updateEmployeeInsurancePreRenewById
(
detail
,
Stream
.
of
(
"4"
).
collect
(
Collectors
.
toList
()),
CommonConstants
.
SIX_STRING
);
}
}
}
...
...
@@ -8155,6 +8189,42 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
ok
();
}
@Override
public
R
<
Object
>
batchIgnoreInsuranceAlert
(
List
<
String
>
ids
,
String
remark
)
{
if
(
Common
.
isEmpty
(
ids
)
||
Common
.
isEmpty
(
remark
)){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
// 先查再更新
List
<
TInsuranceAlert
>
alertList
=
tInsuranceWarnMapper
.
selectInsuranceAlertList
(
ids
);
if
(
alertList
!=
null
&&
!
alertList
.
isEmpty
())
{
List
<
String
>
successList
=
new
ArrayList
<>();
Map
<
String
,
TInsuranceAlert
>
alertMap
=
new
HashMap
<>();
for
(
TInsuranceAlert
alert
:
alertList
)
{
alertMap
.
put
(
alert
.
getId
(),
alert
);
}
TInsuranceAlert
alert
;
int
successNum
=
0
;
for
(
String
id
:
ids
)
{
alert
=
alertMap
.
get
(
id
);
if
(
alert
!=
null
&&
InsurancesConstants
.
ALERT_IGNORE_STATUS
.
contains
(
alert
.
getProcessStatus
()))
{
successList
.
add
(
id
);
successNum
++;
}
}
baseMapper
.
batchexpireIgnore
(
successList
,
remark
);
//更新商险到期提醒表
baseMapper
.
batchexpireAlertIgnore
(
successList
,
remark
);
if
(
successNum
==
ids
.
size
())
{
return
R
.
ok
();
}
else
{
int
failNum
=
ids
.
size
()
-
successNum
;
return
R
.
ok
(
"成功"
+
successNum
+
"条;"
+
"失败"
+
failNum
+
"条"
);
}
}
else
{
return
R
.
failed
(
"无数据可操作"
);
}
}
/**
* @Author fxj
* @Description 商险到期提醒 批量备注更新
...
...
@@ -8687,4 +8757,53 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
employeeInsurancePreMapper
.
updateById
(
pre
);
}
}
// hgw-1商险待续签-商险各个入口更新待续签列表状态更新
private
void
updateEmployeeInsurancePreRenew
(
String
insurancePreId
,
TInsuranceDetail
insuranceDetail
,
String
status
)
{
TInsurancePreRenewDetail
pre
;
if
(
null
!=
insurancePreId
)
{
pre
=
tInsurancePreRenewDetailMapper
.
selectOne
(
Wrappers
.<
TInsurancePreRenewDetail
>
query
().
lambda
()
.
eq
(
TInsurancePreRenewDetail:
:
getId
,
insurancePreId
)
.
in
(
TInsurancePreRenewDetail:
:
getProcessStatus
,
Stream
.
of
(
"0"
,
"1"
,
"2"
,
"5"
).
collect
(
Collectors
.
toList
()))
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
else
{
pre
=
tInsurancePreRenewDetailMapper
.
selectOne
(
Wrappers
.<
TInsurancePreRenewDetail
>
query
().
lambda
()
.
eq
(
TInsurancePreRenewDetail:
:
getEmpIdcardNo
,
insuranceDetail
.
getEmpIdcardNo
())
.
eq
(
TInsurancePreRenewDetail:
:
getDeptNo
,
insuranceDetail
.
getDeptNo
())
.
eq
(
TInsurancePreRenewDetail:
:
getBuyStandard
,
insuranceDetail
.
getBuyStandard
())
.
eq
(
TInsurancePreRenewDetail:
:
getInsuranceTypeName
,
insuranceDetail
.
getInsuranceTypeName
())
.
eq
(
TInsurancePreRenewDetail:
:
getInsuranceCompanyName
,
insuranceDetail
.
getInsuranceCompanyName
())
.
eq
(
TInsurancePreRenewDetail:
:
getPolicyStart
,
insuranceDetail
.
getPolicyStart
())
.
eq
(
TInsurancePreRenewDetail:
:
getPolicyEnd
,
insuranceDetail
.
getPolicyEnd
())
.
in
(
TInsurancePreRenewDetail:
:
getProcessStatus
,
Stream
.
of
(
"0"
,
"1"
,
"2"
,
"5"
).
collect
(
Collectors
.
toList
()))
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
if
(
Common
.
isNotNull
(
pre
))
{
pre
.
setProcessStatus
(
status
);
if
(
Common
.
isNotNull
(
insuranceDetail
.
getId
()))
{
pre
.
setInsurancesId
(
insuranceDetail
.
getId
());
pre
.
setIsAddress
(
insuranceDetail
.
getIsAdress
());
}
tInsurancePreRenewDetailMapper
.
updateById
(
pre
);
}
}
// hgw-2商险待续签-更新商险待购买派单失败
private
void
updateEmployeeInsurancePreRenew
(
List
<
String
>
insurancePreIdList
)
{
if
(!
insurancePreIdList
.
isEmpty
())
{
tInsurancePreRenewDetailMapper
.
updateRenewBatchById
(
insurancePreIdList
);
}
}
// hgw-3商险待续签-商险各个入口更新待购买列表状态更新
private
void
updateEmployeeInsurancePreRenewById
(
TInsuranceDetail
insuranceDetail
,
List
<
String
>
preStatusList
,
String
status
)
{
TInsurancePreRenewDetail
pre
=
tInsurancePreRenewDetailMapper
.
selectOne
(
Wrappers
.<
TInsurancePreRenewDetail
>
query
().
lambda
()
.
eq
(
TInsurancePreRenewDetail:
:
getInsurancesId
,
insuranceDetail
.
getId
())
.
in
(
TInsurancePreRenewDetail:
:
getProcessStatus
,
preStatusList
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
pre
))
{
pre
.
setProcessStatus
(
status
);
tInsurancePreRenewDetailMapper
.
updateById
(
pre
);
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsurancePreRenewDetailQwDetailServiceImpl.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQwDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreRenewDetailQwDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailQwDetailService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
@Log4j2
@Service
public
class
TInsurancePreRenewDetailQwDetailServiceImpl
extends
ServiceImpl
<
TInsurancePreRenewDetailQwDetailMapper
,
TInsurancePreRenewDetailQwDetail
>
implements
TInsurancePreRenewDetailQwDetailService
{
/**
* 商险待续保企微消息简单分页查询
*
* @param tInsurancePreRenewDetailQwDetail 商险待续保企微消息
* @return
*/
@Override
public
IPage
<
TInsurancePreRenewDetailQwDetail
>
getTInsurancePreRenewDetailQwDetailPage
(
Page
<
TInsurancePreRenewDetailQwDetail
>
page
,
TInsurancePreRenewDetailQwDetail
tInsurancePreRenewDetailQwDetail
)
{
return
baseMapper
.
getTInsurancePreRenewDetailQwDetailPage
(
page
,
tInsurancePreRenewDetailQwDetail
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsurancePreRenewDetailQwServiceImpl.java
0 → 100644
View file @
f17fefc1
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQw
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreRenewDetailQwMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailQwService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
/**
* 商险待续保企微消息
*
* @author hgw
* @date 2025-11-17 14:49:48
*/
@Log4j2
@Service
public
class
TInsurancePreRenewDetailQwServiceImpl
extends
ServiceImpl
<
TInsurancePreRenewDetailQwMapper
,
TInsurancePreRenewDetailQw
>
implements
TInsurancePreRenewDetailQwService
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsurancePreRenewDetailServiceImpl.java
View file @
f17fefc1
...
...
@@ -16,14 +16,48 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
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.vo.IdNameNoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
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.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.config.WxConfig
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQw
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQwDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreRenewDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceWarnMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailQwDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailQwService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TEmployeeInsuranceWorkDayVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* 商险续签待办
...
...
@@ -34,6 +68,27 @@ import org.springframework.stereotype.Service;
@Log4j2
@Service
public
class
TInsurancePreRenewDetailServiceImpl
extends
ServiceImpl
<
TInsurancePreRenewDetailMapper
,
TInsurancePreRenewDetail
>
implements
TInsurancePreRenewDetailService
{
@Autowired
@Lazy
private
TInsuranceDetailService
detailService
;
@Resource
private
TInsuranceWarnMapper
tInsuranceWarnMapper
;
@Resource
private
TInsurancePreRenewDetailQwService
tInsurancePreRenewDetailQwService
;
@Resource
private
TInsurancePreRenewDetailQwDetailService
tInsurancePreRenewDetailQwDetailService
;
@Autowired
private
WxConfig
wxConfig
;
@Autowired
private
UpmsDaprUtils
upmsDaprUtils
;
@Autowired
private
SocialDaprUtils
socialDaprUtils
;
/**
* 商险续签待办简单分页查询
*
...
...
@@ -44,4 +99,597 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
public
IPage
<
TInsurancePreRenewDetail
>
getTInsurancePreRenewDetailPage
(
Page
<
TInsurancePreRenewDetail
>
page
,
TInsurancePreRenewDetail
tInsurancePreRenewDetail
)
{
return
baseMapper
.
getTInsurancePreRenewDetailPage
(
page
,
tInsurancePreRenewDetail
);
}
@Override
public
R
<
String
>
doEdit
(
TInsurancePreRenewDetail
tInsurancePreRenewDetail
)
{
if
(
tInsurancePreRenewDetail
!=
null
&&
Common
.
isNotNull
(
tInsurancePreRenewDetail
.
getId
()))
{
TInsuranceAlert
alert
=
tInsuranceWarnMapper
.
selectInsuranceAlertOne
(
tInsurancePreRenewDetail
.
getId
());
if
(
alert
!=
null
&&
Common
.
isNotNull
(
alert
.
getId
())
&&
Common
.
isNotNull
(
alert
.
getProcessStatus
()))
{
if
(!(
CommonConstants
.
ONE_STRING
.
equals
(
alert
.
getProcessStatus
())
||
CommonConstants
.
TWO_STRING
.
equals
(
alert
.
getProcessStatus
())
||
CommonConstants
.
FIVE_STRING
.
equals
(
alert
.
getProcessStatus
())))
{
return
R
.
failed
(
"该状态不可编辑,请刷新后重试"
);
}
this
.
updateById
(
tInsurancePreRenewDetail
);
return
R
.
ok
();
}
else
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
}
else
{
return
R
.
failed
(
"请传参ID"
);
}
}
@Override
public
R
<
String
>
doSure
(
TInsurancePreRenewDetail
tInsurancePreRenewDetail
)
{
if
(
tInsurancePreRenewDetail
!=
null
&&
Common
.
isNotNull
(
tInsurancePreRenewDetail
.
getId
()))
{
TInsuranceAlert
alert
=
tInsuranceWarnMapper
.
selectInsuranceAlertOne
(
tInsurancePreRenewDetail
.
getId
());
if
(
alert
!=
null
&&
Common
.
isNotNull
(
alert
.
getId
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
alert
.
getProcessStatus
()))
{
tInsurancePreRenewDetail
.
setProcessStatus
(
CommonConstants
.
ONE_STRING
);
this
.
updateById
(
tInsurancePreRenewDetail
);
return
R
.
ok
();
}
else
{
return
R
.
failed
(
"状态不是待确认"
);
}
}
else
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
}
else
{
return
R
.
failed
(
"请传参ID"
);
}
}
@Override
public
R
<
String
>
doSureBatch
(
BatchIgnoreVo
vo
)
{
List
<
String
>
ids
=
vo
.
getIds
();
if
(
Common
.
isEmpty
(
ids
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
// 先查再更新
List
<
TInsuranceAlert
>
alertList
=
tInsuranceWarnMapper
.
selectInsuranceAlertList
(
ids
);
if
(
alertList
!=
null
&&
!
alertList
.
isEmpty
())
{
List
<
String
>
successList
=
new
ArrayList
<>();
Map
<
String
,
TInsuranceAlert
>
alertMap
=
new
HashMap
<>();
for
(
TInsuranceAlert
alert
:
alertList
)
{
alertMap
.
put
(
alert
.
getId
(),
alert
);
}
TInsuranceAlert
alert
;
int
successNum
=
0
;
for
(
String
id
:
ids
)
{
alert
=
alertMap
.
get
(
id
);
if
(
alert
!=
null
&&
CommonConstants
.
ZERO_STRING
.
equals
(
alert
.
getProcessStatus
()))
{
successList
.
add
(
id
);
successNum
++;
}
}
if
(
successNum
==
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
else
{
baseMapper
.
doBatchSure
(
successList
);
return
R
.
ok
();
}
}
else
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
}
@Override
public
void
autoDoWxSureMessage
()
{
//获取所有预计派单时间为当天而且状态是待确认的商险待购买数据
// 工作日逻辑
// 工作日逻辑
if
(
isWorkDay
())
{
List
<
IdNameNoVo
>
unConfirmList
=
baseMapper
.
getAllUnconfimData
();
if
(
Common
.
isNotNull
(
unConfirmList
)
&&
!
unConfirmList
.
isEmpty
())
{
for
(
IdNameNoVo
messageVo
:
unConfirmList
)
{
try
{
sendWxSureMessage
(
messageVo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
}
}
//发送企业微信待办
private
void
sendWxSureMessage
(
IdNameNoVo
messageVo
)
{
//获取前端客服
SysUser
user
;
if
(
Common
.
isEmpty
(
messageVo
.
getName
()))
{
return
;
}
R
<
SysUser
>
res
=
upmsDaprUtils
.
getSimpleUserByLoginName
(
messageVo
.
getName
());
if
(
Common
.
isNotNull
(
res
)
&&
Common
.
isNotNull
(
res
.
getData
()))
{
user
=
res
.
getData
();
}
else
{
return
;
}
StringBuilder
sendUser
=
null
;
if
(
Common
.
isNotKong
(
user
.
getWxMessage
()))
{
sendUser
=
new
StringBuilder
(
user
.
getWxMessage
());
}
if
(
sendUser
!=
null
)
{
RestTemplate
restTemplate
=
new
RestTemplate
();
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
textcard
=
new
HashMap
<>();
String
authUrl
=
String
.
format
(
SecurityConstants
.
WX_GET_MESSAGE_AUTH_URL
,
wxConfig
.
getCorpid
()
,
wxConfig
.
getDomainName
()
+
"/auth/oauth/wxLogin"
,
"02"
+
messageVo
.
getName
());
StringBuilder
description
=
new
StringBuilder
();
String
title
=
"作业自动化——商险临期续保提醒"
;
description
.
append
(
"商险剩余天数不足5个工作日的人数:"
+
messageVo
.
getId
()+
"人"
).
append
(
"<br>"
)
.
append
(
"请及时续保,以免脱保,产生用工风险!"
);
textcard
.
put
(
"title"
,
title
);
textcard
.
put
(
"url"
,
authUrl
);
textcard
.
put
(
"description"
,
description
.
toString
());
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
);
}
}
}
@Override
public
boolean
isWorkDayTest
()
{
return
isWorkDay
();
}
/**
* 判断指定日期是否为工作日
* @return true-工作日,false-非工作日
*/
private
boolean
isWorkDay
()
{
TEmployeeInsuranceWorkDayVo
workDayVo
=
new
TEmployeeInsuranceWorkDayVo
();
LocalDate
localDate
=
LocalDate
.
now
();
// 转换为java.util.Date(如果需要)
Date
today
=
Date
.
from
(
localDate
.
atStartOfDay
(
ZoneId
.
systemDefault
()).
toInstant
());
workDayVo
.
setRegistDate
(
today
);
// 使用THolidayInfoService的checkIsWorkDay方法判断是否为假期
// 如果是假期则不是工作日,否则是工作日
R
<
Boolean
>
res
=
socialDaprUtils
.
checkIsWorkDay
(
workDayVo
);
return
!
res
.
getData
();
}
@Override
public
void
autoDoInsurancePreRenew
()
{
//获取所有待派单的数据
// 工作日逻辑
if
(
isWorkDay
())
{
List
<
String
>
unConfirmList
=
baseMapper
.
getAllNeedDispatchData
();
if
(
null
!=
unConfirmList
&&
!
unConfirmList
.
isEmpty
())
{
//更新成已确认
LambdaUpdateWrapper
<
TInsurancePreRenewDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
in
(
TInsurancePreRenewDetail:
:
getId
,
unConfirmList
)
.
eq
(
TInsurancePreRenewDetail:
:
getProcessStatus
,
CommonConstants
.
ZERO_STRING
)
.
set
(
TInsurancePreRenewDetail:
:
getProcessStatus
,
CommonConstants
.
ONE_STRING
);
this
.
update
(
updateWrapper
);
try
{
this
.
batchDoInsurancePreRenew
(
unConfirmList
,
CommonConstants
.
ONE_STRING
,
true
);
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
}
@Override
public
R
<
List
<
InsuranceAutoParam
>>
batchDoInsurancePreRenew
(
List
<
String
>
idList
,
String
sameFlag
,
boolean
pushQiWeiFlag
)
{
List
<
TInsurancePreRenewDetail
>
insurancePreList
=
baseMapper
.
selectPreRenewDetailListByDispatch
(
idList
);
if
(
Common
.
isEmpty
(
insurancePreList
))
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
List
<
String
>
pushIdList
=
insurancePreList
.
stream
().
map
(
TInsurancePreRenewDetail:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
InsuranceAddParam
>
addParamList
=
new
ArrayList
<>();
List
<
InsuranceBatchParam
>
batchAddParamList
=
new
ArrayList
<>();
List
<
InsuranceReplaceParam
>
replaceAddParamList
=
new
ArrayList
<>();
for
(
TInsurancePreRenewDetail
insurancePre
:
insurancePreList
)
{
//新增、批增、替换
if
(
CommonConstants
.
ONE_INT
==
insurancePre
.
getBuyType
())
{
InsuranceAddParam
addParam
=
new
InsuranceAddParam
();
addParam
.
setEmpName
(
insurancePre
.
getEmpName
());
addParam
.
setEmpIdcardNo
(
insurancePre
.
getEmpIdcardNo
());
addParam
.
setDeptNo
(
insurancePre
.
getDeptNo
());
addParam
.
setInsuranceCompanyName
(
insurancePre
.
getInsuranceCompanyName
());
addParam
.
setInsuranceTypeName
(
insurancePre
.
getInsuranceTypeName
());
addParam
.
setPolicyStart
(
LocalDateUtil
.
getDateSrt
(
insurancePre
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
));
addParam
.
setPolicyEnd
(
LocalDateUtil
.
getDateSrt
(
insurancePre
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
));
addParam
.
setBuyStandard
(
insurancePre
.
getBuyStandard
());
addParam
.
setInsuranceProvinceName
(
insurancePre
.
getInsuranceProvinceName
());
addParam
.
setInsuranceCityName
(
insurancePre
.
getInsuranceCityName
());
addParam
.
setSettleMonth
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setPost
(
insurancePre
.
getPost
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreRenewId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
addParam
.
setIsExit
(
sameFlag
);
addParamList
.
add
(
addParam
);
}
if
(
CommonConstants
.
THREE_INT
==
insurancePre
.
getBuyType
())
{
InsuranceBatchParam
addParam
=
new
InsuranceBatchParam
();
addParam
.
setEmpName
(
insurancePre
.
getEmpName
());
addParam
.
setEmpIdcardNo
(
insurancePre
.
getEmpIdcardNo
());
addParam
.
setDeptNo
(
insurancePre
.
getDeptNo
());
addParam
.
setInsuranceCompanyName
(
insurancePre
.
getInsuranceCompanyName
());
addParam
.
setInsuranceTypeName
(
insurancePre
.
getInsuranceTypeName
());
addParam
.
setPolicyNo
(
insurancePre
.
getPolicyNo
());
addParam
.
setBuyStandard
(
insurancePre
.
getBuyStandard
());
addParam
.
setInsuranceProvinceName
(
insurancePre
.
getInsuranceProvinceName
());
addParam
.
setInsuranceCityName
(
insurancePre
.
getInsuranceCityName
());
addParam
.
setSettleMonth
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setPost
(
insurancePre
.
getPost
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreRenewId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
addParam
.
setPolicyStart
(
insurancePre
.
getPolicyStart
());
addParam
.
setPolicyEnd
(
insurancePre
.
getPolicyEnd
());
addParam
.
setIsExit
(
sameFlag
);
batchAddParamList
.
add
(
addParam
);
}
if
(
CommonConstants
.
FOUR_INT
==
insurancePre
.
getBuyType
())
{
InsuranceReplaceParam
addParam
=
new
InsuranceReplaceParam
();
addParam
.
setEmpName
(
insurancePre
.
getReplaceEmployeeName
());
addParam
.
setEmpIdcardNo
(
insurancePre
.
getReplaceEmpIdcard
());
addParam
.
setDeptNo
(
insurancePre
.
getReplaceDeptNo
());
addParam
.
setInsuranceCompanyName
(
insurancePre
.
getInsuranceCompanyName
());
addParam
.
setInsuranceTypeName
(
insurancePre
.
getInsuranceTypeName
());
addParam
.
setBuyStandard
(
insurancePre
.
getBuyStandard
());
addParam
.
setPolicyStart
(
LocalDateUtil
.
getDateSrt
(
insurancePre
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
));
addParam
.
setPolicyEnd
(
LocalDateUtil
.
getDateSrt
(
insurancePre
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
));
addParam
.
setPost
(
insurancePre
.
getPost
());
addParam
.
setReplaceEmpName
(
insurancePre
.
getEmpName
());
addParam
.
setReplaceDeptNo
(
insurancePre
.
getDeptNo
());
addParam
.
setReplaceEmpIdcardNo
(
insurancePre
.
getEmpIdcardNo
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreRenewId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
addParam
.
setIsExit
(
sameFlag
);
replaceAddParamList
.
add
(
addParam
);
}
}
//组装返回给前端
List
<
InsuranceAddParam
>
paramList
=
new
ArrayList
<>();
List
<
InsuranceBatchParam
>
batchParamList
=
new
ArrayList
<>();
List
<
InsuranceReplaceParam
>
replaceParamList
=
new
ArrayList
<>();
if
(!
addParamList
.
isEmpty
())
{
R
<
List
<
InsuranceAddParam
>>
listR
=
detailService
.
addInsurance
(
addParamList
,
null
,
true
);
if
(
Common
.
isNotNull
(
listR
)
&&
Common
.
isNotNull
(
listR
.
getData
())
&&
!
listR
.
getData
().
isEmpty
())
{
paramList
=
listR
.
getData
();
}
}
if
(!
batchAddParamList
.
isEmpty
())
{
R
<
List
<
InsuranceBatchParam
>>
listR
=
detailService
.
batchInsurance
(
batchAddParamList
,
null
,
true
);
if
(
Common
.
isNotNull
(
listR
)
&&
Common
.
isNotNull
(
listR
.
getData
())
&&
!
listR
.
getData
().
isEmpty
())
{
batchParamList
=
listR
.
getData
();
}
}
if
(!
replaceAddParamList
.
isEmpty
())
{
R
<
List
<
InsuranceReplaceParam
>>
listR
=
detailService
.
replaceInsurance
(
replaceAddParamList
,
null
,
true
);
if
(
Common
.
isNotNull
(
listR
)
&&
Common
.
isNotNull
(
listR
.
getData
())
&&
!
listR
.
getData
().
isEmpty
())
{
replaceParamList
=
listR
.
getData
();
}
}
// 使用Stream合并三个列表
List
<
InsuranceAutoParam
>
autoAddParamList
=
this
.
getInsuranceAutoParamList
(
paramList
,
batchParamList
,
replaceParamList
);
if
(
autoAddParamList
.
isEmpty
())
{
LambdaUpdateWrapper
<
TInsurancePreRenewDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
in
(
TInsurancePreRenewDetail:
:
getId
,
pushIdList
)
.
set
(
TInsurancePreRenewDetail:
:
getProcessStatus
,
CommonConstants
.
THREE_STRING
);
this
.
update
(
updateWrapper
);
}
else
{
// 将 autoAddParamList 中的id等信息提取出来,放入一个 Set 中
Set
<
String
>
autoAddParamSet
=
new
HashSet
<>();
Map
<
String
,
String
>
errorMessageMap
=
new
HashMap
<>();
for
(
InsuranceAutoParam
info
:
autoAddParamList
)
{
autoAddParamSet
.
add
(
info
.
getInsurancePreId
());
errorMessageMap
.
put
(
info
.
getInsurancePreId
(),
info
.
getErrorMessage
());
}
Map
<
String
,
Set
<
String
>>
deptNumMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
allNumMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
failNumMap
=
new
HashMap
<>();
Map
<
String
,
TInsurancePreRenewDetailQw
>
preQwMap
=
new
HashMap
<>();
List
<
TInsurancePreRenewDetail
>
updateList
=
new
ArrayList
<>();
TInsurancePreRenewDetail
updatePre
;
LocalDateTime
now
=
LocalDateTime
.
now
();
String
errorrMessage
;
Set
<
String
>
tempSet
;
Integer
nums
;
String
customerUserLoginname
;
// 项目、人数、失败人数
TInsurancePreRenewDetailQw
qw
;
TInsurancePreRenewDetailQwDetail
qwDetail
;
List
<
TInsurancePreRenewDetailQwDetail
>
qwDetalList
=
new
ArrayList
<>();
for
(
TInsurancePreRenewDetail
pre
:
insurancePreList
)
{
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
.
setId
(
pre
.
getId
());
String
qwUuId
;
if
(
Common
.
isNotNull
(
customerUserLoginname
))
{
nums
=
allNumMap
.
get
(
customerUserLoginname
);
if
(
Common
.
isEmpty
(
nums
))
{
nums
=
CommonConstants
.
ZERO_INT
;
}
nums
++;
allNumMap
.
put
(
customerUserLoginname
,
nums
);
}
// 派单失败的
if
(
autoAddParamSet
.
contains
(
pre
.
getId
()))
{
errorrMessage
=
errorMessageMap
.
get
(
pre
.
getId
());
if
(
Common
.
isNotNull
(
customerUserLoginname
))
{
nums
=
failNumMap
.
get
(
customerUserLoginname
);
if
(
Common
.
isEmpty
(
nums
))
{
nums
=
CommonConstants
.
ZERO_INT
;
}
nums
++;
failNumMap
.
put
(
customerUserLoginname
,
nums
);
// 派单失败,组装需要推送企微的明细
qw
=
preQwMap
.
get
(
customerUserLoginname
);
if
(
qw
==
null
)
{
qw
=
new
TInsurancePreRenewDetailQw
();
qwUuId
=
String
.
valueOf
(
UUID
.
randomUUID
()).
replace
(
"-"
,
""
);
qw
.
setId
(
qwUuId
);
qw
.
setCreateTime
(
now
);
qw
.
setCustomerUserLoginname
(
customerUserLoginname
);
qw
.
setCustomerUsername
(
pre
.
getCustomerUsername
());
}
else
{
qwUuId
=
qw
.
getId
();
}
preQwMap
.
put
(
customerUserLoginname
,
qw
);
// 派单失败,组装需要推送企微的明细
qwDetail
=
new
TInsurancePreRenewDetailQwDetail
();
qwDetail
.
setPreId
(
pre
.
getId
());
qwDetail
.
setMainId
(
qwUuId
);
qwDetail
.
setEmpName
(
pre
.
getEmpName
());
qwDetail
.
setEmpIdcard
(
pre
.
getEmpIdcardNo
());
qwDetail
.
setErrorInfo
(
errorrMessage
);
qwDetail
.
setErrorTime
(
now
);
qwDetalList
.
add
(
qwDetail
);
}
updatePre
.
setProcessStatus
(
CommonConstants
.
TWO_STRING
);
updatePre
.
setErrorTime
(
now
);
updatePre
.
setErrorInfo
(
errorrMessage
);
updateList
.
add
(
updatePre
);
}
else
{
// 派单成功的
updatePre
.
setProcessStatus
(
CommonConstants
.
THREE_STRING
);
updateList
.
add
(
updatePre
);
}
}
if
(!
updateList
.
isEmpty
())
{
this
.
updateBatchById
(
updateList
);
}
// pushQiWeiFlag 推送企微的flag,true表示推送企微
if
(
pushQiWeiFlag
&&
!
preQwMap
.
isEmpty
())
{
List
<
TInsurancePreRenewDetailQw
>
qwList
=
new
ArrayList
<>();
int
deptNum
;
int
allNum
;
int
failNum
;
StringBuilder
description
;
String
userLoginNames
=
null
;
for
(
Map
.
Entry
<
String
,
TInsurancePreRenewDetailQw
>
entry
:
preQwMap
.
entrySet
())
{
customerUserLoginname
=
entry
.
getKey
();
if
(
Common
.
isNotNull
(
userLoginNames
))
{
userLoginNames
+=
","
+
customerUserLoginname
;
}
else
{
userLoginNames
=
customerUserLoginname
;
}
qw
=
entry
.
getValue
();
tempSet
=
deptNumMap
.
get
(
customerUserLoginname
);
if
(
Common
.
isNotNull
(
tempSet
))
{
deptNum
=
tempSet
.
size
();
}
else
{
deptNum
=
0
;
}
allNum
=
allNumMap
.
get
(
customerUserLoginname
);
if
(
Common
.
isEmpty
(
allNum
))
{
allNum
=
0
;
}
failNum
=
failNumMap
.
get
(
customerUserLoginname
);
if
(
Common
.
isEmpty
(
failNum
))
{
failNum
=
0
;
}
description
=
new
StringBuilder
(
"项目数:"
).
append
(
deptNum
).
append
(
"个;自动化派单人数:"
)
.
append
(
allNum
).
append
(
"个,【失败人数:"
).
append
(
failNum
).
append
(
"个】<br>请及时至HRO系统处理,以免人员漏保!"
);
qw
.
setDescription
(
description
.
toString
());
qwList
.
add
(
qw
);
}
if
(!
qwDetalList
.
isEmpty
()
&&
!
qwList
.
isEmpty
())
{
tInsurancePreRenewDetailQwDetailService
.
saveBatch
(
qwDetalList
);
tInsurancePreRenewDetailQwService
.
saveBatch
(
qwList
);
if
(
Common
.
isNotNull
(
userLoginNames
))
{
Map
<
String
,
String
>
sysUserMap
=
getUserQiWeiInfo
(
userLoginNames
);
String
qwInfo
;
if
(!
sysUserMap
.
isEmpty
())
{
for
(
TInsurancePreRenewDetailQw
sendQw
:
qwList
)
{
qwInfo
=
sysUserMap
.
get
(
sendQw
.
getCustomerUserLoginname
());
if
(
Common
.
isNotNull
(
qwInfo
))
{
sendMessageToWx
(
qwInfo
,
sendQw
.
getDescription
(),
sendQw
.
getId
());
}
}
}
}
}
}
}
return
R
.
ok
(
autoAddParamList
);
}
private
List
<
InsuranceAutoParam
>
getInsuranceAutoParamList
(
List
<
InsuranceAddParam
>
addParamList
,
List
<
InsuranceBatchParam
>
batchParamList
,
List
<
InsuranceReplaceParam
>
replaceParamList
)
{
if
(
addParamList
!=
null
)
{
addParamList
=
new
ArrayList
<>();
}
if
(
batchParamList
!=
null
)
{
batchParamList
=
new
ArrayList
<>();
}
if
(
replaceParamList
!=
null
)
{
replaceParamList
=
new
ArrayList
<>();
}
// 使用Stream合并三个列表
return
Stream
.
concat
(
addParamList
.
stream
().
map
(
this
::
convertAddParam
),
Stream
.
concat
(
batchParamList
.
stream
().
map
(
this
::
convertBatchParam
),
replaceParamList
.
stream
().
map
(
this
::
convertReplaceParam
)
)
).
collect
(
Collectors
.
toList
());
}
private
InsuranceAutoParam
convertAddParam
(
InsuranceAddParam
addParam
)
{
InsuranceAutoParam
autoParam
=
new
InsuranceAutoParam
();
// 复制InsuranceAddParam的字段
autoParam
.
setEmpName
(
addParam
.
getEmpName
());
autoParam
.
setEmpIdcardNo
(
addParam
.
getEmpIdcardNo
());
autoParam
.
setDeptNo
(
addParam
.
getDeptNo
());
autoParam
.
setInsuranceCompanyName
(
addParam
.
getInsuranceCompanyName
());
autoParam
.
setInsuranceTypeName
(
addParam
.
getInsuranceTypeName
());
autoParam
.
setPolicyStart
(
addParam
.
getPolicyStart
());
autoParam
.
setPolicyEnd
(
addParam
.
getPolicyEnd
());
autoParam
.
setBuyStandard
(
addParam
.
getBuyStandard
());
autoParam
.
setInsuranceProvinceName
(
addParam
.
getInsuranceProvinceName
());
autoParam
.
setInsuranceCityName
(
addParam
.
getInsuranceCityName
());
autoParam
.
setSettleMonth
(
addParam
.
getSettleMonth
());
autoParam
.
setPost
(
addParam
.
getPost
());
autoParam
.
setRemark
(
addParam
.
getRemark
());
autoParam
.
setErrorMessage
(
addParam
.
getErrorMessage
());
autoParam
.
setInsurancePreRenewId
(
addParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
addParam
.
getCustomerUserName
());
autoParam
.
setIsExit
(
addParam
.
getIsExit
());
autoParam
.
setDeptName
(
addParam
.
getDeptName
());
autoParam
.
setBuyType
(
addParam
.
getBuyType
());
autoParam
.
setInProgressList
(
addParam
.
getInProgressList
());
return
autoParam
;
}
private
InsuranceAutoParam
convertBatchParam
(
InsuranceBatchParam
batchParam
)
{
InsuranceAutoParam
autoParam
=
new
InsuranceAutoParam
();
// 复制InsuranceBatchParam的字段
autoParam
.
setEmpName
(
batchParam
.
getEmpName
());
autoParam
.
setEmpIdcardNo
(
batchParam
.
getEmpIdcardNo
());
autoParam
.
setDeptNo
(
batchParam
.
getDeptNo
());
autoParam
.
setInsuranceCompanyName
(
batchParam
.
getInsuranceCompanyName
());
autoParam
.
setInsuranceTypeName
(
batchParam
.
getInsuranceTypeName
());
autoParam
.
setPolicyNo
(
batchParam
.
getPolicyNo
());
autoParam
.
setBuyStandard
(
batchParam
.
getBuyStandard
());
autoParam
.
setInsuranceProvinceName
(
batchParam
.
getInsuranceProvinceName
());
autoParam
.
setInsuranceCityName
(
batchParam
.
getInsuranceCityName
());
autoParam
.
setSettleMonth
(
batchParam
.
getSettleMonth
());
autoParam
.
setPost
(
batchParam
.
getPost
());
autoParam
.
setRemark
(
batchParam
.
getRemark
());
autoParam
.
setErrorMessage
(
batchParam
.
getErrorMessage
());
autoParam
.
setInsurancePreRenewId
(
batchParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
batchParam
.
getCustomerUserName
());
autoParam
.
setIsExit
(
batchParam
.
getIsExit
());
autoParam
.
setDeptName
(
batchParam
.
getDeptName
());
autoParam
.
setBuyType
(
batchParam
.
getBuyType
());
autoParam
.
setInProgressList
(
batchParam
.
getInProgressList
());
autoParam
.
setPolicyEnd
(
LocalDateUtil
.
getDateSrt
(
batchParam
.
getPolicyEnd
()));
autoParam
.
setPolicyStart
(
LocalDateUtil
.
getDateSrt
(
batchParam
.
getPolicyStart
()));
return
autoParam
;
}
private
InsuranceAutoParam
convertReplaceParam
(
InsuranceReplaceParam
replaceParam
)
{
InsuranceAutoParam
autoParam
=
new
InsuranceAutoParam
();
// 复制InsuranceReplaceParam的字段
autoParam
.
setEmpName
(
replaceParam
.
getEmpName
());
autoParam
.
setEmpIdcardNo
(
replaceParam
.
getEmpIdcardNo
());
autoParam
.
setDeptNo
(
replaceParam
.
getDeptNo
());
autoParam
.
setInsuranceCompanyName
(
replaceParam
.
getInsuranceCompanyName
());
autoParam
.
setInsuranceTypeName
(
replaceParam
.
getInsuranceTypeName
());
autoParam
.
setBuyStandard
(
replaceParam
.
getBuyStandard
());
autoParam
.
setPolicyEnd
(
replaceParam
.
getPolicyEnd
());
autoParam
.
setPolicyStart
(
replaceParam
.
getPolicyStart
());
autoParam
.
setPost
(
replaceParam
.
getPost
());
autoParam
.
setReplaceEmpName
(
replaceParam
.
getReplaceEmpName
());
autoParam
.
setReplaceDeptNo
(
replaceParam
.
getReplaceDeptNo
());
autoParam
.
setReplaceEmpIdcardNo
(
replaceParam
.
getReplaceEmpIdcardNo
());
autoParam
.
setErrorMessage
(
replaceParam
.
getErrorMessage
());
autoParam
.
setInsurancePreRenewId
(
replaceParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
replaceParam
.
getCustomerUserName
());
autoParam
.
setIsExit
(
replaceParam
.
getIsExit
());
autoParam
.
setDeptName
(
replaceParam
.
getDeptName
());
autoParam
.
setBuyType
(
replaceParam
.
getBuyType
());
autoParam
.
setInProgressList
(
replaceParam
.
getInProgressList
());
return
autoParam
;
}
//发送企业微信待办
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"
,
"65"
+
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
);
}
}
}
/**
* @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
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceWarnServiceImpl.java
View file @
f17fefc1
...
...
@@ -77,6 +77,18 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
initSearchVo
(
tInsuranceAlert
);
return
baseMapper
.
getTInsuranceAlertPage
(
page
,
tInsuranceAlert
);
}
@Override
public
List
<
TInsuranceAlert
>
getTInsuranceAlertList2000
(
TInsuranceAlertSearchVo
tInsuranceAlert
)
{
//权限赋值
initSearchVo
(
tInsuranceAlert
);
return
baseMapper
.
getTInsuranceAlertList2000
(
tInsuranceAlert
);
}
@Override
public
long
getInsuranceAlertCount
(
TInsuranceAlertSearchVo
tInsuranceAlert
)
{
initSearchVo
(
tInsuranceAlert
);
return
baseMapper
.
getTInsuranceAlertExportCount
(
tInsuranceAlert
);
}
@Override
public
void
exportTInsuranceAlert
(
TInsuranceAlertSearchVo
searchVo
,
HttpServletResponse
response
)
{
...
...
@@ -97,7 +109,7 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
EmployeeContractExportAudi
tVO
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TInsuranceAlertExpor
tVO
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
...
...
@@ -142,7 +154,7 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
searchVo
.
setAuthSql
(
null
);
return
;
}
//
if (Common.isNotNull(searchVo.getType()) && CommonConstants.ONE_STRING.equals(searchVo.getType())) {
if
(
Common
.
isNotNull
(
searchVo
.
getType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
searchVo
.
getType
()))
{
searchVo
.
setAuthSql
(
null
);
//获取项目信息
R
<
TSettleDomainRegistListVo
>
domainR
=
archivesDaprUtil
.
getAllDeptByCustomerLoginName
(
user
.
getUsername
());
...
...
@@ -151,7 +163,7 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
}
else
{
searchVo
.
setId
(
CommonConstants
.
ONE_STRING_NEGATE
);
}
//
}
}
}
public
boolean
haveRole
(
YifuUser
user
,
long
roleId
)
{
...
...
@@ -346,7 +358,6 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
detail
.
setUnitName
(
vo
.
getUnitName
());
detail
.
setUnitNo
(
vo
.
getUnitNo
());
detail
.
setIsAddress
(
vo
.
getIsAddress
());
detail
.
setPolicyNo
(
vo
.
getPolicyNo
());
detail
.
setProcessStatus
(
CommonConstants
.
ZERO_STRING
);
detailList
.
add
(
detail
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsurancePreRenewDetailMapper.xml
View file @
f17fefc1
...
...
@@ -255,4 +255,63 @@
<include
refid=
"tInsurancePreRenewDetail_where"
/>
</where>
</select>
<!-- 查找符合条件的需要派单的数据 -->
<select
id=
"selectPreRenewDetailListByDispatch"
resultMap=
"tInsurancePreRenewDetailMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_insurance_pre_renew_detail a
JOIN t_insurance_alert b ON b.INSURANCES_PRE_RENEW_DETAIL_ID = a.ID
<where>
b.EXPIRE_IGNORE_FLAG = '1' and b.DELETE_FLAG=0 and a.is_leave = '0' and b.IS_OVERDUE = 0
AND a.process_status in ('1','2','5')
<include
refid=
"tInsurancePreRenewDetail_where"
/>
</where>
order by b.POLICY_END asc,b.id asc
</select>
<update
id=
"doBatchSure"
>
<if
test=
"idList != null and idList.size() > 0"
>
update t_insurance_pre_renew_detail a
set a.process_status = '1'
where
a.id in
<foreach
collection=
"idList"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
</update>
<!-- 获取所有需要派单的数据 -->
<select
id=
"getAllNeedDispatchData"
resultType=
"java.lang.String"
>
SELECT
a.id
FROM t_insurance_pre_renew_detail a
JOIN t_insurance_alert b ON b.INSURANCES_PRE_RENEW_DETAIL_ID = a.ID
where b.EXPIRE_IGNORE_FLAG = '1' and b.DELETE_FLAG=0 and a.is_leave = '0' and b.IS_OVERDUE = 0
AND a.process_status in ('0','1','2','5')
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d")
<![CDATA[ <= ]]>
CURDATE()
</select>
<!-- 获取所有待确认的数据 -->
<select
id=
"getAllUnconfimData"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo"
>
SELECT
count(1) as id, a.customer_user_loginname as name
FROM t_insurance_pre_renew_detail a
JOIN t_insurance_alert b ON b.INSURANCES_PRE_RENEW_DETAIL_ID = a.ID
where b.EXPIRE_IGNORE_FLAG = '1' and b.DELETE_FLAG=0 and a.is_leave = '0' and b.IS_OVERDUE = 0
AND a.process_status = '0' and DATE_FORMAT(a.confirmDate,"%Y-%m-%d") >= CURDATE()
AND DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d")
<![CDATA[ <= ]]>
CURDATE()
group by a.customer_user_loginname
</select>
<update
id=
"updateRenewBatchById"
>
update t_insurance_pre_renew_detail a
set a.process_status = '2'
where a.process_status in ('0','1') and a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</update>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsurancePreRenewDetailQwDetailMapper.xml
0 → 100644
View file @
f17fefc1
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreRenewDetailQwDetailMapper"
>
<resultMap
id=
"tInsurancePreRenewDetailQwDetailMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQwDetail"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"mainId"
column=
"MAIN_ID"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"errorInfo"
column=
"ERROR_INFO"
/>
<result
property=
"errorTime"
column=
"ERROR_TIME"
/>
<result
property=
"preId"
column=
"PRE_ID"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.MAIN_ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.ERROR_INFO,
a.ERROR_TIME,
a.PRE_ID
</sql>
<sql
id=
"tInsurancePreRenewDetailQwDetail_where"
>
<if
test=
"tInsurancePreRenewDetailQwDetail != null"
>
<if
test=
"tInsurancePreRenewDetailQwDetail.id != null and tInsurancePreRenewDetailQwDetail.id.trim() != ''"
>
AND a.ID = #{tInsurancePreRenewDetailQwDetail.id}
</if>
<if
test=
"tInsurancePreRenewDetailQwDetail.mainId != null and tInsurancePreRenewDetailQwDetail.mainId.trim() != ''"
>
AND a.MAIN_ID = #{tInsurancePreRenewDetailQwDetail.mainId}
</if>
<if
test=
"tInsurancePreRenewDetailQwDetail.empName != null and tInsurancePreRenewDetailQwDetail.empName.trim() != ''"
>
AND a.EMP_NAME = #{tInsurancePreRenewDetailQwDetail.empName}
</if>
<if
test=
"tInsurancePreRenewDetailQwDetail.empIdcard != null and tInsurancePreRenewDetailQwDetail.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{tInsurancePreRenewDetailQwDetail.empIdcard}
</if>
<if
test=
"tInsurancePreRenewDetailQwDetail.errorInfo != null and tInsurancePreRenewDetailQwDetail.errorInfo.trim() != ''"
>
AND a.ERROR_INFO = #{tInsurancePreRenewDetailQwDetail.errorInfo}
</if>
<if
test=
"tInsurancePreRenewDetailQwDetail.errorTime != null"
>
AND a.ERROR_TIME = #{tInsurancePreRenewDetailQwDetail.errorTime}
</if>
<if
test=
"tInsurancePreRenewDetailQwDetail.preId != null and tInsurancePreRenewDetailQwDetail.preId.trim() != ''"
>
AND a.PRE_ID = #{tInsurancePreRenewDetailQwDetail.preId}
</if>
</if>
</sql>
<!--tInsurancePreRenewDetailQwDetail简单分页查询-->
<select
id=
"getTInsurancePreRenewDetailQwDetailPage"
resultMap=
"tInsurancePreRenewDetailQwDetailMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_insurance_pre_renew_detail_qw_detail a
<where>
1=1
<include
refid=
"tInsurancePreRenewDetailQwDetail_where"
/>
</where>
</select>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsurancePreRenewDetailQwMapper.xml
0 → 100644
View file @
f17fefc1
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreRenewDetailQwMapper"
>
<resultMap
id=
"tInsurancePreRenewDetailQwMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetailQw"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"customerUsername"
column=
"customer_username"
/>
<result
property=
"customerUserLoginname"
column=
"customer_user_loginname"
/>
<result
property=
"description"
column=
"description"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.customer_username,
a.customer_user_loginname,
a.description,
a.CREATE_TIME
</sql>
<sql
id=
"tInsurancePreRenewDetailQw_where"
>
<if
test=
"tInsurancePreRenewDetailQw != null"
>
<if
test=
"tInsurancePreRenewDetailQw.id != null and tInsurancePreRenewDetailQw.id.trim() != ''"
>
AND a.ID = #{tInsurancePreRenewDetailQw.id}
</if>
<if
test=
"tInsurancePreRenewDetailQw.customerUsername != null and tInsurancePreRenewDetailQw.customerUsername.trim() != ''"
>
AND a.customer_username = #{tInsurancePreRenewDetailQw.customerUsername}
</if>
<if
test=
"tInsurancePreRenewDetailQw.customerUserLoginname != null and tInsurancePreRenewDetailQw.customerUserLoginname.trim() != ''"
>
AND a.customer_user_loginname = #{tInsurancePreRenewDetailQw.customerUserLoginname}
</if>
<if
test=
"tInsurancePreRenewDetailQw.description != null and tInsurancePreRenewDetailQw.description.trim() != ''"
>
AND a.description = #{tInsurancePreRenewDetailQw.description}
</if>
<if
test=
"tInsurancePreRenewDetailQw.createTime != null"
>
AND a.CREATE_TIME = #{tInsurancePreRenewDetailQw.createTime}
</if>
</if>
</sql>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceWarnMapper.xml
View file @
f17fefc1
...
...
@@ -54,6 +54,7 @@
<result
property=
"configId"
column=
"config_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"configName"
column=
"config_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"isAddress"
column=
"IS_ADDRESS"
jdbcType=
"CHAR"
/>
<result
property=
"expectedCollectionTime"
column=
"expected_collection_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<!-- 商险续签待办专用 -->
...
...
@@ -96,14 +97,15 @@
a.UPDATE_TIME,
a.CREATE_USER_DEPT_NAME,
a.IS_EFFECT,
a.BUY_HANDLE_STATUS,
a.ALERTER,
a.ALERT_ID,
a.HAVE_WORK_DAY,
a.INSURANCES_PRE_RENEW_DETAIL_ID,
a.BUY_TYPE,
b.process_status,
b.error_info,
b.error_time
,DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d %H:%i') expected_collection_time
</sql>
<sql
id=
"tInsuranceAlert_where"
>
<if
test=
"tInsuranceAlert != null"
>
...
...
@@ -233,9 +235,6 @@
<if
test=
"tInsuranceAlert.isEffect != null"
>
AND a.IS_EFFECT = #{tInsuranceAlert.isEffect}
</if>
<if
test=
"tInsuranceAlert.buyHandleStatus != null"
>
AND a.BUY_HANDLE_STATUS = #{tInsuranceAlert.buyHandleStatus}
</if>
<if
test=
"tInsuranceAlert.alerter != null and tInsuranceAlert.alerter.trim() != ''"
>
AND a.ALERTER = #{tInsuranceAlert.alerter}
</if>
...
...
@@ -276,6 +275,29 @@
order by a.POLICY_END asc,a.id asc
</select>
<!--tInsuranceAlert简单分页查询-->
<select
id=
"getTInsuranceAlertList2000"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Alert_Column_List"
/>
FROM t_insurance_alert a
JOIN t_insurance_pre_renew_detail b ON a.INSURANCES_PRE_RENEW_DETAIL_ID = b.ID
<where>
a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0
<include
refid=
"tInsuranceAlert_where"
/>
<if
test=
"tInsuranceAlert != null"
>
<if
test=
"tInsuranceAlert.processStatusArray != null and tInsuranceAlert.processStatusArray.length > 0"
>
AND b.PROCESS_STATUS in
<foreach
item=
"statusStr"
index=
"index"
collection=
"tInsuranceAlert.processStatusArray"
open=
"("
separator=
","
close=
")"
>
#{statusStr}
</foreach>
</if>
</if>
</where>
order by a.POLICY_END asc,a.id asc
limit 2000
</select>
<!-- 导出 -->
<select
id=
"getTInsuranceAlertExportCount"
resultType=
"java.lang.Integer"
>
SELECT
...
...
@@ -461,4 +483,31 @@
t_insurance_alert a
where a.DELETE_FLAG = '0' and a.EXPIRE_IGNORE_FLAG = '0'
</select>
<select
id=
"selectInsuranceAlertList"
resultMap=
"BaseResultMap"
>
SELECT
a.ID,
b.process_status
FROM t_insurance_alert a
JOIN t_insurance_pre_renew_detail b ON a.INSURANCES_PRE_RENEW_DETAIL_ID = b.ID
where a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0
<if
test=
"idList != null"
>
AND b.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
</select>
<select
id=
"selectInsuranceAlertOne"
resultMap=
"BaseResultMap"
>
SELECT
a.ID,
b.process_status
FROM t_insurance_alert a
JOIN t_insurance_pre_renew_detail b ON a.INSURANCES_PRE_RENEW_DETAIL_ID = b.ID
where a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0
AND b.id = #{id}
limit 1
</select>
</mapper>
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/UpdateOverdueTask.java
View file @
f17fefc1
...
...
@@ -110,4 +110,27 @@ public class UpdateOverdueTask {
"/insuranceWarn/inner/pushInsuranceAlertToWx"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每天刷新商险待办信息到微信-定时任务结束------------"
);
}
/**
* 每天下午三点、三点二十推送续保待派单数据
* @author hgw
*/
public
void
autoDoInsurancePreRenew
()
{
log
.
info
(
"-------------每天下午三点、三点二十推送续保待派单数据------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
(),
"/tinsuranceprerenewdetail/inner/autoDoInsurancePreRenew"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每天下午三点、三点二十推送续保待派单数据-定时任务结束------------"
);
}
/**
* 每日9点统一推送确认信息(确认日到派单日之间的数据且今天是工作日)
* @author hgw
*/
public
void
autoDoWxSureMessage
()
{
log
.
info
(
"-------------每日9点统一推送确认信息(确认日到派单日之间的数据且今天是工作日)------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
(),
"/tinsuranceprerenewdetail/inner/autoDoWxSureMessage"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每日9点统一推送确认信息(确认日到派单日之间的数据且今天是工作日)-定时任务结束------------"
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
f17fefc1
...
...
@@ -704,6 +704,9 @@ public class SocialFriendConfig {
}
mxzt
=
blxmjglb
.
getString
(
"mxzt"
);
if
(
Common
.
isNotNull
(
mxzt
))
{
if
(
cwxx
==
null
)
{
cwxx
=
""
;
}
if
(
cwxx
.
length
()
>
70
)
{
cwxx
=
cwxx
.
substring
(
0
,
70
);
}
...
...
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