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
eaf54eed
Commit
eaf54eed
authored
Nov 07, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'develop'
Feature licancan See merge request
!255
parents
75f59018
121e1611
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
16 deletions
+84
-16
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+4
-0
TInsuranceCompany.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
+24
-0
InsuranceRegisterParam.java
...ud/plus/v1/yifu/insurances/vo/InsuranceRegisterParam.java
+6
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+44
-15
TInsuranceCompanyMapper.xml
...n/resources/mapper/insurances/TInsuranceCompanyMapper.xml
+6
-1
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
eaf54eed
...
@@ -277,6 +277,10 @@ public class InsurancesConstants {
...
@@ -277,6 +277,10 @@ 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 @
eaf54eed
...
@@ -70,4 +70,28 @@ public class TInsuranceCompany extends BaseEntity {
...
@@ -70,4 +70,28 @@ public class TInsuranceCompany extends BaseEntity {
@Schema
(
description
=
"是否删除 0否/1是"
)
@Schema
(
description
=
"是否删除 0否/1是"
)
private
Integer
deleteFlag
;
private
Integer
deleteFlag
;
/**
* 商险办理省code
*/
@Schema
(
description
=
"商险办理省code"
)
private
Integer
insuranceHandleProvince
;
/**
* 商险办理省
*/
@Schema
(
description
=
"商险办理省"
)
private
String
insuranceHandleProvinceName
;
/**
* 商险办理城市code
*/
@Schema
(
description
=
"商险办理城市code"
)
private
Integer
insuranceHandleCity
;
/**
* 商险办理城市
*/
@Schema
(
description
=
"商险办理城市"
)
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/InsuranceRegisterParam.java
View file @
eaf54eed
...
@@ -50,6 +50,12 @@ public class InsuranceRegisterParam implements Serializable {
...
@@ -50,6 +50,12 @@ public class InsuranceRegisterParam implements Serializable {
@Schema
(
description
=
"保单结束时间"
)
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
private
String
policyEnd
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
/**
* 保单编号
* 保单编号
*/
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
eaf54eed
...
@@ -234,9 +234,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -234,9 +234,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceList
=
baseMapper
.
getInsuranceList
(
param
);
insuranceList
=
baseMapper
.
getInsuranceList
(
param
);
// 购买月数
// 购买月数
if
(
CollectionUtils
.
isNotEmpty
(
insuranceList
)){
if
(
CollectionUtils
.
isNotEmpty
(
insuranceList
)){
if
(
insuranceList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(insuranceList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
}
*/
insuranceList
.
stream
().
forEach
(
e
->{
insuranceList
.
stream
().
forEach
(
e
->{
e
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
e
.
getPolicyStart
().
toString
(),
e
.
getPolicyEnd
().
toString
()));
e
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
e
.
getPolicyStart
().
toString
(),
e
.
getPolicyEnd
().
toString
()));
});
});
...
@@ -782,6 +782,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -782,6 +782,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//购买周期
//购买周期
String
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
String
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if
(
CommonConstants
.
THREE_INT
==
insuranceDetailVO
.
getBuyType
()){
if
(
Objects
.
isNull
(
insuranceDetailVO
.
getPolicyEffect
())){
insuranceDetailVO
.
setBuyCycle
(
null
);
}
else
{
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetailVO
.
getPolicyEffect
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
month
=
LocalDateUtil
.
betweenMonth
(
insuranceDetailVO
.
getPolicyEffect
().
toString
(),
insuranceDetailVO
.
getPolicyEnd
().
toString
());
buyCycle
=
month
+
"个月/"
+
day
+
"天"
;
insuranceDetailVO
.
setBuyCycle
(
buyCycle
);
}
}
//派单类型
//派单类型
insuranceDetailVO
.
setDistributeType
(
insuranceDetailVO
.
getReduceHandleStatus
()
==
null
?
insuranceDetailVO
.
getBuyType
():
CommonConstants
.
FIVE_INT
);
insuranceDetailVO
.
setDistributeType
(
insuranceDetailVO
.
getReduceHandleStatus
()
==
null
?
insuranceDetailVO
.
getBuyType
():
CommonConstants
.
FIVE_INT
);
//派单状态
//派单状态
...
@@ -888,9 +899,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -888,9 +899,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceExportList
=
baseMapper
.
getInsuranceExportList
(
param
);
insuranceExportList
=
baseMapper
.
getInsuranceExportList
(
param
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
insuranceExportList
)){
if
(
CollectionUtils
.
isNotEmpty
(
insuranceExportList
)){
if
(
insuranceExportList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(insuranceExportList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
}
*/
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceExportList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceExportList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
...
@@ -1309,12 +1320,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1309,12 +1320,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//按天
//按天
//计算起止时间的天数
//计算起止时间的天数
long
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyStart
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
long
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyStart
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
detail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
day
)).
divide
(
new
BigDecimal
(
"365"
),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
detail
.
setEstimatePremium
(
estimatePremium
);
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
day
=
LocalDateUtil
.
betweenDay
(
detail
.
getPolicyEffect
().
toString
(),
detail
.
getPolicyEnd
().
toString
());
}
}
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
detail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
day
)).
divide
(
new
BigDecimal
(
"365"
),
CommonConstants
.
TWO_INT
,
BigDecimal
.
ROUND_HALF_UP
);
detail
.
setEstimatePremium
(
estimatePremium
);
//记录状态均置为「已投保」
//记录状态均置为「已投保」
detail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
detail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
detail
.
setSignFlag
(
CommonConstants
.
ONE_INT
);
detail
.
setSignFlag
(
CommonConstants
.
ONE_INT
);
...
@@ -2869,6 +2881,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2869,6 +2881,22 @@ 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_EXIST
);
listResult
.
add
(
param
);
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
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_MORE_THAN_50
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_MORE_THAN_50
);
...
@@ -2890,7 +2918,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2890,7 +2918,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
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
())
...
@@ -2898,6 +2926,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2898,6 +2926,7 @@ 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
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
@@ -3311,9 +3340,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3311,9 +3340,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuredListVo
>
insuredList
;
List
<
InsuredListVo
>
insuredList
;
insuredList
=
this
.
baseMapper
.
getInsuredList
(
param
);
insuredList
=
this
.
baseMapper
.
getInsuredList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuredList
)){
if
(
CollectionUtils
.
isNotEmpty
(
insuredList
)){
if
(
insuredList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(insuredList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return
R
.
failed
(
InsurancesConstants
.
IM
PORT_TOO_LONG
);
return R.failed(InsurancesConstants.
EX
PORT_TOO_LONG);
}
}
*/
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
InsuredListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
InsuredListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
try
{
try
{
...
@@ -3391,9 +3420,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3391,9 +3420,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
if
(
insuranceRefundList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(insuranceRefundList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
}
*/
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
InsuranceRefundListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
InsuranceRefundListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
...
@@ -3478,9 +3507,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3478,9 +3507,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
refundExportList
=
baseMapper
.
getRefundExportList
(
param
);
refundExportList
=
baseMapper
.
getRefundExportList
(
param
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
refundExportList
)){
if
(
CollectionUtils
.
isNotEmpty
(
refundExportList
)){
if
(
refundExportList
.
size
()
>
CommonConstants
.
EXPORT_TWENTY_THOUSAND
){
/*
if(refundExportList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}
}
*/
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
//根据项目编码获取项目名称
//根据项目编码获取项目名称
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceCompanyMapper.xml
View file @
eaf54eed
...
@@ -15,12 +15,17 @@
...
@@ -15,12 +15,17 @@
<result
property=
"updateBy"
column=
"UPDATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
jdbcType=
"TINYINT"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceHandleProvince"
column=
"INSURANCE_HANDLE_PROVINCE"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceHandleProvinceName"
column=
"INSURANCE_HANDLE_PROVINCE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceHandleCity"
column=
"INSURANCE_HANDLE_CITY"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceHandleCityName"
column=
"INSURANCE_HANDLE_CITY_NAME"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
ID,COMPANY_NAME,COMPANY_ADDRESS,
ID,COMPANY_NAME,COMPANY_ADDRESS,
COMPANY_DOCKING,CREATE_BY,CREATE_NAME,
COMPANY_DOCKING,CREATE_BY,CREATE_NAME,
CREATE_TIME,UPDATE_BY,UPDATE_TIME,
CREATE_TIME,UPDATE_BY,UPDATE_TIME,
DELETE_FLAG
DELETE_FLAG,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME
</sql>
</sql>
</mapper>
</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