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
412709b9
Commit
412709b9
authored
Aug 29, 2022
by
查济
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zhaji' into 'develop'
"feature-zhaJi:新增订单商险列表查询" See merge request fangxinjiang/yifu!208
parents
c9a7f6e2
325e1916
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
476 additions
and
89 deletions
+476
-89
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+10
-0
InsuranceRefundListVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
+5
-0
InsuredListVo.java
.../yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
+5
-2
InsuredOrderListVo.java
.../cloud/plus/v1/yifu/insurances/vo/InsuredOrderListVo.java
+113
-0
InsuredOrderParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuredOrderParam.java
+55
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+22
-8
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+25
-3
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+12
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+92
-60
TInsuranceEkpServiceImpl.java
...nces/service/insurance/impl/TInsuranceEkpServiceImpl.java
+6
-8
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+131
-8
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
412709b9
...
...
@@ -1014,6 +1014,16 @@ public class InsurancesConstants {
*/
public
static
final
String
ORDER_NO_IS_EMPTY
=
"订单编号不能为空"
;
/**
* 购买类型为空
*/
public
static
final
String
BUY_TYPE_IS_EMPTY
=
"购买类型为空"
;
/**
* 购买类型错误
*/
public
static
final
String
BUY_TYPE_ERROR
=
"购买类型错误"
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
View file @
412709b9
...
...
@@ -170,6 +170,11 @@ public class InsuranceRefundListVo implements Serializable {
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回"
)
private
Integer
reduceHandleStatus
;
/**
* 创建人所在部门名称
*/
@Schema
(
description
=
"创建人所在部门名称"
)
private
String
createUserDeptName
;
/**
* 购买月数
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
View file @
412709b9
...
...
@@ -232,8 +232,11 @@ public class InsuredListVo implements Serializable {
@Schema
(
description
=
"购买月数"
)
private
Long
buyMonth
;
/**
* 创建人所在部门名称
*/
@Schema
(
description
=
"创建人所在部门名称"
)
private
String
createUserDeptName
;
//订单编号、姓名、身份证号、投保类型、项目、岗位、保单开始日期、保单结束日期、保险公司、险种、购买标准、医保、身故或残疾、预估保费、实际保费、保单号、发票号、保单生效日期、商险购买地、商险办理地、是否出险、是否过期、是否失效、派单日期、派单人
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredOrderListVo.java
0 → 100644
View file @
412709b9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* @author zhaji
* @description TODO
* @date 2022-08-29 14:47:46
*/
@Data
public
class
InsuredOrderListVo
implements
Serializable
{
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema
(
description
=
" 投保类型, 1新增、3批增、4替换"
)
private
Integer
buyType
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 医疗额度
*/
@Schema
(
description
=
"医疗额度"
)
private
String
medicalQuota
;
/**
* 身故或残疾额度
*/
@Schema
(
description
=
"身故或残疾额度"
)
private
String
dieDisableQuota
;
/**
* 创建人姓名
*/
@Schema
(
description
=
"创建人(派单人)"
)
private
String
createName
;
/**
* 创建人部门名称
*/
@Schema
(
description
=
"创建人部门名称(派单人)"
)
private
String
createUserDeptName
;
/**
* 创建时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
/**
* 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema
(
description
=
"投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员"
)
private
Integer
buyHandleStatus
;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回,4减员成功"
)
private
Integer
reduceHandleStatus
;
/**
* 减员ID
*/
@Schema
(
description
=
"减员ID"
)
private
Integer
refundId
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredOrderParam.java
0 → 100644
View file @
412709b9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author zhaji
* @description 订单商险列表查询
* @date 2022-08-29 14:44:25
*/
@Data
@Tag
(
name
=
"订单商险列表查询"
)
public
class
InsuredOrderParam
implements
Serializable
{
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 开始日期
*/
@Schema
(
description
=
"开始日期"
)
private
String
startDate
;
/**
* 结束日期
*/
@Schema
(
description
=
"结束日期"
)
private
String
endDate
;
/**
* 项目编码列表
*/
@Schema
(
description
=
"项目编码列表"
)
private
List
<
String
>
deptNoList
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
412709b9
...
...
@@ -526,47 +526,47 @@ public class TInsuranceDetailController {
}
/**
* 商险新增
*
订单
商险新增
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceAddParam>>}
*/
@Operation
(
summary
=
"
投保新增"
,
description
=
"投保
新增"
)
@Operation
(
summary
=
"
订单商险新增"
,
description
=
"订单商险
新增"
)
@PostMapping
(
"/addOrderInsurance"
)
public
R
<
List
<
InsuranceAddParam
>>
addOrderInsurance
(
@RequestBody
InsuranceListOrderParam
paramList
){
return
tInsuranceDetailService
.
addOrderInsurance
(
paramList
);
}
/**
* 商险批增
*
订单
商险批增
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceBatchParam>>}
*/
@Operation
(
summary
=
"
投保批增"
,
description
=
"投保
批增"
)
@Operation
(
summary
=
"
订单商险批增"
,
description
=
"订单商险
批增"
)
@PostMapping
(
"/batchOrderInsurance"
)
public
R
<
List
<
InsuranceBatchParam
>>
batchOrderInsurance
(
@RequestBody
InsuranceOrderBatchParam
paramList
){
return
tInsuranceDetailService
.
batchOrderInsurance
(
paramList
);
}
/**
* 商险替换
*
订单
商险替换
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceReplaceParam>>}
*/
@Operation
(
summary
=
"
投保替换"
,
description
=
"投保
替换"
)
@Operation
(
summary
=
"
订单商险替换"
,
description
=
"订单商险
替换"
)
@PostMapping
(
"/replaceOrderInsurance"
)
public
R
<
List
<
InsuranceReplaceParam
>>
replaceOrderInsurance
(
@RequestBody
InsuranceOrderReplaceParam
paramList
){
return
tInsuranceDetailService
.
replaceOrderInsurance
(
paramList
);
}
/**
*
导入减员校验
* @param paramList
导入减员校验
*
订单商险减员
* @param paramList
订单商险减员
* @author zhaji
* @date 2022-07-19
* @since v1.0
...
...
@@ -576,5 +576,19 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
refundOrderInsurance
(
paramList
);
}
/**
* 订单商险列表查询
*
* @author zhaji
* @param page 分页参数
* @param param 查询条件
* @return {@link R<IPage<InsuredListVo>>}
*/
@Operation
(
summary
=
"订单商险列表查询"
,
description
=
"订单商险列表查询"
)
@PostMapping
(
"/getOrderInsuredListPage"
)
public
R
getOrderInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
@RequestBody
InsuredOrderParam
param
)
{
return
tInsuranceDetailService
.
getOrderInsuredListPage
(
page
,
param
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
412709b9
...
...
@@ -204,15 +204,37 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @param empIdcardNo
* @return {@link List< TInsuranceDetail>}
*/
List
<
TInsuranceDetail
>
selectListBy
e
mpIdcardNo
(
String
empIdcardNo
);
List
<
TInsuranceDetail
>
selectListBy
E
mpIdcardNo
(
String
empIdcardNo
);
/**
* 查数据是否存在权限范围内
*
* @author zhaji
* @param regionS
QL
* @param regionS
ql
* @param id
* @return {@link TInsuranceDetail}
*/
TInsuranceDetail
selectByregionSQL
(
@Param
(
"regionSql"
)
String
regionSQL
,
@Param
(
"id"
)
String
id
);
TInsuranceDetail
selectByRegionSql
(
@Param
(
"regionSql"
)
String
regionSql
,
@Param
(
"id"
)
String
id
);
/**
* 商险订单投保列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
IPage
<
InsuredOrderListVo
>
getOrderInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
@Param
(
"param"
)
InsuredOrderParam
param
);
/**
* 商险订单减员列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
IPage
<
InsuredOrderListVo
>
getOrderRefundInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
@Param
(
"param"
)
InsuredOrderParam
param
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
View file @
412709b9
...
...
@@ -383,4 +383,16 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
R
<
List
<
InsuranceReplaceParam
>>
replaceOrderInsurance
(
InsuranceOrderReplaceParam
paramList
);
R
refundOrderInsurance
(
InsuranceOrderRefundParam
paramList
);
/**
* 订单商险列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
R
getOrderInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
InsuredOrderParam
param
);
SettleVo
getInsuranceDetailSettleStatus
(
String
detailId
,
String
defaultSettleId
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
412709b9
...
...
@@ -1347,7 +1347,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
())){
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
//如果保单号不为空,将替换类型的保单号也全部更新
List
<
TInsuranceReplace
>
list
=
tInsuranceReplaceService
.
list
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
...
...
@@ -1367,22 +1366,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// todo 判断是否推送过ekp,没推送过调新增接口,推送过调更新接口
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
//调EKP更新实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
if
(!
Common
.
isEmpty
(
settleVo
)
&&
InsurancesConstants
.
SETTLE_ZERO
.
equals
(
settleVo
.
getActualStatus
())){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
settle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
settle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
//调EKP更新实际保费
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
FOUR_INT
);
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
});
}
}
}
else
{
//保费存储
...
...
@@ -2621,7 +2622,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
else
{
//查数据是否存在权限范围内
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectBy
regionSQL
(
regionSQL
,
detail
.
getId
());
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectBy
RegionSql
(
regionSQL
,
detail
.
getId
());
if
(!
Optional
.
ofNullable
(
detailByRegionSQL
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_UPDATE_DETAIL_JURISDICTION
);
listResult
.
add
(
param
);
...
...
@@ -2712,15 +2713,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settle
.
getSettleHandleStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settle
.
getSettleHandleStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
if
(!
Common
.
isEmpty
(
settleVo
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
}
}
}
}
...
...
@@ -4483,21 +4487,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String
defaultSettleId
=
insuranceDetail
.
getDefaultSettleId
();
if
(
StringUtils
.
isNotEmpty
(
defaultSettleId
)){
//查询结算状态
LambdaQueryWrapper
<
TInsuranceSettle
>
insuranceSettleQuery
=
new
LambdaQueryWrapper
<>();
insuranceSettleQuery
.
eq
(
TInsuranceSettle
::
getId
,
defaultSettleId
);
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getOne
(
insuranceSettleQuery
);
if
(!
Common
.
isEmpty
(
insuranceSettle
)){
//当前结算状态为结算中时,不能变更结算月
if
(
CommonConstants
.
TWO_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_SETTLE_STATUS_TWO_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//当前结算状态为已结算时,不能变更结算月
if
(
CommonConstants
.
THREE_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_SETTLE_STATUS_THREE_ERROR
);
errorList
.
add
(
param
);
continue
;
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
insuranceDetail
.
getId
(),
defaultSettleId
);
if
(!
Common
.
isEmpty
(
settleVo
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
errorList
.
add
(
param
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
errorList
.
add
(
param
);
continue
;
}
}
}
}
...
...
@@ -4672,7 +4675,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String
detailId
=
insuranceDetail
.
getId
();
//查数据是否存在权限范围内
String
regionSQL
=
getRegionSQL
(
user
);
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectBy
regionSQL
(
regionSQL
,
detailId
);
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectBy
RegionSql
(
regionSQL
,
detailId
);
if
(!
Optional
.
ofNullable
(
detailByRegionSQL
).
isPresent
()
||
!
user
.
getId
().
equals
(
detailByRegionSQL
.
getUpdateBy
())){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
errorList
.
add
(
param
);
...
...
@@ -4991,20 +4994,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String
defaultSettleId
=
insuranceDetail
.
getDefaultSettleId
();
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
//查询结算状态
LambdaQueryWrapper
<
TInsuranceSettle
>
insuranceSettleQuery
=
new
LambdaQueryWrapper
<>();
insuranceSettleQuery
.
eq
(
TInsuranceSettle
::
getId
,
defaultSettleId
);
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getOne
(
insuranceSettleQuery
);
//当前结算状态为结算中时,不能变更结算项目
if
(
CommonConstants
.
TWO_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_SETTLE_STATUS_TWO_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//当前结算状态为已结算时,不能变更结算项目
if
(
CommonConstants
.
THREE_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_SETTLE_STATUS_THREE_ERROR
);
errorList
.
add
(
param
);
continue
;
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
insuranceDetail
.
getId
(),
defaultSettleId
);
if
(!
Common
.
isEmpty
(
settleVo
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
errorList
.
add
(
param
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
errorList
.
add
(
param
);
continue
;
}
}
}
}
//预估
...
...
@@ -5126,7 +5130,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
"身份证格式不正确"
);
}
//查询所有在保,未出险,未过期,未失效,未减员的保单信息
List
<
TInsuranceDetail
>
list
=
this
.
baseMapper
.
selectListBy
e
mpIdcardNo
(
empIdcardNo
);
List
<
TInsuranceDetail
>
list
=
this
.
baseMapper
.
selectListBy
E
mpIdcardNo
(
empIdcardNo
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
return
R
.
failed
(
"无可出险的保单"
);
}
...
...
@@ -5198,6 +5202,33 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
saveInsuranceRefund
(
paramList
.
getData
(),
paramList
.
getOrderNo
());
}
/**
* 订单商险列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
@Override
public
R
getOrderInsuredListPage
(
Page
<
InsuredOrderListVo
>
page
,
InsuredOrderParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
Page
<
InsuredOrderListVo
>
pageList
=
new
Page
<>();
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
return
R
.
ok
(
pageList
);
}
param
.
setDeptNoList
(
deptNoList
);
String
orderNo
=
param
.
getOrderNo
();
if
(
StringUtils
.
isBlank
(
orderNo
))
{
return
R
.
failed
(
InsurancesConstants
.
ORDER_NO_IS_EMPTY
);
}
//查询所有投保信息
IPage
<
InsuredOrderListVo
>
orderInsuredList
=
baseMapper
.
getOrderRefundInsuredListPage
(
page
,
param
);
//查询所有的减员信息
return
R
.
ok
(
orderInsuredList
);
}
/**
* 获取项目权限
*
...
...
@@ -5304,6 +5335,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
String
>
deptNoList
=
new
ArrayList
<>();
deptNoList
.
add
(
tInsuranceDetail
.
getDeptNo
());
BeanCopyUtils
.
copyProperties
(
tInsuranceDetail
,
param
);
param
.
setDetailId
(
tInsuranceDetail
.
getId
());
//获取当前项目的名称,客户名称和客户编码
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
deptNoList
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
...
...
@@ -5362,11 +5394,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param
* @return {@link String}
*/
@Override
public
SettleVo
getInsuranceDetailSettleStatus
(
String
detailId
,
String
settleId
){
String
id
=
detailId
+
CommonConstants
.
DOWN_LINE_STRING
+
settleId
;
//获取ekp结算信息
SettleVo
settle
=
ekpSettleService
.
getSettle
(
id
);
return
settle
;
return
ekpSettleService
.
getSettle
(
id
);
}
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceEkpServiceImpl.java
View file @
412709b9
...
...
@@ -56,12 +56,14 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
List
<
TInsuranceEkp
>
ekpRefundList
=
this
.
baseMapper
.
getEkpRefundList
();
List
<
TInsuranceEkp
>
failList
=
new
ArrayList
<>();
List
<
TInsuranceEkp
>
successLit
=
new
ArrayList
<>();
SettleVo
settle
=
ekpSettleService
.
getSettle
(
"12345"
);
String
actualStatus
=
settle
.
getActualStatus
();
log
.
info
(
"settle:"
+
settle
.
toString
());
log
.
info
(
"actualStatus:"
+
actualStatus
);
if
(
CollectionUtils
.
isNotEmpty
(
ekpRefundList
)){
for
(
TInsuranceEkp
tInsuranceEkp
:
ekpRefundList
)
{
//结算信息
SettleVo
settleVo
=
tInsuranceDetailService
.
getInsuranceDetailSettleStatus
(
tInsuranceEkp
.
getDetailId
(),
tInsuranceEkp
.
getDefaultSettleId
());
//实缴结算状态
String
actualStatus
=
settleVo
.
getActualStatus
();
//预缴结算状态
String
estimateStatus
=
settleVo
.
getEstimateStatus
();
Integer
pushType
=
tInsuranceEkp
.
getPushType
();
LambdaQueryWrapper
<
TInsuranceSettle
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceSettle
::
getId
,
tInsuranceEkp
.
getDefaultSettleId
());
...
...
@@ -80,10 +82,6 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}
EKPInteractiveParam
ekpParam
=
new
EKPInteractiveParam
();
BeanCopyUtils
.
copyProperties
(
tInsuranceEkp
,
ekpParam
);
String
detailId
=
ekpParam
.
getDetailId
();
String
defaultSettleId
=
ekpParam
.
getDefaultSettleId
();
//查询当前结算状态
String
status
=
CommonConstants
.
ONE_STRING
;
if
(
actualStatus
.
equals
(
InsurancesConstants
.
SETTLE_ZERO
)){
String
s
=
EKPUtil
.
sendToEKP
(
ekpParam
);
//如果发送成功
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
412709b9
...
...
@@ -57,7 +57,6 @@
<result
property=
"createUserDeptId"
column=
"CREATE_USER_DEPT_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"createUserDeptName"
column=
"CREATE_USER_DEPT_NAME"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,EMP_NAME,
EMP_IDCARD_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
...
...
@@ -138,7 +137,6 @@
</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,
...
...
@@ -200,7 +198,6 @@
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保办理分页查询-->
<select
id=
"getInsuranceHandleListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
...
...
@@ -261,7 +258,6 @@
</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"
>
select
detail.id as id,
...
...
@@ -393,13 +389,11 @@
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<update
id=
"updatePolicyNoBatch"
>
<foreach
collection=
"details"
index=
"index"
item=
"item"
separator=
";"
>
update t_insurance_detail set POLICY_NO = #{item.policyNo} where ID = #{item.id}
</foreach>
</update>
<update
id=
"updateInvoiceNoBatch"
>
<foreach
collection=
"details"
index=
"index"
item=
"item"
separator=
";"
>
update t_insurance_detail set INVOICE_NO = #{item.invoiceNo} where ID = #{item.id}
...
...
@@ -425,6 +419,7 @@
detail.IS_OVERDUE as isOverdue,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.BUY_STANDARD as buyStandard
from
t_insurance_detail detail
...
...
@@ -582,6 +577,7 @@
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.POLICY_NO as policyNo,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as refundCreateTime
from
t_insurance_detail detail,
...
...
@@ -908,7 +904,7 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<select
id=
"selectListBy
e
mpIdcardNo"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
<select
id=
"selectListBy
E
mpIdcardNo"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
...
...
@@ -924,7 +920,8 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<select
id=
"selectByregionSQL"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
<!--查数据是否存在权限范围内-->
<select
id=
"selectByRegionSql"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
...
...
@@ -937,4 +934,130 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<!--商险订单减员列表查询-->
<select
id=
"getOrderRefundInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
(
select
detail.id as id,
detail.BUY_TYPE as buyType,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.CREATE_NAME as createName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.ORDER_NO = #{param.orderNo}
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, '00:00:00')
</if>
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.deptNoList != null"
>
and detail.DEPT_NO in
<foreach
collection=
"param.deptNoList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
)
union all(
select
detail.id as id,
detail.BUY_TYPE as buyType,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_NAME as createName,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
refund.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail,
t_insurance_refund refund
where
detail.DELETE_FLAG = 0
and
refund.ORDER_NO = #{param.orderNo}
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != ''"
>
AND refund.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, '00:00:00')
</if>
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND refund.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.deptNoList != null"
>
and detail.DEPT_NO in
<foreach
collection=
"param.deptNoList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
)order by createTime desc
</select>
<select
id=
"getOrderInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
select
detail.id as id,
detail.BUY_TYPE as buyType,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.CREATE_NAME as createName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.ORDER_NO = #{param.orderNo}
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.startDate != null and param.startDate.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, '00:00:00')
</if>
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.deptNoList != null"
>
and detail.DEPT_NO in
<foreach
collection=
"param.deptNoList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
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