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
c4320208
Commit
c4320208
authored
Dec 09, 2022
by
zhangyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:商险退保费用相关
parent
3b32a37b
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
663 additions
and
103 deletions
+663
-103
BaseEntity.java
...fu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
+5
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+26
-1
InsuranceDetailVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
+9
-3
RefundListVo.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/RefundListVo.java
+110
-0
RefundMoneyUpdateParam.java
...ud/plus/v1/yifu/insurances/vo/RefundMoneyUpdateParam.java
+78
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+3
-16
TInsuranceRefundController.java
...ifu/insurances/controller/TInsuranceRefundController.java
+78
-0
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+26
-6
TInsuranceRefundMapper.java
.../insurances/mapper/insurances/TInsuranceRefundMapper.java
+8
-1
TInsuranceDetailService.java
...insurances/service/insurance/TInsuranceDetailService.java
+26
-5
TInsuranceRefundService.java
...insurances/service/insurance/TInsuranceRefundService.java
+7
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+115
-45
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+168
-22
TInsuranceRefundMapper.xml
...in/resources/mapper/insurances/TInsuranceRefundMapper.xml
+4
-4
No files found.
yifu-common/yifu-common-mybatis/src/main/java/com/yifu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
View file @
c4320208
...
@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle;
...
@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
...
@@ -66,6 +67,7 @@ public class BaseEntity implements Serializable {
...
@@ -66,6 +67,7 @@ public class BaseEntity implements Serializable {
@Schema
(
description
=
"更新时间"
)
@Schema
(
description
=
"更新时间"
)
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
@ExcelIgnore
@ExcelIgnore
@JsonIgnore
private
LocalDateTime
updateTime
;
private
LocalDateTime
updateTime
;
/**
/**
...
@@ -73,6 +75,7 @@ public class BaseEntity implements Serializable {
...
@@ -73,6 +75,7 @@ public class BaseEntity implements Serializable {
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ExcelIgnore
@ExcelIgnore
@JsonIgnore
private
String
mId
;
private
String
mId
;
/**
/**
...
@@ -80,6 +83,7 @@ public class BaseEntity implements Serializable {
...
@@ -80,6 +83,7 @@ public class BaseEntity implements Serializable {
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ExcelIgnore
@ExcelIgnore
@JsonIgnore
private
String
menuInfo
;
private
String
menuInfo
;
/**
/**
...
@@ -87,6 +91,7 @@ public class BaseEntity implements Serializable {
...
@@ -87,6 +91,7 @@ public class BaseEntity implements Serializable {
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ExcelIgnore
@ExcelIgnore
@JsonIgnore
private
String
authSql
;
private
String
authSql
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
c4320208
...
@@ -601,6 +601,31 @@ public class InsurancesConstants {
...
@@ -601,6 +601,31 @@ public class InsurancesConstants {
public
static
final
String
DEPT_NO_CHANGE_OLD_IS_NOT_EXIST
=
"被替换的项目不存在"
;
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 +639,7 @@ public class InsurancesConstants {
...
@@ -614,7 +639,7 @@ public class InsurancesConstants {
/**
/**
* 员工减员记录不存在
* 员工减员记录不存在
*/
*/
public
static
final
String
REFUND_IS_NULL
=
"
员工减员记录不存在
"
;
public
static
final
String
REFUND_IS_NULL
=
"
未找到“减员成功”的参保信息
"
;
/**
/**
* 已更新保单减员退费,不能再次更新
* 已更新保单减员退费,不能再次更新
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
View file @
c4320208
...
@@ -363,10 +363,16 @@ public class InsuranceDetailVO implements Serializable {
...
@@ -363,10 +363,16 @@ public class InsuranceDetailVO implements Serializable {
private
String
replaceInvoiceTitle
;
private
String
replaceInvoiceTitle
;
/**
/**
*
退保金额 todo 数据库暂时没有
*
减员id
*/
*/
@Schema
(
description
=
"退保金额 :预留字段,暂时都是空(减员类型专用)"
)
@Schema
(
description
=
"减员id"
)
private
String
surrender
;
private
String
refundId
;
/**
* 退保金额
*/
@Schema
(
description
=
"退保金额(减员类型专用)"
)
private
BigDecimal
surrender
;
/**
/**
* 退保结算状态 todo 数据库暂时没有
* 退保结算状态 todo 数据库暂时没有
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundListVo.java
0 → 100644
View file @
c4320208
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 @
c4320208
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
;
/**
* 员工姓名
*/
@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-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
c4320208
...
@@ -374,7 +374,7 @@ public class TInsuranceDetailController {
...
@@ -374,7 +374,7 @@ public class TInsuranceDetailController {
*
*
* @author zhaji
* @author zhaji
* @param param 查询条件
* @param param 查询条件
* @return {@link R<IPage<
InsuranceRefundListVo
>>}
* @return {@link R<IPage<
InsuranceRefundListVo
>>}
*/
*/
@Operation
(
summary
=
"已减员列表分页查询"
,
description
=
"已减员列表分页查询"
)
@Operation
(
summary
=
"已减员列表分页查询"
,
description
=
"已减员列表分页查询"
)
@PostMapping
(
"/getInsuranceRefundPageList"
)
@PostMapping
(
"/getInsuranceRefundPageList"
)
...
@@ -388,7 +388,7 @@ public class TInsuranceDetailController {
...
@@ -388,7 +388,7 @@ public class TInsuranceDetailController {
*
*
* @author zhaji
* @author zhaji
* @param param 查询条件
* @param param 查询条件
* @return {@link R<List<
InsuranceRefundListVo
>>}
* @return {@link R<List<
InsuranceRefundListVo
>>}
*/
*/
@Operation
(
summary
=
"已减员列表导出"
,
description
=
"已减员列表导出"
)
@Operation
(
summary
=
"已减员列表导出"
,
description
=
"已减员列表导出"
)
@PostMapping
(
"/getInsuranceRefundList"
)
@PostMapping
(
"/getInsuranceRefundList"
)
...
@@ -403,7 +403,7 @@ public class TInsuranceDetailController {
...
@@ -403,7 +403,7 @@ public class TInsuranceDetailController {
*
*
* @author zhaji
* @author zhaji
* @param param 查询条件
* @param param 查询条件
* @return {@link R<IPage<
RefundExportListVo
>>}
* @return {@link R<IPage<
RefundExportListVo
>>}
*/
*/
@Operation
(
summary
=
"减员办理列表分页查询"
,
description
=
"减员办理列表分页查询"
)
@Operation
(
summary
=
"减员办理列表分页查询"
,
description
=
"减员办理列表分页查询"
)
@GetMapping
(
"/getInsuranceRefundHandlingPageList"
)
@GetMapping
(
"/getInsuranceRefundHandlingPageList"
)
...
@@ -494,19 +494,6 @@ public class TInsuranceDetailController {
...
@@ -494,19 +494,6 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
updateIsUse
(
id
);
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);
}
/**
/**
* 查询项目列表
* 查询项目列表
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceRefundController.java
0 → 100644
View file @
c4320208
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.jmx.export.annotation.ManagedOperationParameter
;
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"
)
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/TInsuranceDetailMapper.java
View file @
c4320208
...
@@ -130,7 +130,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
...
@@ -130,7 +130,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @author zhaji
* @author zhaji
* @param page 分页参数
* @param page 分页参数
* @param param 查询参数
* @param param 查询参数
* @return {@link IPage<
InsuranceRefundListVo>}
* @return {@link IPage<InsuranceRefundListVo>}
*/
*/
IPage
<
InsuranceRefundListVo
>
getInsuranceRefundPageList
(
Page
<
InsuranceRefundParam
>
page
,
@Param
(
"param"
)
InsuranceRefundParam
param
);
IPage
<
InsuranceRefundListVo
>
getInsuranceRefundPageList
(
Page
<
InsuranceRefundParam
>
page
,
@Param
(
"param"
)
InsuranceRefundParam
param
);
...
@@ -139,10 +139,30 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
...
@@ -139,10 +139,30 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*
*
* @author zhaji
* @author zhaji
* @param param 查询参数
* @param param 查询参数
* @return {@link List<
InsuranceRefundListVo>}
* @return {@link List<InsuranceRefundListVo>}
*/
*/
List
<
InsuranceRefundListVo
>
getInsuranceRefundList
(
@Param
(
"param"
)
InsuranceRefundParam
param
);
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 +194,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
...
@@ -174,11 +194,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
/**
/**
* 查询保单减员退费信息
* 查询保单减员退费信息
*
*
* @author zha
ji
* @author zha
ngyun
* @param
refundDetail
* @param
param 查询参数
* @return {@link
TInsuranceRefundDetail
}
* @return {@link
String
}
*/
*/
TInsuranceRefundDetail
selectRefundDetail
(
@Param
(
"param"
)
TInsuranceRefundDetail
refundDetail
);
String
selectRefundDetailId
(
@Param
(
"param"
)
RefundMoneyUpdateParam
param
);
/**
/**
* 根据ID导出减员办理列表
* 根据ID导出减员办理列表
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceRefundMapper.java
View file @
c4320208
...
@@ -25,5 +25,12 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> {
...
@@ -25,5 +25,12 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> {
void
updateByInsDetailId
(
@Param
(
"param"
)
TInsuranceRefund
insuranceRefund
);
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/TInsuranceDetailService.java
View file @
c4320208
...
@@ -226,17 +226,38 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
...
@@ -226,17 +226,38 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*
*
* @author zhaji
* @author zhaji
* @param param 查询参数
* @param param 查询参数
* @return {@link List<
InsuranceRefundListVo
>}
* @return {@link List<
InsuranceRefundListVo
>}
*/
*/
R
getInsuranceRefundList
(
InsuranceRefundParam
param
);
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
* @author zhaji
* @param page 分页数据
* @param page 分页数据
* @param param 查询参数
* @param param 查询参数
* @return {@link IPage< RefundExportListVo >}
* @param mId 菜单id
* @return {@link IPage<RefundExportListVo>}
*/
*/
IPage
<
RefundExportListVo
>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
InsuranceRefundHandlingParam
param
,
IPage
<
RefundExportListVo
>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
InsuranceRefundHandlingParam
param
,
String
mId
);
String
mId
);
...
@@ -317,11 +338,11 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
...
@@ -317,11 +338,11 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
/**
/**
* 更新减员退费
* 更新减员退费
*
*
* @author zha
ji
* @author zha
ngyun
* @param paramList
* @param paramList
减员退费参数
* @return {@link R}
* @return {@link R}
*/
*/
R
updateRefundMoney
(
List
<
RefundMoneyParam
>
paramList
);
R
updateRefundMoney
(
List
<
RefundMoney
Update
Param
>
paramList
);
/**
/**
* 查询项目列表
* 查询项目列表
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceRefundService.java
View file @
c4320208
...
@@ -14,6 +14,13 @@ public interface TInsuranceRefundService extends IService<TInsuranceRefund> {
...
@@ -14,6 +14,13 @@ public interface TInsuranceRefundService extends IService<TInsuranceRefund> {
void
updateByInsDetailId
(
TInsuranceRefund
insuranceRefund
);
void
updateByInsDetailId
(
TInsuranceRefund
insuranceRefund
);
/**
* 更新退款信息
*
* @author zhangyun
* @param insuranceRefund 退款参数
* @return {@link int}
*/
int
updateRefundMoney
(
TInsuranceRefund
insuranceRefund
);
int
updateRefundMoney
(
TInsuranceRefund
insuranceRefund
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
c4320208
...
@@ -914,11 +914,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -914,11 +914,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//减员类型 处理创建人、创建时间、备注
//减员类型 处理创建人、创建时间、备注
if
(
CommonConstants
.
FIVE_INT
==
insuranceDetailVO
.
getDistributeType
()){
if
(
CommonConstants
.
FIVE_INT
==
insuranceDetailVO
.
getDistributeType
()){
TInsuranceRefund
refund
=
tInsuranceRefundService
.
getOne
(
Wrappers
.<
TInsuranceRefund
>
query
().
lambda
()
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
)
.
orderByDesc
(
TInsuranceRefund:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
);
);
if
(
Optional
.
ofNullable
(
refund
).
isPresent
()){
if
(
Optional
.
ofNullable
(
refund
).
isPresent
()){
insuranceDetailVO
.
setSurrender
(
refund
.
getRefundMoney
());
insuranceDetailVO
.
setCreateName
(
refund
.
getCreateName
());
insuranceDetailVO
.
setCreateName
(
refund
.
getCreateName
());
insuranceDetailVO
.
setCreateTime
(
refund
.
getCreateTime
());
insuranceDetailVO
.
setCreateTime
(
refund
.
getCreateTime
());
insuranceDetailVO
.
setRemark
(
refund
.
getRemark
());
insuranceDetailVO
.
setRemark
(
refund
.
getRemark
());
...
@@ -3621,7 +3622,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3621,7 +3622,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*
*
* @author zhaji
* @author zhaji
* @param param 查询参数
* @param param 查询参数
* @return {@link List<
InsuranceRefundListVo
>}
* @return {@link List<
InsuranceRefundListVo
>}
*/
*/
@Override
@Override
public
R
getInsuranceRefundList
(
InsuranceRefundParam
param
)
{
public
R
getInsuranceRefundList
(
InsuranceRefundParam
param
)
{
...
@@ -3633,9 +3634,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3633,9 +3634,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
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
());
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
InsuranceRefundListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
...
@@ -3656,6 +3655,51 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3656,6 +3655,51 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
ok
(
insuranceRefundList
);
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
);
}
/**
/**
* 减员办理列表分页查询
* 减员办理列表分页查询
*
*
...
@@ -4867,24 +4911,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4867,24 +4911,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
/**
/**
* 更新减员退费
* 更新减员退费
*
*
* @author zha
ji
* @author zha
ngyun
* @param paramList
* @param paramList
导入参数
* @return {@link R}
* @return {@link R}
*/
*/
@Override
@Override
public
R
updateRefundMoney
(
List
<
RefundMoneyParam
>
paramList
)
{
public
R
updateRefundMoney
(
List
<
RefundMoney
Update
Param
>
paramList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
refundMoneyCheck
(
paramList
);
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
map
=
refundMoneyCheck
(
paramList
);
List
<
RefundMoneyParam
>
successList
=
map
.
get
(
InsurancesConstants
.
SUCCESS_LIST
);
List
<
RefundMoneyUpdateParam
>
successList
=
map
.
get
(
InsurancesConstants
.
SUCCESS_LIST
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
RefundMoneyParam
param
:
successList
)
{
for
(
RefundMoney
Update
Param
param
:
successList
)
{
TInsuranceRefund
insuranceRefund
=
new
TInsuranceRefund
();
TInsuranceRefund
insuranceRefund
=
new
TInsuranceRefund
();
insuranceRefund
.
setI
nsDetailI
d
(
param
.
getId
());
insuranceRefund
.
setId
(
param
.
getId
());
insuranceRefund
.
setRefundMoney
(
new
BigDecimal
(
param
.
getRefundMoney
()));
insuranceRefund
.
setRefundMoney
(
new
BigDecimal
(
param
.
getRefundMoney
()));
insuranceRefund
.
setReduceHandleStatus
(
CommonConstants
.
FOUR_INT
);
insuranceRefund
.
setReduceHandleStatus
(
CommonConstants
.
FOUR_INT
);
insuranceRefund
.
setCreateBy
(
user
.
getId
());
insuranceRefund
.
setUpdateBy
(
user
.
getId
());
insuranceRefund
.
setCreateName
(
user
.
getNickname
());
insuranceRefund
.
setUpdateTime
(
LocalDateTime
.
now
());
insuranceRefund
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceRefundService
.
updateRefundMoney
(
insuranceRefund
);
tInsuranceRefundService
.
updateRefundMoney
(
insuranceRefund
);
}
}
}
}
...
@@ -5089,57 +5133,83 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5089,57 +5133,83 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param paramList 变更列表
* @param paramList 变更列表
* @return {@link R}
* @return {@link R}
*/
*/
public
Map
<
String
,
List
<
RefundMoneyParam
>>
refundMoneyCheck
(
List
<
RefundMoneyParam
>
paramList
){
public
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
refundMoneyCheck
(
List
<
RefundMoneyUpdateParam
>
paramList
){
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
new
HashMap
<>(
16
);
Map
<
String
,
List
<
RefundMoneyUpdateParam
>>
map
=
new
HashMap
<>(
16
);
List
<
RefundMoneyParam
>
errorList
=
new
ArrayList
<>();
List
<
RefundMoneyUpdateParam
>
errorList
=
new
ArrayList
<>();
List
<
RefundMoneyParam
>
successList
=
new
ArrayList
<>();
List
<
RefundMoneyUpdateParam
>
successList
=
new
ArrayList
<>();
for
(
RefundMoneyParam
param
:
paramList
)
{
for
(
RefundMoneyUpdateParam
param
:
paramList
)
{
String
refundMoney
=
param
.
getRefundMoney
();
String
policyNo
=
param
.
getPolicyNo
();
//姓名
String
empName
=
param
.
getEmpName
();
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
String
empIdcardNo
=
param
.
getEmpIdcardNo
();
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
//退费金额
if
(
StringUtils
.
isBlank
(
refundMoney
)){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_NOT_EMPTY
);
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//
保单
号
//
身份证
号
if
(
StringUtils
.
isBlank
(
p
olicyNo
)){
if
(
StringUtils
.
isBlank
(
p
aram
.
getEmpIdcardNo
()
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO
_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT
_EMPTY
);
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
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
);
errorList
.
add
(
param
);
continue
;
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
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_INSURANCE_END_DATE_NOT_EMPTY
);
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
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
ValidityUtil
.
validateMoney
(
refundMoney
)){
if
(!
ValidityUtil
.
validateMoney
(
param
.
getRefundMoney
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_PARSE_ERROR
);
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//必填格式校通过后查询对应的保单信息
//必填格式校通过后查询对应的保单信息
TInsuranceRefundDetail
refundDetail
=
new
TInsuranceRefundDetail
();
String
tInsuranceRefundDetailId
=
this
.
baseMapper
.
selectRefundDetailId
(
param
);
refundDetail
.
setEmpName
(
empName
);
if
(
Common
.
isEmpty
(
tInsuranceRefundDetailId
)){
refundDetail
.
setEmpIdcardNo
(
empIdcardNo
);
refundDetail
.
setPolicyNo
(
policyNo
);
TInsuranceRefundDetail
tInsuranceRefundDetail
=
this
.
baseMapper
.
selectRefundDetail
(
refundDetail
);
if
(
Common
.
isEmpty
(
tInsuranceRefundDetail
)){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_IS_NULL
);
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_IS_NULL
);
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
param
.
setId
(
tInsuranceRefundDetail
.
getInsDetailId
()
);
param
.
setId
(
tInsuranceRefundDetail
Id
);
successList
.
add
(
param
);
successList
.
add
(
param
);
}
}
map
.
put
(
InsurancesConstants
.
ERROR_LIST
,
errorList
);
map
.
put
(
InsurancesConstants
.
ERROR_LIST
,
errorList
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
c4320208
...
@@ -324,7 +324,8 @@
...
@@ -324,7 +324,8 @@
a.REMARK as remark,
a.REMARK as remark,
a.BILLING_TYPE as billingType,
a.BILLING_TYPE as billingType,
a.DEFAULT_SETTLE_ID as defaultSettleId,
a.DEFAULT_SETTLE_ID as defaultSettleId,
a.RATE as rate
a.RATE as rate,
a.REFUND_ID as refundId
from t_insurance_detail a
from t_insurance_detail a
left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID
left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID
where a.ID = #{id}
where a.ID = #{id}
...
@@ -910,35 +911,29 @@
...
@@ -910,35 +911,29 @@
#{item}
#{item}
</foreach>
</foreach>
</select>
</select>
<!-- 查询保单减员退费信息-->
<!-- 查询保单减员退费信息-->
<select
id=
"selectRefundDetail
"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceRefundDetail
"
>
<select
id=
"selectRefundDetail
Id"
resultType=
"String
"
>
select
select
a.DEPT_NO as deptNo,
refund.ID as refundId
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
from
from
t_insurance_detail a,
t_insurance_detail a,
t_insurance_refund refund
t_insurance_refund refund
where
where
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
and
and a.REFUND_ID = refund.ID
a.REFUND_ID = refund.ID
and a.BUY_HANDLE_STATUS = 5
and
and a.REDUCE_HANDLE_STATUS = 4
a.BUY_HANDLE_STATUS = 5
and
a.REDUCE_HANDLE_STATUS = 4
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and a.EMP_NAME = #{param.empName}
and a.EMP_NAME = #{param.empName}
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and a.EMP_IDCARD_NO = #{param.empIdcardNo}
and a.EMP_IDCARD_NO = #{param.empIdcardNo}
</if>
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
<if
test=
"param.policyNo!= null and param.policyNo.trim() != ''"
>
and a.INSURANCE_TYPE_NAME = #{param.insuranceTypeName}
and a.POLICY_NO = #{param.policyNo}
and a.POLICY_START = #{param.policyStart}
</if>
and a.POLICY_END = #{param.policyEnd}
and a.BUY_STANDARD = #{param.buyStandard}
order by
refund.CREATE_TIME DESC
limit 1;
</select>
</select>
<!-- 根据ID导出减员办理列表-->
<!-- 根据ID导出减员办理列表-->
<select
id=
"getRefundExportListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
<select
id=
"getRefundExportListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo"
>
...
@@ -1228,4 +1223,155 @@
...
@@ -1228,4 +1223,155 @@
</foreach>
</foreach>
</select>
</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.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.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
ORDER BY refund.CREATE_TIME DESC,a.ID ASC
</select>
</mapper>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceRefundMapper.xml
View file @
c4320208
...
@@ -63,11 +63,11 @@
...
@@ -63,11 +63,11 @@
update
update
t_insurance_refund
t_insurance_refund
set
set
REFUND_MONEY = #{refundMoney},
REFUND_MONEY = #{
param.
refundMoney},
UPDATE_BY = #{updateBy},
UPDATE_BY = #{
param.
updateBy},
UPDATE_TIME = #{updateTime}
UPDATE_TIME = #{
param.
updateTime}
where
where
I
NS_DETAIL_ID = #{insDetailI
d}
I
D = #{param.i
d}
</update>
</update>
<select
id=
"getByInsDetailId"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund"
>
<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