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
56cd6cd6
Commit
56cd6cd6
authored
Nov 08, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'develop'
Feature licancan See merge request
!257
parents
69f10b0b
3c4180fe
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
311 additions
and
140 deletions
+311
-140
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+4
-4
TInsuranceCompany.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
+5
-0
InsuranceDetailVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
+28
-4
InsuranceExportListParam.java
.../plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
+10
-0
InsuranceExportListVO.java
...oud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
+7
-0
InsuranceRefundListVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
+6
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+6
-0
InsuranceTypeVo.java
...ifu/cloud/plus/v1/yifu/insurances/vo/InsuranceTypeVo.java
+2
-0
RefundExportListParam.java
...oud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
+11
-0
RefundExportListVo.java
.../cloud/plus/v1/yifu/insurances/vo/RefundExportListVo.java
+17
-1
TInsuranceTypeController.java
.../yifu/insurances/controller/TInsuranceTypeController.java
+1
-1
TInsuranceCompanyMapper.java
...insurances/mapper/insurances/TInsuranceCompanyMapper.java
+12
-0
TInsuranceTypeMapper.java
...fu/insurances/mapper/insurances/TInsuranceTypeMapper.java
+2
-2
TInsuranceTypeService.java
...u/insurances/service/insurance/TInsuranceTypeService.java
+2
-2
TInsuranceCompanyServiceImpl.java
.../service/insurance/impl/TInsuranceCompanyServiceImpl.java
+2
-4
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+167
-118
TInsuranceTypeServiceImpl.java
...ces/service/insurance/impl/TInsuranceTypeServiceImpl.java
+2
-2
TInsuranceCompanyMapper.xml
...n/resources/mapper/insurances/TInsuranceCompanyMapper.xml
+13
-0
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+8
-2
TInsuranceTypeMapper.xml
...main/resources/mapper/insurances/TInsuranceTypeMapper.xml
+6
-0
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
56cd6cd6
...
@@ -27,6 +27,10 @@ public class InsurancesConstants {
...
@@ -27,6 +27,10 @@ public class InsurancesConstants {
* 替换
* 替换
*/
*/
public
static
final
String
REPLACE
=
"“替换”提交申请"
;
public
static
final
String
REPLACE
=
"“替换”提交申请"
;
/**
* 被替换成功
*/
public
static
final
String
SOURCE_REPLACE
=
"被替换成功"
;
/**
/**
* 删除
* 删除
*/
*/
...
@@ -277,10 +281,6 @@ public class InsurancesConstants {
...
@@ -277,10 +281,6 @@ public class InsurancesConstants {
* 购买标准不存在
* 购买标准不存在
*/
*/
public
static
final
String
BUY_STANDARD_NOT_EXIST
=
"购买标准不存在"
;
public
static
final
String
BUY_STANDARD_NOT_EXIST
=
"购买标准不存在"
;
/**
* 购买标准格式错误
*/
public
static
final
String
BUY_STANDARD_PARSE_ERROR
=
"购买标准格式错误"
;
/**
/**
* 商险购买地省名称不能为空
* 商险购买地省名称不能为空
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
View file @
56cd6cd6
...
@@ -12,6 +12,7 @@ import org.checkerframework.common.value.qual.StringVal;
...
@@ -12,6 +12,7 @@ import org.checkerframework.common.value.qual.StringVal;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
/**
/**
...
@@ -74,24 +75,28 @@ public class TInsuranceCompany extends BaseEntity {
...
@@ -74,24 +75,28 @@ public class TInsuranceCompany extends BaseEntity {
* 商险办理省code
* 商险办理省code
*/
*/
@Schema
(
description
=
"商险办理省code"
)
@Schema
(
description
=
"商险办理省code"
)
@NotNull
(
message
=
"商险办理省code不能为空"
)
private
Integer
insuranceHandleProvince
;
private
Integer
insuranceHandleProvince
;
/**
/**
* 商险办理省
* 商险办理省
*/
*/
@Schema
(
description
=
"商险办理省"
)
@Schema
(
description
=
"商险办理省"
)
@NotBlank
(
message
=
"商险办理省不能为空"
)
private
String
insuranceHandleProvinceName
;
private
String
insuranceHandleProvinceName
;
/**
/**
* 商险办理城市code
* 商险办理城市code
*/
*/
@Schema
(
description
=
"商险办理城市code"
)
@Schema
(
description
=
"商险办理城市code"
)
@NotNull
(
message
=
"商险办理城市code不能为空"
)
private
Integer
insuranceHandleCity
;
private
Integer
insuranceHandleCity
;
/**
/**
* 商险办理城市
* 商险办理城市
*/
*/
@Schema
(
description
=
"商险办理城市"
)
@Schema
(
description
=
"商险办理城市"
)
@NotBlank
(
message
=
"商险办理城市不能为空"
)
private
String
insuranceHandleCityName
;
private
String
insuranceHandleCityName
;
}
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
View file @
56cd6cd6
...
@@ -317,26 +317,50 @@ public class InsuranceDetailVO implements Serializable {
...
@@ -317,26 +317,50 @@ public class InsuranceDetailVO implements Serializable {
/**
/**
* 被替换人姓名
* 被替换人姓名
*/
*/
@Schema
(
description
=
"被替换人姓名
(替换类型专用字段)
"
)
@Schema
(
description
=
"被替换人姓名"
)
private
String
coverEmpName
;
private
String
coverEmpName
;
/**
/**
* 被替换人身份证号
* 被替换人身份证号
*/
*/
@Schema
(
description
=
"被替换人身份证号
(替换类型专用字段
)"
)
@Schema
(
description
=
"被替换人身份证号)"
)
private
String
coverEmpIdcardNo
;
private
String
coverEmpIdcardNo
;
/**
/**
* 被替换人项目名称
* 被替换人项目名称
*/
*/
@Schema
(
description
=
"被替换人项目名称
(替换类型专用字段)
"
)
@Schema
(
description
=
"被替换人项目名称"
)
private
String
coverProjectName
;
private
String
coverProjectName
;
/**
/**
* 被替换人封面抬头
* 被替换人封面抬头
*/
*/
@Schema
(
description
=
"被替换人封面抬头"
)
@Schema
(
description
=
"被替换人封面抬头"
)
private
String
coveInvoiceTitle
;
private
String
coverInvoiceTitle
;
/**
* 替换人姓名
*/
@Schema
(
description
=
"替换人姓名"
)
private
String
replaceEmpName
;
/**
* 替换人身份证号
*/
@Schema
(
description
=
"替换人身份证号"
)
private
String
replaceEmpIdcardNo
;
/**
* 替换人项目名称
*/
@Schema
(
description
=
"被替换人项目名称"
)
private
String
replaceProjectName
;
/**
* 替换人封面抬头
*/
@Schema
(
description
=
"替换人封面抬头"
)
private
String
replaceInvoiceTitle
;
/**
/**
* 退保金额 todo 数据库暂时没有
* 退保金额 todo 数据库暂时没有
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
View file @
56cd6cd6
...
@@ -3,7 +3,9 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
...
@@ -3,7 +3,9 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
org.checkerframework.common.value.qual.IntVal
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
...
@@ -17,6 +19,14 @@ import java.util.List;
...
@@ -17,6 +19,14 @@ import java.util.List;
public
class
InsuranceExportListParam
extends
BaseEntity
implements
Serializable
{
public
class
InsuranceExportListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
/**
* 投保状态 1待投保 2投保中 3已投保 (4投保退回 5 已减员)不在此列表展示4,5
*/
@Schema
(
description
=
"投保状态 1待投保 2投保中 3已投保"
)
@NotNull
(
message
=
"投保状态不能为空"
)
@IntVal
({
1
,
2
,
3
})
private
Integer
buyHandleStatus
;
/**
/**
* 员工姓名
* 员工姓名
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
View file @
56cd6cd6
...
@@ -115,6 +115,13 @@ public class InsuranceExportListVO implements Serializable {
...
@@ -115,6 +115,13 @@ public class InsuranceExportListVO implements Serializable {
@Schema
(
description
=
"保单结束时间"
)
@Schema
(
description
=
"保单结束时间"
)
private
LocalDate
policyEnd
;
private
LocalDate
policyEnd
;
/**
* 保单生效时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@JsonIgnore
private
LocalDate
policyEffect
;
/**
/**
* 保险公司名称(冗余字段)
* 保险公司名称(冗余字段)
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
View file @
56cd6cd6
...
@@ -71,6 +71,12 @@ public class InsuranceRefundListVo implements Serializable {
...
@@ -71,6 +71,12 @@ public class InsuranceRefundListVo implements Serializable {
@Schema
(
description
=
"保单编号"
)
@Schema
(
description
=
"保单编号"
)
private
String
policyNo
;
private
String
policyNo
;
/**
* 实际保费
*/
@Schema
(
description
=
"实际保费"
)
private
String
actualPremium
;
/**
/**
* 商险购买地省code
* 商险购买地省code
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
56cd6cd6
...
@@ -64,6 +64,12 @@ public class InsuranceReplaceParam implements Serializable {
...
@@ -64,6 +64,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"保单结束时间"
)
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
private
String
policyEnd
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
/**
* 替换员工姓名
* 替换员工姓名
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceTypeVo.java
View file @
56cd6cd6
...
@@ -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
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
...
@@ -18,6 +19,7 @@ public class InsuranceTypeVo extends TInsuranceType {
...
@@ -18,6 +19,7 @@ public class InsuranceTypeVo extends TInsuranceType {
/**
/**
* 所属保险公司名称
* 所属保险公司名称
*/
*/
@Schema
(
description
=
"所属保险公司名称"
)
private
String
insuranceCompanyName
;
private
String
insuranceCompanyName
;
/**
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
View file @
56cd6cd6
...
@@ -3,7 +3,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
...
@@ -3,7 +3,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
org.checkerframework.common.value.qual.IntVal
;
import
org.checkerframework.common.value.qual.StringVal
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
...
@@ -17,6 +20,14 @@ import java.util.List;
...
@@ -17,6 +20,14 @@ import java.util.List;
public
class
RefundExportListParam
extends
BaseEntity
implements
Serializable
{
public
class
RefundExportListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
/**
* 减员状态 1待减员 2减员中 3减员退回 4减员成功
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中 4减员成功"
)
@NotNull
(
message
=
"减员状态不能为空"
)
@IntVal
({
1
,
2
,
4
})
private
Integer
reduceHandleStatus
;
/**
/**
* 员工姓名
* 员工姓名
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListVo.java
View file @
56cd6cd6
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
/**
* @author zhaji
* @author zhaji
...
@@ -129,6 +131,13 @@ public class RefundExportListVo implements Serializable {
...
@@ -129,6 +131,13 @@ public class RefundExportListVo implements Serializable {
@Schema
(
description
=
"保单结束时间"
)
@Schema
(
description
=
"保单结束时间"
)
private
LocalDate
policyEnd
;
private
LocalDate
policyEnd
;
/**
* 保单生效时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@JsonIgnore
private
LocalDate
policyEffect
;
/**
/**
* 保险公司名称(冗余字段)
* 保险公司名称(冗余字段)
*/
*/
...
@@ -193,7 +202,7 @@ public class RefundExportListVo implements Serializable {
...
@@ -193,7 +202,7 @@ public class RefundExportListVo implements Serializable {
* 购买天数
* 购买天数
*/
*/
@Schema
(
description
=
"购买天数"
)
@Schema
(
description
=
"购买天数"
)
private
l
ong
buyDay
;
private
L
ong
buyDay
;
/**
/**
* 封面抬头
* 封面抬头
...
@@ -206,4 +215,11 @@ public class RefundExportListVo implements Serializable {
...
@@ -206,4 +215,11 @@ public class RefundExportListVo implements Serializable {
*/
*/
@Schema
(
description
=
"保单号"
)
@Schema
(
description
=
"保单号"
)
private
String
policyNo
;
private
String
policyNo
;
/**
* 派单日期
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"派单日期"
)
private
LocalDateTime
createTime
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeController.java
View file @
56cd6cd6
...
@@ -39,7 +39,7 @@ public class TInsuranceTypeController {
...
@@ -39,7 +39,7 @@ public class TInsuranceTypeController {
*/
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
InsuranceTypeVo
>>
getInsuranceTypePage
(
Page
<
TInsuranceType
>
page
,
TInsuranceType
insuranceType
)
{
public
R
<
IPage
<
InsuranceTypeVo
>>
getInsuranceTypePage
(
Page
<
InsuranceTypeVo
>
page
,
InsuranceTypeVo
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
pageDiy
(
page
,
insuranceType
));
return
R
.
ok
(
insuranceTypeService
.
pageDiy
(
page
,
insuranceType
));
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceCompanyMapper.java
View file @
56cd6cd6
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
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.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* @author Administrator
* @author Administrator
...
@@ -14,4 +17,13 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -14,4 +17,13 @@ import org.apache.ibatis.annotations.Mapper;
public
interface
TInsuranceCompanyMapper
extends
BaseMapper
<
TInsuranceCompany
>
{
public
interface
TInsuranceCompanyMapper
extends
BaseMapper
<
TInsuranceCompany
>
{
/**
* 分页查询保险公司
*
* @author licancan
* @param page
* @param param
* @return {@link IPage<TInsuranceCompany>}
*/
IPage
<
TInsuranceCompany
>
getInsuranceCompanyListPage
(
Page
<
TInsuranceCompany
>
page
,
@Param
(
"param"
)
TInsuranceCompany
param
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceTypeMapper.java
View file @
56cd6cd6
...
@@ -44,9 +44,9 @@ public interface TInsuranceTypeMapper extends BaseMapper<TInsuranceType> {
...
@@ -44,9 +44,9 @@ public interface TInsuranceTypeMapper extends BaseMapper<TInsuranceType> {
* @author zhaji
* @author zhaji
* @param page 分页参数
* @param page 分页参数
* @param insuranceType 查询参数
* @param insuranceType 查询参数
* @return {@link IPage<
InsuranceTypeVo>}
* @return {@link IPage<InsuranceTypeVo>}
*/
*/
IPage
<
InsuranceTypeVo
>
selectInsuranceTypePage
(
Page
page
,
@Param
(
"insuranceType"
)
TInsuranceType
insuranceType
);
IPage
<
InsuranceTypeVo
>
selectInsuranceTypePage
(
Page
page
,
@Param
(
"insuranceType"
)
InsuranceTypeVo
insuranceType
);
InsuranceTypeVo
getInsuranceTypeDetailById
(
String
id
);
InsuranceTypeVo
getInsuranceTypeDetailById
(
String
id
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceTypeService.java
View file @
56cd6cd6
...
@@ -22,9 +22,9 @@ public interface TInsuranceTypeService extends IService<TInsuranceType> {
...
@@ -22,9 +22,9 @@ public interface TInsuranceTypeService extends IService<TInsuranceType> {
* @author zhaji
* @author zhaji
* @param page 分页参数
* @param page 分页参数
* @param insuranceType 分页查询参数
* @param insuranceType 分页查询参数
* @return {@link IPage<
TInsuranceType
>}
* @return {@link IPage<
InsuranceTypeVo
>}
*/
*/
IPage
<
InsuranceTypeVo
>
pageDiy
(
Page
<
TInsuranceType
>
page
,
TInsuranceType
insuranceType
);
IPage
<
InsuranceTypeVo
>
pageDiy
(
Page
<
InsuranceTypeVo
>
page
,
InsuranceTypeVo
insuranceType
);
/**
/**
* 新增险种信息
* 新增险种信息
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceCompanyServiceImpl.java
View file @
56cd6cd6
...
@@ -48,13 +48,11 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
...
@@ -48,13 +48,11 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
* @author zhaji
* @author zhaji
* @param page 分页参数
* @param page 分页参数
* @param insuranceCompany 查询类
* @param insuranceCompany 查询类
* @return {@link IPage<
TInsuranceCompany>}
* @return {@link IPage<TInsuranceCompany>}
*/
*/
@Override
@Override
public
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
public
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
LambdaQueryWrapper
<
TInsuranceCompany
>
wrapper
=
new
LambdaQueryWrapper
<>();
IPage
<
TInsuranceCompany
>
list
=
this
.
baseMapper
.
getInsuranceCompanyListPage
(
page
,
insuranceCompany
);
wrapper
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
);
IPage
<
TInsuranceCompany
>
list
=
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
return
list
;
return
list
;
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
56cd6cd6
...
@@ -424,7 +424,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -424,7 +424,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for
(
InsuranceReplaceParam
success
:
listSuccess
)
{
for
(
InsuranceReplaceParam
success
:
listSuccess
)
{
//替换
//替换
TInsuranceDetail
newDetail
=
new
TInsuranceDetail
();
TInsuranceDetail
newDetail
=
new
TInsuranceDetail
();
//原数据置为无效:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
//原数据置为无效:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
+ 购买标准 + 有效
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
...
@@ -433,7 +433,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -433,7 +433,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
success
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
...
@@ -611,6 +617,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -611,6 +617,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//冗余保险公司计费方式
//冗余保险公司计费方式
byId
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
byId
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
//冗余办理地省、市
param
.
setInsuranceHandleProvince
(
insuranceCompany
.
getInsuranceHandleProvince
());
param
.
setInsuranceHandleProvinceName
(
insuranceCompany
.
getInsuranceHandleProvinceName
());
param
.
setInsuranceHandleCity
(
insuranceCompany
.
getInsuranceHandleCity
());
param
.
setInsuranceHandleCityName
(
insuranceCompany
.
getInsuranceHandleCityName
());
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getOne
(
Wrappers
.<
TInsuranceType
>
query
().
lambda
()
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getOne
(
Wrappers
.<
TInsuranceType
>
query
().
lambda
()
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
...
@@ -657,7 +668,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -657,7 +668,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
}
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期 是唯一(剔除退回、过期状态的记录)
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期
+ 购买标准
是唯一(剔除退回、过期状态的记录)
//待投保、投保中、已投保(有效、未过期)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
@@ -669,6 +680,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -669,6 +680,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
//有效
...
@@ -797,29 +809,53 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -797,29 +809,53 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceDetailVO
.
setDistributeType
(
insuranceDetailVO
.
getReduceHandleStatus
()
==
null
?
insuranceDetailVO
.
getBuyType
():
CommonConstants
.
FIVE_INT
);
insuranceDetailVO
.
setDistributeType
(
insuranceDetailVO
.
getReduceHandleStatus
()
==
null
?
insuranceDetailVO
.
getBuyType
():
CommonConstants
.
FIVE_INT
);
//派单状态
//派单状态
insuranceDetailVO
.
setDistributeStatus
(
insuranceDetailVO
.
getDistributeType
()
==
CommonConstants
.
FIVE_INT
?
insuranceDetailVO
.
getReduceHandleStatus
():
insuranceDetailVO
.
getBuyHandleStatus
());
insuranceDetailVO
.
setDistributeStatus
(
insuranceDetailVO
.
getDistributeType
()
==
CommonConstants
.
FIVE_INT
?
insuranceDetailVO
.
getReduceHandleStatus
():
insuranceDetailVO
.
getBuyHandleStatus
());
//
替换类型
//
被替换人
if
(
insuranceDetailVO
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
(
)
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
insuranceDetailVO
.
getId
()
)
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
insuranceDetailVO
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
())
{
if
(
Optional
.
ofNullable
(
one
).
isPresent
())
{
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
byId
).
isPresent
())
{
i
f
(
Optional
.
ofNullable
(
byId
).
isPresent
())
{
i
nsuranceDetailVO
.
setCoverEmpName
(
byId
.
getEmpName
());
insuranceDetailVO
.
setCoverEmpName
(
byId
.
getEmpName
());
insuranceDetailVO
.
setCoverEmpIdcardNo
(
byId
.
getEmpIdcardNo
());
insuranceDetailVO
.
setCoverEmpIdcardNo
(
byId
.
getEmpIdcardNo
(
));
R
<
SetInfoVo
>
infoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
byId
.
getDeptNo
()
));
R
<
SetInfoVo
>
infoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
byId
.
getDeptNo
()));
if
(
null
!=
infoByCodes
&&
infoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
infoByCodes
.
getData
()))
{
if
(
null
!=
infoByCodes
&&
infoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
infoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
infoByCodes
.
getData
().
getProjectSetInfoVoMap
();
Map
<
String
,
ProjectSetInfoVo
>
data
=
infoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
Objects
.
nonNull
(
data
)){
ProjectSetInfoVo
setInfoVo
=
data
.
get
(
byId
.
getDeptNo
());
ProjectSetInfoVo
setInfoVo
=
data
.
get
(
byId
.
getDeptNo
());
if
(
null
!=
setInfoVo
){
if
(
null
!=
setInfoVo
){
insuranceDetailVO
.
setCoverProjectName
(
Optional
.
ofNullable
(
setInfoVo
.
getDepartName
()).
orElse
(
""
));
insuranceDetailVO
.
setCoverProjectName
(
Optional
.
ofNullable
(
setInfoVo
.
getDepartName
()).
orElse
(
""
));
insuranceDetailVO
.
setCoveInvoiceTitle
(
Optional
.
ofNullable
(
setInfoVo
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
insuranceDetailVO
.
setCoverInvoiceTitle
(
Optional
.
ofNullable
(
setInfoVo
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
}
}
}
}
}
//替换人
TInsuranceReplace
replace
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getFromInsuranceDetailId
,
insuranceDetailVO
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
replace
).
isPresent
())
{
TInsuranceDetail
replaceById
=
this
.
getById
(
replace
.
getToInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
replaceById
).
isPresent
())
{
insuranceDetailVO
.
setReplaceEmpName
(
replaceById
.
getEmpName
());
insuranceDetailVO
.
setReplaceEmpIdcardNo
(
replaceById
.
getEmpIdcardNo
());
R
<
SetInfoVo
>
infoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
replaceById
.
getDeptNo
()));
if
(
null
!=
infoByCodes
&&
infoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
infoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
infoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
Objects
.
nonNull
(
data
)){
ProjectSetInfoVo
setInfoVo
=
data
.
get
(
replaceById
.
getDeptNo
());
if
(
null
!=
setInfoVo
){
insuranceDetailVO
.
setReplaceProjectName
(
Optional
.
ofNullable
(
setInfoVo
.
getDepartName
()).
orElse
(
""
));
insuranceDetailVO
.
setReplaceInvoiceTitle
(
Optional
.
ofNullable
(
setInfoVo
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
}
}
}
}
}
}
}
}
}
}
//减员类型 处理创建人、创建时间、备注
//减员类型 处理创建人、创建时间、备注
if
(
CommonConstants
.
FIVE_INT
==
insuranceDetailVO
.
getDistributeType
()){
if
(
CommonConstants
.
FIVE_INT
==
insuranceDetailVO
.
getDistributeType
()){
TInsuranceRefund
refund
=
tInsuranceRefundService
.
getOne
(
Wrappers
.<
TInsuranceRefund
>
query
().
lambda
()
TInsuranceRefund
refund
=
tInsuranceRefundService
.
getOne
(
Wrappers
.<
TInsuranceRefund
>
query
().
lambda
()
...
@@ -921,26 +957,39 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -921,26 +957,39 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
//购买天数
//购买天数
record
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
record
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
TInsuranceDetail
detail
=
new
TInsuranceDetail
();
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
detail
.
setId
(
record
.
getId
());
if
(
CommonConstants
.
THREE_INT
==
record
.
getBuyType
()){
//update状态由「待投保」置为「投保中」
if
(
Objects
.
isNull
(
record
.
getPolicyEffect
())){
detail
.
setBuyHandleStatus
(
CommonConstants
.
TWO_INT
);
record
.
setBuyMonth
(
null
);
if
(
record
.
getBuyType
()
==
CommonConstants
.
ONE_INT
){
record
.
setBuyDay
(
null
);
// if 投保类型 == 新增,then 更新保单生效日期为:T+1,无需考虑节假日
}
else
{
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyEffect
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
record
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
record
.
getPolicyEffect
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
}
}
}
detail
.
setHandledBy
(
user
.
getId
());
//如果是待投保,需要处理相关逻辑,投保中、投保成功只是单纯的导出
detail
.
setHandledTime
(
LocalDateTime
.
now
());
if
(
param
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
detail
.
setUpdateBy
(
user
.
getId
());
TInsuranceDetail
detail
=
new
TInsuranceDetail
();
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
detail
.
setId
(
record
.
getId
());
if
(
Common
.
isNotNull
(
jsonObject
)){
//update状态由「待投保」置为「投保中」
detail
.
setDeptId
(
jsonObject
.
getId
());
detail
.
setBuyHandleStatus
(
CommonConstants
.
TWO_INT
);
detail
.
setDeptName
(
jsonObject
.
getDepartName
());
if
(
record
.
getBuyType
()
==
CommonConstants
.
ONE_INT
){
detail
.
setUnitId
(
jsonObject
.
getCustomerId
());
// if 投保类型 == 新增,then 更新保单生效日期为:T+1,无需考虑节假日
detail
.
setUnitName
(
jsonObject
.
getCustomerName
());
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
detail
.
setUnitNo
(
jsonObject
.
getCustomerCode
());
}
detail
.
setHandledBy
(
user
.
getId
());
detail
.
setHandledTime
(
LocalDateTime
.
now
());
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
if
(
Common
.
isNotNull
(
jsonObject
)){
detail
.
setDeptId
(
jsonObject
.
getId
());
detail
.
setDeptName
(
jsonObject
.
getDepartName
());
detail
.
setUnitId
(
jsonObject
.
getCustomerId
());
detail
.
setUnitName
(
jsonObject
.
getCustomerName
());
detail
.
setUnitNo
(
jsonObject
.
getCustomerCode
());
}
detailList
.
add
(
detail
);
}
}
detailList
.
add
(
detail
);
}
}
}
}
//批量更新
//批量更新
...
@@ -971,6 +1020,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -971,6 +1020,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
vo
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
vo
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
//购买天数
//购买天数
vo
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
vo
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if
(
CommonConstants
.
THREE_INT
==
vo
.
getBuyType
()){
if
(
Objects
.
isNull
(
vo
.
getPolicyEffect
())){
vo
.
setBuyMonth
(
null
);
vo
.
setBuyDay
(
null
);
}
else
{
vo
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
vo
.
getPolicyEffect
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
vo
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
vo
.
getPolicyEffect
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
}
}
vo
.
setRemark
(
InsurancesConstants
.
QUIT
);
vo
.
setRemark
(
InsurancesConstants
.
QUIT
);
vo
.
setBuyType
(
CommonConstants
.
FOUR_INT
);
vo
.
setBuyType
(
CommonConstants
.
FOUR_INT
);
vo
.
setProjectName
(
byId
.
getDeptName
());
vo
.
setProjectName
(
byId
.
getDeptName
());
...
@@ -1257,6 +1316,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1257,6 +1316,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceListVO
>
errorList
=
new
ArrayList
<>();
List
<
InsuranceListVO
>
errorList
=
new
ArrayList
<>();
//后端处理的数据
//后端处理的数据
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
//被替换人标记被替换成功
List
<
TInsuranceDetail
>
sourceList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
for
(
TInsuranceDetail
detail
:
detailList
)
{
for
(
TInsuranceDetail
detail
:
detailList
)
{
//先判断投保状态是不是投保中,如果不是不给标记办理成功,防止重复推数据
//先判断投保状态是不是投保中,如果不是不给标记办理成功,防止重复推数据
...
@@ -1281,6 +1342,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1281,6 +1342,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//替换类型,保单生效日期:T + 1
//替换类型,保单生效日期:T + 1
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
successList
.
add
(
detail
);
successList
.
add
(
detail
);
//查找被替换人信息
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
detail
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
())
{
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
byId
).
isPresent
())
{
sourceList
.
add
(
byId
);
}
}
}
else
{
}
else
{
//根据结算类型判断是否需要计算预估保费
//根据结算类型判断是否需要计算预估保费
//预估
//预估
...
@@ -1406,6 +1478,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1406,6 +1478,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
addOperate
(
operateList
,
user
,
InsurancesConstants
.
SUCCESSFUL
);
addOperate
(
operateList
,
user
,
InsurancesConstants
.
SUCCESSFUL
);
addOperate
(
sourceList
,
user
,
InsurancesConstants
.
SOURCE_REPLACE
,
null
,
CommonConstants
.
ONE_INT
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
}
...
@@ -1438,7 +1511,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1438,7 +1511,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
//登记保单保费
//登记保单保费
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
+ 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
...
@@ -1446,6 +1519,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1446,6 +1519,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
success
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
@@ -1826,16 +1900,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1826,16 +1900,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceHandleProvinceName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceHandleCityName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getSettleMonth
())){
if
(
StringUtils
.
isBlank
(
param
.
getSettleMonth
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_NOT_EMPTY
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
...
@@ -1911,6 +1975,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1911,6 +1975,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//&& LocalDateUtil.hasOverlap(LocalDateUtil.parseLocalDate(param.getPolicyStart()),LocalDateUtil.parseLocalDate(param.getPolicyEnd()),LocalDateUtil.parseLocalDate(repeat.getPolicyStart()),LocalDateUtil.parseLocalDate(repeat.getPolicyEnd()))
//&& 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
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
...
@@ -1996,22 +2061,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1996,22 +2061,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
}
}
String
redisHandleProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceHandleProvinceName
());
if
(
Common
.
isEmpty
(
redisHandleProvinceName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceHandleProvince
(
Integer
.
parseInt
(
redisHandleProvinceName
));
}
String
redisHandleCityName
=
getRedisAreaValue
(
param
.
getInsuranceHandleCityName
()
+
"_"
+
param
.
getInsuranceHandleProvinceName
());
if
(
Common
.
isEmpty
(
redisHandleCityName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_CITY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceHandleCity
(
Integer
.
parseInt
(
redisHandleCityName
));
}
// 保险公司-险种-购买标准 是否存在
// 保险公司-险种-购买标准 是否存在
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
...
@@ -2026,6 +2075,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2026,6 +2075,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//冗余保险公司计费方式
//冗余保险公司计费方式
param
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
param
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
//冗余办理地省、市
param
.
setInsuranceHandleProvince
(
insuranceCompany
.
getInsuranceHandleProvince
());
param
.
setInsuranceHandleProvinceName
(
insuranceCompany
.
getInsuranceHandleProvinceName
());
param
.
setInsuranceHandleCity
(
insuranceCompany
.
getInsuranceHandleCity
());
param
.
setInsuranceHandleCityName
(
insuranceCompany
.
getInsuranceHandleCityName
());
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getOne
(
Wrappers
.<
TInsuranceType
>
query
().
lambda
()
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getOne
(
Wrappers
.<
TInsuranceType
>
query
().
lambda
()
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
...
@@ -2091,7 +2145,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2091,7 +2145,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期 是唯一(剔除退回、过期状态的记录)
//记录查重校验:姓名 + 身份证号 + 保险公司 + 险种 + 保单开始日期~保单结束日期
+ 购买标准
是唯一(剔除退回、过期状态的记录)
//待投保、投保中、已投保(有效、未过期)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
@@ -2103,6 +2157,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2103,6 +2157,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
//有效
//有效
.
and
(
.
and
(
...
@@ -2208,16 +2263,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2208,16 +2263,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceHandleProvinceName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceHandleCityName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getSettleMonth
())){
if
(
StringUtils
.
isBlank
(
param
.
getSettleMonth
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_NOT_EMPTY
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
...
@@ -2242,7 +2287,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2242,7 +2287,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种
、购买标准
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceBatchParam
repeat
=
distinctList
.
get
(
j
);
InsuranceBatchParam
repeat
=
distinctList
.
get
(
j
);
if
(
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
if
(
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
...
@@ -2336,22 +2381,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2336,22 +2381,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
}
}
String
redisHandleProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceHandleProvinceName
());
if
(
Common
.
isEmpty
(
redisHandleProvinceName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceHandleProvince
(
Integer
.
parseInt
(
redisHandleProvinceName
));
}
String
redisHandleCityName
=
getRedisAreaValue
(
param
.
getInsuranceHandleCityName
()
+
"_"
+
param
.
getInsuranceHandleProvinceName
());
if
(
Common
.
isEmpty
(
redisHandleCityName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_CITY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceHandleCity
(
Integer
.
parseInt
(
redisHandleCityName
));
}
//保单开始日期、结束日期,由系统根据保单号关联查询投保状态为 "已投保" 的商险记录的任意一条
//保单开始日期、结束日期,由系统根据保单号关联查询投保状态为 "已投保" 的商险记录的任意一条
TInsuranceDetail
limitOne
=
getOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
limitOne
=
getOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
...
@@ -2392,6 +2421,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2392,6 +2421,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
}
else
{
//冗余保险公司计费方式
//冗余保险公司计费方式
param
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
param
.
setBillingType
(
Integer
.
valueOf
(
insuranceCompany
.
getBillingType
()));
//冗余办理地省、市
param
.
setInsuranceHandleProvince
(
insuranceCompany
.
getInsuranceHandleProvince
());
param
.
setInsuranceHandleProvinceName
(
insuranceCompany
.
getInsuranceHandleProvinceName
());
param
.
setInsuranceHandleCity
(
insuranceCompany
.
getInsuranceHandleCity
());
param
.
setInsuranceHandleCityName
(
insuranceCompany
.
getInsuranceHandleCityName
());
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getOne
(
Wrappers
.<
TInsuranceType
>
query
().
lambda
()
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getOne
(
Wrappers
.<
TInsuranceType
>
query
().
lambda
()
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceType:
:
getName
,
param
.
getInsuranceTypeName
())
...
@@ -2469,7 +2503,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2469,7 +2503,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
//记录查重校验:姓名 + 身份证号 + 保
险公司 + 险种
//记录查重校验:姓名 + 身份证号 + 保
单号 + 保险公司 + 险种 + 购买标准
//待投保、投保中、已投保(有效、未过期)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
@@ -2562,6 +2596,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2562,6 +2596,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getReplaceEmpName
())){
if
(
StringUtils
.
isBlank
(
param
.
getReplaceEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_EMP_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_EMP_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
...
@@ -2638,6 +2677,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2638,6 +2677,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//20221107 现在需求要求允许同一个人同时存在多个不同的在保信息
//&& LocalDateUtil.hasOverlap(LocalDateUtil.parseLocalDate(param.getPolicyStart()),LocalDateUtil.parseLocalDate(param.getPolicyEnd()),LocalDateUtil.parseLocalDate(repeat.getPolicyStart()),LocalDateUtil.parseLocalDate(repeat.getPolicyEnd()))
//&& 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
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
...
@@ -2704,7 +2744,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2704,7 +2744,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
//原数据查重校验:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
//原数据查重校验:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
+ 购买标准 + 有效
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
...
@@ -2713,7 +2753,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2713,7 +2753,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
...
@@ -2788,7 +2834,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2788,7 +2834,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
}
}
//替换者数据查重校验:替换姓名 + 替换身份证号 + 替换项目编码? + 保险公司 + 险种名称
//替换者数据查重校验:替换姓名 + 替换身份证号 + 替换项目编码? + 保险公司 + 险种名称
+ 购买标准
//待投保、投保中、已投保(有效、未过期)
//待投保、投保中、已投保(有效、未过期)
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
Set
<
Integer
>
setRStatus
=
Sets
.
newHashSet
();
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
setRStatus
.
add
(
CommonConstants
.
FOUR_INT
);
...
@@ -2800,6 +2846,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2800,6 +2846,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
//有效
...
@@ -2882,20 +2929,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2882,20 +2929,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_E
XIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_E
MPTY
);
listResult
.
add
(
param
);
listResult
.
add
(
param
);
continue
;
continue
;
}
else
{
if
(!
ValidityUtil
.
validateMoney
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validateMoneyMax
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_STANDARD_MAX_ERROR
);
listResult
.
add
(
param
);
continue
;
}
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
...
@@ -3522,26 +3558,39 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3522,26 +3558,39 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
//购买天数
//购买天数
record
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
record
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if
(
CommonConstants
.
THREE_INT
==
record
.
getBuyType
()){
if
(
Objects
.
isNull
(
record
.
getPolicyEffect
())){
record
.
setBuyMonth
(
null
);
record
.
setBuyDay
(
null
);
}
else
{
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyEffect
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
record
.
setBuyDay
(
LocalDateUtil
.
betweenDay
(
record
.
getPolicyEffect
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
}
}
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
)
{
if
(
null
!=
jsonObject
)
{
record
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
record
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
}
}
}
}
TInsuranceDetail
detail
=
getById
(
record
.
getId
());
//如果是待减员,需要处理相关逻辑,减员中、减员成功只是单纯的导出
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
if
(
param
.
getReduceHandleStatus
()
==
CommonConstants
.
ONE_INT
){
detail
.
setId
(
record
.
getId
());
TInsuranceDetail
detail
=
getById
(
record
.
getId
());
//update状态由「待减员」置为「减员中」
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setId
(
record
.
getId
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
//update状态由「待减员」置为「减员中」
detail
.
setReduceHandleStatus
(
CommonConstants
.
TWO_INT
);
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
detailList
.
add
(
detail
);
detail
.
setReduceHandleStatus
(
CommonConstants
.
TWO_INT
);
refund
.
setId
(
detail
.
getRefundId
());
refund
.
setReduceHandleStatus
(
CommonConstants
.
TWO_INT
);
detailList
.
add
(
detail
);
refund
.
setUpdateBy
(
user
.
getId
());
refund
.
setId
(
detail
.
getRefundId
());
refund
.
setUpdateTime
(
LocalDateTime
.
now
());
refund
.
setReduceHandleStatus
(
CommonConstants
.
TWO_INT
);
refundList
.
add
(
refund
);
refund
.
setUpdateBy
(
user
.
getId
());
refund
.
setUpdateTime
(
LocalDateTime
.
now
());
refundList
.
add
(
refund
);
}
}
}
}
}
//批量更新
//批量更新
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceTypeServiceImpl.java
View file @
56cd6cd6
...
@@ -46,10 +46,10 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
...
@@ -46,10 +46,10 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
* @author zhaji
* @author zhaji
* @param page 分页参数
* @param page 分页参数
* @param insuranceType 分页查询参数
* @param insuranceType 分页查询参数
* @return {@link IPage<
TInsuranceType
>}
* @return {@link IPage<
InsuranceTypeVo
>}
*/
*/
@Override
@Override
public
IPage
<
InsuranceTypeVo
>
pageDiy
(
Page
<
TInsuranceType
>
page
,
TInsuranceType
insuranceType
)
{
public
IPage
<
InsuranceTypeVo
>
pageDiy
(
Page
<
InsuranceTypeVo
>
page
,
InsuranceTypeVo
insuranceType
)
{
return
this
.
baseMapper
.
selectInsuranceTypePage
(
page
,
insuranceType
);
return
this
.
baseMapper
.
selectInsuranceTypePage
(
page
,
insuranceType
);
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceCompanyMapper.xml
View file @
56cd6cd6
...
@@ -28,4 +28,17 @@
...
@@ -28,4 +28,17 @@
DELETE_FLAG,
DELETE_FLAG,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME
</sql>
</sql>
<select
id=
"getInsuranceCompanyListPage"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
></include>
FROM t_insurance_company
where DELETE_FLAG = 0
<if
test=
"param.companyName != null and param.companyName.trim() != ''"
>
and COMPANY_NAME = #{param.companyName}
</if>
<if
test=
"param.insuranceHandleCity != null"
>
and INSURANCE_HANDLE_CITY = #{param.insuranceHandleCity}
</if>
ORDER BY CREATE_TIME DESC
</select>
</mapper>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
56cd6cd6
...
@@ -226,6 +226,7 @@
...
@@ -226,6 +226,7 @@
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.BUY_STANDARD as buyStandard,
a.CREATE_TIME as createTime,
a.CREATE_NAME as createName,
a.CREATE_NAME as createName,
a.BUY_HANDLE_STATUS as buyHandleStatus,
a.BUY_HANDLE_STATUS as buyHandleStatus,
a.SETTLE_TYPE as settleType,
a.SETTLE_TYPE as settleType,
...
@@ -339,6 +340,7 @@
...
@@ -339,6 +340,7 @@
a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a.POLICY_START as policyStart,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.BUY_STANDARD as buyStandard,
...
@@ -371,6 +373,7 @@
...
@@ -371,6 +373,7 @@
a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a.POLICY_START as policyStart,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_END as policyEnd,
a.POLICY_EFFECT as policyEffect,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.BUY_STANDARD as buyStandard,
...
@@ -382,7 +385,7 @@
...
@@ -382,7 +385,7 @@
a.POLICY_NO as policyNo,
a.POLICY_NO as policyNo,
a.REMARK as remark
a.REMARK as remark
from t_insurance_detail a
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS =
1
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS =
#{param.buyHandleStatus}
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
</if>
...
@@ -687,6 +690,8 @@
...
@@ -687,6 +690,8 @@
a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
a.POLICY_START as policyStart,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_END as policyEnd,
a.POLICY_NO as policyNo,
a.ACTUAL_PREMIUM as actualPremium,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.BUY_STANDARD as buyStandard,
a.BUY_STANDARD as buyStandard,
...
@@ -767,6 +772,7 @@
...
@@ -767,6 +772,7 @@
a.BUY_STANDARD as buyStandard,
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.CREATE_TIME as createTime,
refund.CREATE_NAME as createName,
refund.CREATE_NAME as createName,
a.REDUCE_HANDLE_STATUS as reduceHandleStatus
a.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
from
...
@@ -921,7 +927,7 @@
...
@@ -921,7 +927,7 @@
t_insurance_refund refund
t_insurance_refund refund
where
where
a.REFUND_ID = refund.ID and
a.REFUND_ID = refund.ID and
a.DELETE_FLAG = 0 and a.REDUCE_HANDLE_STATUS =
1
a.DELETE_FLAG = 0 and a.REDUCE_HANDLE_STATUS =
#{param.reduceHandleStatus}
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
</if>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceTypeMapper.xml
View file @
56cd6cd6
...
@@ -71,6 +71,12 @@
...
@@ -71,6 +71,12 @@
a.INSURANCE_COMPANY_ID = b.ID
a.INSURANCE_COMPANY_ID = b.ID
and
and
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
<if
test=
"insuranceType.insuranceCompanyName != null and insuranceType.insuranceCompanyName.trim() != ''"
>
and b.COMPANY_NAME = #{insuranceType.insuranceCompanyName}
</if>
<if
test=
"insuranceType.name != null and insuranceType.name.trim() != ''"
>
and a.NAME = #{insuranceType.name}
</if>
ORDER BY a.CREATE_TIME DESC
ORDER BY a.CREATE_TIME DESC
</select>
</select>
<select
id=
"getInsuranceTypeDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo"
>
<select
id=
"getInsuranceTypeDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo"
>
...
...
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