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
2a8c343f
Commit
2a8c343f
authored
Sep 02, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:增加商险按钮权限验证"
parent
0f0adc19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
10 deletions
+86
-10
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+13
-0
InsuranceExportListVO.java
...oud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
+5
-0
InsuranceRefundListVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
+6
-0
RefundExportListVo.java
.../cloud/plus/v1/yifu/insurances/vo/RefundExportListVo.java
+6
-0
TInsuranceCompanyController.java
...fu/insurances/controller/TInsuranceCompanyController.java
+6
-5
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+26
-2
TInsuranceEnclosureController.java
.../insurances/controller/TInsuranceEnclosureController.java
+3
-0
TInsuranceTypeController.java
.../yifu/insurances/controller/TInsuranceTypeController.java
+7
-3
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+14
-0
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
2a8c343f
...
...
@@ -1055,6 +1055,19 @@ public class InsurancesConstants {
*/
public
static
final
String
CORRECT_SETTLE_BILL
=
"红冲结算单信息"
;
/**
* 突发事件创建
*/
public
static
final
String
URGENT_UPDATE_IS_USE
=
"突发事件创建"
;
/**
* 系统触发
*/
public
static
final
String
SYSTEM_TRIGGER
=
"系统触发"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
View file @
2a8c343f
...
...
@@ -175,5 +175,10 @@ public class InsuranceExportListVO implements Serializable {
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 封面抬头
*/
@Schema
(
description
=
"封面抬头"
)
private
String
invoiceTitle
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
View file @
2a8c343f
...
...
@@ -181,4 +181,10 @@ public class InsuranceRefundListVo implements Serializable {
*/
@Schema
(
description
=
"购买月数"
)
private
Long
buyMonth
;
/**
* 封面抬头
*/
@Schema
(
description
=
"封面抬头"
)
private
String
invoiceTitle
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListVo.java
View file @
2a8c343f
...
...
@@ -194,4 +194,10 @@ public class RefundExportListVo implements Serializable {
*/
@Schema
(
description
=
"购买天数"
)
private
long
buyDay
;
/**
* 封面抬头
*/
@Schema
(
description
=
"封面抬头"
)
private
String
invoiceTitle
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceCompanyController.java
View file @
2a8c343f
...
...
@@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
...
...
@@ -50,6 +51,7 @@ public class TInsuranceCompanyController {
*/
@GetMapping
(
"/{id}"
)
@Operation
(
summary
=
"通过id查询保险公司详情"
,
description
=
"通过id查询保险公司详情"
)
@PreAuthorize
(
"@pms.hasPermission('insurance:insuranceCompany_getById')"
)
public
R
<
TInsuranceCompany
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
insuranceCompanyService
.
getById
(
id
));
}
...
...
@@ -60,10 +62,10 @@ public class TInsuranceCompanyController {
* @param insuranceCompany 保险公司明细
* @return R
*/
@Operation
(
summary
=
"新增保险公司"
,
description
=
"新增保险公司:hasPermission('
demo_insuranceCompany_add
')"
)
@Operation
(
summary
=
"新增保险公司"
,
description
=
"新增保险公司:hasPermission('
insurance:insuranceCompany_save
')"
)
@SysLog
(
"新增保险公司"
)
@PostMapping
(
"/save"
)
//@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_add')"
)
@PreAuthorize
(
"@pms.hasPermission('insurance_company_ad')"
)
public
R
save
(
@RequestBody
TInsuranceCompany
insuranceCompany
)
{
return
insuranceCompanyService
.
saveInsuranceCompany
(
insuranceCompany
);
}
...
...
@@ -73,10 +75,9 @@ public class TInsuranceCompanyController {
* @param insuranceCompany 修改实体类
* @return R
*/
@Operation
(
summary
=
"修改保险公司"
,
description
=
"修改保险公司:hasPermission('
demo_
insuranceCompany_update')"
)
@Operation
(
summary
=
"修改保险公司"
,
description
=
"修改保险公司:hasPermission('
insurance:
insuranceCompany_update')"
)
@SysLog
(
"修改保险公司"
)
@PostMapping
(
"/update"
)
//@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_update')" )
public
R
update
(
@RequestBody
TInsuranceCompany
insuranceCompany
)
{
return
insuranceCompanyService
.
updateInsuranceCompany
(
insuranceCompany
);
}
...
...
@@ -85,7 +86,7 @@ public class TInsuranceCompanyController {
* 查询保险公司列表(不分页)
* @return
*/
@Operation
(
summary
=
"查询保险公司列表(不分页)"
,
description
=
"查询保险公司列表(不分页)"
)
@Operation
(
summary
=
"查询保险公司列表(不分页)"
,
description
=
"查询保险公司列表(不分页)
:insurance:insuranceCompany_list
"
)
@GetMapping
(
"/list"
)
public
R
<
List
<
TInsuranceCompany
>>
getInsuranceCompanyList
()
{
return
R
.
ok
(
insuranceCompanyService
.
getInsuranceCompanyList
());
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
2a8c343f
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceEnclosureController.java
View file @
2a8c343f
...
...
@@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -46,6 +47,7 @@ public class TInsuranceEnclosureController {
@SysLog
(
"电子保单上传"
)
@Schema
(
description
=
"电子保单上传"
)
@PostMapping
(
value
=
"/uploadInsuranceEnclosure"
)
@PreAuthorize
(
"@pms.hasPermission('insurance_handle_electronic_import')"
)
public
R
uploadInsuranceEnclosure
(
@RequestBody
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
{
return
tInsuranceEnclosureService
.
uploadInsuranceEnclosure
(
file
,
filePath
,
remark
);
}
...
...
@@ -76,6 +78,7 @@ public class TInsuranceEnclosureController {
@Schema
(
description
=
"删除电子保单"
)
@SysLog
(
"删除电子保单"
)
@GetMapping
(
"/deleteInsuranceEnclosure/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('insurance_handle_electronic_delete')"
)
public
R
deleteInsuranceEnclosure
(
@PathVariable
String
id
)
{
return
tInsuranceEnclosureService
.
deleteInsuranceEnclosure
(
id
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeController.java
View file @
2a8c343f
...
...
@@ -12,6 +12,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
...
...
@@ -47,9 +48,10 @@ public class TInsuranceTypeController {
* @param insuranceType 险种明细
* @return R
*/
@Operation
(
summary
=
"新增险种"
,
description
=
"新增险种:hasPermission('
demo_insuranceType_add
')"
)
@Operation
(
summary
=
"新增险种"
,
description
=
"新增险种:hasPermission('
insurance:insuranceType_save
')"
)
@SysLog
(
"新增险种"
)
@PostMapping
(
"/save"
)
@PreAuthorize
(
"@pms.hasPermission('insuranceType_add')"
)
public
R
save
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
saveInsuranceType
(
insuranceType
);
}
...
...
@@ -59,8 +61,9 @@ public class TInsuranceTypeController {
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询险种详情"
,
description
=
"通过id查询:hasPermission('
demo_insuranceType_get
')"
)
@Operation
(
summary
=
"通过id查询险种详情"
,
description
=
"通过id查询:hasPermission('
insurance:insuranceType_getInsuranceTypeDetail
')"
)
@GetMapping
(
"/{id}"
)
//@PreAuthorize("@pms.hasPermission('insurance:insuranceType_getInsuranceTypeDetail')")
public
R
getInsuranceTypeDetail
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeService
.
getInsuranceTypeDetail
(
id
);
}
...
...
@@ -71,9 +74,10 @@ public class TInsuranceTypeController {
* @param insuranceType 险种明细
* @return R
*/
@Operation
(
summary
=
"修改险种"
,
description
=
"新增险种:hasPermission('
demo_insuranceType_add
')"
)
@Operation
(
summary
=
"修改险种"
,
description
=
"新增险种:hasPermission('
insurance:insuranceType_update
')"
)
@SysLog
(
"修改险种"
)
@PostMapping
(
"/update"
)
//@PreAuthorize("@pms.hasPermission('insurance:insuranceType_update')")
public
R
update
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
updateInsuranceType
(
insuranceType
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
2a8c343f
...
...
@@ -789,6 +789,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo
setInfoVo
=
data
.
get
(
byId
.
getDeptNo
());
if
(
null
!=
setInfoVo
){
insuranceDetailVO
.
setCoverProjectName
(
Optional
.
ofNullable
(
setInfoVo
.
getDepartName
()).
orElse
(
""
));
insuranceDetailVO
.
setCoveInvoiceTitle
(
Optional
.
ofNullable
(
setInfoVo
.
getInvoiceTitle
()).
orElse
(
""
));
}
}
}
...
...
@@ -945,6 +946,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
record
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitle
()).
orElse
(
""
));
}
}
}
...
...
@@ -3088,6 +3090,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
record
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitle
()).
orElse
(
""
));
}
}
}
...
...
@@ -3171,6 +3174,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
record
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitle
()).
orElse
(
""
));
}
TInsuranceDetail
detail
=
getById
(
record
.
getId
());
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
...
...
@@ -5141,13 +5145,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isEmpty
(
list
)){
return
R
.
failed
(
"无可出险的保单"
);
}
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
for
(
TInsuranceDetail
tInsuranceDetail
:
list
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
tInsuranceDetail
.
getId
())
.
set
(
TInsuranceDetail
::
getIsUse
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
operate
.
setOperateDesc
(
InsurancesConstants
.
URGENT_UPDATE_IS_USE
);
operate
.
setCreateName
(
InsurancesConstants
.
SYSTEM_TRIGGER
);
operate
.
setInsuranceDetailId
(
tInsuranceDetail
.
getId
());
operate
.
setDisplayFlag
(
CommonConstants
.
ONE_INT
);
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operate
.
setCreateBy
(
CommonConstants
.
ZERO_STRING
);
operateList
.
add
(
operate
);
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
return
R
.
ok
(
"EKP紧急出险成功"
);
}
...
...
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