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
021abe80
Commit
021abe80
authored
Nov 12, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.17-商险续签待办2
parent
2934a019
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
297 additions
and
15 deletions
+297
-15
TAutoMainRelController.java
...s/v1/yifu/archives/controller/TAutoMainRelController.java
+14
-0
TAutoMainRelMapper.java
...loud/plus/v1/yifu/archives/mapper/TAutoMainRelMapper.java
+3
-0
TAutoMainRelService.java
...ud/plus/v1/yifu/archives/service/TAutoMainRelService.java
+4
-0
TAutoMainRelServiceImpl.java
...1/yifu/archives/service/impl/TAutoMainRelServiceImpl.java
+28
-0
TAutoMainRelMapper.xml
...ives-biz/src/main/resources/mapper/TAutoMainRelMapper.xml
+8
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+16
-0
TInsuranceAlert.java
...cloud/plus/v1/yifu/insurances/entity/TInsuranceAlert.java
+21
-0
TInsurancePreRenewDetail.java
...s/v1/yifu/insurances/entity/TInsurancePreRenewDetail.java
+8
-1
AutoDeptVO.java
...com/yifu/cloud/plus/v1/yifu/insurances/vo/AutoDeptVO.java
+21
-0
HolidayListVO.java
.../yifu/cloud/plus/v1/yifu/insurances/vo/HolidayListVO.java
+6
-0
TInsuranceWarnServiceImpl.java
...ces/service/insurance/impl/TInsuranceWarnServiceImpl.java
+148
-9
TInsurancePreRenewDetailMapper.xml
...rces/mapper/insurances/TInsurancePreRenewDetailMapper.xml
+7
-5
TInsuranceWarnMapper.xml
...main/resources/mapper/insurances/TInsuranceWarnMapper.xml
+12
-0
THolidayInfoServiceImpl.java
.../v1/yifu/social/service/impl/THolidayInfoServiceImpl.java
+1
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TAutoMainRelController.java
View file @
021abe80
...
@@ -33,6 +33,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
...
@@ -33,6 +33,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.AutoDeptVO
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -209,4 +210,17 @@ public class TAutoMainRelController {
...
@@ -209,4 +210,17 @@ public class TAutoMainRelController {
public
R
<
Boolean
>
updateAutoFlagById
(
@RequestParam
(
required
=
true
)
String
id
,
@RequestParam
(
required
=
true
)
String
autoFlag
)
{
public
R
<
Boolean
>
updateAutoFlagById
(
@RequestParam
(
required
=
true
)
String
id
,
@RequestParam
(
required
=
true
)
String
autoFlag
)
{
return
tAutoMainRelService
.
updateAutoFlagById
(
id
,
autoFlag
);
return
tAutoMainRelService
.
updateAutoFlagById
(
id
,
autoFlag
);
}
}
/**
* @Description: 获取全量自动化项目,value里是续保周期
* @Author: hgw
* @Date: 2025/11/12 18:11
* @return: java.util.Map<java.lang.String, java.lang.String>
**/
@Inner
@PostMapping
(
"/inner/getAutoDeptMap"
)
public
AutoDeptVO
getAutoDeptMap
()
{
return
tAutoMainRelService
.
getAutoDeptMap
();
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TAutoMainRelMapper.java
View file @
021abe80
...
@@ -43,6 +43,9 @@ public interface TAutoMainRelMapper extends BaseMapper<TAutoMainRel> {
...
@@ -43,6 +43,9 @@ public interface TAutoMainRelMapper extends BaseMapper<TAutoMainRel> {
*/
*/
IPage
<
TAutoMainRel
>
getTAutoMainRelPage
(
Page
<
TAutoMainRel
>
page
,
@Param
(
"tAutoMainRel"
)
TAutoMainRel
tAutoMainRel
);
IPage
<
TAutoMainRel
>
getTAutoMainRelPage
(
Page
<
TAutoMainRel
>
page
,
@Param
(
"tAutoMainRel"
)
TAutoMainRel
tAutoMainRel
);
// 获取全量自动化项目与商险续保周期
List
<
TAutoMainRel
>
getAutoDeptMap
();
Long
noPageCountDiy
(
@Param
(
"tAutoMainRel"
)
TAutoMainRelSearchVo
tAutoMainRel
);
Long
noPageCountDiy
(
@Param
(
"tAutoMainRel"
)
TAutoMainRelSearchVo
tAutoMainRel
);
List
<
TAutoMainRelExportVo
>
noPageDiy
(
@Param
(
"tAutoMainRel"
)
TAutoMainRelSearchVo
tAutoMainRel
);
List
<
TAutoMainRelExportVo
>
noPageDiy
(
@Param
(
"tAutoMainRel"
)
TAutoMainRelSearchVo
tAutoMainRel
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TAutoMainRelService.java
View file @
021abe80
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TAutoMainRelExportVo;
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TAutoMainRelExportVo;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TAutoMainRelSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TAutoMainRelSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.AutoDeptVO
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.io.InputStream
;
...
@@ -66,5 +67,8 @@ public interface TAutoMainRelService extends IService<TAutoMainRel> {
...
@@ -66,5 +67,8 @@ public interface TAutoMainRelService extends IService<TAutoMainRel> {
Map
<
String
,
String
>
getProjectAutoSetMap
(
List
<
String
>
departNos
);
Map
<
String
,
String
>
getProjectAutoSetMap
(
List
<
String
>
departNos
);
// 获取全量自动化项目,value里是续保周期
AutoDeptVO
getAutoDeptMap
();
R
<
Boolean
>
updateAutoFlagById
(
String
id
,
String
autoFlag
);
R
<
Boolean
>
updateAutoFlagById
(
String
id
,
String
autoFlag
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TAutoMainRelServiceImpl.java
View file @
021abe80
...
@@ -40,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
...
@@ -40,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.AutoDeptVO
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetInfoVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
...
@@ -1517,6 +1518,33 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
...
@@ -1517,6 +1518,33 @@ private R<Boolean> checkItemRepeat(List<SysAutoDictItem> autoDictItems, Map<Stri
return
map
;
return
map
;
}
}
/**
* @Description: 获取全量自动化项目,value里是续保周期
* @Author: hgw
* @Date: 2025/11/12 18:15
* @return: com.yifu.cloud.plus.v1.yifu.insurances.vo.AutoDeptVO
**/
@Override
public
AutoDeptVO
getAutoDeptMap
()
{
Map
<
String
,
Integer
>
returnMap
=
new
HashMap
<>();
List
<
TAutoMainRel
>
list
=
baseMapper
.
getAutoDeptMap
();
if
(
Common
.
isNotNull
(
list
))
{
Integer
month
;
for
(
TAutoMainRel
vo
:
list
)
{
try
{
month
=
Integer
.
parseInt
(
vo
.
getId
());
}
catch
(
Exception
e
)
{
month
=
CommonConstants
.
ONE_INT
;
log
.
info
(
"转化周期失败,默认1月: {}"
,
e
);
}
returnMap
.
put
(
vo
.
getDeptNo
(),
month
);
}
}
AutoDeptVO
returnVo
=
new
AutoDeptVO
();
returnVo
.
setDeptMap
(
returnMap
);
return
returnVo
;
}
/**
/**
* @Author fxj
* @Author fxj
* @Description 校验社保规则
* @Description 校验社保规则
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TAutoMainRelMapper.xml
View file @
021abe80
...
@@ -120,6 +120,14 @@
...
@@ -120,6 +120,14 @@
</where>
</where>
</select>
</select>
<!-- 获取全量自动化项目与商险续保周期 -->
<select
id=
"getAutoDeptMap"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TAutoMainRel"
>
SELECT
ifnull(r.RENEWAL_PERIOD,1) ID,d.DEPT_NO
FROM t_auto_main_rel d
left join t_auto_insur_rule_info r on r.MAIN_ID=d.id
</select>
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Long"
>
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Long"
>
SELECT
SELECT
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
021abe80
...
@@ -14,6 +14,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
...
@@ -14,6 +14,7 @@ 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.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.AutoDeptVO
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -590,6 +591,21 @@ public class ArchivesDaprUtil {
...
@@ -590,6 +591,21 @@ public class ArchivesDaprUtil {
return
res
;
return
res
;
}
}
/**
* @Description: 获取全量自动化项目,value里是续保周期
* @Author: hgw
* @Date: 2025/11/12 18:25
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.insurances.vo.AutoDeptVO>
**/
public
R
<
AutoDeptVO
>
getAutoDeptVO
()
{
R
<
AutoDeptVO
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
()
,
daprArchivesProperties
.
getAppId
(),
"/tautomainrel/inner/getAutoDeptMap"
,
null
,
AutoDeptVO
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取自动化项目失败!"
);
}
return
res
;
}
/**
/**
* @Author fxj
* @Author fxj
* @Description 远程接口获取非在职档案(无档案或已离职)
* @Description 远程接口获取非在职档案(无档案或已离职)
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceAlert.java
View file @
021abe80
...
@@ -227,6 +227,11 @@ public class TInsuranceAlert extends BaseEntity {
...
@@ -227,6 +227,11 @@ public class TInsuranceAlert extends BaseEntity {
*/
*/
@Schema
(
description
=
"距离到期剩余工作日"
)
@Schema
(
description
=
"距离到期剩余工作日"
)
private
String
haveWorkDay
;
private
String
haveWorkDay
;
/**
* 商险续签待办ID
*/
@Schema
(
description
=
"商险续签待办ID"
)
private
String
insurancesPreRenewDetailId
;
//@Schema(description = "本表的ID就是商险ID")
//@Schema(description = "本表的ID就是商险ID")
...
@@ -242,5 +247,21 @@ public class TInsuranceAlert extends BaseEntity {
...
@@ -242,5 +247,21 @@ public class TInsuranceAlert extends BaseEntity {
@Schema
(
description
=
"失败时间"
)
@Schema
(
description
=
"失败时间"
)
private
LocalDateTime
errorTime
;
private
LocalDateTime
errorTime
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"投保类型: 1新增、3批增、4替换"
)
private
Integer
buyType
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"配置名称"
)
private
String
configName
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"配置id"
)
private
String
configId
;
@TableField
(
exist
=
false
)
@Schema
(
description
=
"是否地市自购0是 1 否"
)
private
String
isAddress
;
private
static
final
long
serialVersionUID
=
1L
;
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 @
021abe80
...
@@ -254,6 +254,13 @@ public class TInsurancePreRenewDetail extends BaseEntity {
...
@@ -254,6 +254,13 @@ public class TInsurancePreRenewDetail extends BaseEntity {
@ExcelProperty
(
"预计派单时间"
)
@ExcelProperty
(
"预计派单时间"
)
@Schema
(
description
=
"预计派单时间"
)
@Schema
(
description
=
"预计派单时间"
)
private
LocalDateTime
expectedCollectionTime
;
private
LocalDateTime
expectedCollectionTime
;
/**
* 发送确认起始日期
*/
@ExcelAttribute
(
name
=
"发送确认起始日期"
,
isDate
=
true
)
@ExcelProperty
(
"发送确认起始日期"
)
@Schema
(
description
=
"发送确认起始日期"
)
private
LocalDate
confirmDate
;
/**
/**
* 客户名称
* 客户名称
*/
*/
...
@@ -277,7 +284,7 @@ public class TInsurancePreRenewDetail extends BaseEntity {
...
@@ -277,7 +284,7 @@ public class TInsurancePreRenewDetail extends BaseEntity {
@Length
(
max
=
1
,
message
=
"是否地市自购0是 1 否不能超过1个字符"
)
@Length
(
max
=
1
,
message
=
"是否地市自购0是 1 否不能超过1个字符"
)
@ExcelProperty
(
"是否地市自购0是 1 否"
)
@ExcelProperty
(
"是否地市自购0是 1 否"
)
@Schema
(
description
=
"是否地市自购0是 1 否"
)
@Schema
(
description
=
"是否地市自购0是 1 否"
)
private
String
isAdress
;
private
String
isAd
d
ress
;
/**
/**
* 失败原因
* 失败原因
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/AutoDeptVO.java
0 → 100644
View file @
021abe80
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Map
;
/**
* @Description: 自动化项目Map
* @Author: hgw
* @Date: 2025-11-12 18:01:49
* @return:
**/
@Data
public
class
AutoDeptVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6673220061558171816L
;
// 自动化项目Map,value是续保周期,默认1个月
private
Map
<
String
,
Integer
>
deptMap
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/HolidayListVO.java
View file @
021abe80
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -19,4 +20,9 @@ public class HolidayListVO implements Serializable {
...
@@ -19,4 +20,9 @@ public class HolidayListVO implements Serializable {
// 2025-11-11, 1; 2025-11-12,2; 2025-11-13,3; 2025-11-14,4; 2025-11-15,4; 2025-11-16,4; 2025-11-17,5
// 2025-11-11, 1; 2025-11-12,2; 2025-11-13,3; 2025-11-14,4; 2025-11-15,4; 2025-11-16,4; 2025-11-17,5
private
Map
<
String
,
Integer
>
workDayMap
;
private
Map
<
String
,
Integer
>
workDayMap
;
// 纯假日map,例如,当前时间是2025-11-11,15号,16号是节假日:
// 2025-11-15,1; 2025-11-16,1;
// 2025-11-22,1; 2025-11-23,1;
private
Map
<
String
,
Integer
>
holidayMap
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceWarnServiceImpl.java
View file @
021abe80
...
@@ -24,14 +24,13 @@ import com.yifu.cloud.plus.v1.yifu.insurances.config.WxConfig;
...
@@ -24,14 +24,13 @@ import com.yifu.cloud.plus.v1.yifu.insurances.config.WxConfig;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.SysConfig
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.SysConfig
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert
;
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.mapper.insurances.SysConfigMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.SysConfigMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceWarnMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceWarnMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreRenewDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceWarnService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceWarnService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.HolidayListVO
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAlertWx
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAlertWxVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -59,6 +58,8 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
...
@@ -59,6 +58,8 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
@Autowired
@Autowired
private
SysConfigMapper
sysConfigMapper
;
private
SysConfigMapper
sysConfigMapper
;
@Autowired
@Autowired
private
TInsurancePreRenewDetailService
tInsurancePreRenewDetailService
;
@Autowired
private
WxConfig
wxConfig
;
private
WxConfig
wxConfig
;
@Override
@Override
...
@@ -123,15 +124,26 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
...
@@ -123,15 +124,26 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
//不为空生成数据
//不为空生成数据
if
(
Common
.
isNotKong
(
list
)){
if
(
Common
.
isNotKong
(
list
)){
try
{
try
{
//获取
对应项目
信息
//获取
假日
信息
R
<
HolidayListVO
>
holidayListR
=
socialDaprUtils
.
getOneMonthDay
();
R
<
HolidayListVO
>
holidayListR
=
socialDaprUtils
.
getOneMonthDay
();
Map
<
String
,
Integer
>
workDayMap
=
null
;
Map
<
String
,
Integer
>
workDayMap
=
null
;
Map
<
String
,
Integer
>
holidayMap
=
null
;
if
(
null
!=
holidayListR
&&
Common
.
isNotNull
(
holidayListR
.
getData
())
&&
Common
.
isNotNull
(
holidayListR
.
getData
().
getWorkDayMap
()))
{
if
(
null
!=
holidayListR
&&
Common
.
isNotNull
(
holidayListR
.
getData
())
&&
Common
.
isNotNull
(
holidayListR
.
getData
().
getWorkDayMap
()))
{
workDayMap
=
holidayListR
.
getData
().
getWorkDayMap
();
workDayMap
=
holidayListR
.
getData
().
getWorkDayMap
();
holidayMap
=
holidayListR
.
getData
().
getHolidayMap
();
}
}
if
(
workDayMap
!=
null
&&
!
workDayMap
.
isEmpty
())
{
if
(
workDayMap
!=
null
&&
!
workDayMap
.
isEmpty
()
&&
holidayMap
!=
null
&&
!
holidayMap
.
isEmpty
()
)
{
String
days
;
String
days
;
Integer
dayInt
;
Integer
dayInt
;
//获取自动化项目Map,后面放周期,默认1个月
Map
<
String
,
Integer
>
deptMap
=
new
HashMap
<>();
// 获取全量自动化项目,value里是续保周期
R
<
AutoDeptVO
>
deptMapR
=
archivesDaprUtil
.
getAutoDeptVO
();
if
(
null
!=
deptMapR
&&
Common
.
isNotNull
(
deptMapR
.
getData
())
&&
Common
.
isNotNull
(
deptMapR
.
getData
().
getDeptMap
()))
{
deptMap
=
deptMapR
.
getData
().
getDeptMap
();
}
List
<
TInsurancePreRenewDetail
>
detailList
=
new
ArrayList
<>();
String
renewId
;
// 处理:距离到期剩余工作日
// 处理:距离到期剩余工作日
for
(
TInsuranceAlert
vo
:
list
)
{
for
(
TInsuranceAlert
vo
:
list
)
{
if
(
Common
.
isNotNull
(
vo
.
getIsOverdue
())
if
(
Common
.
isNotNull
(
vo
.
getIsOverdue
())
...
@@ -142,12 +154,26 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
...
@@ -142,12 +154,26 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
if
(
Common
.
isNotNull
(
dayInt
))
{
if
(
Common
.
isNotNull
(
dayInt
))
{
vo
.
setHaveWorkDay
(
String
.
valueOf
(
dayInt
));
vo
.
setHaveWorkDay
(
String
.
valueOf
(
dayInt
));
}
}
// 为空,表示没有商险续签待办,需要新增
// 自动化项目配置表中存在,则新增,否则不需要续签待办
if
(
Common
.
isEmpty
(
vo
.
getInsurancesPreRenewDetailId
())
&&
Common
.
isNotNull
(
vo
.
getDeptNo
())
&&
deptMap
.
get
(
vo
.
getDeptNo
())
!=
null
)
{
renewId
=
String
.
valueOf
(
UUID
.
randomUUID
()).
replace
(
"-"
,
""
);
vo
.
setInsurancesPreRenewDetailId
(
renewId
);
// 生成续签待办数据
this
.
setRenewDetailBaseInfo
(
vo
,
renewId
,
detailList
,
holidayMap
,
deptMap
);
}
}
}
}
}
// 保存续签待办数据
if
(
Common
.
isNotKong
(
detailList
))
{
tInsurancePreRenewDetailService
.
saveBatch
(
detailList
);
}
}
}
// TODO - 生成续签待办数据:
// TInsurancePreRenewDetail
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"商险到期提醒获取工作日异常:"
,
e
);
log
.
error
(
"商险到期提醒获取工作日异常:"
,
e
);
}
}
...
@@ -166,6 +192,119 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
...
@@ -166,6 +192,119 @@ public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper,
}
}
}
}
// 设置续签待办数据
private
void
setRenewDetailBaseInfo
(
TInsuranceAlert
vo
,
String
renewId
,
List
<
TInsurancePreRenewDetail
>
detailList
,
Map
<
String
,
Integer
>
holidayMap
,
Map
<
String
,
Integer
>
deptMap
)
{
TInsurancePreRenewDetail
detail
=
new
TInsurancePreRenewDetail
();
detail
.
setId
(
renewId
);
detail
.
setInsurancesId
(
vo
.
getId
());
detail
.
setDeptName
(
vo
.
getDeptName
());
detail
.
setDeptNo
(
vo
.
getDeptNo
());
detail
.
setEmpName
(
vo
.
getEmpName
());
detail
.
setEmpIdcardNo
(
vo
.
getEmpIdcardNo
());
detail
.
setPost
(
vo
.
getPost
());
detail
.
setBuyTypeOld
(
vo
.
getBuyType
());
detail
.
setInsuranceProvinceNameOld
(
vo
.
getInsuranceProvinceName
());
detail
.
setInsuranceCityNameOld
(
vo
.
getInsuranceCityName
());
detail
.
setInsuranceCompanyNameOld
(
vo
.
getInsuranceCompanyName
());
detail
.
setInsuranceTypeNameOld
(
vo
.
getInsuranceTypeName
());
detail
.
setPolicyEffectOld
(
vo
.
getPolicyEffect
());
detail
.
setPolicyStartOld
(
vo
.
getPolicyStart
());
detail
.
setPolicyEndOld
(
vo
.
getPolicyEnd
());
detail
.
setBuyType
(
vo
.
getBuyType
());
detail
.
setConfigId
(
vo
.
getConfigId
());
detail
.
setConfigName
(
vo
.
getConfigName
());
detail
.
setInsuranceCompanyName
(
vo
.
getInsuranceCompanyName
());
detail
.
setInsuranceTypeName
(
vo
.
getInsuranceTypeName
());
detail
.
setBuyStandard
(
vo
.
getBuyStandard
());
detail
.
setInsuranceProvinceName
(
vo
.
getInsuranceProvinceName
());
detail
.
setInsuranceCityName
(
vo
.
getInsuranceCityName
());
// 预计派单时间
if
(
Common
.
isNotNull
(
vo
.
getPolicyEnd
()))
{
LocalDate
days
=
calculateThreeWorkDays
(
vo
.
getPolicyEnd
(),
holidayMap
);
if
(
days
!=
null
&&
Common
.
isNotNull
(
days
))
{
// 新增逻辑
detail
.
setExpectedCollectionTime
(
days
.
atTime
(
15
,
20
));
detail
.
setPolicyStart
(
days
.
plusDays
(
CommonConstants
.
ONE_INT
));
detail
.
setPolicyEffect
(
detail
.
getPolicyStart
());
Integer
month
=
deptMap
.
get
(
vo
.
getDeptNo
());
if
(
Common
.
isEmpty
(
month
))
{
month
=
CommonConstants
.
ONE_INT
;
}
detail
.
setPolicyEnd
(
detail
.
getPolicyStart
().
plusMonths
(
month
));
// 向前推2个工作日,作为确认发起时间的起点
days
=
getPreviousWorkday
(
days
,
CommonConstants
.
TWO_INT
,
holidayMap
);
detail
.
setConfirmDate
(
days
);
}
}
detail
.
setUnitName
(
vo
.
getUnitName
());
detail
.
setUnitNo
(
vo
.
getUnitNo
());
detail
.
setIsAddress
(
vo
.
getIsAddress
());
detail
.
setPolicyNo
(
vo
.
getPolicyNo
());
detail
.
setProcessStatus
(
CommonConstants
.
ZERO_STRING
);
detailList
.
add
(
detail
);
}
// 保单截止日期B + 1天,向之前推3个工作日。得到预计派单日期
private
LocalDate
calculateThreeWorkDays
(
LocalDate
policyEnd
,
Map
<
String
,
Integer
>
holidayMap
)
{
// 预计派单时间逻辑:
//保单截止日期B + 1天,向之前推3个工作日。得到日期A。
//如果A小于当前日期,则顺延到今天。
//如果今天是工作日,则为今天。
//如果今天非工作日,则顺延到工作日,如果超过B,则置空。
// 步骤1: B + 1天,向前推3个工作日
// 获取B + 1天
LocalDate
policyEndPlusDay
=
policyEnd
.
plusDays
(
1
);
// 向前推3个工作日
LocalDate
dateA
=
getPreviousWorkday
(
policyEndPlusDay
,
CommonConstants
.
THREE_INT
,
holidayMap
);
// 今天
LocalDate
today
=
LocalDate
.
now
();
// 步骤2: 如果A小于当前日期,则顺延
if
(
dateA
.
isBefore
(
today
))
{
// 如果今天是工作日,则为今天
if
(
this
.
isWorkday
(
today
,
holidayMap
))
{
return
today
;
}
else
{
// 今天非工作日,顺延到工作日
return
getNextWorkday
(
today
,
holidayMap
);
}
}
return
dateA
;
}
// 向前推N天工作日
public
LocalDate
getPreviousWorkday
(
LocalDate
date
,
int
n
,
Map
<
String
,
Integer
>
holidayMap
)
{
LocalDate
result
=
date
;
int
count
=
0
;
while
(
count
<
n
)
{
result
=
result
.
minusDays
(
CommonConstants
.
ONE_INT
);
if
(
this
.
isWorkday
(
result
,
holidayMap
))
{
count
++;
}
}
return
result
;
}
// 获取下一个工作日
public
LocalDate
getNextWorkday
(
LocalDate
date
,
Map
<
String
,
Integer
>
holidayMap
)
{
LocalDate
result
=
date
.
plusDays
(
CommonConstants
.
ONE_INT
);
while
(!
this
.
isWorkday
(
date
,
holidayMap
))
{
result
=
result
.
plusDays
(
CommonConstants
.
ONE_INT
);
}
return
result
;
}
/**
* 判断是否为工作日,true是,false否
*/
public
boolean
isWorkday
(
LocalDate
date
,
Map
<
String
,
Integer
>
holidayMap
)
{
String
days
=
LocalDateUtil
.
getDateSrt
(
date
,
LocalDateUtil
.
NORM_DATE_PATTERN
);
return
holidayMap
.
get
(
days
)
==
null
;
}
private
R
<
Set
<
String
>>
getSetR
(
List
<
TInsuranceAlert
>
list
,
R
<
Set
<
String
>>
onlineSetTemp
)
{
private
R
<
Set
<
String
>>
getSetR
(
List
<
TInsuranceAlert
>
list
,
R
<
Set
<
String
>>
onlineSetTemp
)
{
if
(
list
.
size
()
<=
2000
){
if
(
list
.
size
()
<=
2000
){
onlineSetTemp
=
archivesDaprUtil
.
getEmpOnlineMap
(
list
.
stream
().
map
(
TInsuranceAlert:
:
getEmpIdcardNo
).
collect
(
Collectors
.
toList
()));
onlineSetTemp
=
archivesDaprUtil
.
getEmpOnlineMap
(
list
.
stream
().
map
(
TInsuranceAlert:
:
getEmpIdcardNo
).
collect
(
Collectors
.
toList
()));
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsurancePreRenewDetailMapper.xml
View file @
021abe80
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"unitName"
column=
"UNIT_NAME"
/>
<result
property=
"unitName"
column=
"UNIT_NAME"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
/>
<result
property=
"isAd
ress"
column=
"IS_A
DRESS"
/>
<result
property=
"isAd
dress"
column=
"IS_AD
DRESS"
/>
<result
property=
"errorInfo"
column=
"error_info"
/>
<result
property=
"errorInfo"
column=
"error_info"
/>
<result
property=
"errorTime"
column=
"error_time"
/>
<result
property=
"errorTime"
column=
"error_time"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
<result
property=
"replaceEmpIdcard"
column=
"replace_emp_idcard"
/>
<result
property=
"replaceEmpIdcard"
column=
"replace_emp_idcard"
/>
<result
property=
"replaceDeptNo"
column=
"replace_dept_no"
/>
<result
property=
"replaceDeptNo"
column=
"replace_dept_no"
/>
<result
property=
"processStatus"
column=
"process_status"
/>
<result
property=
"processStatus"
column=
"process_status"
/>
<result
property=
"confirmDate"
column=
"confirm_date"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -102,14 +103,15 @@
...
@@ -102,14 +103,15 @@
a.UPDATE_TIME,
a.UPDATE_TIME,
a.UNIT_NAME,
a.UNIT_NAME,
a.UNIT_NO,
a.UNIT_NO,
a.IS_ADRESS,
a.IS_AD
D
RESS,
a.error_info,
a.error_info,
a.error_time,
a.error_time,
a.policy_no,
a.policy_no,
a.replace_employee_name,
a.replace_employee_name,
a.replace_emp_idcard,
a.replace_emp_idcard,
a.replace_dept_no,
a.replace_dept_no,
a.process_status
a.process_status,
a.confirm_date
</sql>
</sql>
<sql
id=
"tInsurancePreRenewDetail_where"
>
<sql
id=
"tInsurancePreRenewDetail_where"
>
<if
test=
"tInsurancePreRenewDetail != null"
>
<if
test=
"tInsurancePreRenewDetail != null"
>
...
@@ -215,8 +217,8 @@
...
@@ -215,8 +217,8 @@
<if
test=
"tInsurancePreRenewDetail.unitNo != null and tInsurancePreRenewDetail.unitNo.trim() != ''"
>
<if
test=
"tInsurancePreRenewDetail.unitNo != null and tInsurancePreRenewDetail.unitNo.trim() != ''"
>
AND a.UNIT_NO = #{tInsurancePreRenewDetail.unitNo}
AND a.UNIT_NO = #{tInsurancePreRenewDetail.unitNo}
</if>
</if>
<if
test=
"tInsurancePreRenewDetail.isAd
ress != null and tInsurancePreRenewDetail.isA
dress.trim() != ''"
>
<if
test=
"tInsurancePreRenewDetail.isAd
dress != null and tInsurancePreRenewDetail.isAd
dress.trim() != ''"
>
AND a.IS_AD
RESS = #{tInsurancePreRenewDetail.isA
dress}
AND a.IS_AD
DRESS = #{tInsurancePreRenewDetail.isAd
dress}
</if>
</if>
<if
test=
"tInsurancePreRenewDetail.errorInfo != null and tInsurancePreRenewDetail.errorInfo.trim() != ''"
>
<if
test=
"tInsurancePreRenewDetail.errorInfo != null and tInsurancePreRenewDetail.errorInfo.trim() != ''"
>
AND a.error_info = #{tInsurancePreRenewDetail.errorInfo}
AND a.error_info = #{tInsurancePreRenewDetail.errorInfo}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceWarnMapper.xml
View file @
021abe80
...
@@ -49,6 +49,11 @@
...
@@ -49,6 +49,11 @@
<result
property=
"processStatus"
column=
"process_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"processStatus"
column=
"process_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"errorInfo"
column=
"error_info"
jdbcType=
"VARCHAR"
/>
<result
property=
"errorInfo"
column=
"error_info"
jdbcType=
"VARCHAR"
/>
<result
property=
"errorTime"
column=
"error_time"
jdbcType=
"DATE"
/>
<result
property=
"errorTime"
column=
"error_time"
jdbcType=
"DATE"
/>
<result
property=
"insurancesPreRenewDetailId"
column=
"INSURANCES_PRE_RENEW_DETAIL_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"buyType"
column=
"BUY_TYPE"
jdbcType=
"TINYINT"
/>
<result
property=
"configId"
column=
"config_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"configName"
column=
"config_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"isAddress"
column=
"IS_ADDRESS"
jdbcType=
"CHAR"
/>
</resultMap>
</resultMap>
<!-- 商险续签待办专用 -->
<!-- 商险续签待办专用 -->
...
@@ -300,6 +305,11 @@
...
@@ -300,6 +305,11 @@
a.UPDATE_TIME,
a.UPDATE_TIME,
a.IS_EFFECT,
a.IS_EFFECT,
a.CREATE_USER_DEPT_NAME
a.CREATE_USER_DEPT_NAME
,d.ID INSURANCES_PRE_RENEW_DETAIL_ID
,a.BUY_TYPE
,ep.config_id
,ep.config_name
,a.IS_ADRESS
FROM
FROM
t_insurance_detail a
t_insurance_detail a
INNER JOIN (
INNER JOIN (
...
@@ -357,6 +367,8 @@
...
@@ -357,6 +367,8 @@
AND ll.endTime = a.POLICY_END
AND ll.endTime = a.POLICY_END
AND ll.INSURANCE_COMPANY_NAME = a.INSURANCE_COMPANY_NAME
AND ll.INSURANCE_COMPANY_NAME = a.INSURANCE_COMPANY_NAME
AND ll.INSURANCE_TYPE_NAME = a.INSURANCE_TYPE_NAME
AND ll.INSURANCE_TYPE_NAME = a.INSURANCE_TYPE_NAME
LEFT JOIN t_insurance_pre_renew_detail d on d.INSURANCES_ID = a.id
LEFT JOIN t_employee_insurance_pre ep on ep.INSURANCES_ID = a.id
where a.DELETE_FLAG = '0'
where a.DELETE_FLAG = '0'
AND a.EXPIRE_IGNORE_FLAG = '1'
AND a.EXPIRE_IGNORE_FLAG = '1'
AND a.IS_EFFECT = 0
AND a.IS_EFFECT = 0
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/THolidayInfoServiceImpl.java
View file @
021abe80
...
@@ -484,6 +484,7 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
...
@@ -484,6 +484,7 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
}
}
HolidayListVO
vo
=
new
HolidayListVO
();
HolidayListVO
vo
=
new
HolidayListVO
();
vo
.
setWorkDayMap
(
workDayMap
);
vo
.
setWorkDayMap
(
workDayMap
);
vo
.
setHolidayMap
(
holidayMap
);
return
vo
;
return
vo
;
}
}
...
...
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