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
55314879
Commit
55314879
authored
Aug 24, 2022
by
查济
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zhaji' into 'develop'
"feature-zhaJi:优化部分提示语句" See merge request fangxinjiang/yifu!190
parents
cb2eb69c
149da136
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
45 deletions
+137
-45
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+94
-0
TInsuranceEnclosureController.java
.../insurances/controller/TInsuranceEnclosureController.java
+12
-12
TInsuranceEnclosureService.java
...1/yifu/insurances/service/TInsuranceEnclosureService.java
+4
-4
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+9
-9
TInsuranceEnclosureServiceImpl.java
...surances/service/impl/TInsuranceEnclosureServiceImpl.java
+18
-17
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+0
-3
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
55314879
...
...
@@ -894,6 +894,100 @@ public class InsurancesConstants {
*/
public
static
final
String
HAND_REMARK_NOT_MORE_THAN_50
=
"办理意见长度超过50字符限制"
;
/**
* 操作类型不正确
*/
public
static
final
String
OPERATION_TYPE_ERROR
=
"操作类型不正确"
;
/**
* 该保单信息已被更新为减员成功
*/
public
static
final
String
INSURANCE_DETAIL_IS_REFUND_SUCCESS
=
"该保单信息已被更新为减员成功"
;
/**
* 该保单信息已被更新为减员退回
*/
public
static
final
String
INSURANCE_DETAIL_IS_REFUND_FAIL
=
"该保单信息已被更新为减员退回"
;
/**
* 减员退回的办理意见不能为空
*/
public
static
final
String
REMARK_IS_EMPTY
=
"减员退回的办理意见不能为空"
;
/**
* 列表为空
*/
public
static
final
String
OPERATION_LIST_IS_EMPTY
=
"列表为空"
;
/**EKP提示*/
/**
* 更新EKP结算月份失败
*/
public
static
final
String
EKP_UPDATE_SETTLE_MONTH_ERROR
=
"更新EKP结算月份失败"
;
/**电子保单提示*/
/**
* 电子保单为空
*/
public
static
final
String
INSURANCE_ENCLOSURE_IS_EMPTY
=
"电子保单为空"
;
/**
* 非法的电子保单类型
*/
public
static
final
String
INSURANCE_ENCLOSURE_TYPE_IS_ERROR
=
"非法的电子保单类型"
;
/**
* 电子保单超出上传上限
*/
public
static
final
String
INSURANCE_ENCLOSURE_SIZE_ERROR
=
"电子保单超出上传上限"
;
/**
* 电子保单备注字段不能超过50个字符
*/
public
static
final
String
INSURANCE_ENCLOSURE_REMARK_SIZE_ERROR
=
"电子保单备注字段不能超过50个字符"
;
/**
* 电子保单上传成功
*/
public
static
final
String
INSURANCE_ENCLOSURE_UPLOAD_SUCCESS
=
"电子保单上传成功"
;
/**
* 电子保单上传失败
*/
public
static
final
String
INSURANCE_ENCLOSURE_UPLOAD_FAIL
=
"电子保单上传失败"
;
/**
* 电子保单id为空
*/
public
static
final
String
INSURANCE_ENCLOSURE_ID_IS_EMPTY
=
"电子保单id为空"
;
/**
* 无对应的电子保单信息
*/
public
static
final
String
INSURANCE_ENCLOSURE_IS_NOT_EXIST
=
"无对应的电子保单信息"
;
/**
* 删除电子保单成功
*/
public
static
final
String
INSURANCE_ENCLOSURE_DELETE_SUCCESS
=
"删除电子保单成功"
;
/**
* 电子保单删除失败
*/
public
static
final
String
INSURANCE_ENCLOSURE_DELETE_FAIL
=
"电子保单删除失败"
;
/**
* 电子保单删除异常
*/
public
static
final
String
INSURANCE_ENCLOSURE_DELETE_ABNORMAL
=
"电子保单删除异常"
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceEnclosureController.java
View file @
55314879
...
...
@@ -40,7 +40,7 @@ public class TInsuranceEnclosureController {
TInsuranceEnclosureService
tInsuranceEnclosureService
;
/**
*
商险文件
上传
*
电子保单
上传
*
* @param file 文件
* @param filePath 如: import 或 import/test/test..../test
...
...
@@ -49,45 +49,45 @@ public class TInsuranceEnclosureController {
* @Author zhaji
* @Date 2022-08-23
*/
@SysLog
(
"
商险文件
上传"
)
@Schema
(
description
=
"
商险文件
上传"
)
@SysLog
(
"
电子保单
上传"
)
@Schema
(
description
=
"
电子保单
上传"
)
@PostMapping
(
value
=
"/uploadInsuranceEnclosure"
)
public
R
uploadInsuranceEnclosure
(
@RequestBody
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
{
return
tInsuranceEnclosureService
.
uploadInsuranceEnclosure
(
file
,
filePath
,
remark
);
}
/**
* 获取
附件
下载地址
* 获取
电子保单
下载地址
*
* @param id
* @return
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"
商险附件
预览下载地址"
)
@SysLog
(
"
商险附件
预览下载地址"
)
@Schema
(
description
=
"
电子保单
预览下载地址"
)
@SysLog
(
"
电子保单
预览下载地址"
)
@GetMapping
(
"/getInsuranceEnclosureUrl/{id}"
)
public
R
getInsuranceEnclosureUrl
(
@PathVariable
String
id
)
{
return
tInsuranceEnclosureService
.
getInsuranceEnclosureUrl
(
id
);
}
/**
* 删除
商险附件
* 删除
电子保单
*
* @param id 商险id
* @return R
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"删除
商险附件
"
)
@SysLog
(
"删除
商险附件
"
)
@Schema
(
description
=
"删除
电子保单
"
)
@SysLog
(
"删除
电子保单
"
)
@GetMapping
(
"/deleteInsuranceEnclosure/{id}"
)
public
R
deleteInsuranceEnclosure
(
@PathVariable
String
id
)
{
return
tInsuranceEnclosureService
.
deleteInsuranceEnclosure
(
id
);
}
/**
*
商险附件
列表分页查询
*
电子保单
列表分页查询
*
* @param page 分页参数
* @param param 查询条件
...
...
@@ -95,8 +95,8 @@ public class TInsuranceEnclosureController {
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"
商险附件
列表分页查询"
)
@SysLog
(
"
商险附件
列表分页查询"
)
@Schema
(
description
=
"
电子保单
列表分页查询"
)
@SysLog
(
"
电子保单
列表分页查询"
)
@PostMapping
(
"/getInsuranceEnclosurePage"
)
public
R
getInsuranceEnclosurePage
(
Page
<
InsuranceEnclosureParam
>
page
,
@RequestBody
InsuranceEnclosureParam
param
)
{
return
tInsuranceEnclosureService
.
getInsuranceEnclosurePage
(
page
,
param
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceEnclosureService.java
View file @
55314879
...
...
@@ -17,7 +17,7 @@ import java.io.IOException;
public
interface
TInsuranceEnclosureService
extends
IService
<
TInsuranceEnclosure
>
{
/**
* 上传
商险附件
* 上传
电子保单
*
* @author zhaji
* @param file 文件
...
...
@@ -29,7 +29,7 @@ public interface TInsuranceEnclosureService extends IService<TInsuranceEnclosure
R
uploadInsuranceEnclosure
(
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
;
/**
* 获取
附件
列表
* 获取
电子保单
列表
*
* @author zhaji
* @param page 分页参数
...
...
@@ -39,7 +39,7 @@ public interface TInsuranceEnclosureService extends IService<TInsuranceEnclosure
R
getInsuranceEnclosurePage
(
Page
<
InsuranceEnclosureParam
>
page
,
InsuranceEnclosureParam
param
);
/**
* 获
取商险附件
地址
* 获
电子保单
地址
*
* @author zhaji
* @param id
...
...
@@ -48,7 +48,7 @@ public interface TInsuranceEnclosureService extends IService<TInsuranceEnclosure
R
getInsuranceEnclosureUrl
(
String
id
);
/**
* 删除
商险附件
* 删除
电子保单
*
* @author zhaji
* @param id
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
55314879
...
...
@@ -3157,16 +3157,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
R
updateInsuranceRefund
(
InsuranceRefundListParam
insuranceDetail
)
{
Integer
refundType
=
insuranceDetail
.
getRefundType
();
if
(
CommonConstants
.
THREE_INT
!=
refundType
&&
CommonConstants
.
FOUR_INT
!=
refundType
){
return
R
.
failed
(
"当前的操作类型不正确"
);
return
R
.
failed
(
InsurancesConstants
.
OPERATION_TYPE_ERROR
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
insuranceDetailList
=
insuranceDetail
.
getInsuranceDetailList
();
if
(
CollectionUtils
.
isEmpty
(
insuranceDetailList
)){
return
R
.
failed
(
"减员办理列表为空"
);
return
R
.
failed
(
InsurancesConstants
.
OPERATION_LIST_IS_EMPTY
);
}
String
remark
=
insuranceDetail
.
getRemark
();
if
(
CommonConstants
.
FOUR
_INT
==
refundType
&&
Common
.
isEmpty
(
remark
)){
return
R
.
failed
(
"减员退回的办理意见不能为空"
);
if
(
CommonConstants
.
THREE
_INT
==
refundType
&&
Common
.
isEmpty
(
remark
)){
return
R
.
failed
(
InsurancesConstants
.
REMARK_IS_EMPTY
);
}
List
<
RefundErrorVo
>
errorList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
...
...
@@ -3179,10 +3179,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Integer
deleteFlag
=
tInsuranceDetail
.
getDeleteFlag
();
if
(
refundType
.
equals
(
tInsuranceDetail
.
getReduceHandleStatus
())){
if
(
CommonConstants
.
THREE_INT
==
refundType
){
refundErrorVo
.
setErrorMessage
(
"该保单信息已被更新为减员退回"
);
refundErrorVo
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_DETAIL_IS_REFUND_FAIL
);
errorList
.
add
(
refundErrorVo
);
}
else
{
refundErrorVo
.
setErrorMessage
(
"该保单信息已被更新为减员成功"
);
refundErrorVo
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_DETAIL_IS_REFUND_SUCCESS
);
errorList
.
add
(
refundErrorVo
);
}
}
else
{
...
...
@@ -3343,7 +3343,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
for
(
SettleMonthChangeCheckParam
success
:
successList
)
{
if
(
success
.
getId
().
equals
(
ekpInteractiveParam
.
getDetailId
()))
{
success
.
setErrorMessage
(
"更新EKP结算月份失败"
);
success
.
setErrorMessage
(
InsurancesConstants
.
EKP_UPDATE_SETTLE_MONTH_ERROR
);
errorList
.
add
(
success
);
}
}
...
...
@@ -3351,7 +3351,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
});
}
return
R
.
ok
(
errorList
,
"导入成功"
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
/**
* 变更所属项目
...
...
@@ -3367,7 +3367,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(!
Common
.
isNotEmpty
(
deptChangeCheckList
)){
return
R
.
failed
(
"当前变更所属项目列表为空"
);
return
R
.
failed
(
InsurancesConstants
.
OPERATION_LIST_IS_EMPTY
);
}
Map
<
String
,
List
<
DeptChangeCheckParam
>>
stringListMap
=
deptChangeCheck
(
deptChangeCheckList
,
user
);
List
<
DeptChangeCheckParam
>
successList
=
stringListMap
.
get
(
"successList"
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceEnclosureServiceImpl.java
View file @
55314879
...
...
@@ -10,6 +10,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEnclosureMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEnclosureService
;
...
...
@@ -54,13 +55,13 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
@Override
public
R
uploadInsuranceEnclosure
(
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
{
if
(
Common
.
isEmpty
(
file
)){
return
R
.
failed
(
"商险附件为空"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_IS_EMPTY
);
}
if
(!
Common
.
checkInsuranceFile
(
file
.
getOriginalFilename
())){
return
R
.
failed
(
"非法的文件类型"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_TYPE_IS_ERROR
);
}
if
(
file
.
getSize
()
>
(
CommonConstants
.
FIFTY_INT
*
CommonConstants
.
BYTE
*
CommonConstants
.
BYTE
)){
return
R
.
failed
(
"文件超出上传上限"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_SIZE_ERROR
);
}
String
enclosureName
=
Objects
.
requireNonNull
(
file
.
getOriginalFilename
()).
substring
(
0
,
file
.
getOriginalFilename
().
lastIndexOf
(
"."
));
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
file
.
getOriginalFilename
();
...
...
@@ -79,7 +80,7 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
insuranceEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
if
(
StringUtils
.
isNotBlank
(
remark
)){
if
(!
ValidityUtil
.
validate50
(
remark
)){
return
R
.
failed
(
"备注字段不能超过50"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_REMARK_SIZE_ERROR
);
}
else
{
insuranceEnclosure
.
setRemark
(
remark
);
}
...
...
@@ -93,14 +94,14 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
return
R
.
ok
(
"商险附件上传成功"
);
return
R
.
ok
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_UPLOAD_SUCCESS
);
}
else
{
return
R
.
failed
(
"failed:上传至存储空间失败"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_UPLOAD_FAIL
);
}
}
/**
* 获取
附件
列表
* 获取
电子保单
列表
*
* @author zhaji
* @param page 分页参数
...
...
@@ -113,7 +114,7 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
}
/**
* 获取
商险附件
地址
* 获取
电子保单
地址
*
* @author zhaji
* @param id 附件id
...
...
@@ -122,11 +123,11 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
@Override
public
R
getInsuranceEnclosureUrl
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"附件id为空"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_ID_IS_EMPTY
);
}
TInsuranceEnclosure
insuranceEnclosure
=
getById
(
id
);
if
(
null
==
insuranceEnclosure
)
{
return
R
.
failed
(
"无对应附件信息"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_IS_NOT_EXIST
);
}
String
enclosureAddress
=
insuranceEnclosure
.
getEnclosureAddress
();
log
.
info
(
"key:"
+
enclosureAddress
);
...
...
@@ -135,7 +136,7 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
}
/**
* 删除
商险附件
* 删除
电子保单
*
* @author zhaji
* @param id 附件id
...
...
@@ -144,21 +145,21 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
@Override
public
R
deleteInsuranceEnclosure
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"附件id为空"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_ID_IS_EMPTY
);
}
TInsuranceEnclosure
insuranceEnclosure
=
getById
(
id
);
if
(
null
==
insuranceEnclosure
)
{
return
R
.
failed
(
"无对应附件信息"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_IS_NOT_EXIST
);
}
try
{
if
(
removeById
(
id
))
{
ossUtil
.
deleteObject
(
null
,
insuranceEnclosure
.
getEnclosureAddress
());
return
R
.
ok
(
"删除成功!"
);
return
R
.
ok
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_DELETE_SUCCESS
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"
附件删除异常:"
+
e
.
getMessage
()
);
return
R
.
failed
(
"附件删除异常!"
);
log
.
error
(
"
电子保单删除异常:"
+
e
.
getMessage
()+
"电子保单id为:"
+
id
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_DELETE_ABNORMAL
);
}
return
R
.
ok
(
"删除失败!"
);
return
R
.
ok
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_DELETE_FAIL
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
55314879
...
...
@@ -37,9 +37,6 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
@Resource
private
TInsuranceTypeService
tInsuranceTypeService
;
@Resource
private
TInsuranceDetailService
tInsuranceDetailService
;
@Resource
private
TInsuranceOperateService
tInsuranceOperateService
;
...
...
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