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
cb40f4e1
Commit
cb40f4e1
authored
Aug 05, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-商险自动化逻辑调整
parent
efc91385
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
508 additions
and
91 deletions
+508
-91
EmployeeRegistrationPre.java
...plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
+3
-0
EmployeeRegistrationPreVo.java
...d/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
+3
-0
EmployeeRegistrationPreMapper.xml
...c/main/resources/mapper/EmployeeRegistrationPreMapper.xml
+2
-1
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+4
-0
TInsurancePreDetail.java
...d/plus/v1/yifu/insurances/entity/TInsurancePreDetail.java
+169
-0
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+9
-0
InsuranceAutoParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceAutoParam.java
+9
-0
InsuranceBatchParam.java
...cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
+9
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+9
-1
InsuredListVo.java
.../yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
+7
-0
TEmployeeInsurancePreController.java
...nsurances/controller/TEmployeeInsurancePreController.java
+1
-1
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+11
-0
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+4
-0
TInsurancePreDetailMapper.java
...surances/mapper/insurances/TInsurancePreDetailMapper.java
+16
-0
TEmployeeInsurancePreService.java
...ances/service/insurance/TEmployeeInsurancePreService.java
+2
-1
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+2
-0
TInsurancePreDetailService.java
...urances/service/insurance/TInsurancePreDetailService.java
+14
-0
ScheduleServiceImpl.java
...nsurances/service/insurance/impl/ScheduleServiceImpl.java
+1
-1
TEmployeeInsurancePreServiceImpl.java
...vice/insurance/impl/TEmployeeInsurancePreServiceImpl.java
+11
-2
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+140
-84
TInsurancePreDetailServiceImpl.java
...ervice/insurance/impl/TInsurancePreDetailServiceImpl.java
+20
-0
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+30
-0
TInsurancePreDetailMapper.xml
...resources/mapper/insurances/TInsurancePreDetailMapper.xml
+32
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
View file @
cb40f4e1
...
...
@@ -100,6 +100,9 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema
(
description
=
"档案所在地-市编号"
)
private
String
cityCode
;
@Schema
(
description
=
"商险是否已购买 0 是 1 否"
)
private
String
insuranceIsBuy
;
@Schema
(
description
=
"档案所在地-县编号"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
townCode
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
View file @
cb40f4e1
...
...
@@ -116,6 +116,9 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema
(
description
=
"更新人"
)
private
String
updateBy
;
@Schema
(
description
=
"商险是否已购买 0 是 1 否"
)
private
String
insuranceIsBuy
;
@Schema
(
description
=
"身份证合集"
)
private
List
<
String
>
idcardList
;
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/EmployeeRegistrationPreMapper.xml
View file @
cb40f4e1
...
...
@@ -37,6 +37,7 @@
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"customerUsernameNew"
column=
"customer_username_new"
/>
<result
property=
"insuranceIsBuy"
column=
"insurance_is_buy"
/>
</resultMap>
<resultMap
id=
"employeeRegistrationPreExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo"
>
...
...
@@ -113,7 +114,7 @@
a.update_time,
a.contract_sub_name,
a.customer_username_new,
province_code,city_code,town_code
province_code,city_code,town_code
,insurance_is_buy
</sql>
<sql
id=
"employeeRegistrationPre_where"
>
<if
test=
"employeeRegistrationPre != null"
>
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
cb40f4e1
...
...
@@ -104,6 +104,10 @@ public class InsurancesConstants {
* 投保记录已存在
*/
public
static
final
String
DATA_IS_EXIST
=
"投保记录已存在"
;
/**
* 本次派单前系统已有该人员在途/在保数据
*/
public
static
final
String
DIS_PERSON_DATA_IS_EXIST
=
"本次派单前系统已有该人员在途/在保数据"
;
/**
* 投保记录不存在
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsurancePreDetail.java
0 → 100644
View file @
cb40f4e1
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
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.util.Date
;
/**
* 入职确认信息已购买商险明细
*
* @author huych
* @date 2025-08-05 15:08:42
*/
@Data
@TableName
(
"t_insurance_pre_detail"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"入职确认信息已购买商险明细"
)
public
class
TInsurancePreDetail
extends
BaseEntity
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 姓名
*/
@ExcelAttribute
(
name
=
"姓名"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"姓名不能超过32个字符"
)
@ExcelProperty
(
"姓名"
)
@Schema
(
description
=
"姓名"
)
private
String
empName
;
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
errorInfo
=
"身份证号不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"身份证号不能为空"
)
@Length
(
max
=
32
,
message
=
"身份证号不能超过32个字符"
)
@ExcelProperty
(
"身份证号"
)
@Schema
(
description
=
"身份证号"
)
private
String
empIdcardNo
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"项目编码不能超过30个字符"
)
@ExcelProperty
(
"项目编码"
)
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
/**
* 投保岗位
*/
@ExcelAttribute
(
name
=
"投保岗位"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"投保岗位不能超过32个字符"
)
@ExcelProperty
(
"投保岗位"
)
@Schema
(
description
=
"投保岗位"
)
private
String
post
;
/**
* 保险公司名称
*/
@ExcelAttribute
(
name
=
"保险公司名称"
,
maxLength
=
60
)
@Length
(
max
=
60
,
message
=
"保险公司名称不能超过60个字符"
)
@ExcelProperty
(
"保险公司名称"
)
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@ExcelAttribute
(
name
=
"险种名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"险种名称不能超过50个字符"
)
@ExcelProperty
(
"险种名称"
)
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 购买标准
*/
@ExcelAttribute
(
name
=
"购买标准"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"购买标准不能超过32个字符"
)
@ExcelProperty
(
"购买标准"
)
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 保单开始时间
*/
@ExcelAttribute
(
name
=
"保单开始时间"
,
isDate
=
true
)
@ExcelProperty
(
"保单开始时间"
)
@Schema
(
description
=
"保单开始时间"
)
private
Date
policyStart
;
/**
* 保单结束时间
*/
@ExcelAttribute
(
name
=
"保单结束时间"
,
isDate
=
true
)
@ExcelProperty
(
"保单结束时间"
)
@Schema
(
description
=
"保单结束时间"
)
private
Date
policyEnd
;
/**
* 保单生效日期
*/
@ExcelAttribute
(
name
=
"保单生效日期"
,
isDate
=
true
)
@ExcelProperty
(
"保单生效日期"
)
@Schema
(
description
=
"保单生效日期"
)
private
Date
policyEffect
;
/**
* 购买类型, 1新增、3批增、4替换
*/
@ExcelAttribute
(
name
=
"购买类型, 1新增、3批增、4替换"
)
@ExcelProperty
(
"购买类型, 1新增、3批增、4替换"
)
@Schema
(
description
=
"购买类型, 1新增、3批增、4替换"
)
private
Integer
buyType
;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@ExcelAttribute
(
name
=
"投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员"
)
@ExcelProperty
(
"投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员"
)
@Schema
(
description
=
"投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员"
)
private
Integer
buyHandleStatus
;
/**
* 结算主体名称
*/
@ExcelAttribute
(
name
=
"结算主体名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"结算主体名称不能超过50个字符"
)
@ExcelProperty
(
"结算主体名称"
)
@Schema
(
description
=
"结算主体名称"
)
private
String
deptName
;
/**
* 客户名称
*/
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"客户名称不能超过50个字符"
)
@ExcelProperty
(
"客户名称"
)
@Schema
(
description
=
"客户名称"
)
private
String
unitName
;
/**
* 客户编码
*/
@ExcelAttribute
(
name
=
"客户编码"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"客户编码不能超过32个字符"
)
@ExcelProperty
(
"客户编码"
)
@Schema
(
description
=
"客户编码"
)
private
String
unitNo
;
/**
* 是否地市自购0是 1 否
*/
@ExcelAttribute
(
name
=
"是否地市自购0是 1 否"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"是否地市自购0是 1 否不能超过1个字符"
)
@ExcelProperty
(
"是否地市自购0是 1 否"
)
@Schema
(
description
=
"是否地市自购0是 1 否"
)
private
String
isAdress
;
/**
* 入离职登记id
*/
@ExcelAttribute
(
name
=
"入离职登记id"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"入离职登记id不能超过32个字符"
)
@ExcelProperty
(
"入离职登记id"
)
@Schema
(
description
=
"入离职登记id"
)
private
String
registerId
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
cb40f4e1
...
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* @author licancan
...
...
@@ -214,4 +215,12 @@ public class InsuranceAddParam implements Serializable {
*/
@Schema
(
description
=
"是否地市自购"
)
private
String
isAdress
;
/**
* 是否已有参保明细标识 1是 空否
*/
@Schema
(
description
=
"是否已有参保明细标识"
)
private
String
isExit
;
private
List
<
InsuredListVo
>
inProgressList
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAutoParam.java
View file @
cb40f4e1
...
...
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author huyc
...
...
@@ -156,4 +157,12 @@ public class InsuranceAutoParam implements Serializable {
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
/**
* 是否已有参保明细标识 1是 空否
*/
@Schema
(
description
=
"是否已有参保明细标识"
)
private
String
isExit
;
private
List
<
InsuredListVo
>
inProgressList
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
View file @
cb40f4e1
...
...
@@ -8,6 +8,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* @author licancan
...
...
@@ -221,4 +222,12 @@ public class InsuranceBatchParam implements Serializable {
*/
@Schema
(
description
=
"是否地市自购"
)
private
String
isAdress
;
/**
* 是否已有参保明细标识 1是 空否
*/
@Schema
(
description
=
"是否已有参保明细标识"
)
private
String
isExit
;
private
List
<
InsuredListVo
>
inProgressList
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
cb40f4e1
...
...
@@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author licancan
...
...
@@ -151,11 +152,18 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"是否地市自购"
)
private
String
isAdress
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 是否已有参保明细标识 1是 空否
*/
@Schema
(
description
=
"是否已有参保明细标识"
)
private
String
isExit
;
private
List
<
InsuredListVo
>
inProgressList
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
View file @
cb40f4e1
...
...
@@ -230,6 +230,13 @@ public class InsuredListVo implements Serializable {
@ExcelIgnore
private
Integer
insuranceCity
;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema
(
description
=
"投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员"
)
@ExcelIgnore
private
Integer
buyHandleStatus
;
/**
* 商险购买地市
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TEmployeeInsurancePreController.java
View file @
cb40f4e1
...
...
@@ -163,7 +163,7 @@ public class TEmployeeInsurancePreController {
@Operation
(
description
=
"商险派单信息单个/批量派单"
)
@PostMapping
(
"/batchDispatcherInsurance"
)
public
R
batchDispatcherInsurance
(
@RequestBody
List
<
String
>
idList
)
{
return
tEmployeeInsurancePreService
.
batchDispatcherInsurance
(
idList
);
return
tEmployeeInsurancePreService
.
batchDispatcherInsurance
(
idList
,
null
);
}
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
cb40f4e1
...
...
@@ -874,4 +874,15 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
policyPageToAutoSelect
(
page
,
param
,
mId
));
}
/**
* 查询在用或者在途的商险数据
* @param empIdcard 身份证号
* @return
*/
@Operation
(
description
=
"查询在用或者在途的商险数据"
)
@GetMapping
(
"/getOnProcessInsurancesInfo"
)
public
R
<
List
<
InsuredListVo
>>
getInProcessInsurancesInfo
(
@RequestParam
String
empIdcard
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getOnProcessInsurancesInfo
(
empIdcard
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
cb40f4e1
...
...
@@ -334,5 +334,9 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
IPage
<
InsuredListVo
>
policyPageToAutoSelect
(
Page
<
InsuredListVo
>
page
,
@Param
(
"param"
)
InsuredParam
param
);
/**
* 派单前系统已有在途/在保数据的人员明细
*/
List
<
InsuredListVo
>
getOnProcessInsuredList
(
@Param
(
"empIdCard"
)
String
empIdCard
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsurancePreDetailMapper.java
0 → 100644
View file @
cb40f4e1
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.TInsurancePreDetail
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 入职确认信息已购买商险明细
*
* @author huych
* @date 2025-08-05 15:08:42
*/
@Mapper
public
interface
TInsurancePreDetailMapper
extends
BaseMapper
<
TInsurancePreDetail
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TEmployeeInsurancePreService.java
View file @
cb40f4e1
...
...
@@ -59,9 +59,10 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
/**
* 商险派单信息批量派单
* @param idList id集合
* @param sameFlag 是否要做重复人员明细校验的标识 1 不需要 空需要
* @return
*/
R
batchDispatcherInsurance
(
List
<
String
>
idList
);
R
batchDispatcherInsurance
(
List
<
String
>
idList
,
String
sameFlag
);
/**
* 新增商险待购买信息
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
View file @
cb40f4e1
...
...
@@ -575,5 +575,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
IPage
<
InsuredListVo
>
policyPageToAutoSelect
(
Page
<
InsuredListVo
>
page
,
InsuredParam
param
,
String
mId
);
List
<
InsuredListVo
>
getOnProcessInsurancesInfo
(
String
empIdCard
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsurancePreDetailService.java
0 → 100644
View file @
cb40f4e1
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.TInsurancePreDetail
;
/**
* 入职确认信息已购买商险明细
*
* @author huych
* @date 2025-08-05 15:08:42
*/
public
interface
TInsurancePreDetailService
extends
IService
<
TInsurancePreDetail
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/ScheduleServiceImpl.java
View file @
cb40f4e1
...
...
@@ -53,7 +53,7 @@ public class ScheduleServiceImpl implements ScheduleService {
transactionTemplate
.
execute
(
status
->
{
List
<
String
>
idList
=
new
ArrayList
<>();
idList
.
add
(
aId
);
insurancePreService
.
batchDispatcherInsurance
(
idList
);
insurancePreService
.
batchDispatcherInsurance
(
idList
,
CommonConstants
.
ONE_STRING
);
return
null
;
});
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TEmployeeInsurancePreServiceImpl.java
View file @
cb40f4e1
...
...
@@ -179,7 +179,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
}
@Override
public
R
batchDispatcherInsurance
(
List
<
String
>
idList
)
{
public
R
batchDispatcherInsurance
(
List
<
String
>
idList
,
String
sameFlag
)
{
List
<
TEmployeeInsurancePre
>
insurancePreList
=
baseMapper
.
selectList
(
Wrappers
.<
TEmployeeInsurancePre
>
query
()
.
lambda
().
in
(
TEmployeeInsurancePre:
:
getId
,
idList
)
.
in
(
TEmployeeInsurancePre:
:
getProcessStatus
,
CommonConstants
.
processInsurancesStatus
));
...
...
@@ -209,6 +209,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
addParam
.
setIsExit
(
sameFlag
);
addParamList
.
add
(
addParam
);
}
if
(
CommonConstants
.
THREE_INT
==
insurancePre
.
getBuyType
())
{
...
...
@@ -229,6 +230,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
addParam
.
setPolicyStart
(
LocalDateUtil
.
parseLocalDate
(
DateUtil
.
dateToString
(
insurancePre
.
getPolicyStart
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)));
addParam
.
setPolicyEnd
(
LocalDateUtil
.
parseLocalDate
(
DateUtil
.
dateToString
(
insurancePre
.
getPolicyEnd
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)));
addParam
.
setIsExit
(
sameFlag
);
batchAddParamList
.
add
(
addParam
);
}
if
(
CommonConstants
.
FOUR_INT
==
insurancePre
.
getBuyType
())
{
...
...
@@ -248,6 +250,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
addParam
.
setIsExit
(
sameFlag
);
replaceAddParamList
.
add
(
addParam
);
}
}
...
...
@@ -433,7 +436,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
.
set
(
TEmployeeInsurancePre:
:
getProcessStatus
,
CommonConstants
.
ONE_STRING
);
this
.
update
(
updateWrapper
);
try
{
this
.
batchDispatcherInsurance
(
unConfirmList
);
this
.
batchDispatcherInsurance
(
unConfirmList
,
CommonConstants
.
ONE_STRING
);
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
...
...
@@ -495,6 +498,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setErrorMessage
(
addParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
addParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
addParam
.
getCustomerUserName
());
autoParam
.
setIsExit
(
addParam
.
getIsExit
());
autoParam
.
setInProgressList
(
addParam
.
getInProgressList
());
return
autoParam
;
}
...
...
@@ -516,6 +521,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setErrorMessage
(
batchParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
batchParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
batchParam
.
getCustomerUserName
());
autoParam
.
setIsExit
(
batchParam
.
getIsExit
());
autoParam
.
setInProgressList
(
batchParam
.
getInProgressList
());
return
autoParam
;
}
...
...
@@ -537,6 +544,8 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setErrorMessage
(
replaceParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
replaceParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
replaceParam
.
getCustomerUserName
());
autoParam
.
setIsExit
(
replaceParam
.
getIsExit
());
autoParam
.
setInProgressList
(
replaceParam
.
getInProgressList
());
return
autoParam
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
cb40f4e1
...
...
@@ -386,21 +386,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this
.
doFailInfo
(
detailList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
FOUR_STRING
);
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
ADD
,
null
,
CommonConstants
.
ONE_INT
);
//派单失败更新商险待购买数据
if
(
CollectionUtils
.
isNotEmpty
(
listResult
)){
List
<
String
>
idList
=
new
ArrayList
<>();
for
(
InsuranceAddParam
addParam:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
List
<
InsuranceAddParam
>
listUpdateResult
=
listResult
.
stream
().
filter
(
e
->
e
.
getIsExit
()
==
null
)
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
listUpdateResult
))
{
List
<
String
>
idList
=
new
ArrayList
<>();
for
(
InsuranceAddParam
addParam
:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
return
R
.
other
(
listResult
,
InsurancesConstants
.
ADD_SUCCESS
,
CommonConstants
.
TWO_INT
);
}
else
{
return
R
.
ok
(
null
,
InsurancesConstants
.
ADD_SUCCESS
);
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
ADD
,
null
,
CommonConstants
.
ONE_INT
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
ADD_SUCCESS
);
}
/**
...
...
@@ -460,17 +466,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
addOperate
(
detailList
,
user
,
InsurancesConstants
.
BATCH
,
null
,
CommonConstants
.
ONE_INT
);
//派单失败更新商险待购买数据
if
(
CollectionUtils
.
isNotEmpty
(
listResult
)){
List
<
String
>
idList
=
new
ArrayList
<>();
for
(
InsuranceBatchParam
addParam:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
List
<
InsuranceBatchParam
>
listUpdateResult
=
listResult
.
stream
().
filter
(
e
->
e
.
getIsExit
()
==
null
)
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
listUpdateResult
))
{
List
<
String
>
idList
=
new
ArrayList
<>();
for
(
InsuranceBatchParam
addParam
:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
return
R
.
other
(
listResult
,
InsurancesConstants
.
BATCH_SUCCESS
,
CommonConstants
.
TWO_INT
);
}
else
{
return
R
.
ok
(
null
,
InsurancesConstants
.
BATCH_SUCCESS
);
}
return
R
.
ok
(
listResult
,
InsurancesConstants
.
BATCH_SUCCESS
);
}
/**
...
...
@@ -597,17 +609,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REPLACE
,
null
,
CommonConstants
.
ONE_INT
);
//派单失败更新商险待购买数据
if
(
CollectionUtils
.
isNotEmpty
(
listResult
)){
List
<
String
>
idList
=
new
ArrayList
<>();
for
(
InsuranceReplaceParam
addParam:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
List
<
InsuranceReplaceParam
>
listUpdateResult
=
listResult
.
stream
().
filter
(
e
->
e
.
getIsExit
()
==
null
)
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
listUpdateResult
))
{
List
<
String
>
idList
=
new
ArrayList
<>();
for
(
InsuranceReplaceParam
addParam
:
listResult
)
{
if
(
Common
.
isNotNull
(
addParam
.
getInsurancePreId
()))
{
idList
.
add
(
addParam
.
getInsurancePreId
());
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
}
if
(!
idList
.
isEmpty
())
{
updateEmployeeInsurancePre
(
idList
);
}
return
R
.
other
(
listResult
,
InsurancesConstants
.
REPLACE_SUCCESS
,
CommonConstants
.
TWO_INT
);
}
else
{
return
R
.
ok
(
null
,
InsurancesConstants
.
REPLACE_SUCCESS
);
}
return
R
.
ok
(
listResult
,
InsurancesConstants
.
REPLACE_SUCCESS
);
}
/**
...
...
@@ -2680,80 +2698,82 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceAddParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceAddParam
>
listSuccess
=
new
ArrayList
<>();
List
<
InsuranceAddParam
>
distinctList
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
//派单前系统已有在途/在保数据的人员明细
// List<InsuredListVo> listInProgress = new ArrayList<>();
//定义外层循环标识,方便去重的时候跳出
outer:
for
(
int
i
=
0
;
i
<
distinctList
.
size
();
i
++)
{
InsuranceAddParam
param
=
distinctList
.
get
(
i
);
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validate20
(
param
.
getEmpName
())){
if
(!
ValidityUtil
.
validate20
(
param
.
getEmpName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_MORE_THAN_20
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getDeptNo
())){
if
(
StringUtils
.
isBlank
(
param
.
getDeptNo
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceProvinceName
())){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceProvinceName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_PROVINCE_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCityName
())){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCityName
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_CITY_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPost
())){
if
(
StringUtils
.
isBlank
(
param
.
getPost
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POST_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validate32
(
param
.
getPost
())){
if
(!
ValidityUtil
.
validate32
(
param
.
getPost
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POST_NOT_MORE_THAN_32
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isNotBlank
(
param
.
getRemark
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getRemark
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getRemark
()))
{
if
(!
ValidityUtil
.
validate50
(
param
.
getRemark
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
REMARK_NOT_MORE_THAN_50
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -2761,34 +2781,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
}
// 保单开始日期 > 当前派单日期
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
))
{
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
))
{
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isFutureDate
(
param
.
getPolicyStart
()))
{
if
(!
LocalDateUtil
.
isFutureDate
(
param
.
getPolicyStart
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_SHOULD_IS_FUTURE
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
compareDate
(
param
.
getPolicyStart
(),
param
.
getPolicyEnd
()))
{
if
(!
LocalDateUtil
.
compareDate
(
param
.
getPolicyStart
(),
param
.
getPolicyEnd
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_SHOULD_LESS_THAN_POLICY_END
);
listResult
.
add
(
param
);
continue
;
}
if
(
DateUtil
.
getDateStr
(
DateUtil
.
stringToDate
(
param
.
getPolicyStart
()),
1
).
compareTo
(
param
.
getPolicyEnd
().
replaceAll
(
"-"
,
""
))
<
CommonConstants
.
ZERO_INT
)
{
if
(
DateUtil
.
getDateStr
(
DateUtil
.
stringToDate
(
param
.
getPolicyStart
()),
1
).
compareTo
(
param
.
getPolicyEnd
().
replaceAll
(
"-"
,
""
))
<
CommonConstants
.
ZERO_INT
)
{
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_DATE_NOT_MORE_THAN_365
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -2805,7 +2825,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//&& LocalDateUtil.hasOverlap(LocalDateUtil.parseLocalDate(param.getPolicyStart()),LocalDateUtil.parseLocalDate(param.getPolicyEnd()),LocalDateUtil.parseLocalDate(repeat.getPolicyStart()),LocalDateUtil.parseLocalDate(repeat.getPolicyEnd()))
&&
param
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
&&
i
!=
j
)
{
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
listResult
.
add
(
param
);
continue
outer
;
...
...
@@ -2817,9 +2837,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
checkIdCard
.
setName
(
param
.
getEmpName
());
checkIdCard
.
setIdCard
(
param
.
getEmpIdcardNo
());
R
<
TCheckIdCard
>
tCheckIdCardR
=
checkDaprUtil
.
checkIdCardSingle
(
checkIdCard
);
if
(
null
!=
tCheckIdCardR
&&
tCheckIdCardR
.
getCode
()
==
CommonConstants
.
SUCCESS
){
if
(
null
!=
tCheckIdCardR
&&
tCheckIdCardR
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
TCheckIdCard
data
=
tCheckIdCardR
.
getData
();
if
(
CommonConstants
.
ONE_INT
!=
data
.
getIsTrue
()){
if
(
CommonConstants
.
ONE_INT
!=
data
.
getIsTrue
())
{
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_ID_CARD_NO_NOT_FIT
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -2827,24 +2847,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//根据项目编码查询项目是否存在
try
{
try
{
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
param
.
getDeptNo
()));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
if
(
MapUtils
.
isEmpty
(
data
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
ProjectSetInfoVo
projectSetInfoVo
=
data
.
get
(
param
.
getDeptNo
());
if
(
null
==
projectSetInfoVo
){
if
(
null
==
projectSetInfoVo
)
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
// MVP1.7.11:校验户是否在服务项里
// 获取项目的服务项
if
(
Common
.
isEmpty
(
projectSetInfoVo
.
getServerItem
())){
if
(
Common
.
isEmpty
(
projectSetInfoVo
.
getServerItem
()))
{
param
.
setErrorMessage
(
"项目未维护服务项目,请联系管理员"
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -2859,18 +2879,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//对应的项目编码已停止合作
if
(
CommonConstants
.
ONE_STRING
.
equals
(
projectSetInfoVo
.
getStopFlag
())
||
CommonConstants
.
TWO_STRING
.
equals
(
projectSetInfoVo
.
getStopFlag
())){
CommonConstants
.
TWO_STRING
.
equals
(
projectSetInfoVo
.
getStopFlag
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_DISPATCH_SETTLEDOMAIN_STOP
);
listResult
.
add
(
param
);
continue
;
}
//结算类型,根据项目编码获取,并冗余到明细记录中
String
settleType
=
projectSetInfoVo
.
getInsuranceSettleType
();
if
(
StringUtils
.
isEmpty
(
settleType
)){
if
(
StringUtils
.
isEmpty
(
settleType
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
param
.
setBpoFlag
(
projectSetInfoVo
.
getBpoFlag
());
param
.
setSettleType
(
Integer
.
parseInt
(
settleType
));
}
...
...
@@ -2883,8 +2903,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
InsurancesConstants
.
GET_DEPT_DETAIL_ERROR
+
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
InsurancesConstants
.
GET_DEPT_DETAIL_ERROR
+
e
);
param
.
setErrorMessage
(
InsurancesConstants
.
GET_DEPT_DETAIL_ERROR
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -2905,19 +2925,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisProvinceName
)){
if
(
Common
.
isEmpty
(
redisProvinceName
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_PROVINCE_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
param
.
setInsuranceProvince
(
Integer
.
parseInt
(
redisProvinceName
));
}
String
redisCityName
=
getRedisAreaValue
(
param
.
getInsuranceCityName
()
+
"_"
+
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisCityName
)){
if
(
Common
.
isEmpty
(
redisCityName
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_CITY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
}
...
...
@@ -2927,11 +2947,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
insuranceCompany
).
isPresent
())
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
//冗余保险公司计费方式
param
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
//冗余办理地省、市
...
...
@@ -2947,13 +2967,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceType:
:
getEnable
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
insuranceType
).
isPresent
())
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
//如果有年龄限制则判断年龄是否在16-70之间
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
insuranceType
.
getAgeLimit
())
&&
(
IdCardUtil
.
getFullAge
(
param
.
getEmpIdcardNo
())
<
CommonConstants
.
SIXTEEN_INT
||
IdCardUtil
.
getFullAge
(
param
.
getEmpIdcardNo
())
>
CommonConstants
.
SEVENTY
)){
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
insuranceType
.
getAgeLimit
())
&&
(
IdCardUtil
.
getFullAge
(
param
.
getEmpIdcardNo
())
<
CommonConstants
.
SIXTEEN_INT
||
IdCardUtil
.
getFullAge
(
param
.
getEmpIdcardNo
())
>
CommonConstants
.
SEVENTY
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_AGE_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -2967,11 +2987,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeStandard:
:
getEnable
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
typeStandard
).
isPresent
())
{
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
// "医疗额度" 和 "身故或残疾",由系统根据 保险公司+险种+ 购买标准 关联查询,并补全
// 这里计算好赋值,是为了方便入库
param
.
setMedicalQuota
(
typeStandard
.
getMedicalQuota
());
...
...
@@ -2980,7 +3000,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//按月查费率
if
(
CommonConstants
.
ONE_STRING
.
equals
(
insuranceCompany
.
getBillingType
())){
if
(
CommonConstants
.
ONE_STRING
.
equals
(
insuranceCompany
.
getBillingType
()))
{
//计算起止时间的月数
long
month
=
LocalDateUtil
.
betweenMonth
(
param
.
getPolicyStart
(),
param
.
getPolicyEnd
());
TInsuranceTypeRate
typeRate
=
tInsuranceTypeRateService
.
getOne
(
Wrappers
.<
TInsuranceTypeRate
>
query
().
lambda
()
...
...
@@ -2989,11 +3009,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
typeRate
).
isPresent
())
{
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_RATE_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
}
else
{
//冗余费率
param
.
setRate
(
new
BigDecimal
(
typeRate
.
getRate
()));
}
...
...
@@ -3002,18 +3022,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示)
if
(
Common
.
isNotNull
(
param
.
getSettleMonth
())
&&
!
LocalDateUtil
.
isDate
(
param
.
getSettleMonth
(),
LocalDateUtil
.
NORM_MONTH_PATTERN
))
{
if
(
Common
.
isNotNull
(
param
.
getSettleMonth
())
&&
!
LocalDateUtil
.
isDate
(
param
.
getSettleMonth
(),
LocalDateUtil
.
NORM_MONTH_PATTERN
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
if
(
Common
.
isNotNull
(
param
.
getSettleMonth
())
&&
!
LocalDateUtil
.
isCurrentOrFutureMonth
(
param
.
getSettleMonth
()))
{
if
(
Common
.
isNotNull
(
param
.
getSettleMonth
())
&&
!
LocalDateUtil
.
isCurrentOrFutureMonth
(
param
.
getSettleMonth
()))
{
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_SHOULD_IS_FUTURE
);
listResult
.
add
(
param
);
continue
;
}
//兼容处理,结算月为空时赋值null huych
if
(
Common
.
isEmpty
(
param
.
getSettleMonth
()))
{
if
(
Common
.
isEmpty
(
param
.
getSettleMonth
()))
{
param
.
setSettleMonth
(
null
);
}
...
...
@@ -3033,23 +3053,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
())
{
param
.
setErrorMessage
(
InsurancesConstants
.
DATA_IS_EXIST
);
listResult
.
add
(
param
);
continue
;
}
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
List
<
InsuredListVo
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getEmpIdcardNo
());
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
listInsured
);
listResult
.
add
(
param
);
continue
;
// listInProgress.addAll(listInsured);
}
}
listSuccess
.
add
(
param
);
}
map
.
put
(
"listResult"
,
listResult
);
...
...
@@ -3445,7 +3476,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
List
<
InsuredListVo
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getEmpIdcardNo
());
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
listInsured
);
listResult
.
add
(
param
);
continue
;
}
}
listSuccess
.
add
(
param
);
}
map
.
put
(
"listResult"
,
listResult
);
...
...
@@ -3834,7 +3875,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//本次派单人员系统已有参保明细 如果是二次派单则无需校验
if
(
Common
.
isEmpty
(
param
.
getIsExit
()))
{
List
<
InsuredListVo
>
listInsured
=
baseMapper
.
getOnProcessInsuredList
(
param
.
getEmpIdcardNo
());
if
(
Common
.
isNotNull
(
listInsured
)
&&
!
listInsured
.
isEmpty
())
{
param
.
setIsExit
(
CommonConstants
.
ONE_STRING
);
param
.
setErrorMessage
(
InsurancesConstants
.
DIS_PERSON_DATA_IS_EXIST
);
param
.
setInProgressList
(
listInsured
);
listResult
.
add
(
param
);
continue
;
}
}
//所有校验通过后设置查到的结果
//直接用excel里面的备注覆盖既有备注
detail
.
setRemark
(
param
.
getRemark
());
...
...
@@ -8482,6 +8533,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
baseMapper
.
policyPageToAutoSelect
(
page
,
param
);
}
@Override
public
List
<
InsuredListVo
>
getOnProcessInsurancesInfo
(
String
empIdCard
)
{
return
baseMapper
.
getOnProcessInsuredList
(
empIdCard
);
}
//商险各个入口更新待购买列表状态更新
private
void
updateEmployeeInsurancePre
(
String
insurancePreId
,
TInsuranceDetail
insuranceDetail
,
String
status
)
{
TEmployeeInsurancePre
pre
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsurancePreDetailServiceImpl.java
0 → 100644
View file @
cb40f4e1
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.TInsurancePreDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePreDetailService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
/**
* 入职确认信息已购买商险明细
*
* @author huych
* @date 2025-08-05 15:08:42
*/
@Log4j2
@Service
public
class
TInsurancePreDetailServiceImpl
extends
ServiceImpl
<
TInsurancePreDetailMapper
,
TInsurancePreDetail
>
implements
TInsurancePreDetailService
{
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
cb40f4e1
...
...
@@ -593,6 +593,36 @@
</foreach>
</update>
<!-- 派单人员系统已有参保明细查询-->
<select
id=
"getOnProcessInsuredList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
select
a.id as id,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.POST as post,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.BUY_HANDLE_STATUS as buyHandleStatus,
a.CREATE_TIME as createTime,
a.CREATE_NAME as createName,
a.UNIT_NAME as unitName,
a.UNIT_NO as unitNo,
a.IS_ADRESS as isAdress
from
t_insurance_detail a
where
a.DELETE_FLAG = 0
and (a.BUY_HANDLE_STATUS = 2 or (a.BUY_HANDLE_STATUS = 3 and a.isEffect = 0 and a.isOverdue = 0))
AND EMP_IDCARD_NO = #{empIdCard}
</select>
<!-- ***********************减员办理******************************** -->
<!-- 已投保列表分页查询-->
<select
id=
"getInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsurancePreDetailMapper.xml
0 → 100644
View file @
cb40f4e1
<?xml version="1.0" encoding="UTF-8"?>
<!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.TInsurancePreDetailMapper"
>
<resultMap
id=
"tInsurancePreDetailMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcardNo"
column=
"EMP_IDCARD_NO"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
/>
<result
property=
"post"
column=
"POST"
/>
<result
property=
"insuranceCompanyName"
column=
"INSURANCE_COMPANY_NAME"
/>
<result
property=
"insuranceTypeName"
column=
"INSURANCE_TYPE_NAME"
/>
<result
property=
"buyStandard"
column=
"BUY_STANDARD"
/>
<result
property=
"policyStart"
column=
"POLICY_START"
/>
<result
property=
"policyEnd"
column=
"POLICY_END"
/>
<result
property=
"policyEffect"
column=
"POLICY_EFFECT"
/>
<result
property=
"buyType"
column=
"BUY_TYPE"
/>
<result
property=
"buyHandleStatus"
column=
"BUY_HANDLE_STATUS"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"deptName"
column=
"DEPT_NAME"
/>
<result
property=
"unitName"
column=
"UNIT_NAME"
/>
<result
property=
"unitNo"
column=
"UNIT_NO"
/>
<result
property=
"isAdress"
column=
"IS_ADRESS"
/>
<result
property=
"registerId"
column=
"REGISTER_ID"
/>
</resultMap>
</mapper>
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