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
29ec3eae
Commit
29ec3eae
authored
Aug 22, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险优化部分接口
parent
bd086211
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
117 additions
and
17 deletions
+117
-17
InsuranceHandleParam.java
...loud/plus/v1/yifu/insurances/vo/InsuranceHandleParam.java
+32
-0
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+28
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+6
-8
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+4
-2
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+9
-4
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+38
-3
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceHandleParam.java
0 → 100644
View file @
29ec3eae
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author licancan
* @description 商险操作(加审批意见)请求参数
* @date 2022-08-22 13:58:58
*/
@Data
@Schema
(
description
=
"商险操作(加审批意见)请求参数"
)
public
class
InsuranceHandleParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 集合不能为空
*/
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
@Schema
(
description
=
"主键集合"
)
private
List
<
String
>
idList
;
/**
* 审批意见
*/
@Schema
(
description
=
"审批意见"
)
private
String
remark
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
29ec3eae
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
...
...
@@ -75,4 +77,30 @@ public class InsuranceListParam implements Serializable {
*/
@Schema
(
description
=
"保单办理人"
)
private
String
updateBy
;
/**
* 购买类型, 1新增、3批增、4替换
*/
@Schema
(
description
=
" 购买类型(派单类型), 1新增、3批增、4替换"
)
private
Integer
buyType
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"派单人"
)
private
String
createName
;
/**
* 派单开始时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"派单开始时间"
)
private
LocalDate
startDate
;
/**
* 派单结束时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"派单结束时间"
)
private
LocalDate
endDate
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
29ec3eae
...
...
@@ -116,8 +116,6 @@ public class TInsuranceDetailController {
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceList
(
param
));
}
/**
* 商险新增
*
...
...
@@ -215,26 +213,26 @@ public class TInsuranceDetailController {
* 投保退回
*
* @author licancan
* @param
idList
* @param
param
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation
(
summary
=
"投保退回"
,
description
=
"投保退回"
)
@PostMapping
(
"/rollBackInsurance"
)
public
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
rollBackInsurance
(
idList
);
public
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
@RequestBody
@Valid
InsuranceHandleParam
param
){
return
tInsuranceDetailService
.
rollBackInsurance
(
param
.
getIdList
(),
param
.
getRemark
()
);
}
/**
* 办理成功
*
* @author licancan
* @param
idList
* @param
param
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation
(
summary
=
"办理成功"
,
description
=
"办理成功"
)
@PostMapping
(
"/successfulInsurance"
)
public
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
successfulInsurance
(
idList
);
public
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
@RequestBody
@Valid
InsuranceHandleParam
param
){
return
tInsuranceDetailService
.
successfulInsurance
(
param
.
getIdList
(),
param
.
getRemark
()
);
}
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
29ec3eae
...
...
@@ -143,18 +143,20 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*
* @author licancan
* @param idList
* @param remark
* @return {@link R<List<InsuranceListVO>>}
*/
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
List
<
String
>
idList
);
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
List
<
String
>
idList
,
String
remark
);
/**
* 办理成功
*
* @author licancan
* @param idList
* @param remark
* @return {@link R<List<InsuranceListVO>>}
*/
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
List
<
String
>
idList
);
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
List
<
String
>
idList
,
String
remark
);
/**
* 登记保单保费
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
29ec3eae
...
...
@@ -866,6 +866,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Optional
.
ofNullable
(
byId
).
isPresent
()){
InsuranceExportListVO
vo
=
new
InsuranceExportListVO
();
BeanCopyUtils
.
copyProperties
(
byId
,
vo
);
if
(
StringUtils
.
isNotBlank
(
byId
.
getPolicyNo
())){
listVO
.
setPolicyNo
(
byId
.
getPolicyNo
());
}
//购买月数
vo
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
//购买天数
...
...
@@ -902,11 +905,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* 投保退回
*
* @param idList
* @param remark
* @return {@link R<List<InsuranceListVO>>}
* @author licancan
*/
@Override
public
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
List
<
String
>
idList
)
{
public
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
List
<
String
>
idList
,
String
remark
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -1008,7 +1012,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
setProjectNameByDeptNo
(
errorList
);
//操作记录
addOperate
(
successList
,
user
,
InsurancesConstants
.
ROLLBACK
,
null
);
addOperate
(
successList
,
user
,
InsurancesConstants
.
ROLLBACK
,
remark
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
...
...
@@ -1016,11 +1020,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* 办理成功
*
* @param idList
* @param remark
* @return {@link R<List<InsuranceListVO>>}
* @author licancan
*/
@Override
public
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
List
<
String
>
idList
)
{
public
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
List
<
String
>
idList
,
String
remark
)
{
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
...
...
@@ -1168,7 +1173,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
setProjectNameByDeptNo
(
errorList
);
//操作记录
addOperate
(
successList
,
user
,
InsurancesConstants
.
SUCCESSFUL
,
null
);
addOperate
(
successList
,
user
,
InsurancesConstants
.
SUCCESSFUL
,
remark
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
29ec3eae
...
...
@@ -69,7 +69,7 @@
CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME
</sql>
<!--投保
办理
分页查询-->
<!--投保分页查询-->
<select
id=
"getInsuranceListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.EMP_NAME as empName,
...
...
@@ -119,6 +119,15 @@
#{item}
</foreach>
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
...
...
@@ -171,10 +180,19 @@
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and detail.HANDLED_BY = #{param.updateBy}
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保
办理
不分页查询-->
<!--投保不分页查询-->
<select
id=
"getInsuranceList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.EMP_NAME as empName,
...
...
@@ -224,6 +242,15 @@
#{item}
</foreach>
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
...
...
@@ -276,7 +303,15 @@
#{item}
</foreach>
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</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"
>
...
...
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