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
7a323d93
Commit
7a323d93
authored
Aug 01, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
91a5325f
f83f038b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
79 additions
and
16 deletions
+79
-16
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+16
-2
ValidityUtil.java
...yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
+9
-0
InsuranceListByIdCardVo.java
...d/plus/v1/yifu/insurances/vo/InsuranceListByIdCardVo.java
+20
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+3
-3
TInsuranceDetailMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
+1
-1
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+1
-1
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+19
-8
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+9
-0
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+1
-1
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
7a323d93
...
...
@@ -569,9 +569,9 @@ public class InsurancesConstants {
*/
public
static
final
String
REFUND_EXPORT_FAILED
=
"减员办理失败"
;
/**
* 员工投保
信息
不存在
* 员工投保
记录
不存在
*/
public
static
final
String
USER_DATA_IS_NOT_EXIST
=
"员工投保
信息
不存在"
;
public
static
final
String
USER_DATA_IS_NOT_EXIST
=
"员工投保
记录
不存在"
;
/**
* 存在多条在保记录
...
...
@@ -619,6 +619,20 @@ public class InsurancesConstants {
*/
public
static
final
String
DELETE_INSURANCE_TYPE_STANDARD
=
"删除购买标准"
;
/**
* 购买标准不能超过9999999.99
*/
public
static
final
String
INSURANCE_TYPE_STANDARD_MAX_ERROR
=
"购买标准不能超过9999999.99"
;
/**
* 医疗额度不能超过9999999.99
*/
public
static
final
String
MEDICAL_QUOTA_MAX_ERROR
=
"医疗额度不能超过9999999.99"
;
/**
* 身故和残疾不能超过9999999.99
*/
public
static
final
String
DIE_DISABLE_QUOTA_MAX_ERROR
=
"身故和残疾不能超过9999999.99"
;
/**
* 导入减员数据
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
View file @
7a323d93
...
...
@@ -168,6 +168,15 @@ public class ValidityUtil {
if
(!
money
.
matches
(
ValidityConstants
.
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
)){
return
Boolean
.
FALSE
;
}
return
Boolean
.
TRUE
;
}
/**
* 判断金额是否大于9999999.99
* @param money 金额
* @return boolean
*/
public
static
boolean
validateMoneyMax
(
final
String
money
)
{
BigDecimal
bigDecimalMoney
=
new
BigDecimal
(
money
);
boolean
max
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
>
0
;
if
(
max
){
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListByIdCardVo.java
0 → 100644
View file @
7a323d93
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
/**
* @author zhaji
* @description TODO
* @date 2022-08-01 18:11:59
*/
@Data
public
class
InsuranceListByIdCardVo
extends
TInsuranceDetail
{
/**
* 购买月数
*/
@Schema
(
description
=
"购买月数"
)
private
Long
buyMonth
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
7a323d93
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
...
...
@@ -442,9 +443,8 @@ public class TInsuranceDetailController {
* @return
*/
@Operation
(
summary
=
"根据身份证查询所有的商险列表"
,
description
=
"根据身份证查询所有的商险列表"
)
@PostMapping
(
"/getInsuranceListByIdCard"
)
public
R
<
IPage
<
TInsuranceDetail
>>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
@RequestParam
String
idCard
)
{
@GetMapping
(
"/getInsuranceListByIdCard"
)
public
R
<
IPage
<
InsuranceListByIdCardVo
>>
getInsuranceListByIdCard
(
Page
page
,
String
idCard
)
{
return
new
R
<>(
tInsuranceDetailService
.
getInsuranceListByIdCard
(
page
,
idCard
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
View file @
7a323d93
...
...
@@ -176,5 +176,5 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @date 2022-08-01
* @return
*/
IPage
<
TInsuranceDetail
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
@Param
(
"idCard"
)
String
idCard
);
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
@Param
(
"idCard"
)
String
idCard
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
7a323d93
...
...
@@ -301,6 +301,6 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param
* @return {@link R}
*/
IPage
<
TInsuranceDetail
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
);
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
7a323d93
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -2491,7 +2490,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
tInsuranceDetails
=
this
.
listByIds
(
insuranceDetailList
);
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
tInsuranceDetail
:
tInsuranceDetails
)
{
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
RefundErrorVo
refundErrorVo
=
new
RefundErrorVo
();
...
...
@@ -2898,7 +2896,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
))
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
...
...
@@ -2910,6 +2908,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
TInsuranceDetail
one
=
getOne
(
queryWrapper
);
//员工投保记录不存在
if
(
Common
.
isEmpty
(
one
)){
param
.
setErrorMessage
(
InsurancesConstants
.
USER_DATA_IS_NOT_EXIST
);
errorList
.
add
(
param
);
...
...
@@ -2917,11 +2916,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//当前保单信息的不是已投保状态不能导入
Integer
buyHandleStatus
=
one
.
getBuyHandleStatus
();
//商险待投保,无法减员
if
(
CommonConstants
.
ONE_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_BUY_STATUS_ONE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//商险投保中,无法减员
if
(
CommonConstants
.
TWO_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_BUY_STATUS_TWO_ERROR
);
errorList
.
add
(
param
);
...
...
@@ -3150,7 +3151,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getDeptNo
,
deptNo
).
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)
).
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)
)
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
...
...
@@ -3367,7 +3369,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
).
eq
(
TInsuranceDetail:
:
getDeptNo
,
oldDeptNo
)
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)).
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
))
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
));
//排除已减员的数据
queryWrapper
.
ne
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
FIVE_INT
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
...
...
@@ -3514,7 +3517,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* EKP紧急出险
*
* @author zhaji
* @param userName
* @param empIdcardNo
* @return {@link R}
*/
...
...
@@ -3553,8 +3555,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
@Override
public
IPage
<
TInsuranceDetail
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
)
{
return
baseMapper
.
getInsuranceListByIdCard
(
page
,
idCard
);
public
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
)
{
IPage
<
InsuranceListByIdCardVo
>
insuranceListByIdCard
=
baseMapper
.
getInsuranceListByIdCard
(
page
,
idCard
);
List
<
InsuranceListByIdCardVo
>
records
=
insuranceListByIdCard
.
getRecords
();
if
(
CollectionUtils
.
isNotEmpty
(
records
)){
for
(
InsuranceListByIdCardVo
record
:
records
)
{
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
}
insuranceListByIdCard
.
setRecords
(
records
);
}
return
insuranceListByIdCard
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
7a323d93
...
...
@@ -125,12 +125,21 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
if
(!
ValidityUtil
.
validateMoney
(
buyStandard
)){
return
R
.
failed
(
"购买标准格式不正确"
);
}
if
(!
ValidityUtil
.
validateMoneyMax
(
buyStandard
)){
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_TYPE_STANDARD_MAX_ERROR
);
}
if
(!
ValidityUtil
.
validateMoney
(
medicalQuota
)){
return
R
.
failed
(
"医疗额度格式不正确"
);
}
if
(!
ValidityUtil
.
validateMoneyMax
(
medicalQuota
)){
return
R
.
failed
(
InsurancesConstants
.
MEDICAL_QUOTA_MAX_ERROR
);
}
if
(!
ValidityUtil
.
validateMoney
(
dieDisableQuota
)){
return
R
.
failed
(
"身故或残疾额度格式不正确"
);
}
if
(!
ValidityUtil
.
validateMoneyMax
(
dieDisableQuota
)){
return
R
.
failed
(
InsurancesConstants
.
DIE_DISABLE_QUOTA_MAX_ERROR
);
}
LambdaQueryWrapper
<
TInsuranceTypeStandard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceTypeStandard
.
getInsuranceTypeId
())
.
eq
(
TInsuranceTypeStandard:
:
getBuyStandard
,
insuranceTypeStandard
.
getBuyStandard
())
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
7a323d93
...
...
@@ -763,7 +763,7 @@
</update>
<!--getInsuranceListByIdCard-->
<select
id=
"getInsuranceListByIdCard"
result
Map=
"BaseResultMap
"
>
<select
id=
"getInsuranceListByIdCard"
result
Type=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListByIdCardVo
"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_insurance_detail
...
...
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