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
5b5d668d
Commit
5b5d668d
authored
Aug 08, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:新增投保办理权限认证和获取唯一性的排序规则"
parent
29668d7c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
26 deletions
+96
-26
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+6
-0
InsuranceExportListParam.java
.../plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
+6
-0
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+6
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+14
-12
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+56
-13
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+8
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
5b5d668d
...
...
@@ -130,6 +130,12 @@ public interface CommonConstants {
String
THIRTEEN_STRING
=
"13"
;
String
FOURTEEN_STRING
=
"14"
;
String
FIFTEEN_STRING
=
"15"
;
String
SIXTEEN_STRING
=
"16"
;
/**
* number 0
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
View file @
5b5d668d
...
...
@@ -45,4 +45,10 @@ public class InsuranceExportListParam implements Serializable {
*/
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
5b5d668d
...
...
@@ -63,4 +63,10 @@ public class InsuranceListParam implements Serializable {
*/
@Schema
(
description
=
"项目编码列表"
)
private
List
<
String
>
deptNoList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
5b5d668d
...
...
@@ -76,6 +76,19 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceHandleListPage
(
page
,
param
));
}
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation
(
summary
=
"投保办理不分页查询"
,
description
=
"投保办理不分页查询"
)
@PostMapping
(
"/getInsuranceHandleList"
)
public
R
<
List
<
InsuranceListVO
>>
getInsuranceHandleList
(
@RequestBody
InsuranceListParam
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceHandleList
(
param
));
}
/**
* 投保分页查询
*
...
...
@@ -103,18 +116,7 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceList
(
param
));
}
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation
(
summary
=
"投保办理不分页查询"
,
description
=
"投保办理不分页查询"
)
@PostMapping
(
"/getInsuranceHandleList"
)
public
R
<
List
<
InsuranceListVO
>>
getInsuranceHandleList
(
@RequestBody
InsuranceListParam
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceHandleList
(
param
));
}
/**
* 商险新增
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
5b5d668d
...
...
@@ -228,6 +228,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
InsuranceListVO
>
getInsuranceHandleListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
//todo 根据登录人获取数据权限
IPage
<
InsuranceListVO
>
iPage
=
new
Page
<>();
YifuUser
user
=
SecurityUtils
.
getUser
();
String
regionSQL
=
getRegionSQL
(
user
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
return
iPage
;
}
param
.
setRegionSql
(
regionSQL
);
IPage
<
InsuranceListVO
>
insuranceList
=
baseMapper
.
getInsuranceHandleListPage
(
page
,
param
);
//根据项目编码获取项目名称
setProjectNameByDeptNo
(
insuranceList
.
getRecords
());
...
...
@@ -249,6 +256,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
List
<
InsuranceListVO
>
getInsuranceHandleList
(
InsuranceListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
//todo 根据登录人获取数据权限
List
<
InsuranceListVO
>
insuranceList
=
baseMapper
.
getInsuranceHandleList
(
param
);
//根据项目编码获取项目名称
...
...
@@ -757,9 +767,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
List
<
InsuranceExportListVO
>
getInsuranceExportList
(
InsuranceExportListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
InsuranceExportListVO
>
insuranceExportList
;
List
<
InsuranceExportListVO
>
insuranceExportList
=
new
ArrayList
<>()
;
//todo 根据登录人获取数据权限
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
return
insuranceExportList
;
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
insuranceExportList
=
baseMapper
.
getInsuranceExportListBySelect
(
param
.
getIdList
());
...
...
@@ -2683,6 +2697,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
List
<
InsuranceRefundListVo
>
getInsuranceRefundList
(
InsuranceRefundParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
param
.
setDeptNoList
(
deptNoList
);
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
//根据项目编码获取项目名称
...
...
@@ -3495,11 +3512,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
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
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
))
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
))
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -3763,12 +3784,16 @@ 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
)
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
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
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
))
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -3994,12 +4019,17 @@ 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
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
).
eq
(
TInsuranceDetail:
:
getDeptNo
,
oldDeptNo
)
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
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
)).
last
(
CommonConstants
.
LAST_ONE_SQL
);
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
))
.
orderByDesc
(
TInsuranceDetail:
:
getCreateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
list
.
size
()>
1
){
param
.
setErrorMessage
(
InsurancesConstants
.
MULTIPLE_RECORDS_UNDER_WARRANTY
);
...
...
@@ -4255,7 +4285,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
public
String
getRegionSQL
(
YifuUser
user
){
String
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
String
id
=
user
.
getId
();
String
sql
;
//user_id=14, 合肥办理1
//user_id=15,合肥办理2
//user_id=16,上海办理
if
(
CommonConstants
.
FOURTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
}
else
if
(
CommonConstants
.
FIFTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
}
else
if
(
CommonConstants
.
SIXTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (9) and detail.INSURANCE_HANDLE_CITY in (109)"
;
}
else
{
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12,9) and detail.INSURANCE_HANDLE_CITY in (135,109)"
;
}
return
sql
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
5b5d668d
...
...
@@ -168,6 +168,9 @@
#{item}
</foreach>
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
...
...
@@ -272,6 +275,7 @@
#{item}
</foreach>
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<select
id=
"getInsuranceDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"
>
...
...
@@ -348,7 +352,7 @@
</foreach>
ORDER BY detail.CREATE_TIME DESC
</select>
<!--出办理非勾选查询结果-->
<select
id=
"getInsuranceExportList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"
>
select detail.id as id,
detail.DEPT_NO as deptNo,
...
...
@@ -385,6 +389,9 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
...
...
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