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
4670c7a4
Commit
4670c7a4
authored
Dec 15, 2022
by
张云
🎱
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/insurance-1.3.0' into 'develop'
Feature/insurance 1.3.0 See merge request
!316
parents
aa78ac12
55328c19
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
3174 additions
and
265 deletions
+3174
-265
TSettleDomainListVo.java
...u/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
+4
-0
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+1
-0
TSettleDomainService.java
...d/plus/v1/yifu/archives/service/TSettleDomainService.java
+5
-0
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+22
-0
CacheConstants.java
...oud/plus/v1/yifu/common/core/constant/CacheConstants.java
+4
-0
EkpInsuranceProperties.java
...cloud/plus/v1/yifu/ekp/config/EkpInsuranceProperties.java
+15
-1
EkpInsuranceUtil.java
...om/yifu/cloud/plus/v1/yifu/ekp/util/EkpInsuranceUtil.java
+47
-1
ekpInsuranceConfig.properties
...mmon-ekp/src/main/resources/ekpInsuranceConfig.properties
+5
-1
BaseEntity.java
...fu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
+5
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+122
-1
TBusinessOperate.java
...loud/plus/v1/yifu/insurances/entity/TBusinessOperate.java
+59
-0
TInsurancePolicy.java
...loud/plus/v1/yifu/insurances/entity/TInsurancePolicy.java
+80
-0
EkpUpdateParam.java
...yifu/cloud/plus/v1/yifu/insurances/vo/EkpUpdateParam.java
+56
-0
InsuranceDetailVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
+17
-3
InsuranceEnclosureVo.java
...loud/plus/v1/yifu/insurances/vo/InsuranceEnclosureVo.java
+1
-1
InsuranceExportListParam.java
.../plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
+12
-0
InsuranceInsuredDetailParam.java
...us/v1/yifu/insurances/vo/InsuranceInsuredDetailParam.java
+45
-0
InsuranceInsuredParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceInsuredParam.java
+102
-0
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+12
-0
InsurancePolicyListEditParam.java
...s/v1/yifu/insurances/vo/InsurancePolicyListEditParam.java
+70
-0
InsurancePolicyListParam.java
.../plus/v1/yifu/insurances/vo/InsurancePolicyListParam.java
+52
-0
InsuranceRefundHandlingParam.java
...s/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
+11
-0
InsuranceRefundVo.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundVo.java
+47
-0
InsuranceRegisterInvoiceNoParam.java
...1/yifu/insurances/vo/InsuranceRegisterInvoiceNoParam.java
+79
-0
InsuranceRegisterParam.java
...ud/plus/v1/yifu/insurances/vo/InsuranceRegisterParam.java
+8
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+7
-0
RefundExportListParam.java
...oud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
+12
-1
RefundListVo.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/RefundListVo.java
+110
-0
RefundMoneyUpdateParam.java
...ud/plus/v1/yifu/insurances/vo/RefundMoneyUpdateParam.java
+84
-0
TInsurancePolicyDetailVO.java
.../plus/v1/yifu/insurances/vo/TInsurancePolicyDetailVO.java
+24
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+59
-17
TInsurancePolicyController.java
...ifu/insurances/controller/TInsurancePolicyController.java
+107
-0
TInsuranceRefundController.java
...ifu/insurances/controller/TInsuranceRefundController.java
+78
-0
TBusinessOperateMapper.java
.../insurances/mapper/insurances/TBusinessOperateMapper.java
+19
-0
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+27
-6
TInsurancePolicyMapper.java
.../insurances/mapper/insurances/TInsurancePolicyMapper.java
+43
-0
TInsuranceRefundMapper.java
.../insurances/mapper/insurances/TInsuranceRefundMapper.java
+8
-1
TBusinessOperateService.java
...insurances/service/insurance/TBusinessOperateService.java
+34
-0
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+62
-5
TInsurancePolicyService.java
...insurances/service/insurance/TInsurancePolicyService.java
+75
-0
TInsuranceRefundService.java
...insurances/service/insurance/TInsuranceRefundService.java
+7
-0
TBusinessOperateServiceImpl.java
...s/service/insurance/impl/TBusinessOperateServiceImpl.java
+83
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+920
-191
TInsurancePolicyServiceImpl.java
...s/service/insurance/impl/TInsurancePolicyServiceImpl.java
+190
-0
TBusinessOperateMapper.xml
...in/resources/mapper/insurances/TBusinessOperateMapper.xml
+27
-0
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+219
-31
TInsuranceEnclosureMapper.xml
...resources/mapper/insurances/TInsuranceEnclosureMapper.xml
+1
-1
TInsurancePolicyMapper.xml
...in/resources/mapper/insurances/TInsurancePolicyMapper.xml
+93
-0
TInsuranceRefundMapper.xml
...in/resources/mapper/insurances/TInsuranceRefundMapper.xml
+4
-4
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
View file @
4670c7a4
...
...
@@ -22,5 +22,9 @@ public class TSettleDomainListVo {
* 合同主体IDS
*/
private
List
<
String
>
deptIds
;
/**
* 合同主体项目编码
*/
private
List
<
String
>
deptNos
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
4670c7a4
...
...
@@ -156,6 +156,7 @@ public class TSettleDomainController {
public
TSettleDomainListVo
getSettleDomainIdsByUserId
(
@RequestBody
String
userId
)
{
TSettleDomainListVo
vo
=
new
TSettleDomainListVo
();
vo
.
setDeptIds
(
tSettleDomainService
.
getSettleDomainIdsByUserId
(
userId
));
vo
.
setDeptNos
(
tSettleDomainService
.
getSettleDomainNosByUserId
(
userId
));
return
vo
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TSettleDomainService.java
View file @
4670c7a4
...
...
@@ -76,6 +76,11 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
List
<
String
>
getSettleDomainIdsByUserId
(
String
id
);
/**
* 获取用户所拥有的项目编码
*/
List
<
String
>
getSettleDomainNosByUserId
(
String
id
);
SetInfoVo
getSetInfoByCodes
(
List
<
String
>
codes
);
TSettleDomainListVo
getSettleInfoByCodes
(
List
<
String
>
codes
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
4670c7a4
...
...
@@ -117,6 +117,28 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return
domainIds
;
}
/**
* 获取用户所拥有的项目编码
*
* @param userId 用户id
*/
@Override
public
List
<
String
>
getSettleDomainNosByUserId
(
String
userId
)
{
List
<
String
>
domainNos
=
new
ArrayList
<>();
String
userKey
=
CacheConstants
.
WXHR_SETTLE_DOMAIN_NOS_BY_USERID
+
"_"
+
userId
;
Object
settleDomainVoR
=
redisUtil
.
get
(
userKey
);
if
(
settleDomainVoR
!=
null
)
{
return
(
List
<
String
>)
settleDomainVoR
;
}
else
{
List
<
TCutsomerDataPermisson
>
permissonList
=
permissonMapper
.
selectAllSettleDomainPermissionByUserId
(
userId
);
if
(
Common
.
isNotNull
(
permissonList
))
{
domainNos
=
permissonList
.
stream
().
map
(
TCutsomerDataPermisson:
:
getSettleDomainNo
).
collect
(
Collectors
.
toList
());
redisUtil
.
set
(
userKey
,
domainNos
);
}
}
return
domainNos
;
}
/**
* @param settleDomainSelectVo
* @Author: wangan
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CacheConstants.java
View file @
4670c7a4
...
...
@@ -131,5 +131,9 @@ public interface CacheConstants {
* 用户登录的项目vo缓存
*/
public
static
final
String
WXHR_SETTLE_DOMAIN_VOS_BY_USERID
=
ServiceNameConstants
.
ARCHIVES_SERVICE
+
"_SettleDomainVosByUserId"
;
/**
* 缓存用户所拥有的项目编码
*/
public
static
final
String
WXHR_SETTLE_DOMAIN_NOS_BY_USERID
=
ServiceNameConstants
.
ARCHIVES_SERVICE
+
"_SettleDomainNosByUserId"
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/config/EkpInsuranceProperties.java
View file @
4670c7a4
...
...
@@ -26,5 +26,19 @@ public class EkpInsuranceProperties {
String
insuranceLoginName
;
String
insuranceFocSubject
;
String
insuranceDocSubject
;
/**
* ekp修改接口描述
*/
String
insuranceUpdateDocSubject
;
/**
* ekp修改FdModelId
*/
String
insuranceUpdateFdModelId
;
/**
* ekp修改FdFlowId
*/
String
insuranceUpdateFdFlowId
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/util/EkpInsuranceUtil.java
View file @
4670c7a4
...
...
@@ -3,8 +3,10 @@ package com.yifu.cloud.plus.v1.yifu.ekp.util;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpInsuranceProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EKPInsurancePushParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInteractiveParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpUpdateParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceSettlePushParam
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -44,7 +46,7 @@ public class EkpInsuranceUtil {
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
wholeForm
.
add
(
"docSubject"
,
ekpInsuranceProperties
.
getInsurance
F
ocSubject
());
wholeForm
.
add
(
"docSubject"
,
ekpInsuranceProperties
.
getInsurance
D
ocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docStatus"
,
ekpInsuranceProperties
.
getInsuranceDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpInsuranceProperties
.
getInsuranceFdModelId
());
...
...
@@ -73,6 +75,50 @@ public class EkpInsuranceUtil {
}
}
/**
* 商险修改信息推送ekp
*
* @author licancan
* @param param
* @return {@link String}
*/
public
String
sendUpdateToEkp
(
EkpUpdateParam
param
){
log
.
info
(
"推送EKP开始--商险修改"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
param
);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
wholeForm
.
add
(
"docSubject"
,
ekpInsuranceProperties
.
getInsuranceUpdateDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docStatus"
,
ekpInsuranceProperties
.
getInsuranceDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpInsuranceProperties
.
getInsuranceUpdateFdModelId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpInsuranceProperties
.
getInsuranceUpdateFdFlowId
());
wholeForm
.
add
(
"formValues"
,
formValues
);
log
.
info
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpInsuranceProperties
.
getInsuranceUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
){
log
.
error
(
EkpConstants
.
SEND_FAILED
+
":"
,
e
);
return
null
;
}
}
/**
* 将类转换成EKP要求的格式
*
...
...
yifu-common/yifu-common-ekp/src/main/resources/ekpInsuranceConfig.properties
View file @
4670c7a4
...
...
@@ -4,6 +4,10 @@ insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e
insurance.insuranceFdFlowId
=
18267f206233f29cbd3c5ee425c9408a
insurance.insuranceDocStatus
=
20
insurance.insuranceLoginName
=
admin
insurance.insuranceFocSubject
=
\u
85AA
\u
8D44
\u
8BA2
\u5355\u
660E
\u
7EC6
\u6570\u
636E
\u
63A5
\u
53E3
insurance.insuranceDocSubject
=
\u5546\u9669\u
63a8
\u9001\u0065\u
006b
\u0070\u
63a5
\u
53e3
insurance.insuranceUpdateDocSubject
=
\u5546\u9669\u
63a8
\u9001\u0065\u
006b
\u0070\u
4fee
\u6539\u
63a5
\u
53e3
insurance.insuranceUpdateFdModelId
=
1850416f69cc813f128474e478b83794
insurance.insuranceUpdateFdFlowId
=
185041a4d264c3892a0543e43be925eb
yifu-common/yifu-common-mybatis/src/main/java/com/yifu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
View file @
4670c7a4
...
...
@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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.Getter
;
import
lombok.Setter
;
...
...
@@ -66,6 +67,7 @@ public class BaseEntity implements Serializable {
@Schema
(
description
=
"更新时间"
)
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
@ExcelIgnore
@JsonIgnore
private
LocalDateTime
updateTime
;
/**
...
...
@@ -73,6 +75,7 @@ public class BaseEntity implements Serializable {
*/
@TableField
(
exist
=
false
)
@ExcelIgnore
@JsonIgnore
private
String
mId
;
/**
...
...
@@ -80,6 +83,7 @@ public class BaseEntity implements Serializable {
*/
@TableField
(
exist
=
false
)
@ExcelIgnore
@JsonIgnore
private
String
menuInfo
;
/**
...
...
@@ -87,6 +91,7 @@ public class BaseEntity implements Serializable {
*/
@TableField
(
exist
=
false
)
@ExcelIgnore
@JsonIgnore
private
String
authSql
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
4670c7a4
...
...
@@ -7,6 +7,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.constants;
*/
public
class
InsurancesConstants
{
/**
* 主键不能为空
*/
public
static
final
String
ID_IS_EMPTY
=
"主键不能为空"
;
/**
* 新增
*/
...
...
@@ -15,6 +19,10 @@ public class InsurancesConstants {
* 替换导出新增
*/
public
static
final
String
INSERT
=
"新增"
;
/**
* 批增
*/
public
static
final
String
BATCH_INSERT
=
"批增"
;
/**
* 离职
*/
...
...
@@ -59,6 +67,14 @@ public class InsurancesConstants {
* 登记保单保费
*/
public
static
final
String
REGISTERED
=
"登记保单保费"
;
/**
* 登记发票号
*/
public
static
final
String
REGISTERED_INVOICE
=
"登记发票号"
;
/**
* 已投保信息修改
*/
public
static
final
String
UPDATE_INSURED
=
"已投保信息修改"
;
/**
* 新增投保成功
*/
...
...
@@ -92,6 +108,22 @@ public class InsurancesConstants {
* 投保记录不存在
*/
public
static
final
String
DATA_IS_NOT_EXIST
=
"投保记录不存在"
;
/**
* 未找到符合条件的参保记录
*/
public
static
final
String
NOT_FOUND_INSURANCE_RECORD
=
"未找到符合条件的参保记录"
;
/**
* 未找到符合条件的新增或批增投保数据
*/
public
static
final
String
NOT_FOUND_INSERT_OR_BATCH_RECORD
=
"未找到符合条件的新增或批增投保数据"
;
/**
* 当前投保状态无法变更投保记录
*/
public
static
final
String
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
=
"当前投保状态无法变更投保记录"
;
/**
* 当前投保状态无法登记发票号
*/
public
static
final
String
CURRENT_STATUS_NOT_REGISTER_INVOICE_NO
=
"当前投保状态无法登记发票号"
;
/**
* 结算信息不存在
*/
...
...
@@ -125,6 +157,10 @@ public class InsurancesConstants {
* 替换员工投保记录已存在
*/
public
static
final
String
REPLACE_IS_EXIST
=
"替换员工投保记录已存在"
;
/**
* 替换投保不允许变更投保类型
*/
public
static
final
String
REPLACE_NOT_ALLOW
=
"替换投保不允许变更投保类型"
;
/**
* 当前记录是待投保,无法替换
*/
...
...
@@ -253,6 +289,14 @@ public class InsurancesConstants {
* 保单开始时间格式错误
*/
public
static
final
String
POLICY_START_PARSE_ERROR
=
"保单开始时间格式错误"
;
/**
* 变更后保单开始时间格式错误
*/
public
static
final
String
POLICY_START_NEW_PARSE_ERROR
=
"变更后保单开始时间格式错误"
;
/**
* 变更后保单结束时间格式错误
*/
public
static
final
String
POLICY_END_NEW_PARSE_ERROR
=
"变更后保单结束时间格式错误"
;
/**
* 保单开始时间需要大于派单日期
*/
...
...
@@ -261,6 +305,10 @@ public class InsurancesConstants {
* 保单结束时间需要大于保单开始时间
*/
public
static
final
String
POLICY_START_SHOULD_LESS_THAN_POLICY_END
=
"保单结束时间需要大于保单开始时间"
;
/**
* 变更后的保单开始时间需早于保单结束时间
*/
public
static
final
String
POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW
=
"变更后的保单开始时间需早于保单结束时间"
;
/**
* 保单起止时间不能超过365天
*/
...
...
@@ -273,10 +321,18 @@ public class InsurancesConstants {
* 保单结束时间格式错误
*/
public
static
final
String
POLICY_END_PARSE_ERROR
=
"保单结束时间格式错误"
;
/**
* 保单结束时间需要大于派单日期
*/
public
static
final
String
POLICY_END_SHOULD_IS_FUTURE
=
"保单结束时间需要大于派单日期"
;
/**
* 购买标准不能为空
*/
public
static
final
String
BUY_STANDARD_NOT_EMPTY
=
"购买标准不能为空"
;
/**
* 变更后保单开始时间、变更后保单结束时间、变更后投保类型三个字段至少填写一个
*/
public
static
final
String
CHOOSE_ONE_OF_THREE
=
"变更后保单开始时间、变更后保单结束时间、变更后投保类型三个字段至少填写一个"
;
/**
* 购买标准不存在
*/
...
...
@@ -345,6 +401,18 @@ public class InsurancesConstants {
* 保单号长度超过50字符限制
*/
public
static
final
String
POLICY_NO_MORE_THAN_50
=
"保单号长度超过50字符限制"
;
/**
* 发票号不能为空
*/
public
static
final
String
INVOICE_NO_EMPTY
=
"发票号不能为空"
;
/**
* 变更原因不能为空
*/
public
static
final
String
REASON_EMPTY
=
"变更原因不能为空"
;
/**
* 变更原因超过50字符限制
*/
public
static
final
String
REASON_MORE_THAN_50
=
"变更原因超过50字符限制"
;
/**
* 发票号长度超过50字符限制
*/
...
...
@@ -361,6 +429,10 @@ public class InsurancesConstants {
* 替换类型无法登记保单保费
*/
public
static
final
String
BUY_TYPE_FOUR_NOT_REGISTERED
=
"替换类型无法登记保单保费"
;
/**
* 变更后投保类型只能填写新增、批增
*/
public
static
final
String
BUY_TYPE_ERROR_NEW
=
"变更后投保类型只能填写新增、批增"
;
/**
* 商险待投保,无法登记保单保费
*/
...
...
@@ -389,6 +461,10 @@ public class InsurancesConstants {
* 保单号不存在或已过期
*/
public
static
final
String
POLICY_NO_EXIST
=
"保单号不存在或已过期"
;
/**
* 保单已禁用
*/
public
static
final
String
POLICY_NO_FORBIDDEN
=
"保单已禁用"
;
/**
* 保单号不存在
*/
...
...
@@ -601,6 +677,31 @@ public class InsurancesConstants {
public
static
final
String
DEPT_NO_CHANGE_OLD_IS_NOT_EXIST
=
"被替换的项目不存在"
;
/**
* 保险公司不能为空
*/
public
static
final
String
REFUND_INSURANCE_COMPANY_NOT_EMPTY
=
"保险公司不能为空"
;
/**
* 险种不能为空
*/
public
static
final
String
REFUND_INSURANCE_TYPE_NOT_EMPTY
=
"险种不能为空"
;
/**
* 保单开始日期不能为空
*/
public
static
final
String
REFUND_INSURANCE_START_DATE_NOT_EMPTY
=
"保单开始日期不能为空"
;
/**
* 保单结束日期不能为空
*/
public
static
final
String
REFUND_INSURANCE_END_DATE_NOT_EMPTY
=
"保单结束日期不能为空"
;
/**
* 购买标准不能为空
*/
public
static
final
String
REFUND_BUY_STANDARD_NOT_EMPTY
=
"购买标准不能为空"
;
/**
* 退费金额不能为空
*/
...
...
@@ -614,7 +715,7 @@ public class InsurancesConstants {
/**
* 员工减员记录不存在
*/
public
static
final
String
REFUND_IS_NULL
=
"
员工减员记录不存在
"
;
public
static
final
String
REFUND_IS_NULL
=
"
未找到“减员成功”的参保信息
"
;
/**
* 已更新保单减员退费,不能再次更新
...
...
@@ -880,6 +981,10 @@ public class InsurancesConstants {
* 当前为已投保状态,不可办理
*/
public
static
final
String
BUY_HANDLE_STATUS_THREE_HANDLE_ERROR
=
"当前为已投保状态,不可办理"
;
/**
* 当前不是已投保状态
*/
public
static
final
String
BUY_HANDLE_STATUS_NOT_THREE
=
"当前不是已投保状态"
;
/**
* 当前为投保退回状态,不可办理
*/
...
...
@@ -1100,6 +1205,13 @@ public class InsurancesConstants {
*/
public
static
final
String
SETTLE_ID_ATYPISM
=
"结算id不一致"
;
/**
* 登记退保费用
*/
public
static
final
String
REGISTERED_SURRENDER_EXPENSE
=
"登记退保费用"
;
/**
* 获取项目信息失败
*/
...
...
@@ -1162,5 +1274,14 @@ public class InsurancesConstants {
*/
public
static
final
String
EKP_SEND_ERROR
=
"存在与ekp系统交互异常,请联系管理员处理后再操作"
;
/**
* 当前登录人无任何商险办理地的操作权限
*/
public
static
final
String
NO_PERMISSION
=
"当前登录人无任何商险办理地的操作权限"
;
/**
* 该记录的商险办理地为空
*/
public
static
final
String
HANDLE_PROVINCE_IS_NULL
=
"该记录的商险办理地为空"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TBusinessOperate.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
/**
* @author licancan
* @description 业务操作记录表 t_business_operate
* @date 2022-12-08 10:20:16
*/
@TableName
(
value
=
"t_business_operate"
)
@Data
@Schema
(
description
=
"业务操作记录表"
)
public
class
TBusinessOperate
extends
BaseEntity
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 业务表id
*/
@Schema
(
description
=
"业务表id"
)
private
String
businessId
;
/**
* 原来的信息
*/
@Schema
(
description
=
"原来的信息"
)
private
String
oldInfo
;
/**
* 新的信息
*/
@Schema
(
description
=
"新的信息"
)
private
String
newInfo
;
/**
* 操作描述
*/
@Schema
(
description
=
"操作描述:差异的信息(属性名称,逗号隔开)"
)
private
String
differenceInfo
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsurancePolicy.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDate
;
/**
* @author licancan
* @description 保单号对应起止时间表 t_insurance_policy
* @date 2022-12-07 16:40:16
*/
@Schema
(
description
=
"保单号对应起止时间表"
)
@Data
public
class
TInsurancePolicy
extends
BaseEntity
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 保单编号
*/
@Schema
(
description
=
"保单编号"
)
private
String
policyNo
;
/**
* 保单开始时间
*/
@Schema
(
description
=
"保单开始时间"
)
private
LocalDate
policyStart
;
/**
* 保单结束时间
*/
@Schema
(
description
=
"保单结束时间"
)
private
LocalDate
policyEnd
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 是否启用标识 0启用 1未启用
*/
@Schema
(
description
=
"是否启用标识 0启用 1未启用"
)
private
Integer
enableFlag
;
/**
* 是否删除 0未删除 1删除
*/
@Schema
(
description
=
"是否删除 0未删除 1删除"
)
private
Integer
deleteFlag
;
/**
* 购买月数
*/
@TableField
(
exist
=
false
)
@Schema
(
description
=
"购买月数"
)
private
Long
buyMonth
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EkpUpdateParam.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author licancan
* @description ekp更新请求参数
* @date 2022-12-12 14:09:35
*/
@Data
public
class
EkpUpdateParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
581367013151512283L
;
/**
* 保单开始时间
**/
private
String
fd_3b5bf02d3b8fc4
;
/**
* 保单结束时间
**/
private
String
fd_3b5bf02e1d47cc
;
/**
* 投保类型
*/
private
String
fd_3b5bf02fa14596
;
/**
* 发票号
*/
private
String
fd_3b5bf030ab1a56
;
/**
* 购买标准
*/
private
String
fd_3b5bf031b52314
;
/**
* 商险ID:商险id_结算id
*/
private
String
fd_3b5bf032d7a822
;
/**
* 商险变更ID
*/
private
String
fd_3b5bf033da86b2
;
/**
* 变更记录
*/
private
String
fd_3b5bf0b7b4c058
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
View file @
4670c7a4
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -10,6 +11,7 @@ import java.io.Serializable;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @author licancan
...
...
@@ -363,10 +365,16 @@ public class InsuranceDetailVO implements Serializable {
private
String
replaceInvoiceTitle
;
/**
*
退保金额 todo 数据库暂时没有
*
减员id
*/
@Schema
(
description
=
"退保金额 :预留字段,暂时都是空(减员类型专用)"
)
private
String
surrender
;
@Schema
(
description
=
"减员id"
)
private
String
refundId
;
/**
* 退保金额
*/
@Schema
(
description
=
"退保金额(减员类型专用)"
)
private
BigDecimal
surrender
;
/**
* 退保结算状态 todo 数据库暂时没有
...
...
@@ -380,4 +388,10 @@ public class InsuranceDetailVO implements Serializable {
@Schema
(
description
=
"默认结算信息id"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
defaultSettleId
;
/**
* 操作记录列表
*/
@Schema
(
description
=
"操作记录列表"
)
List
<
TBusinessOperate
>
operateList
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceEnclosureVo.java
View file @
4670c7a4
...
...
@@ -21,7 +21,7 @@ public class InsuranceEnclosureVo implements Serializable {
*
*/
@Schema
(
description
=
"主键"
)
private
Integer
id
;
private
String
id
;
/**
* 附件名
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
View file @
4670c7a4
...
...
@@ -80,4 +80,16 @@ public class InsuranceExportListParam extends BaseEntity implements Serializable
*/
@Schema
(
description
=
"派单结束时间"
)
private
String
endDate
;
/**
* 购买标准开始
*/
@Schema
(
description
=
"购买标准开始"
)
private
Integer
buyStandardMin
;
/**
* 购买标准结束
*/
@Schema
(
description
=
"购买标准结束"
)
private
Integer
buyStandardMax
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceInsuredDetailParam.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author licancan
* @description 商险已投保修改请求参数
* @date 2022-12-08 20:16:34
*/
@Data
@Schema
(
description
=
"商险已投保修改请求参数"
)
public
class
InsuranceInsuredDetailParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1445608325251914773L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 变更后保单开始时间
*/
@Schema
(
description
=
"变更后保单开始时间"
)
private
String
policyStart
;
/**
* 变更后保单结束时间
*/
@Schema
(
description
=
"变更后保单结束时间"
)
private
String
policyEnd
;
/**
* 变更后投保类型
*/
@Schema
(
description
=
"变更后投保类型 1新增 3批增"
)
private
Integer
buyType
;
/**
* 变更原因
*/
@Schema
(
description
=
"变更原因"
)
private
String
reason
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceInsuredParam.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author licancan
* @description 商险已投保修改请求参数
* @date 2022-12-08 18:32:11
*/
@Data
@Schema
(
description
=
"商险已投保修改请求参数"
)
public
class
InsuranceInsuredParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6131541135370797891L
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 保单开始时间
*/
@Schema
(
description
=
"保单开始时间"
)
private
String
policyStart
;
/**
* 保单结束时间
*/
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 变更后保单开始时间
*/
@Schema
(
description
=
"变更后保单开始时间"
)
private
String
policyStartNew
;
/**
* 变更后保单结束时间
*/
@Schema
(
description
=
"变更后保单结束时间"
)
private
String
policyEndNew
;
/**
* 变更后投保类型
*/
@Schema
(
description
=
"变更后投保类型, 新增、批增"
)
private
String
buyTypeStr
;
/**
* 变更后投保类型
*/
@JsonIgnore
private
Integer
buyType
;
/**
* 变更原因
*/
@Schema
(
description
=
"变更原因"
)
private
String
reason
;
/**
* 错误信息
*/
@Schema
(
description
=
"错误信息"
)
private
String
errorMessage
;
/**
* 数据传递对象
*/
@JsonIgnore
private
TInsuranceDetail
detail
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
4670c7a4
...
...
@@ -94,4 +94,16 @@ public class InsuranceListParam extends BaseEntity {
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回,4减员成功"
)
private
Integer
reduceHandleStatus
;
/**
* 购买标准开始
*/
@Schema
(
description
=
"购买标准开始"
)
private
Integer
buyStandardMin
;
/**
* 购买标准结束
*/
@Schema
(
description
=
"购买标准结束"
)
private
Integer
buyStandardMax
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsurancePolicyListEditParam.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.checkerframework.common.value.qual.IntVal
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* @author licancan
* @description 保单对应起止保时间编辑入参
* @date 2022-12-07 17:39:45
*/
@Data
@Schema
(
description
=
"保单对应起止保时间编辑入参"
)
public
class
InsurancePolicyListEditParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
9200033608149413253L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
@NotBlank
(
message
=
"主键不能为空"
)
private
String
id
;
/**
* 保单编号
*/
@Schema
(
description
=
"保单编号"
)
@NotBlank
(
message
=
"保单编号不能为空"
)
private
String
policyNo
;
/**
* 保单开始时间
*/
@Schema
(
description
=
"保单开始时间"
)
@NotNull
(
message
=
"保单开始时间不能为空"
)
private
LocalDate
policyStart
;
/**
* 保单结束时间
*/
@Schema
(
description
=
"保单结束时间"
)
@NotNull
(
message
=
"保单结束时间不能为空"
)
private
LocalDate
policyEnd
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
@NotBlank
(
message
=
"保险公司名称不能为空"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
@NotBlank
(
message
=
"险种名称不能为空"
)
private
String
insuranceTypeName
;
/**
* 是否启用标识 0启用 1未启用
*/
@Schema
(
description
=
"是否启用标识 0启用 1未启用"
)
@NotNull
(
message
=
"启用标识不能为空"
)
@IntVal
({
0
,
1
})
private
Integer
enableFlag
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsurancePolicyListParam.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author licancan
* @description 保单对应起止保时间列表入参
* @date 2022-12-07 17:12:27
*/
@Data
@Schema
(
description
=
"保单对应起止保时间列表入参"
)
public
class
InsurancePolicyListParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1442112261102562729L
;
/**
* 保单编号
*/
@Schema
(
description
=
"保单编号"
)
private
String
policyNo
;
/**
* 保单开始时间
*/
@Schema
(
description
=
"保单开始时间"
)
private
String
policyStart
;
/**
* 保单结束时间
*/
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 是否启用标识 0启用 1未启用
*/
@Schema
(
description
=
"是否启用标识 0启用 1未启用"
)
private
Integer
enableFlag
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
View file @
4670c7a4
...
...
@@ -108,5 +108,16 @@ public class InsuranceRefundHandlingParam extends BaseEntity implements Serializ
@Schema
(
description
=
"派单结束时间"
)
private
String
endDate
;
/**
* 购买标准区间最小值
*/
@Schema
(
description
=
"购买标准区间最小值"
)
private
String
buyStandardMin
;
/**
* 购买标准区间最大值
*/
@Schema
(
description
=
"购买标准区间最大值"
)
private
String
buyStandardMax
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundVo.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @ClassName: InsuranceRefundVo
* @Description: 减员退费校验类
* @Author: Administrator
* @Date: 2022/12/15 9:38
*/
@Data
public
class
InsuranceRefundVo
implements
Serializable
{
/**
* 主键id
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 保单信息主键
*/
@Schema
(
description
=
"保单信息主键"
)
private
String
insDetailId
;
/**
* 退费金额
*/
@Schema
(
description
=
"退费金额"
)
private
BigDecimal
refundMoney
;
/**
* 商险办理城市code
*/
@Schema
(
description
=
"商险办理城市code"
)
private
Integer
insuranceHandleCity
;
/**
* 商险办理省code
*/
@Schema
(
description
=
"商险办理省code"
)
private
Integer
insuranceHandleProvince
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRegisterInvoiceNoParam.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author licancan
* @description 登记发票号入参
* @date 2022-12-08 16:33:57
*/
@Data
@Schema
(
description
=
"登记发票号入参"
)
public
class
InsuranceRegisterInvoiceNoParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7450858109465027195L
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 保单开始时间
*/
@Schema
(
description
=
"保单开始时间"
)
private
String
policyStart
;
/**
* 保单结束时间
*/
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 发票号
*/
@Schema
(
description
=
"发票号"
)
private
String
invoiceNo
;
/**
* 错误信息
*/
@Schema
(
description
=
"错误信息"
)
private
String
errorMessage
;
/**
* 数据传递对象
*/
@JsonIgnore
private
TInsuranceDetail
detail
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRegisterParam.java
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -80,4 +82,10 @@ public class InsuranceRegisterParam implements Serializable {
*/
@Schema
(
description
=
"错误信息"
)
private
String
errorMessage
;
/**
* 数据传递对象
*/
@JsonIgnore
private
TInsuranceDetail
detail
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
4670c7a4
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -100,6 +101,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"错误信息"
)
private
String
errorMessage
;
/**
* 数据传递对象
*/
@JsonIgnore
private
TInsuranceDetail
detail
;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
View file @
4670c7a4
...
...
@@ -4,7 +4,6 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.checkerframework.common.value.qual.IntVal
;
import
org.checkerframework.common.value.qual.StringVal
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
...
...
@@ -64,4 +63,16 @@ public class RefundExportListParam extends BaseEntity implements Serializable {
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
/**
* 购买标准开始
*/
@Schema
(
description
=
"购买标准开始"
)
private
String
buyStandardMin
;
/**
* 购买标准结束
*/
@Schema
(
description
=
"购买标准结束"
)
private
String
buyStandardMax
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundListVo.java
0 → 100644
View file @
4670c7a4
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.time.LocalDate
;
/**
* @author zhangyun
* @description 退保成功列表
* @date 2022-12-09 09:00:00
*/
@Data
@Tag
(
name
=
"退保成功列表"
)
public
class
RefundListVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 项目名称
*/
@Schema
(
description
=
"项目名称"
)
private
String
projectName
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema
(
description
=
" 投保类型, 1新增、3批增、4替换"
)
private
Integer
buyType
;
/**
* 保单开始时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"保单开始时间"
)
private
LocalDate
policyStart
;
/**
* 保单结束时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"保单结束时间"
)
private
LocalDate
policyEnd
;
/**
* 保险公司名称(冗余字段)
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 退款金额(元)
*/
@Schema
(
description
=
"退款金额(元)"
)
private
String
refundMoney
;
/**
* 退至项目名称
*/
@Schema
(
description
=
"退至项目名称"
)
private
String
returnProjectName
;
/**
* 退至员工姓名
*/
@Schema
(
description
=
"退至员工姓名"
)
private
String
returnEmpName
;
/**
* 退至员工身份证号
*/
@Schema
(
description
=
"退至员工身份证号"
)
private
String
returnEmpIdcardNo
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundMoneyUpdateParam.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author 张云
* @description 减员退费导入表
* @date 2022-12-09 10:06:31
*/
@Data
@Tag
(
name
=
"减员退费导入表"
)
public
class
RefundMoneyUpdateParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 主键
*/
@JsonIgnore
private
String
id
;
/**
* 商险id
*/
@JsonIgnore
private
String
insDetailId
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 保单开始时间
*/
@Schema
(
description
=
"保单开始时间"
)
private
String
policyStart
;
/**
* 保单结束时间
*/
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
/**
* 保险公司名称(冗余字段)
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 退款金额(元)
*/
@Schema
(
description
=
"退款金额(元)"
)
private
String
refundMoney
;
/**
* 错误原因
*/
@Schema
(
description
=
"错误原因"
)
private
String
errorMessage
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/TInsurancePolicyDetailVO.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author licancan
* @description 保单号对应起止时间详情vo
* @date 2022-12-08 11:11:35
*/
@Data
@Schema
(
description
=
"保单号对应起止时间详情vo"
)
public
class
TInsurancePolicyDetailVO
extends
TInsurancePolicy
{
/**
* 操作记录列表
*/
@Schema
(
description
=
"操作记录列表"
)
List
<
TBusinessOperate
>
operateList
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
4670c7a4
...
...
@@ -297,6 +297,48 @@ public class TInsuranceDetailController {
public
R
<
List
<
InsuranceRegisterParam
>>
registeredPolicyPremium
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
InsuranceRegisterParam
>
paramList
){
return
tInsuranceDetailService
.
registeredPolicyPremium
(
paramList
);
}
/**
* 登记发票号
*
* @author licancan
* @param paramList
* @return {@link R< List<InsuranceRegisterInvoiceNoParam>>}
*/
@Operation
(
summary
=
"登记发票号"
,
description
=
"登记发票号"
)
@PostMapping
(
"/registeredInvoiceNo"
)
@PreAuthorize
(
"@pms.hasPermission('handle_insure_invoice')"
)
public
R
<
List
<
InsuranceRegisterInvoiceNoParam
>>
registeredInvoiceNo
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
InsuranceRegisterInvoiceNoParam
>
paramList
){
return
tInsuranceDetailService
.
registeredInvoiceNo
(
paramList
);
}
/**
* 已投保信息修改
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceInsuredParam>>}
*/
@Operation
(
summary
=
"已投保信息修改"
,
description
=
"已投保信息修改"
)
@PostMapping
(
"/updateInsuranceInsured"
)
@PreAuthorize
(
"@pms.hasPermission('handle_insured')"
)
public
R
<
List
<
InsuranceInsuredParam
>>
updateInsuranceInsured
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
InsuranceInsuredParam
>
paramList
){
return
tInsuranceDetailService
.
updateInsuranceInsured
(
paramList
);
}
/**
* 已投保信息修改
*
* @author licancan
* @param param
* @return {@link R< String>}
*/
@PostMapping
(
"/updateInsuranceInsuredById"
)
@Operation
(
summary
=
"已投保信息修改"
,
description
=
"已投保信息修改"
)
@PreAuthorize
(
"@pms.hasPermission('handle_insured_by_id')"
)
public
R
<
String
>
updateInsuranceInsuredById
(
@RequestBody
InsuranceInsuredDetailParam
param
)
{
return
tInsuranceDetailService
.
updateInsuranceInsuredById
(
param
);
}
/***********************减员办理********************************/
/**
* 导入减员校验
...
...
@@ -374,7 +416,7 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param param 查询条件
* @return {@link R<IPage<
InsuranceRefundListVo
>>}
* @return {@link R<IPage<
InsuranceRefundListVo
>>}
*/
@Operation
(
summary
=
"已减员列表分页查询"
,
description
=
"已减员列表分页查询"
)
@PostMapping
(
"/getInsuranceRefundPageList"
)
...
...
@@ -388,7 +430,7 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param param 查询条件
* @return {@link R<List<
InsuranceRefundListVo
>>}
* @return {@link R<List<
InsuranceRefundListVo
>>}
*/
@Operation
(
summary
=
"已减员列表导出"
,
description
=
"已减员列表导出"
)
@PostMapping
(
"/getInsuranceRefundList"
)
...
...
@@ -403,7 +445,7 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param param 查询条件
* @return {@link R<IPage<
RefundExportListVo
>>}
* @return {@link R<IPage<
RefundExportListVo
>>}
*/
@Operation
(
summary
=
"减员办理列表分页查询"
,
description
=
"减员办理列表分页查询"
)
@GetMapping
(
"/getInsuranceRefundHandlingPageList"
)
...
...
@@ -417,7 +459,7 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param param 查询条件
* @return {@link R<List<
RefundExportListVo
>>}
* @return {@link R<List<
RefundExportListVo
>>}
*/
@Operation
(
summary
=
"导出减员列表"
,
description
=
"导出减员列表"
)
@PostMapping
(
"/getInsuranceRefundHandlingList"
)
...
...
@@ -494,19 +536,6 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
updateIsUse
(
id
);
}
/**
* 更新减员退费
*
* @author zhaji
* @param paramList 退费列表
* @return {@link R<List< RefundMoneyParam >>}
*/
@Operation
(
summary
=
"更新减员退费"
,
description
=
"更新减员退费"
)
@PostMapping
(
"/updateRefundMoney"
)
public
R
updateRefundMoney
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"更新减员退费不能为空"
)
List
<
RefundMoneyParam
>
paramList
)
{
return
R
.
failed
(
"该功能暂未开放"
);
//return tInsuranceDetailService.updateRefundMoney(paramList);
}
/**
* 查询项目列表
...
...
@@ -545,6 +574,19 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
urgentUpdateIsUse
(
empIdcardNo
);
}
/**
* 紧急出险(20221128需求,ekp调用)
*
* @author licancan
* @param paramList 商险明细id集合
* @return {@link R}
*/
@Operation
(
summary
=
"紧急出险"
,
description
=
"紧急出险"
)
@PostMapping
(
"/urgentUpdateIsUseByIds"
)
public
R
urgentUpdateIsUseByIds
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"主键集合不能为空"
)
List
<
String
>
paramList
)
{
return
tInsuranceDetailService
.
urgentUpdateIsUseByIds
(
paramList
);
}
/**
* 根据身份证查询所有的商险列表
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsurancePolicyController.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePolicyService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListEditParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsurancePolicyDetailVO
;
import
io.swagger.v3.oas.annotations.Operation
;
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
;
import
javax.validation.Valid
;
import
java.util.List
;
/**
* @author licancan
* @description 保单维护 controller
* @date 2022-12-07 16:56:53
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/insurancePolicy"
)
@Tag
(
name
=
"保单维护相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsurancePolicyController
{
@Resource
private
TInsurancePolicyService
tInsurancePolicyService
;
/**
* 保单号对应起止保时间分页查询
*
* @author licancan
* @param page 分页对象
* @param param 查询参数
* @return {@link R<IPage<TInsurancePolicy>>}
*/
@Operation
(
summary
=
"保单号对应起止保时间分页查询"
,
description
=
"保单号对应起止保时间分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TInsurancePolicy
>>
getInsurancePolicyPage
(
Page
page
,
InsurancePolicyListParam
param
)
{
return
R
.
ok
(
tInsurancePolicyService
.
pageDiy
(
page
,
param
));
}
/**
* 保单号对应起止保时间列表(不分页)
*
* @author licancan
* @param param
* @return {@link R<List<TInsurancePolicy>>}
*/
@Operation
(
summary
=
"保单号对应起止保时间列表(不分页)"
,
description
=
"保单号对应起止保时间(不分页)"
)
@GetMapping
(
"/list"
)
@PreAuthorize
(
"@pms.hasPermission('insurancePolicy_list')"
)
public
R
<
List
<
TInsurancePolicy
>>
getInsurancePolicyList
(
InsurancePolicyListParam
param
)
{
return
R
.
ok
(
tInsurancePolicyService
.
getInsurancePolicyList
(
param
));
}
/**
* 通过id查询详情
*
* @author licancan
* @param id
* @return {@link R<TInsurancePolicyDetailVO>}
*/
@GetMapping
(
"/{id}"
)
@Operation
(
summary
=
"通过id查询详情"
,
description
=
"通过id查询详情"
)
@PreAuthorize
(
"@pms.hasPermission('insurancePolicy_getById')"
)
public
R
<
TInsurancePolicyDetailVO
>
getDetailById
(
@PathVariable
(
"id"
)
String
id
)
{
return
tInsurancePolicyService
.
getDetailById
(
id
);
}
/**
* 修改保单号对应起止保时间
*
* @author licancan
* @param param 修改参数
* @return {@link R}
*/
@Operation
(
summary
=
"修改保单号对应起止保时间"
,
description
=
"修改保单号对应起止保时间)"
)
@PostMapping
(
"/update"
)
@PreAuthorize
(
"@pms.hasPermission('insurancePolicy_update')"
)
public
R
update
(
@RequestBody
@Valid
InsurancePolicyListEditParam
param
)
{
return
tInsurancePolicyService
.
updateInsurancePolicy
(
param
);
}
/**
* 删除保单号对应起止保时间
*
* @author licancan
* @param id 主键
* @return {@link R}
*/
@Operation
(
summary
=
"删除保单号对应起止保时间"
,
description
=
"删除保单号对应起止保时间"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('insurancePolicy_delete')"
)
public
R
deleteById
(
@PathVariable
(
"id"
)
String
id
)
{
return
tInsurancePolicyService
.
deleteInsurancePolicy
(
id
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceRefundController.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
javax.validation.constraints.Size
;
import
java.util.List
;
/**
* @author zhangyun
* @description 减员退费控制器
* @date 2022-12-09 09:55:28
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/insuranceRefund"
)
@Tag
(
name
=
"商险减员退费相关"
)
@Validated
public
class
TInsuranceRefundController
{
@Resource
private
TInsuranceDetailService
tInsuranceDetailService
;
/**
* 减员退费分页列表
*
* @author zhangyun
* @param page 分页信息
* @param param 筛选条件
* @param mId 菜单Id
* @return {@link R}
*/
@Operation
(
summary
=
"减员退费分页列表"
,
description
=
"减员退费分页列表"
)
@GetMapping
(
"/getInsuranceRefundMoneyPageList"
)
public
R
getInsuranceRefundPageList
(
Page
<
RefundListVo
>
page
,
InsuranceRefundHandlingParam
param
,
@RequestParam
(
required
=
false
)
String
mId
)
{
return
tInsuranceDetailService
.
getInsuranceRefundMoneyPageList
(
page
,
param
,
mId
);
}
/**
* 减员退费不分页列表
*
* @author zhangyun
* @param param 筛选条件
* @return {@link R}
*/
@Operation
(
summary
=
"已减员列表导出"
,
description
=
"已减员列表导出"
)
@GetMapping
(
"/getInsuranceRefundMoneyList"
)
@PreAuthorize
(
"@pms.hasPermission('insurance_custserve_reduction_export')"
)
public
R
getInsuranceRefundList
(
InsuranceRefundHandlingParam
param
)
{
return
tInsuranceDetailService
.
getInsuranceRefundMoneyList
(
param
);
}
/**
* 更新减员退费
*
* @author zhangyun
* @param paramList 退费列表
* @return {@link R<List<RefundMoneyUpdateParam>>}
*/
@Operation
(
summary
=
"更新减员退费"
,
description
=
"更新减员退费"
)
@PostMapping
(
"/updateRefundMoney"
)
@PreAuthorize
(
"@pms.hasPermission('insurance_custserve_reduction_money')"
)
public
R
updateRefundMoney
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"更新减员退费不能为空"
)
List
<
RefundMoneyUpdateParam
>
paramList
)
{
return
tInsuranceDetailService
.
updateRefundMoney
(
paramList
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TBusinessOperateMapper.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @author licancan
* @description 针对表【t_business_operate(业务操作记录表)】的数据库操作Mapper
* @date 2022-12-08 10:20:16
*/
@Mapper
public
interface
TBusinessOperateMapper
extends
BaseMapper
<
TBusinessOperate
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
4670c7a4
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -130,7 +131,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @author zhaji
* @param page 分页参数
* @param param 查询参数
* @return {@link IPage<
InsuranceRefundListVo>}
* @return {@link IPage<InsuranceRefundListVo>}
*/
IPage
<
InsuranceRefundListVo
>
getInsuranceRefundPageList
(
Page
<
InsuranceRefundParam
>
page
,
@Param
(
"param"
)
InsuranceRefundParam
param
);
...
...
@@ -139,10 +140,30 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*
* @author zhaji
* @param param 查询参数
* @return {@link List<
InsuranceRefundListVo>}
* @return {@link List<InsuranceRefundListVo>}
*/
List
<
InsuranceRefundListVo
>
getInsuranceRefundList
(
@Param
(
"param"
)
InsuranceRefundParam
param
);
/**
* 查询退费分页列表
*
* @author zhangyun
* @param page 分页参数
* @param param 查询参数
* @return {@link IPage<RefundListVo>}
*/
IPage
<
RefundListVo
>
getInsuranceRefundMoneyPageList
(
Page
<
RefundListVo
>
page
,
@Param
(
"param"
)
InsuranceRefundHandlingParam
param
);
/**
* 查询退费不分页列表
*
* @author zhangyun
* @param param 查询参数
* @return {@link List<RefundListVo>}
*/
List
<
RefundListVo
>
getInsuranceRefundMoneyList
(
@Param
(
"param"
)
InsuranceRefundHandlingParam
param
);
/**
* 减员办理列表分页查询
*
...
...
@@ -174,11 +195,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
/**
* 查询保单减员退费信息
*
* @author zha
ji
* @param
refundDetail
* @return {@link
TInsuranceRefundDetail
}
* @author zha
ngyun
* @param
param 查询参数
* @return {@link
String
}
*/
TInsuranceRefundDetail
selectRefundDetail
(
@Param
(
"param"
)
TInsuranceRefundDetail
refundDetail
);
InsuranceRefundVo
selectRefundDetailId
(
@Param
(
"param"
)
RefundMoneyUpdateParam
param
);
/**
* 根据ID导出减员办理列表
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsurancePolicyMapper.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
.
insurances
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author licancan
* @description 针对表【t_insurance_policy(保单号对应起止时间表)】的数据库操作Mapper
* @date 2022-12-07 16:40:16
*/
@Mapper
public
interface
TInsurancePolicyMapper
extends
BaseMapper
<
TInsurancePolicy
>
{
/**
* 保单号对应起止保时间分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return {@link IPage <TInsurancePolicy>}
* @author licancan
*/
IPage
<
TInsurancePolicy
>
getInsurancePolicyListPage
(
Page
page
,
@Param
(
"param"
)
InsurancePolicyListParam
param
);
/**
* 保单号对应起止保时间列表(不分页)
*
* @author licancan
* @param param
* @return {@link List< TInsurancePolicy>}
*/
List
<
TInsurancePolicy
>
getInsurancePolicyList
(
@Param
(
"param"
)
InsurancePolicyListParam
param
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceRefundMapper.java
View file @
4670c7a4
...
...
@@ -25,5 +25,12 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> {
void
updateByInsDetailId
(
@Param
(
"param"
)
TInsuranceRefund
insuranceRefund
);
int
updateRefundMoney
(
TInsuranceRefund
insuranceRefund
);
/**
* 更新退款信息
*
* @author zhangyun
* @param insuranceRefund 退款信息
* @return {@link int}
*/
int
updateRefundMoney
(
@Param
(
"param"
)
TInsuranceRefund
insuranceRefund
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TBusinessOperateService.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* @author licancan
* @description 针对表【t_business_operate(业务操作记录表)】的数据库操作Service
* @date 2022-12-08 10:20:16
*/
public
interface
TBusinessOperateService
extends
IService
<
TBusinessOperate
>
{
/**
* 保存修改记录
*
* @author licancan
* @param businessId 业务表主键
* @param oldInfo 老的实体类
* @param newInfo 新的实体类
* @param remark 备注
* @return {@link TBusinessOperate}
*/
<
T
>
TBusinessOperate
saveModificationRecord
(
String
businessId
,
T
oldInfo
,
T
newInfo
,
String
remark
);
/**
* 根据业务主键获取操作记录
*
* @author licancan
* @param businessId
* @return {@link List<TBusinessOperate>}
*/
List
<
TBusinessOperate
>
getOperateListByBusinessId
(
String
businessId
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
View file @
4670c7a4
...
...
@@ -180,6 +180,33 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R
<
List
<
InsuranceRegisterParam
>>
registeredPolicyPremium
(
List
<
InsuranceRegisterParam
>
paramList
);
/**
* 登记发票号
*
* @author licancan
* @param paramList
* @return {@link R< List<InsuranceRegisterInvoiceNoParam>>}
*/
R
<
List
<
InsuranceRegisterInvoiceNoParam
>>
registeredInvoiceNo
(
List
<
InsuranceRegisterInvoiceNoParam
>
paramList
);
/**
* 已投保信息修改
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceInsuredParam>>}
*/
R
<
List
<
InsuranceInsuredParam
>>
updateInsuranceInsured
(
List
<
InsuranceInsuredParam
>
paramList
);
/**
* 已投保信息修改
*
* @author licancan
* @param param
* @return {@link R< String>}
*/
R
<
String
>
updateInsuranceInsuredById
(
InsuranceInsuredDetailParam
param
);
/***********************减员办理********************************/
/**
...
...
@@ -226,17 +253,38 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*
* @author zhaji
* @param param 查询参数
* @return {@link List<
InsuranceRefundListVo
>}
* @return {@link List<
InsuranceRefundListVo
>}
*/
R
getInsuranceRefundList
(
InsuranceRefundParam
param
);
/**
* 减员退费分页列表
*
* @author zhangyun
* @param page 分页信息
* @param param 筛选条件
* @param mId 菜单Id
* @return {@link R}
*/
R
getInsuranceRefundMoneyPageList
(
Page
<
RefundListVo
>
page
,
InsuranceRefundHandlingParam
param
,
String
mId
);
/**
* 减员退费不分页列表
*
* @author zhangyun
* @param param 筛选条件
* @return {@link R}
*/
R
getInsuranceRefundMoneyList
(
InsuranceRefundHandlingParam
param
);
/**
* 减员办理列表分页查询
*
* @author zhaji
* @param page 分页数据
* @param param 查询参数
* @return {@link IPage< RefundExportListVo >}
* @param mId 菜单id
* @return {@link IPage<RefundExportListVo>}
*/
IPage
<
RefundExportListVo
>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
InsuranceRefundHandlingParam
param
,
String
mId
);
...
...
@@ -317,11 +365,11 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
/**
* 更新减员退费
*
* @author zha
ji
* @param paramList
* @author zha
ngyun
* @param paramList
减员退费参数
* @return {@link R}
*/
R
updateRefundMoney
(
List
<
RefundMoneyParam
>
paramList
);
R
updateRefundMoney
(
List
<
RefundMoney
Update
Param
>
paramList
);
/**
* 查询项目列表
...
...
@@ -350,6 +398,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R
urgentUpdateIsUse
(
String
empIdcardNo
);
/**
* 紧急出险
*
* @author licancan
* @param paramList 商险明细id集合
* @return {@link R}
*/
R
urgentUpdateIsUseByIds
(
List
<
String
>
paramList
);
/**
* 根据身份证查询商险列表
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsurancePolicyService.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListEditParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsurancePolicyDetailVO
;
import
java.util.List
;
/**
* @author licancan
* @description 针对表【t_insurance_policy(保单号对应起止时间表)】的数据库操作Service
* @date 2022-12-07 16:40:16
*/
public
interface
TInsurancePolicyService
extends
IService
<
TInsurancePolicy
>
{
/**
* 保单号对应起止保时间分页查询
*
* @author licancan
* @param page 分页对象
* @param param 查询参数
* @return {@link IPage<TInsurancePolicy>}
*/
IPage
<
TInsurancePolicy
>
pageDiy
(
Page
page
,
InsurancePolicyListParam
param
);
/**
* 保单号对应起止保时间列表(不分页)
*
* @author licancan
* @param param
* @return {@link List<TInsurancePolicy>}
*/
List
<
TInsurancePolicy
>
getInsurancePolicyList
(
InsurancePolicyListParam
param
);
/**
* 通过id查询详情
*
* @author licancan
* @param id
* @return {@link R<TInsurancePolicyDetailVO>}
*/
R
<
TInsurancePolicyDetailVO
>
getDetailById
(
String
id
);
/**
* 新增
*
* @author licancan
* @param policy
* @return {@link R}
*/
R
saveTInsurancePolicy
(
TInsurancePolicy
policy
);
/**
* 修改保单号对应起止保时间
*
* @author licancan
* @param param
* @return {@link R}
*/
R
updateInsurancePolicy
(
InsurancePolicyListEditParam
param
);
/**
* 删除保单号对应起止保时间
*
* @author licancan
* @param id 主键
* @return {@link R}
*/
R
deleteInsurancePolicy
(
String
id
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceRefundService.java
View file @
4670c7a4
...
...
@@ -14,6 +14,13 @@ public interface TInsuranceRefundService extends IService<TInsuranceRefund> {
void
updateByInsDetailId
(
TInsuranceRefund
insuranceRefund
);
/**
* 更新退款信息
*
* @author zhangyun
* @param insuranceRefund 退款参数
* @return {@link int}
*/
int
updateRefundMoney
(
TInsuranceRefund
insuranceRefund
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TBusinessOperateServiceImpl.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TBusinessOperateMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TBusinessOperateService
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
static
com
.
alibaba
.
fastjson
.
serializer
.
SerializerFeature
.*;
/**
* @author licancan
* @description 针对表【t_business_operate(业务操作记录表)】的数据库操作Service实现
* @date 2022-12-08 10:20:16
*/
@Service
public
class
TBusinessOperateServiceImpl
extends
ServiceImpl
<
TBusinessOperateMapper
,
TBusinessOperate
>
implements
TBusinessOperateService
{
/**
* 保存修改记录
*
* @param businessId 业务表主键
* @param oldInfo 老的实体类
* @param newInfo 新的实体类
* @param remark 备注
* @return {@link TBusinessOperate}
* @author licancan
*/
@Override
public
<
T
>
TBusinessOperate
saveModificationRecord
(
String
businessId
,
T
oldInfo
,
T
newInfo
,
String
remark
)
{
try
{
//比较记录不影响业务逻辑,用try套住
//比较差异
String
differenceKey
=
HrEquator
.
comparisonValue
(
oldInfo
,
newInfo
);
//如果有差异保存差异
if
(!
Common
.
isEmpty
(
differenceKey
)){
TBusinessOperate
operate
=
new
TBusinessOperate
();
operate
.
setBusinessId
(
businessId
);
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operate
.
setOldInfo
(
JSON
.
toJSONString
(
oldInfo
,
features
));
operate
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
,
features
));
operate
.
setDifferenceInfo
(
differenceKey
);
operate
.
setRemark
(
remark
);
baseMapper
.
insert
(
operate
);
return
operate
;
}
}
catch
(
Exception
e
){
log
.
error
(
JSON
.
toJSON
(
oldInfo
)+
"插入修改记录报错>>>"
,
e
);
}
return
null
;
}
/**
* 根据业务主键获取操作记录
*
* @param businessId
* @return {@link List <TBusinessOperate>}
* @author licancan
*/
@Override
public
List
<
TBusinessOperate
>
getOperateListByBusinessId
(
String
businessId
)
{
List
<
TBusinessOperate
>
list
=
this
.
baseMapper
.
selectList
(
Wrappers
.<
TBusinessOperate
>
query
().
lambda
()
.
eq
(
TBusinessOperate:
:
getBusinessId
,
businessId
));
return
list
;
}
private
SerializerFeature
[]
features
=
new
SerializerFeature
[]
{
WriteMapNullValue
,
WriteNullNumberAsZero
,
WriteNullListAsEmpty
,
WriteNullStringAsEmpty
,
WriteDateUseDateFormat
};
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
4670c7a4
...
...
@@ -17,6 +17,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.*
;
...
...
@@ -26,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceAreaResService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils
;
...
...
@@ -54,6 +56,7 @@ import java.math.RoundingMode;
import
java.net.URLEncoder
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.ThreadPoolExecutor
;
...
...
@@ -113,7 +116,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
@Lazy
private
DoJointInsuranceTask
doJointInsuranceTask
;
@Resource
private
TInsurancePolicyService
tInsurancePolicyService
;
@Resource
private
TBusinessOperateService
tBusinessOperateService
;
@Resource
private
TInsuranceAreaResService
tInsuranceAreaResService
;
/***********************商险办理********************************/
/**
* 每日定时刷新商险到期数据
...
...
@@ -460,24 +468,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//替换
TInsuranceDetail
newDetail
=
new
TInsuranceDetail
();
//原数据置为无效:姓名 + 身份证号 + 项目编码 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准 + 有效
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getDeptNo
,
success
.
getDeptNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
success
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
success
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//有效
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsEffect
)
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
TInsuranceDetail
detail
=
success
.
getDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
newDetail
);
detail
.
setIsEffect
(
CommonConstants
.
ONE_INT
);
detail
.
setIsOverdue
(
null
);
...
...
@@ -914,11 +905,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//减员类型 处理创建人、创建时间、备注
if
(
CommonConstants
.
FIVE_INT
==
insuranceDetailVO
.
getDistributeType
()){
TInsuranceRefund
refund
=
tInsuranceRefundService
.
getOne
(
Wrappers
.<
TInsuranceRefund
>
query
().
lambda
()
.
eq
(
TInsuranceRefund:
:
getI
nsDetailId
,
insuranceDetailVO
.
get
Id
())
.
eq
(
TInsuranceRefund:
:
getI
d
,
insuranceDetailVO
.
getRefund
Id
())
.
orderByDesc
(
TInsuranceRefund:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
refund
).
isPresent
()){
insuranceDetailVO
.
setSurrender
(
refund
.
getRefundMoney
());
insuranceDetailVO
.
setCreateName
(
refund
.
getCreateName
());
insuranceDetailVO
.
setCreateTime
(
refund
.
getCreateTime
());
insuranceDetailVO
.
setRemark
(
refund
.
getRemark
());
...
...
@@ -935,6 +927,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
List
<
TBusinessOperate
>
list
=
tBusinessOperateService
.
getOperateListByBusinessId
(
id
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
insuranceDetailVO
.
setOperateList
(
list
);
}
}
return
insuranceDetailVO
;
}
...
...
@@ -1724,7 +1722,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
List
<
InsuranceRegisterParam
>
operatList
=
registeredPolicyPremiumCheck
(
paramList
);
//获取当前登录人的商险办理地权限
LambdaQueryWrapper
<
TInsuranceAreaRes
>
areaQuery
=
new
LambdaQueryWrapper
<>();
areaQuery
.
eq
(
TInsuranceAreaRes:
:
getUserId
,
user
.
getId
()).
eq
(
TInsuranceAreaRes:
:
getStatus
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceAreaRes
>
insuranceAreaResList
=
tInsuranceAreaResService
.
list
(
areaQuery
);
if
(
CollectionUtils
.
isEmpty
(
insuranceAreaResList
))
{
return
R
.
failed
(
InsurancesConstants
.
NO_PERMISSION
);
}
List
<
InsuranceRegisterParam
>
operatList
=
registeredPolicyPremiumCheck
(
paramList
,
insuranceAreaResList
);
//保存到数据库中的结果
List
<
InsuranceRegisterParam
>
listSuccess
=
operatList
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
());
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
...
...
@@ -1736,18 +1741,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
//登记保单保费
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail
detail
=
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
success
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
success
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
success
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
success
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
success
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
TInsuranceDetail
detail
=
success
.
getDetail
();
actualMoney
=
detail
.
getActualPremium
();
if
(
StringUtils
.
isNotBlank
(
success
.
getInvoiceNo
())){
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
...
...
@@ -1776,6 +1770,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
())){
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
//保单号不为空,维护到保单表中
TInsurancePolicy
policy
=
new
TInsurancePolicy
();
policy
.
setPolicyNo
(
success
.
getPolicyNo
());
policy
.
setPolicyStart
(
detail
.
getPolicyStart
());
policy
.
setPolicyEnd
(
detail
.
getPolicyEnd
());
policy
.
setInsuranceCompanyName
(
detail
.
getInsuranceCompanyName
());
policy
.
setInsuranceTypeName
(
detail
.
getInsuranceTypeName
());
tInsurancePolicyService
.
saveTInsurancePolicy
(
policy
);
//如果保单号不为空,将替换类型的保单号也全部更新
List
<
TInsuranceReplace
>
list
=
tInsuranceReplaceService
.
list
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
...
...
@@ -1982,6 +1985,306 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
ok
(
operatList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 登记发票号
*
* @param paramList
* @return {@link R< List<InsuranceRegisterInvoiceNoParam>>}
* @author licancan
*/
@Override
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
public
R
<
List
<
InsuranceRegisterInvoiceNoParam
>>
registeredInvoiceNo
(
List
<
InsuranceRegisterInvoiceNoParam
>
paramList
)
{
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
if
(
paramList
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
//获取当前登录人的商险办理地权限
LambdaQueryWrapper
<
TInsuranceAreaRes
>
areaQuery
=
new
LambdaQueryWrapper
<>();
areaQuery
.
eq
(
TInsuranceAreaRes:
:
getUserId
,
user
.
getId
()).
eq
(
TInsuranceAreaRes:
:
getStatus
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceAreaRes
>
insuranceAreaResList
=
tInsuranceAreaResService
.
list
(
areaQuery
);
if
(
CollectionUtils
.
isEmpty
(
insuranceAreaResList
))
{
return
R
.
failed
(
InsurancesConstants
.
NO_PERMISSION
);
}
List
<
InsuranceRegisterInvoiceNoParam
>
operateList
=
registeredInvoiceNoCheck
(
paramList
,
insuranceAreaResList
);
//需要修改的结果
List
<
InsuranceRegisterInvoiceNoParam
>
listSuccess
=
operateList
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
());
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceRegisterInvoiceNoParam
success
:
listSuccess
)
{
TInsuranceDetail
detail
=
success
.
getDetail
();
if
(
Optional
.
ofNullable
(
detail
).
isPresent
()){
//当两次发票号不一致时才更新
if
(!
success
.
getInvoiceNo
().
equals
(
detail
.
getInvoiceNo
())){
//只有当结算id存在的时候修改数据才会推给ekp
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
try
{
//推送修改信息
EkpUpdateParam
ekpUpdateParam
=
new
EkpUpdateParam
();
ekpUpdateParam
.
setFd_3b5bf02d3b8fc4
(
success
.
getPolicyStart
());
ekpUpdateParam
.
setFd_3b5bf02e1d47cc
(
success
.
getPolicyEnd
());
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
detail
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf030ab1a56
(
success
.
getInvoiceNo
());
ekpUpdateParam
.
setFd_3b5bf031b52314
(
detail
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
detail
.
getId
()
+
"_"
+
detail
.
getDefaultSettleId
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
"操作人:"
+
user
.
getNickname
()
+
";操作时间:"
+
LocalDateTime
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
))
+
";变更前发票号:"
+
detail
.
getInvoiceNo
()
+
";变更后发票号:"
+
success
.
getInvoiceNo
());
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
}
catch
(
Exception
e
){
log
.
error
(
"pushEkp error registeredInvoiceNo:"
,
e
.
getMessage
());
}
}
//设置发票号
detail
.
setInvoiceNo
(
success
.
getInvoiceNo
());
detailList
.
add
(
detail
);
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
this
.
updateBatchById
(
detailList
);
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REGISTERED_INVOICE
,
null
,
CommonConstants
.
ONE_INT
);
if
(
operateList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
operateList
=
null
;
}
return
R
.
ok
(
operateList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 购买类型转换
*
* @author licancan
* @param buyType
* @return {@link String}
*/
private
String
getBuyType
(
Integer
buyType
){
String
result
;
switch
(
buyType
){
case
1
:
result
=
"新增"
;
break
;
case
3
:
result
=
"批增"
;
break
;
case
4
:
result
=
"替换"
;
break
;
default
:
result
=
""
;
}
return
result
;
}
/**
* 已投保信息修改
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceInsuredParam>>}
*/
@Override
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
public
R
<
List
<
InsuranceInsuredParam
>>
updateInsuranceInsured
(
List
<
InsuranceInsuredParam
>
paramList
)
{
if
(
CollectionUtils
.
isEmpty
(
paramList
)){
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
if
(
paramList
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
//获取当前登录人的商险办理地权限
LambdaQueryWrapper
<
TInsuranceAreaRes
>
areaQuery
=
new
LambdaQueryWrapper
<>();
areaQuery
.
eq
(
TInsuranceAreaRes:
:
getUserId
,
user
.
getId
()).
eq
(
TInsuranceAreaRes:
:
getStatus
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceAreaRes
>
insuranceAreaResList
=
tInsuranceAreaResService
.
list
(
areaQuery
);
if
(
CollectionUtils
.
isEmpty
(
insuranceAreaResList
))
{
return
R
.
failed
(
InsurancesConstants
.
NO_PERMISSION
);
}
List
<
InsuranceInsuredParam
>
operateList
=
updateInsuranceInsuredCheck
(
paramList
,
insuranceAreaResList
);
//需要修改的结果
List
<
InsuranceInsuredParam
>
listSuccess
=
operateList
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
());
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceInsuredParam
success
:
listSuccess
)
{
TInsuranceDetail
detail
=
success
.
getDetail
();
if
(
Optional
.
ofNullable
(
detail
).
isPresent
()){
TInsuranceDetail
oldDetail
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
oldDetail
);
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyStartNew
())){
detail
.
setPolicyStart
(
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStartNew
()));
}
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyEndNew
())){
detail
.
setPolicyEnd
(
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEndNew
()));
}
if
(
Objects
.
nonNull
(
success
.
getBuyType
())){
detail
.
setBuyType
(
success
.
getBuyType
());
}
detailList
.
add
(
detail
);
//变更记录
tBusinessOperateService
.
saveModificationRecord
(
detail
.
getId
(),
oldDetail
,
detail
,
success
.
getReason
());
//只有当结算id存在的时候修改数据才会推给ekp
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
String
differenceKey
=
HrEquator
.
comparisonValue
(
oldDetail
,
detail
);
if
(!
Common
.
isEmpty
(
differenceKey
)){
try
{
//推送修改信息
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"操作人:"
+
user
.
getNickname
()
+
";操作时间:"
+
LocalDateTime
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
if
(!
oldDetail
.
getPolicyStart
().
toString
().
equals
(
success
.
getPolicyStartNew
()))
{
sb
.
append
(
";变更前保单开始时间:"
+
oldDetail
.
getPolicyStart
()
+
";变更后保单开始时间:"
+
success
.
getPolicyStartNew
());
}
if
(!
oldDetail
.
getPolicyEnd
().
toString
().
equals
(
success
.
getPolicyEndNew
()))
{
sb
.
append
(
";变更前保单结束时间:"
+
oldDetail
.
getPolicyEnd
()
+
";变更后保单结束时间:"
+
success
.
getPolicyEndNew
());
}
if
(!
oldDetail
.
getBuyType
().
equals
(
success
.
getBuyType
()))
{
sb
.
append
(
";变更前投保类型:"
+
getBuyType
(
oldDetail
.
getBuyType
())
+
";变更后投保类型:"
+
getBuyType
(
success
.
getBuyType
()));
}
if
(
StringUtils
.
isNotBlank
(
success
.
getReason
())){
sb
.
append
(
";变更原因:"
+
success
.
getReason
());
}
EkpUpdateParam
ekpUpdateParam
=
new
EkpUpdateParam
();
ekpUpdateParam
.
setFd_3b5bf02d3b8fc4
(
success
.
getPolicyStartNew
());
ekpUpdateParam
.
setFd_3b5bf02e1d47cc
(
success
.
getPolicyEndNew
());
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
success
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf031b52314
(
detail
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
detail
.
getId
()
+
"_"
+
detail
.
getDefaultSettleId
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
sb
.
toString
());
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
}
catch
(
Exception
e
){
log
.
error
(
"pushEkp error updateInsuranceInsured:"
,
e
.
getMessage
());
}
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
this
.
updateBatchById
(
detailList
);
}
//操作记录
//addOperate(detailList,user,InsurancesConstants.UPDATE_INSURED,null,CommonConstants.ONE_INT);
if
(
operateList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
operateList
=
null
;
}
return
R
.
ok
(
operateList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 已投保信息修改
*
* @param param
* @return {@link R<String>}
* @author licancan
*/
@Override
public
R
<
String
>
updateInsuranceInsuredById
(
InsuranceInsuredDetailParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
if
(
StringUtils
.
isBlank
(
param
.
getId
())){
return
R
.
failed
(
InsurancesConstants
.
ID_IS_EMPTY
);
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())
&&
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())
&&
Objects
.
isNull
(
param
.
getBuyType
())){
return
R
.
failed
(
InsurancesConstants
.
CHOOSE_ONE_OF_THREE
);
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyStart
())){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
return
R
.
failed
(
InsurancesConstants
.
POLICY_START_NEW_PARSE_ERROR
);
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyEnd
())){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
return
R
.
failed
(
InsurancesConstants
.
POLICY_END_NEW_PARSE_ERROR
);
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyStart
())
&&
StringUtils
.
isNotBlank
(
param
.
getPolicyEnd
())){
if
(!
LocalDateUtil
.
compareDate
(
param
.
getPolicyStart
(),
param
.
getPolicyEnd
())){
return
R
.
failed
(
InsurancesConstants
.
POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW
);
}
}
if
(
StringUtils
.
isBlank
(
param
.
getReason
())){
return
R
.
failed
(
InsurancesConstants
.
REASON_EMPTY
);
}
if
(
StringUtils
.
isNotBlank
(
param
.
getReason
())
&&
!
ValidityUtil
.
validate50
(
param
.
getReason
())){
return
R
.
failed
(
InsurancesConstants
.
REASON_MORE_THAN_50
);
}
TInsuranceDetail
byId
=
this
.
getById
(
param
.
getId
());
if
(!
Optional
.
ofNullable
(
byId
).
isPresent
()){
return
R
.
failed
(
InsurancesConstants
.
NOT_FOUND_INSURANCE_RECORD
);
}
if
(
byId
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
&&
param
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
){
return
R
.
failed
(
InsurancesConstants
.
REPLACE_NOT_ALLOW
);
}
if
(
byId
.
getBuyHandleStatus
()
!=
CommonConstants
.
THREE_INT
&&
byId
.
getBuyHandleStatus
()
!=
CommonConstants
.
FIVE_INT
){
return
R
.
failed
(
InsurancesConstants
.
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
);
}
TInsuranceDetail
old
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
byId
,
old
);
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyStart
())){
byId
.
setPolicyStart
(
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()));
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyEnd
())){
byId
.
setPolicyEnd
(
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()));
}
if
(
Objects
.
nonNull
(
param
.
getBuyType
())){
byId
.
setBuyType
(
param
.
getBuyType
());
}
//变更记录
tBusinessOperateService
.
saveModificationRecord
(
byId
.
getId
(),
old
,
byId
,
param
.
getReason
());
//只有当结算id存在的时候修改数据才会推给ekp
if
(
StringUtils
.
isNotBlank
(
byId
.
getDefaultSettleId
())){
String
differenceKey
=
HrEquator
.
comparisonValue
(
old
,
byId
);
if
(!
Common
.
isEmpty
(
differenceKey
)){
try
{
//推送修改信息
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"操作人:"
+
user
.
getNickname
()
+
";操作时间:"
+
LocalDateTime
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
)));
if
(!
old
.
getPolicyStart
().
toString
().
equals
(
param
.
getPolicyStart
()))
{
sb
.
append
(
";变更前保单开始时间:"
+
old
.
getPolicyStart
()
+
";变更后保单开始时间:"
+
param
.
getPolicyStart
());
}
if
(!
old
.
getPolicyEnd
().
toString
().
equals
(
param
.
getPolicyEnd
()))
{
sb
.
append
(
";变更前保单结束时间:"
+
old
.
getPolicyEnd
()
+
";变更后保单结束时间:"
+
param
.
getPolicyEnd
());
}
if
(!
old
.
getBuyType
().
equals
(
param
.
getBuyType
()))
{
sb
.
append
(
";变更前投保类型:"
+
getBuyType
(
old
.
getBuyType
())
+
";变更后投保类型:"
+
getBuyType
(
param
.
getBuyType
()));
}
if
(
StringUtils
.
isNotBlank
(
param
.
getReason
())){
sb
.
append
(
";变更原因:"
+
param
.
getReason
());
}
EkpUpdateParam
ekpUpdateParam
=
new
EkpUpdateParam
();
ekpUpdateParam
.
setFd_3b5bf02d3b8fc4
(
param
.
getPolicyStart
());
ekpUpdateParam
.
setFd_3b5bf02e1d47cc
(
param
.
getPolicyEnd
());
ekpUpdateParam
.
setFd_3b5bf02fa14596
(
getBuyType
(
param
.
getBuyType
()));
ekpUpdateParam
.
setFd_3b5bf031b52314
(
byId
.
getBuyStandard
());
ekpUpdateParam
.
setFd_3b5bf032d7a822
(
byId
.
getId
()
+
"_"
+
byId
.
getDefaultSettleId
());
ekpUpdateParam
.
setFd_3b5bf0b7b4c058
(
sb
.
toString
());
eKPInsuranceUtil
.
sendUpdateToEkp
(
ekpUpdateParam
);
}
catch
(
Exception
e
){
log
.
error
(
"pushEkp error updateInsuranceInsuredById:"
,
e
.
getMessage
());
}
}
}
this
.
updateById
(
byId
);
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 商险新增校验
*
...
...
@@ -2194,6 +2497,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
...
...
@@ -2512,8 +2820,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
...
...
@@ -2536,29 +2848,41 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
}
//保单开始日期、结束日期,由系统根据保单号关联查询投保状态为 "已投保" 的商险记录的任意一条
TInsuranceDetail
limitOne
=
getOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
//有效
/*.and(
wrapper -> wrapper.eq(TInsuranceDetail::getIsEffect,CommonConstants.ZERO_INT)
.or().isNull(TInsuranceDetail::getIsEffect)
)*/
//未过期
.
and
(
wrapper
->
wrapper
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
or
().
isNull
(
TInsuranceDetail:
:
getIsOverdue
)
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
//保单开始日期、结束日期,根据保单号到t_insurance_policy表查询的 1128需求调整改造
TInsurancePolicy
limitOne
=
tInsurancePolicyService
.
getOne
(
Wrappers
.<
TInsurancePolicy
>
query
().
lambda
()
.
eq
(
TInsurancePolicy:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsurancePolicy:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(!
Optional
.
ofNullable
(
limitOne
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
if
(
limitOne
.
getEnableFlag
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_FORBIDDEN
);
listResult
.
add
(
param
);
continue
;
}
if
(!
limitOne
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
if
(!
limitOne
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isFutureDate
(
limitOne
.
getPolicyEnd
().
toString
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_SHOULD_IS_FUTURE
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
compareDate
(
limitOne
.
getPolicyStart
().
toString
(),
limitOne
.
getPolicyEnd
().
toString
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_SHOULD_LESS_THAN_POLICY_END
);
listResult
.
add
(
param
);
continue
;
}
param
.
setPolicyStart
(
limitOne
.
getPolicyStart
());
param
.
setPolicyEnd
(
limitOne
.
getPolicyEnd
());
}
...
...
@@ -2634,18 +2958,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
if
(!
limitOne
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
if
(!
limitOne
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
}
// 结算月份 >= 派单月份(结算月 < 派单月份的记录予以拦截,并提示)
if
(!
LocalDateUtil
.
isDate
(
param
.
getSettleMonth
(),
LocalDateUtil
.
NORM_MONTH_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_PARSE_ERROR
);
...
...
@@ -2924,6 +3236,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
else
{
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
...
...
@@ -3023,6 +3340,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//所有校验通过后设置查到的结果
param
.
setDetail
(
detail
);
listSuccess
.
add
(
param
);
}
map
.
put
(
"listResult"
,
listResult
);
...
...
@@ -3037,7 +3356,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param paramList
* @return {@link Map<String, List<InsuranceRegisterParam>>}
*/
private
List
<
InsuranceRegisterParam
>
registeredPolicyPremiumCheck
(
List
<
InsuranceRegisterParam
>
paramList
){
private
List
<
InsuranceRegisterParam
>
registeredPolicyPremiumCheck
(
List
<
InsuranceRegisterParam
>
paramList
,
List
<
TInsuranceAreaRes
>
insuranceAreaResList
){
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()))
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
...
...
@@ -3103,14 +3422,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
//排除替换类型,解决保单保费挂靠问题
.
ne
(
TInsuranceDetail:
:
getBuyType
,
CommonConstants
.
FOUR_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
NOT_FOUND_INSERT_OR_BATCH_RECORD
);
continue
;
}
else
{
if
(
null
==
detail
.
getInsuranceHandleProvince
()
||
null
==
detail
.
getInsuranceHandleCity
()){
param
.
setErrorMessage
(
InsurancesConstants
.
HANDLE_PROVINCE_IS_NULL
);
continue
;
}
//商险办理地权限校验
boolean
b
=
insuranceAreaResList
.
stream
().
anyMatch
(
s
->
detail
.
getInsuranceHandleCity
().
equals
(
s
.
getCity
())
&&
detail
.
getInsuranceHandleProvince
().
equals
(
s
.
getProvince
()));
if
(!
b
){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
continue
;
}
LambdaQueryWrapper
<
TInsuranceEkp
>
ekpLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
ekpLambdaQueryWrapper
.
eq
(
TInsuranceEkp
::
getDetailId
,
detail
.
getId
()).
eq
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceEkp
>
ekpList
=
tInsuranceEkpService
.
list
(
ekpLambdaQueryWrapper
);
...
...
@@ -3130,22 +3462,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//批增类型,保单号
不
存在
//批增类型,保单号存在
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
TInsuranceDetail
batchPolicyNo
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
TInsurancePolicy
batchPolicyNo
=
tInsurancePolicyService
.
getOne
(
Wrappers
.<
TInsurancePolicy
>
query
().
lambda
()
.
eq
(
TInsurancePolicy:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsurancePolicy:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
batchPolicyNo
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_NOT_EXIST
);
continue
;
}
else
{
//批增类型,保单号已存在但是和派单时填写的不一致
if
(!
detail
.
getPolicyNo
().
equals
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_ERROR
);
//保单表中存在保单号,判断保险公司和险种是否一致
if
(!
batchPolicyNo
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
continue
;
}
if
(!
batchPolicyNo
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
continue
;
}
}
...
...
@@ -3155,10 +3490,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//新增类型,保单号已存在但是和填写的保险公司不一致
if
(
detail
.
getBuyType
()
==
CommonConstants
.
ONE_INT
){
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
TInsuranceDetail
addPolicyNo
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
TInsurancePolicy
addPolicyNo
=
tInsurancePolicyService
.
getOne
(
Wrappers
.<
TInsurancePolicy
>
query
().
lambda
()
.
eq
(
TInsurancePolicy:
:
getPolicyNo
,
param
.
getPolicyNo
())
.
eq
(
TInsurancePolicy:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(
Optional
.
ofNullable
(
addPolicyNo
).
isPresent
()){
...
...
@@ -3256,47 +3590,283 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
//所有校验通过后设置查到的结果
param
.
setDetail
(
detail
);
}
return
paramList
;
}
/**
* 根据区域名称获取区域id
*
* @author licancan
* @param areaString
* @return {@link String}
*/
private
String
getRedisAreaValue
(
String
areaString
)
{
return
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_VALUE
+
areaString
));
return
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
/**
*
操作记录(无审批remark)
*
登记发票号校验
*
* @author licancan
* @param detailList 商险明细集合
* @param user 登录用户
* @param operateDesc 操作描述
* @param displayFlag 是否显示 0不显示/1显示
* @return void
* @param paramList
* @param insuranceAreaResList 办理地权限
* @return {@link List<InsuranceRegisterInvoiceNoParam>}
*/
public
void
addOperate
(
List
<
TInsuranceDetail
>
detailList
,
YifuUser
user
,
String
operateDesc
,
String
remark
,
Integer
displayFlag
){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
detail
:
detailList
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setId
(
String
.
valueOf
(
UUID
.
randomUUID
()).
replaceAll
(
"-"
,
""
));
operate
.
setRemark
(
remark
);
operate
.
setDisplayFlag
(
displayFlag
);
operate
.
setInsuranceDetailId
(
detail
.
getId
());
operate
.
setOperateDesc
(
operateDesc
);
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operateList
.
add
(
operate
);
private
List
<
InsuranceRegisterInvoiceNoParam
>
registeredInvoiceNoCheck
(
List
<
InsuranceRegisterInvoiceNoParam
>
paramList
,
List
<
TInsuranceAreaRes
>
insuranceAreaResList
){
List
<
InsuranceRegisterInvoiceNoParam
>
collect
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
for
(
InsuranceRegisterInvoiceNoParam
param
:
collect
)
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
continue
;
}
tInsuranceOperateService
.
saveOperateInfo
(
operateList
);
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
continue
;
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
continue
;
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInvoiceNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INVOICE_NO_EMPTY
);
continue
;
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
//排除替换类型
.
ne
(
TInsuranceDetail:
:
getBuyType
,
CommonConstants
.
FOUR_INT
)
//只查询已投保和已减员的
.
in
(
TInsuranceDetail:
:
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
,
CommonConstants
.
FIVE_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
NOT_FOUND_INSERT_OR_BATCH_RECORD
);
continue
;
}
else
{
if
(
null
==
detail
.
getInsuranceHandleProvince
()
||
null
==
detail
.
getInsuranceHandleCity
()){
param
.
setErrorMessage
(
InsurancesConstants
.
HANDLE_PROVINCE_IS_NULL
);
continue
;
}
//商险办理地权限校验
boolean
b
=
insuranceAreaResList
.
stream
().
anyMatch
(
s
->
detail
.
getInsuranceHandleCity
().
equals
(
s
.
getCity
())
&&
detail
.
getInsuranceHandleProvince
().
equals
(
s
.
getProvince
()));
if
(!
b
){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
continue
;
}
if
(
detail
.
getBuyHandleStatus
()
!=
CommonConstants
.
THREE_INT
&&
detail
.
getBuyHandleStatus
()
!=
CommonConstants
.
FIVE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
CURRENT_STATUS_NOT_REGISTER_INVOICE_NO
);
continue
;
}
}
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
//所有校验通过后设置查到的结果
param
.
setDetail
(
detail
);
}
return
collect
;
}
public
static
final
List
<
String
>
BUY_TYPE
=
Arrays
.
asList
(
InsurancesConstants
.
INSERT
,
InsurancesConstants
.
BATCH_INSERT
);
/**
* 已投保信息修改校验
*
* @author licancan
* @param paramList
* @param insuranceAreaResList 办理地权限
* @return {@link List<InsuranceInsuredParam>}
*/
private
List
<
InsuranceInsuredParam
>
updateInsuranceInsuredCheck
(
List
<
InsuranceInsuredParam
>
paramList
,
List
<
TInsuranceAreaRes
>
insuranceAreaResList
){
List
<
InsuranceInsuredParam
>
collect
=
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
for
(
InsuranceInsuredParam
param
:
collect
)
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
continue
;
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
continue
;
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStartNew
())
&&
StringUtils
.
isBlank
(
param
.
getPolicyEndNew
())
&&
StringUtils
.
isBlank
(
param
.
getBuyTypeStr
())){
param
.
setErrorMessage
(
InsurancesConstants
.
CHOOSE_ONE_OF_THREE
);
continue
;
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyStartNew
())){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStartNew
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NEW_PARSE_ERROR
);
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyEndNew
())){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEndNew
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NEW_PARSE_ERROR
);
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyStartNew
())
&&
StringUtils
.
isNotBlank
(
param
.
getPolicyEndNew
())){
if
(!
LocalDateUtil
.
compareDate
(
param
.
getPolicyStartNew
(),
param
.
getPolicyEndNew
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW
);
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getBuyTypeStr
())){
if
(!
BUY_TYPE
.
contains
(
param
.
getBuyTypeStr
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_TYPE_ERROR_NEW
);
continue
;
}
else
{
if
(
InsurancesConstants
.
INSERT
.
equals
(
param
.
getBuyTypeStr
())){
param
.
setBuyType
(
CommonConstants
.
ONE_INT
);
}
if
(
InsurancesConstants
.
BATCH_INSERT
.
equals
(
param
.
getBuyTypeStr
())){
param
.
setBuyType
(
CommonConstants
.
THREE_INT
);
}
}
}
if
(
StringUtils
.
isBlank
(
param
.
getReason
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REASON_EMPTY
);
continue
;
}
if
(
StringUtils
.
isNotBlank
(
param
.
getReason
())
&&
!
ValidityUtil
.
validate50
(
param
.
getReason
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REASON_MORE_THAN_50
);
continue
;
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail
detail
=
this
.
baseMapper
.
selectOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
())
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
())
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
())
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
())
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
//只查询已投保和已减员的
.
in
(
TInsuranceDetail:
:
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
,
CommonConstants
.
FIVE_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
NOT_FOUND_INSURANCE_RECORD
);
continue
;
}
else
{
if
(
null
==
detail
.
getInsuranceHandleProvince
()
||
null
==
detail
.
getInsuranceHandleCity
()){
param
.
setErrorMessage
(
InsurancesConstants
.
HANDLE_PROVINCE_IS_NULL
);
continue
;
}
//商险办理地权限校验
boolean
b
=
insuranceAreaResList
.
stream
().
anyMatch
(
s
->
detail
.
getInsuranceHandleCity
().
equals
(
s
.
getCity
())
&&
detail
.
getInsuranceHandleProvince
().
equals
(
s
.
getProvince
()));
if
(!
b
){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
continue
;
}
//判断是否是已投保状态或已减员
if
(
detail
.
getBuyHandleStatus
()
!=
CommonConstants
.
THREE_INT
&&
detail
.
getBuyHandleStatus
()
!=
CommonConstants
.
FIVE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
);
continue
;
}
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
&&
Objects
.
nonNull
(
param
.
getBuyType
())
&&
param
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_NOT_ALLOW
);
continue
;
}
}
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
//所有校验通过后设置查到的结果
param
.
setDetail
(
detail
);
}
return
collect
;
}
/**
* 根据区域名称获取区域id
*
* @author licancan
* @param areaString
* @return {@link String}
*/
private
String
getRedisAreaValue
(
String
areaString
)
{
return
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_VALUE
+
areaString
));
}
/**
* 操作记录(无审批remark)
*
* @author licancan
* @param detailList 商险明细集合
* @param user 登录用户
* @param operateDesc 操作描述
* @param displayFlag 是否显示 0不显示/1显示
* @return void
*/
public
void
addOperate
(
List
<
TInsuranceDetail
>
detailList
,
YifuUser
user
,
String
operateDesc
,
String
remark
,
Integer
displayFlag
){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
detail
:
detailList
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setId
(
String
.
valueOf
(
UUID
.
randomUUID
()).
replaceAll
(
"-"
,
""
));
operate
.
setRemark
(
remark
);
operate
.
setDisplayFlag
(
displayFlag
);
operate
.
setInsuranceDetailId
(
detail
.
getId
());
operate
.
setOperateDesc
(
operateDesc
);
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operateList
.
add
(
operate
);
}
tInsuranceOperateService
.
saveOperateInfo
(
operateList
);
}
}
...
...
@@ -3617,7 +4187,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*
* @author zhaji
* @param param 查询参数
* @return {@link List<
InsuranceRefundListVo
>}
* @return {@link List<
InsuranceRefundListVo
>}
*/
@Override
public
R
getInsuranceRefundList
(
InsuranceRefundParam
param
)
{
...
...
@@ -3629,9 +4199,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
/*if(insuranceRefundList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
return R.failed(InsurancesConstants.EXPORT_TOO_LONG);
}*/
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
InsuranceRefundListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
...
...
@@ -3652,6 +4220,51 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
ok
(
insuranceRefundList
);
}
/**
* 减员退费分页列表
*
* @param page 分页信息
* @param param 筛选条件
* @param mId 菜单Id
* @return {@link R}
* @author zhangyun
*/
@Override
public
R
getInsuranceRefundMoneyPageList
(
Page
<
RefundListVo
>
page
,
InsuranceRefundHandlingParam
param
,
String
mId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isNotNull
(
mId
))
{
param
.
setMId
(
mId
);
}
param
.
setCreateBy
(
user
.
getId
());
menuUtil
.
setAuthSql
(
user
,
param
);
if
(
Common
.
isNotNull
(
param
.
getAuthSql
())
&&
param
.
getAuthSql
().
contains
(
"1=2 CONCAT"
))
{
param
.
setAuthSql
(
param
.
getAuthSql
().
replace
(
"1=2 CONCAT"
,
"CONCAT"
));
}
IPage
<
RefundListVo
>
insuranceRefundMoneyPageList
=
this
.
baseMapper
.
getInsuranceRefundMoneyPageList
(
page
,
param
);
return
R
.
ok
(
insuranceRefundMoneyPageList
);
}
/**
* 减员退费不分页列表
*
* @param param 筛选条件
* @return {@link R}
* @author zhangyun
*/
@Override
public
R
getInsuranceRefundMoneyList
(
InsuranceRefundHandlingParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
param
.
setCreateBy
(
user
.
getId
());
menuUtil
.
setAuthSql
(
user
,
param
);
if
(
Common
.
isNotNull
(
param
.
getAuthSql
())
&&
param
.
getAuthSql
().
contains
(
"1=2 CONCAT"
))
{
param
.
setAuthSql
(
param
.
getAuthSql
().
replace
(
"1=2 CONCAT"
,
"CONCAT"
));
}
List
<
RefundListVo
>
insuranceRefundMoneyList
=
this
.
baseMapper
.
getInsuranceRefundMoneyList
(
param
);
return
R
.
ok
(
insuranceRefundMoneyList
);
}
/**
* 减员办理列表分页查询
*
...
...
@@ -3694,7 +4307,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*
* @author zhaji
* @param param 查询参数
* @return {@link List<
RefundExportListVo
>}
* @return {@link List<
RefundExportListVo
>}
*/
@Override
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
...
...
@@ -4863,27 +5476,45 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
/**
* 更新减员退费
*
* @author zha
ji
* @param paramList
* @author zha
ngyun
* @param paramList
导入参数
* @return {@link R}
*/
@Override
public
R
updateRefundMoney
(
List
<
RefundMoneyParam
>
paramList
)
{
public
R
updateRefundMoney
(
List
<
RefundMoney
Update
Param
>
paramList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
refundMoneyCheck
(
paramList
);
List
<
RefundMoneyParam
>
successList
=
map
.
get
(
InsurancesConstants
.
SUCCESS_LIST
);
//获取当前登录人的商险办理地权限
LambdaQueryWrapper
<
TInsuranceAreaRes
>
areaQuery
=
new
LambdaQueryWrapper
<>();
areaQuery
.
eq
(
TInsuranceAreaRes:
:
getUserId
,
user
.
getId
()).
eq
(
TInsuranceAreaRes:
:
getStatus
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceAreaRes
>
insuranceAreaResList
=
tInsuranceAreaResService
.
list
(
areaQuery
);
if
(
CollectionUtils
.
isEmpty
(
insuranceAreaResList
))
{
return
R
.
failed
(
InsurancesConstants
.
NO_PERMISSION
);
}
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
map
=
refundMoneyCheck
(
paramList
,
insuranceAreaResList
);
List
<
RefundMoneyUpdateParam
>
successList
=
map
.
get
(
InsurancesConstants
.
SUCCESS_LIST
);
List
<
TInsuranceOperate
>
insuranceOperateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
RefundMoneyParam
param
:
successList
)
{
for
(
RefundMoney
Update
Param
param
:
successList
)
{
TInsuranceRefund
insuranceRefund
=
new
TInsuranceRefund
();
insuranceRefund
.
setI
nsDetailI
d
(
param
.
getId
());
insuranceRefund
.
setId
(
param
.
getId
());
insuranceRefund
.
setRefundMoney
(
new
BigDecimal
(
param
.
getRefundMoney
()));
insuranceRefund
.
setReduceHandleStatus
(
CommonConstants
.
FOUR_INT
);
insuranceRefund
.
setCreateBy
(
user
.
getId
());
insuranceRefund
.
setCreateName
(
user
.
getNickname
());
insuranceRefund
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceRefund
.
setUpdateBy
(
user
.
getId
());
insuranceRefund
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceRefundService
.
updateRefundMoney
(
insuranceRefund
);
//新增操作记录
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
param
.
getInsDetailId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setDisplayFlag
(
CommonConstants
.
ONE_INT
);
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
REGISTERED_SURRENDER_EXPENSE
);
insuranceOperateList
.
add
(
insuranceOperate
);
}
}
tInsuranceOperateService
.
saveBatch
(
insuranceOperateList
);
return
R
.
ok
(
map
.
get
(
InsurancesConstants
.
ERROR_LIST
));
}
...
...
@@ -4998,6 +5629,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
one
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
...
...
@@ -5085,57 +5722,112 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param paramList 变更列表
* @return {@link R}
*/
public
Map
<
String
,
List
<
RefundMoneyParam
>>
refundMoneyCheck
(
List
<
RefundMoneyParam
>
paramList
){
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
new
HashMap
<>(
16
);
List
<
RefundMoneyParam
>
errorList
=
new
ArrayList
<>();
List
<
RefundMoneyParam
>
successList
=
new
ArrayList
<>();
for
(
RefundMoneyParam
param
:
paramList
)
{
String
refundMoney
=
param
.
getRefundMoney
();
String
policyNo
=
param
.
getPolicyNo
();
String
empName
=
param
.
getEmpName
();
String
empIdcardNo
=
param
.
getEmpIdcardNo
();
//退费金额
if
(
StringUtils
.
isBlank
(
refundMoney
)){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_NOT_EMPTY
);
public
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
refundMoneyCheck
(
List
<
RefundMoneyUpdateParam
>
paramList
,
List
<
TInsuranceAreaRes
>
insuranceAreaResList
){
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
map
=
new
HashMap
<>(
16
);
List
<
RefundMoneyUpdateParam
>
errorList
=
new
ArrayList
<>();
List
<
RefundMoneyUpdateParam
>
successList
=
new
ArrayList
<>();
for
(
RefundMoneyUpdateParam
param
:
paramList
)
{
//姓名
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//
保单
号
if
(
StringUtils
.
isBlank
(
p
olicyNo
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO
_EMPTY
);
//
身份证
号
if
(
StringUtils
.
isBlank
(
p
aram
.
getEmpIdcardNo
()
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT
_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//姓名
if
(
StringUtils
.
isBlank
(
empName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
//保险公司
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_INSURANCE_COMPANY_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//身份证号
if
(
StringUtils
.
isBlank
(
empIdcardNo
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
//险种名称
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_INSURANCE_TYPE_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//保单开始时间为空
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_INSURANCE_START_DATE_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//保单开始时间格式不正确
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//保单结束时间
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_INSURANCE_END_DATE_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validateMoney
(
refundMoney
)){
//保单结束时间格式不正确
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//购买标准
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_BUY_STANDARD_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//退费金额
if
(
StringUtils
.
isBlank
(
param
.
getRefundMoney
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
if
(!
ValidityUtil
.
validateMoney
(
param
.
getRefundMoney
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_PARSE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//必填格式校通过后查询对应的保单信息
TInsuranceRefundDetail
refundDetail
=
new
TInsuranceRefundDetail
();
refundDetail
.
setEmpName
(
empName
);
refundDetail
.
setEmpIdcardNo
(
empIdcardNo
);
refundDetail
.
setPolicyNo
(
policyNo
);
TInsuranceRefundDetail
tInsuranceRefundDetail
=
this
.
baseMapper
.
selectRefundDetail
(
refundDetail
);
if
(
Common
.
isEmpty
(
tInsuranceRefundDetail
)){
InsuranceRefundVo
insuranceRefund
=
this
.
baseMapper
.
selectRefundDetailId
(
param
);
if
(
Common
.
isEmpty
(
insuranceRefund
)){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_IS_NULL
);
errorList
.
add
(
param
);
continue
;
}
else
{
if
(
null
==
insuranceRefund
.
getInsuranceHandleProvince
()
||
null
==
insuranceRefund
.
getInsuranceHandleCity
()){
param
.
setErrorMessage
(
InsurancesConstants
.
HANDLE_PROVINCE_IS_NULL
);
errorList
.
add
(
param
);
continue
;
}
//商险办理地权限校验
boolean
b
=
insuranceAreaResList
.
stream
().
anyMatch
(
s
->
insuranceRefund
.
getInsuranceHandleCity
().
equals
(
s
.
getCity
())
&&
insuranceRefund
.
getInsuranceHandleProvince
().
equals
(
s
.
getProvince
()));
if
(!
b
){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
errorList
.
add
(
param
);
continue
;
}
else
{
String
refundMoney
=
param
.
getRefundMoney
();
if
(!
BigDecimalUtils
.
isNullOrZero
(
insuranceRefund
.
getRefundMoney
())
&&
insuranceRefund
.
getRefundMoney
().
compareTo
(
new
BigDecimal
(
refundMoney
))
==
CommonConstants
.
ZERO_INT
){
continue
;
}
}
}
param
.
setId
(
tInsuranceRefundDetail
.
getInsDetailId
());
param
.
setId
(
insuranceRefund
.
getId
());
param
.
setInsDetailId
(
insuranceRefund
.
getInsDetailId
());
successList
.
add
(
param
);
}
map
.
put
(
InsurancesConstants
.
ERROR_LIST
,
errorList
);
...
...
@@ -5176,6 +5868,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//项目所属权限验证
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
deptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
...
...
@@ -5637,6 +6335,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//保单开始日期
String
policyStart
=
param
.
getPolicyStart
();
if
(
StringUtils
.
isBlank
(
policyStart
)){
errorList
.
add
(
param
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
continue
;
}
...
...
@@ -5663,6 +6362,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 保单开始日期格式校验
if
(!
LocalDateUtil
.
isDate
(
policyStart
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
// 保单结束日期格式校验
...
...
@@ -5743,6 +6443,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//旧项目ID不在当前权限范围内
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
oldDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
...
...
@@ -5897,14 +6603,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据当前登录人获取其拥有的项目列表权限
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
List
<
Dept
>
deptList
=
new
ArrayList
<>(
16
);
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
deptNoList
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
SetInfoVo
data
=
setInfoByCodes
.
getData
();
Map
<
String
,
ProjectSetInfoVo
>
projectSetInfoVoMap
=
data
.
getProjectSetInfoVoMap
();
for
(
String
deptNo
:
deptNoList
)
{
ProjectSetInfoVo
projectSetInfoVo
=
projectSetInfoVoMap
.
get
(
deptNo
);
if
(!
Common
.
isEmpty
(
projectSetInfoVo
)){
deptList
.
add
(
new
Dept
(
projectSetInfoVo
.
getDepartNo
(),
projectSetInfoVo
.
getDepartName
()));
if
(
CollectionUtils
.
isNotEmpty
(
deptNoList
)){
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
deptNoList
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
SetInfoVo
data
=
setInfoByCodes
.
getData
();
if
(
Optional
.
ofNullable
(
data
).
isPresent
()){
Map
<
String
,
ProjectSetInfoVo
>
projectSetInfoVoMap
=
data
.
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isNotEmpty
(
projectSetInfoVoMap
)){
for
(
String
deptNo
:
deptNoList
)
{
ProjectSetInfoVo
projectSetInfoVo
=
projectSetInfoVoMap
.
get
(
deptNo
);
if
(!
Common
.
isEmpty
(
projectSetInfoVo
)){
deptList
.
add
(
new
Dept
(
projectSetInfoVo
.
getDepartNo
(),
projectSetInfoVo
.
getDepartName
()));
}
}
}
}
}
}
...
...
@@ -5935,8 +6647,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
"无可出险的保单"
);
}
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
for
(
TInsuranceDetail
tInsuranceDetail
:
list
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
tInsuranceDetail
.
getId
())
.
set
(
TInsuranceDetail
::
getIsUse
,
CommonConstants
.
ONE_INT
)
...
...
@@ -5955,6 +6667,41 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
/**
* 紧急出险
*
* @param paramList 商险明细id集合
* @return {@link R}
* @author licancan
*/
@Override
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
public
R
urgentUpdateIsUseByIds
(
List
<
String
>
paramList
)
{
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
paramList
)){
paramList
.
stream
().
forEach
(
e
->{
TInsuranceDetail
byId
=
this
.
getById
(
e
);
if
(
Optional
.
ofNullable
(
byId
).
isPresent
()){
if
(
byId
.
getIsUse
()
!=
CommonConstants
.
ONE_INT
){
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
byId
.
setIsUse
(
CommonConstants
.
ONE_INT
);
byId
.
setUpdateTime
(
LocalDateTime
.
now
());
updateById
(
byId
);
operate
.
setOperateDesc
(
InsurancesConstants
.
URGENT_UPDATE_IS_USE
);
operate
.
setCreateName
(
InsurancesConstants
.
SYSTEM_TRIGGER
);
operate
.
setInsuranceDetailId
(
byId
.
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紧急出险成功"
);
}
/**
* 根据身份证查询商险列表
*
...
...
@@ -6063,35 +6810,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< String>}
*/
public
List
<
String
>
getDeptNoList
(
YifuUser
user
){
//todo 根据登录人获取其项目权限列表
List
<
String
>
deptList
=
new
ArrayList
<>(
16
);
String
id
=
user
.
getId
();
//周日琴12,徐燕13
if
(
CommonConstants
.
TWELVE_STRING
.
equals
(
id
)){
deptList
.
add
(
"A0001"
);
deptList
.
add
(
"皖M02002"
);
deptList
.
add
(
"皖A12345678"
);
deptList
.
add
(
"皖B29203"
);
deptList
.
add
(
"皖AFA10M"
);
deptList
.
add
(
"皖AFA11F"
);
deptList
.
add
(
"皖M02023"
);
deptList
.
add
(
"皖M02045"
);
}
else
if
(
CommonConstants
.
THIRTEEN_STRING
.
equals
(
id
)){
deptList
.
add
(
"皖A12345678"
);
deptList
.
add
(
"皖B29203"
);
deptList
.
add
(
"皖M02023"
);
deptList
.
add
(
"皖M02002"
);
}
else
{
R
<
TSettleDomainListVo
>
tSettleDomainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
if
(
null
!=
tSettleDomainListVoR
&&
tSettleDomainListVoR
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
tSettleDomainListVoR
.
getData
()))
{
TSettleDomainListVo
data
=
tSettleDomainListVoR
.
getData
();
List
<
TSettleDomainSelectVo
>
listSelectVO
=
data
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
tSettleDomainSelectVo
:
listSelectVO
)
{
if
(
Common
.
isNotNull
(
tSettleDomainSelectVo
.
getDepartNo
()))
{
deptList
.
add
(
tSettleDomainSelectVo
.
getDepartNo
());
}
try
{
R
<
TSettleDomainListVo
>
settleDomainList
=
archivesDaprUtil
.
getSettleDomainIdsByUserId
(
user
.
getId
());
if
(
Common
.
isNotNull
(
settleDomainList
)
&&
settleDomainList
.
getCode
()
==
CommonConstants
.
SUCCESS
){
TSettleDomainListVo
data
=
settleDomainList
.
getData
();
if
(
Optional
.
ofNullable
(
data
).
isPresent
()){
deptList
=
data
.
getDeptNos
();
}
}
}
catch
(
Exception
e
){
log
.
error
(
"查询项目信息出错:"
+
e
);
}
return
deptList
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsurancePolicyServiceImpl.java
0 → 100644
View file @
4670c7a4
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
insurance
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePolicyMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TBusinessOperateService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePolicyService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListEditParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsurancePolicyDetailVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Optional
;
/**
* @author licancan
* @description 针对表【t_insurance_policy(保单号对应起止时间表)】的数据库操作Service实现
* @date 2022-12-07 16:40:16
*/
@Service
public
class
TInsurancePolicyServiceImpl
extends
ServiceImpl
<
TInsurancePolicyMapper
,
TInsurancePolicy
>
implements
TInsurancePolicyService
{
@Resource
private
TBusinessOperateService
tBusinessOperateService
;
@Resource
@Lazy
private
TInsuranceDetailService
tInsuranceDetailService
;
/**
* 保单号对应起止保时间分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return {@link IPage <TInsurancePolicy>}
* @author licancan
*/
@Override
public
IPage
<
TInsurancePolicy
>
pageDiy
(
Page
page
,
InsurancePolicyListParam
param
)
{
IPage
<
TInsurancePolicy
>
list
=
this
.
baseMapper
.
getInsurancePolicyListPage
(
page
,
param
);
// 购买月数
if
(
CollectionUtils
.
isNotEmpty
(
list
.
getRecords
())){
list
.
getRecords
().
stream
().
forEach
(
e
->{
e
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
e
.
getPolicyStart
().
toString
(),
e
.
getPolicyEnd
().
toString
()));
});
}
return
list
;
}
/**
* 保单号对应起止保时间列表(不分页)
*
* @param param
* @return {@link List<TInsurancePolicy>}
* @author licancan
*/
@Override
public
List
<
TInsurancePolicy
>
getInsurancePolicyList
(
InsurancePolicyListParam
param
)
{
List
<
TInsurancePolicy
>
list
=
this
.
baseMapper
.
getInsurancePolicyList
(
param
);
return
list
;
}
/**
* 通过id查询详情
*
* @param id
* @return {@link R<TInsurancePolicyDetailVO>}
* @author licancan
*/
@Override
public
R
<
TInsurancePolicyDetailVO
>
getDetailById
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"id不能为空"
);
}
TInsurancePolicy
byId
=
getById
(
id
);
if
(!
Optional
.
ofNullable
(
byId
).
isPresent
()){
return
R
.
failed
(
"数据不存在"
);
}
TInsurancePolicyDetailVO
vo
=
new
TInsurancePolicyDetailVO
();
BeanCopyUtils
.
copyProperties
(
byId
,
vo
);
List
<
TBusinessOperate
>
list
=
tBusinessOperateService
.
getOperateListByBusinessId
(
id
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
vo
.
setOperateList
(
list
);
}
return
R
.
ok
(
vo
);
}
/**
* 新增,内部调用的,保证调用方把该传的字段都传了(保单号、起止保时间、保险公司、险种)
*
* @param policy
* @return {@link R}
* @author licancan
*/
@Override
public
R
saveTInsurancePolicy
(
TInsurancePolicy
policy
)
{
if
(
StringUtils
.
isNotEmpty
(
policy
.
getPolicyNo
())){
TInsurancePolicy
one
=
this
.
getOne
(
Wrappers
.<
TInsurancePolicy
>
query
().
lambda
()
.
eq
(
TInsurancePolicy:
:
getPolicyNo
,
policy
.
getPolicyNo
())
.
eq
(
TInsurancePolicy:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(!
Optional
.
ofNullable
(
one
).
isPresent
()){
this
.
save
(
policy
);
//第一次新增插入变更记录表为insert,前端会将insert渲染为批量导入
TBusinessOperate
operate
=
new
TBusinessOperate
();
operate
.
setBusinessId
(
policy
.
getId
());
operate
.
setDifferenceInfo
(
"insert"
);
tBusinessOperateService
.
save
(
operate
);
}
}
return
R
.
ok
();
}
/**
* 修改保单号对应起止保时间
*
* @param param
* @return {@link R}
* @author licancan
*/
@Override
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
public
R
updateInsurancePolicy
(
InsurancePolicyListEditParam
param
)
{
TInsurancePolicy
tInsurancePolicy
=
this
.
baseMapper
.
selectById
(
param
.
getId
());
if
(!
Optional
.
ofNullable
(
tInsurancePolicy
).
isPresent
()){
return
R
.
failed
(
"数据不存在"
);
}
if
(!
param
.
getPolicyNo
().
equals
(
tInsurancePolicy
.
getPolicyNo
())){
return
R
.
failed
(
"保单号不能修改"
);
}
//操作日志
tBusinessOperateService
.
saveModificationRecord
(
param
.
getId
(),
tInsurancePolicy
,
param
,
null
);
BeanCopyUtils
.
copyProperties
(
param
,
tInsurancePolicy
);
updateById
(
tInsurancePolicy
);
return
R
.
ok
();
}
/**
* 删除保单号对应起止保时间
*
* @param id 主键
* @return {@link R}
* @author licancan
*/
@Override
public
R
deleteInsurancePolicy
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"id不能为空"
);
}
TInsurancePolicy
byId
=
getById
(
id
);
if
(!
Optional
.
ofNullable
(
byId
).
isPresent
()){
return
R
.
failed
(
"数据不存在"
);
}
//检验保单号是否被使用,被使用不能删除
TInsuranceDetail
one
=
tInsuranceDetailService
.
getOne
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getPolicyNo
,
byId
.
getPolicyNo
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
return
R
.
failed
(
"存在正常关联的承保信息,禁止删除!"
);
}
LambdaUpdateWrapper
<
TInsurancePolicy
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsurancePolicy:
:
getId
,
id
)
.
set
(
TInsurancePolicy:
:
getDeleteFlag
,
CommonConstants
.
ONE_INT
);
update
(
updateWrapper
);
return
R
.
ok
();
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TBusinessOperateMapper.xml
0 → 100644
View file @
4670c7a4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TBusinessOperateMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TBusinessOperate"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"businessId"
column=
"BUSINESS_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"oldInfo"
column=
"OLD_INFO"
jdbcType=
"VARCHAR"
/>
<result
property=
"newInfo"
column=
"NEW_INFO"
jdbcType=
"VARCHAR"
/>
<result
property=
"differenceInfo"
column=
"DIFFERENCE_INFO"
jdbcType=
"VARCHAR"
/>
<result
property=
"remark"
column=
"REMARK"
jdbcType=
"VARCHAR"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,BUSINESS_ID,OPERATE_DESC,
REMARK,CREATE_BY,CREATE_NAME,
CREATE_TIME,UPDATE_BY,
UPDATE_TIME
</sql>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
4670c7a4
...
...
@@ -278,6 +278,12 @@
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
<if
test=
"param.buyStandardMin != null"
>
AND a.BUY_STANDARD
<![CDATA[ >= ]]>
#{param.buyStandardMin}
</if>
<if
test=
"param.buyStandardMax != null"
>
AND a.BUY_STANDARD
<![CDATA[ <= ]]>
#{param.buyStandardMax}
</if>
ORDER BY a.BUY_HANDLE_STATUS,a.CREATE_TIME DESC
</select>
<!--通过id查询商险信息-->
...
...
@@ -324,7 +330,8 @@
a.REMARK as remark,
a.BILLING_TYPE as billingType,
a.DEFAULT_SETTLE_ID as defaultSettleId,
a.RATE as rate
a.RATE as rate,
a.REFUND_ID as refundId
from t_insurance_detail a
left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID
where a.ID = #{id}
...
...
@@ -351,6 +358,7 @@
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.ACTUAL_PREMIUM as actualPremium,
a.SETTLE_MONTH as settleMonth,
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
...
...
@@ -384,6 +392,7 @@
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.ACTUAL_PREMIUM as actualPremium,
a.SETTLE_MONTH as settleMonth,
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
...
...
@@ -418,6 +427,12 @@
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
<if
test=
"param.buyStandardMin != null"
>
AND a.BUY_STANDARD
<![CDATA[ >= ]]>
#{param.buyStandardMin}
</if>
<if
test=
"param.buyStandardMax != null"
>
AND a.BUY_STANDARD
<![CDATA[ <= ]]>
#{param.buyStandardMax}
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<!--批量更新保单号-->
...
...
@@ -487,10 +502,10 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
param.policyEnd == null and param.policyEnd.trim() == ''
"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
(param.policyEnd == null or param.policyEnd.trim() == '')
"
>
AND a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00')
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
param.policyStart == null and param.policyStart.trim() == ''
"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
(param.policyStart == null or param.policyStart.trim() == '')
"
>
AND a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
...
...
@@ -581,10 +596,10 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
param.policyEnd == null and param.policyEnd.trim() == ''
"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
(param.policyEnd == null or param.policyEnd.trim() == '')
"
>
AND a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00')
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
param.policyStart == null and param.policyStart.trim() == ''
"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
(param.policyStart == null or param.policyStart.trim() == '')
"
>
AND a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
...
...
@@ -652,10 +667,10 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
param.policyEnd == null and param.policyEnd.trim() == ''
"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
(param.policyEnd == null or param.policyEnd.trim() == '')
"
>
AND a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00')
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
param.policyStart == null and param.policyStart.trim() == ''
"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
(param.policyStart == null or param.policyStart.trim() == '')
"
>
AND a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
...
...
@@ -732,10 +747,10 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
param.policyEnd == null and param.policyEnd.trim() == ''
"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
( param.policyEnd == null or param.policyEnd.trim() == '' )
"
>
AND a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00')
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
param.policyStart == null and param.policyStart.trim() == ''
"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
(param.policyStart == null or param.policyStart.trim() == '')
"
>
AND a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
...
...
@@ -808,10 +823,10 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and a.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
param.policyEnd == null and param.policyEnd.trim() == ''
"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and
(param.policyEnd == null or param.policyEnd.trim() == '')
"
>
AND a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00')
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
param.policyStart == null and param.policyStart.trim() == ''
"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and
(param.policyStart == null or param.policyStart.trim() == '')
"
>
AND a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
...
...
@@ -854,7 +869,7 @@
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a
.CREATE_TIME as createTime,
refund
.CREATE_TIME as createTime,
refund.CREATE_NAME as createName,
a.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
...
...
@@ -892,6 +907,12 @@
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND refund.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.buyStandardMin != null and param.buyStandardMin.trim() != ''"
>
AND a.BUY_STANDARD
<![CDATA[ >= ]]>
#{param.buyStandardMin}
</if>
<if
test=
"param.buyStandardMax != null and param.buyStandardMax.trim() != ''"
>
AND a.BUY_STANDARD
<![CDATA[ <= ]]>
#{param.buyStandardMax}
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
...
...
@@ -910,35 +931,33 @@
#{item}
</foreach>
</select>
<!-- 查询保单减员退费信息-->
<select
id=
"selectRefundDetail
"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceRefundDetail
"
>
<select
id=
"selectRefundDetail
Id"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundVo
"
>
select
a.DEPT_NO as deptNo,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
refund.ID as id,
refund.INS_DETAIL_ID as insDetailId,
refund.REFUND_MONEY as refundMoney
refund.REFUND_MONEY as refundMoney,
a.INSURANCE_HANDLE_PROVINCE as insuranceHandleProvince,
a.INSURANCE_HANDLE_CITY as insuranceHandleCity
from
t_insurance_detail a,
t_insurance_refund refund
where
a.DELETE_FLAG = 0
and
a.REFUND_ID = refund.ID
and
a.BUY_HANDLE_STATUS = 5
and
a.REDUCE_HANDLE_STATUS = 4
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
a.DELETE_FLAG = 0
and a.REFUND_ID = refund.ID
and a.BUY_HANDLE_STATUS = 5
and a.REDUCE_HANDLE_STATUS = 4
and a.EMP_NAME = #{param.empName}
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and a.EMP_IDCARD_NO = #{param.empIdcardNo}
</if>
<if
test=
"param.policyNo!= null and param.policyNo.trim() != ''"
>
and a.POLICY_NO = #{param.policyNo}
</if>
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
and a.INSURANCE_TYPE_NAME = #{param.insuranceTypeName}
and a.POLICY_START = #{param.policyStart}
and a.POLICY_END = #{param.policyEnd}
and a.BUY_STANDARD = #{param.buyStandard}
order by
a.CREATE_TIME DESC
limit 1;
</select>
<!-- 根据ID导出减员办理列表-->
<select
id=
"getRefundExportListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
...
...
@@ -1025,6 +1044,12 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.buyStandardMin != null and param.buyStandardMin.trim() != ''"
>
AND a.BUY_STANDARD
<![CDATA[ >= ]]>
#{param.buyStandardMin}
</if>
<if
test=
"param.buyStandardMax != null and param.buyStandardMax.trim() != ''"
>
AND a.BUY_STANDARD
<![CDATA[ <= ]]>
#{param.buyStandardMax}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.updateBy}
</if>
...
...
@@ -1228,4 +1253,167 @@
</foreach>
</select>
<!-- 退保退费分页查询-->
<select
id=
"getInsuranceRefundMoneyPageList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundListVo"
>
SELECT
a.ID AS id,
a.DEPT_NAME AS projectName,
a.EMP_NAME AS empName,
a.EMP_IDCARD_NO AS empIdcardNo,
a.BUY_TYPE AS buyType,
a.POLICY_START AS policyStart,
a.POLICY_END AS policyEnd,
a.INSURANCE_COMPANY_NAME AS insuranceCompanyName,
a.INSURANCE_TYPE_NAME AS insuranceTypeName,
a.BUY_STANDARD AS buyStandard,
refund.REFUND_MONEY AS refundMoney,
IF
( a.BUY_TYPE = 4, `replace`.empName, a.EMP_NAME ) AS returnEmpName,
IF
( a.BUY_TYPE = 4, `replace`.empIdcardNo, a.EMP_IDCARD_NO ) AS returnEmpIdcardNo,
IF
( a.BUY_TYPE = 4, `replace`.projectName, a.DEPT_NAME ) AS returnProjectName
FROM
t_insurance_detail a
LEFT JOIN t_insurance_refund refund ON a.REFUND_ID = refund.ID
LEFT JOIN (
SELECT
`replace`.FROM_INSURANCE_DETAIL_ID AS fromDetailId,
`replace`.TO_INSURANCE_DETAIL_ID AS toDetailId,
`replace`.ORIGIN_INSURANCE_DETAIL_ID AS originDetailId,
detail.DEPT_NAME AS projectName,
detail.EMP_NAME AS empName,
detail.EMP_IDCARD_NO AS empIdcardNo
FROM
t_insurance_replace `replace`
LEFT JOIN t_insurance_detail detail ON `replace`.ORIGIN_INSURANCE_DETAIL_ID = detail.ID
) `replace` ON a.ID = `replace`.toDetailId
AND a.BUY_TYPE = 4
WHERE
a.DELETE_FLAG = 0
AND a.REDUCE_HANDLE_STATUS = 4
and refund.REFUND_MONEY IS NOT NULL
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and a.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.reduceHandleStatus != null"
>
and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if
test=
"param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"
>
and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.updateBy}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and refund.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</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.buyStandardMin != null and param.buyStandardMin.trim() != ''"
>
AND a.BUY_STANDARD
<![CDATA[ >= ]]>
#{param.buyStandardMin}
</if>
<if
test=
"param.buyStandardMax != null and param.buyStandardMax.trim() != ''"
>
AND a.BUY_STANDARD
<![CDATA[ <= ]]>
#{param.buyStandardMax}
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
ORDER BY refund.CREATE_TIME DESC,a.ID ASC
</select>
<select
id=
"getInsuranceRefundMoneyList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundListVo"
>
SELECT
a.ID AS id,
a.DEPT_NAME AS projectName,
a.EMP_NAME AS empName,
a.EMP_IDCARD_NO AS empIdcardNo,
a.BUY_TYPE AS buyType,
a.POLICY_START AS policyStart,
a.POLICY_END AS policyEnd,
a.INSURANCE_COMPANY_NAME AS insuranceCompanyName,
a.INSURANCE_TYPE_NAME AS insuranceTypeName,
a.BUY_STANDARD AS buyStandard,
refund.REFUND_MONEY AS refundMoney,
IF
( a.BUY_TYPE = 4, `replace`.empName, a.EMP_NAME ) AS returnEmpName,
IF
( a.BUY_TYPE = 4, `replace`.empIdcardNo, a.EMP_IDCARD_NO ) AS returnEmpIdcardNo,
IF
( a.BUY_TYPE = 4, `replace`.projectName, a.DEPT_NAME ) AS returnProjectName
FROM
t_insurance_detail a
LEFT JOIN t_insurance_refund refund ON a.REFUND_ID = refund.ID
LEFT JOIN (
SELECT
`replace`.FROM_INSURANCE_DETAIL_ID AS fromDetailId,
`replace`.TO_INSURANCE_DETAIL_ID AS toDetailId,
`replace`.ORIGIN_INSURANCE_DETAIL_ID AS originDetailId,
detail.DEPT_NAME AS projectName,
detail.EMP_NAME AS empName,
detail.EMP_IDCARD_NO AS empIdcardNo
FROM
t_insurance_replace `replace`
LEFT JOIN t_insurance_detail detail ON `replace`.ORIGIN_INSURANCE_DETAIL_ID = detail.ID
) `replace` ON a.ID = `replace`.toDetailId
AND a.BUY_TYPE = 4
WHERE
a.DELETE_FLAG = 0
AND a.REDUCE_HANDLE_STATUS = 4
and refund.REFUND_MONEY IS NOT NULL
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and a.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.reduceHandleStatus != null"
>
and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if
test=
"param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"
>
and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.updateBy}
</if>
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and refund.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</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.buyStandardMin != null and param.buyStandardMin.trim() != ''"
>
AND a.BUY_STANDARD
<![CDATA[ >= ]]>
#{param.buyStandardMin}
</if>
<if
test=
"param.buyStandardMax != null and param.buyStandardMax.trim() != ''"
>
AND a.BUY_STANDARD
<![CDATA[ <= ]]>
#{param.buyStandardMax}
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
ORDER BY refund.CREATE_TIME DESC,a.ID ASC
</select>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceEnclosureMapper.xml
View file @
4670c7a4
...
...
@@ -5,7 +5,7 @@
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEnclosureMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"
INTEGE
R"
/>
<id
property=
"id"
column=
"ID"
jdbcType=
"
VARCHA
R"
/>
<result
property=
"enclosureName"
column=
"ENCLOSURE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"remark"
column=
"REMARK"
jdbcType=
"VARCHAR"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
jdbcType=
"VARCHAR"
/>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsurancePolicyMapper.xml
0 → 100644
View file @
4670c7a4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePolicyMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePolicy"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"policyNo"
column=
"POLICY_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"policyStart"
column=
"POLICY_START"
jdbcType=
"DATE"
/>
<result
property=
"policyEnd"
column=
"POLICY_END"
jdbcType=
"DATE"
/>
<result
property=
"insuranceCompanyName"
column=
"INSURANCE_COMPANY_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceTypeName"
column=
"INSURANCE_TYPE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"enableFlag"
column=
"ENABLE_FLAG"
jdbcType=
"TINYINT"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
jdbcType=
"TINYINT"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,POLICY_NO,POLICY_START,
POLICY_END,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
ENABLE_FLAG,DELETE_FLAG,CREATE_BY,
CREATE_NAME,CREATE_TIME,UPDATE_BY,
UPDATE_TIME
</sql>
<select
id=
"getInsurancePolicyListPage"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
></include>
FROM t_insurance_policy
where DELETE_FLAG = 0
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null"
>
AND DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart}
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null"
>
AND DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd}
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
and (
(DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart} and DATE(POLICY_START)
<![CDATA[ <= ]]>
#{param.policyEnd}) OR
(DATE(POLICY_END)
<![CDATA[ >= ]]>
#{param.policyStart} and DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd})
)
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"
>
and INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.enableFlag != null"
>
and ENABLE_FLAG = #{param.enableFlag}
</if>
ORDER BY CREATE_TIME DESC
</select>
<select
id=
"getInsurancePolicyList"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
></include>
FROM t_insurance_policy
where DELETE_FLAG = 0
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null"
>
AND DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart}
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null"
>
AND DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd}
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
and (
(DATE(POLICY_START)
<![CDATA[ >= ]]>
#{param.policyStart} and DATE(POLICY_START)
<![CDATA[ <= ]]>
#{param.policyEnd}) OR
(DATE(POLICY_END)
<![CDATA[ >= ]]>
#{param.policyStart} and DATE(POLICY_END)
<![CDATA[ <= ]]>
#{param.policyEnd})
)
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''"
>
and INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.enableFlag != null"
>
and ENABLE_FLAG = #{param.enableFlag}
</if>
ORDER BY CREATE_TIME DESC
</select>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceRefundMapper.xml
View file @
4670c7a4
...
...
@@ -63,11 +63,11 @@
update
t_insurance_refund
set
REFUND_MONEY = #{refundMoney},
UPDATE_BY = #{updateBy},
UPDATE_TIME = #{updateTime}
REFUND_MONEY = #{
param.
refundMoney},
UPDATE_BY = #{
param.
updateBy},
UPDATE_TIME = #{
param.
updateTime}
where
I
NS_DETAIL_ID = #{insDetailI
d}
I
D = #{param.i
d}
</update>
<select
id=
"getByInsDetailId"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund"
>
...
...
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