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
fe4bcc57
Commit
fe4bcc57
authored
Jul 26, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:修改减员退费校验逻辑"
parent
4e065453
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
372 additions
and
81 deletions
+372
-81
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+3
-2
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+11
-0
TInsuranceOperate.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceOperate.java
+0
-1
TInsuranceRefund.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceRefund.java
+31
-4
TInsuranceRefundDetail.java
...lus/v1/yifu/insurances/entity/TInsuranceRefundDetail.java
+84
-0
InsuranceRefundCheck.java
...loud/plus/v1/yifu/insurances/vo/InsuranceRefundCheck.java
+14
-7
InsuranceRefundListVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
+6
-0
InsuredListVo.java
.../yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
+6
-0
InsuredParam.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
+1
-3
RefundMoneyParam.java
...fu/cloud/plus/v1/yifu/insurances/vo/RefundMoneyParam.java
+6
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+5
-6
TInsuranceDetailMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
+10
-0
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+2
-2
TInsuranceRefundService.java
...s/v1/yifu/insurances/service/TInsuranceRefundService.java
+0
-1
TInsuranceCompanyServiceImpl.java
...insurances/service/impl/TInsuranceCompanyServiceImpl.java
+8
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+99
-28
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+80
-24
TInsuranceOperateMapper.xml
...biz/src/main/resources/mapper/TInsuranceOperateMapper.xml
+1
-1
TInsuranceRefundMapper.xml
...-biz/src/main/resources/mapper/TInsuranceRefundMapper.xml
+5
-2
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
fe4bcc57
...
@@ -409,7 +409,7 @@ public interface CommonConstants {
...
@@ -409,7 +409,7 @@ public interface CommonConstants {
/**
/**
* 工资最小不能小于零
* 工资最小不能小于零
*/
*/
public
static
final
String
MONEY_MAX
=
"999999.99"
;
public
static
final
String
MONEY_MAX
=
"999999
9
.99"
;
/**
/**
* 工资最小不能小于零
* 工资最小不能小于零
...
@@ -417,9 +417,10 @@ public interface CommonConstants {
...
@@ -417,9 +417,10 @@ public interface CommonConstants {
public
static
final
String
MONEY_MIN
=
"0"
;
public
static
final
String
MONEY_MIN
=
"0"
;
public
static
final
int
TWENTY_INT
=
20
;
public
static
final
int
TWENTY_INT
=
20
;
public
static
final
BigDecimal
MONEY_MAX
=
new
BigDecimal
(
"999999.99"
);
public
static
final
String
ERROR_MSG_PRFIX
=
"error="
;
public
static
final
String
ERROR_MSG_PRFIX
=
"error="
;
public
static
final
String
SUCCESS_MSG_PREFIX
=
"success="
;
public
static
final
String
SUCCESS_MSG_PREFIX
=
"success="
;
public
static
final
int
SIXTY_INT
=
60
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
fe4bcc57
...
@@ -333,4 +333,15 @@ public class InsurancesConstants {
...
@@ -333,4 +333,15 @@ public class InsurancesConstants {
*/
*/
public
static
final
String
EMP_NAME_MAX_LENGTH_ERROR
=
"姓名不能超过20个字符"
;
public
static
final
String
EMP_NAME_MAX_LENGTH_ERROR
=
"姓名不能超过20个字符"
;
/**
* 员工减员记录不存在
*/
public
static
final
String
REFUND_IS_NULL
=
"员工减员记录不存在"
;
/**
* 已更新保单减员退费,不能再次更新
*/
public
static
final
String
REFUND_MONEY_IS_NOT_NULL
=
"已更新保单减员退费,不能再次更新"
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceOperate.java
View file @
fe4bcc57
...
@@ -15,7 +15,6 @@ import java.util.Date;
...
@@ -15,7 +15,6 @@ import java.util.Date;
* @date 2022-07-25 14:20:16
* @date 2022-07-25 14:20:16
*/
*/
@Data
@Data
@TableName
(
"t_insurance_operate"
)
@Schema
(
description
=
"商险操作表"
)
@Schema
(
description
=
"商险操作表"
)
public
class
TInsuranceOperate
implements
Serializable
{
public
class
TInsuranceOperate
implements
Serializable
{
/**
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceRefund.java
View file @
fe4bcc57
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -17,18 +19,36 @@ public class TInsuranceRefund implements Serializable {
...
@@ -17,18 +19,36 @@ public class TInsuranceRefund implements Serializable {
/**
/**
* 主键id
* 主键id
*/
*/
private
Lo
ng
id
;
private
Stri
ng
id
;
/**
/**
* 保单信息主键
* 保单信息主键
*/
*/
private
Lo
ng
insDetailId
;
private
Stri
ng
insDetailId
;
/**
/**
* 减员状态
* 减员状态
*/
*/
private
Integer
reduceHandleStatus
;
private
Integer
reduceHandleStatus
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 保单编号
*/
@Schema
(
description
=
"保单编号"
)
private
String
policyNo
;
/**
/**
* 退费金额
* 退费金额
*/
*/
...
@@ -42,7 +62,7 @@ public class TInsuranceRefund implements Serializable {
...
@@ -42,7 +62,7 @@ public class TInsuranceRefund implements Serializable {
/**
/**
* 减员创建时间
* 减员创建时间
*/
*/
private
Dat
e
createTime
;
private
LocalDateTim
e
createTime
;
/**
/**
* 减员创建人
* 减员创建人
...
@@ -54,6 +74,13 @@ public class TInsuranceRefund implements Serializable {
...
@@ -54,6 +74,13 @@ public class TInsuranceRefund implements Serializable {
*/
*/
private
String
createName
;
private
String
createName
;
/**
* 是否删除 0未删除/1删除
*/
@Schema
(
description
=
"是否删除 0否/1是"
)
private
Integer
deleteFlag
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceRefundDetail.java
0 → 100644
View file @
fe4bcc57
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
* @author zhaji
* @description TODO
* @date 2022-07-26 15:28:49
*/
@Data
public
class
TInsuranceRefundDetail
implements
Serializable
{
/**
* 主键id
*/
private
String
id
;
/**
* 保单信息主键
*/
private
String
insDetailId
;
/**
* 减员状态
*/
private
Integer
reduceHandleStatus
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 保单编号
*/
@Schema
(
description
=
"保单编号"
)
private
String
policyNo
;
/**
* 退费金额
*/
private
BigDecimal
refundMoney
;
/**
* 备注
*/
private
String
remark
;
/**
* 减员创建时间
*/
private
LocalDateTime
createTime
;
/**
* 减员创建人
*/
private
String
createBy
;
/**
* 减员创建人姓名
*/
private
String
createName
;
/**
* 是否删除 0未删除/1删除
*/
@Schema
(
description
=
"是否删除 0否/1是"
)
private
Integer
deleteFlag
;
private
static
final
long
serialVersionUID
=
1L
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundCheck.java
View file @
fe4bcc57
...
@@ -17,6 +17,12 @@ public class InsuranceRefundCheck implements Serializable {
...
@@ -17,6 +17,12 @@ public class InsuranceRefundCheck implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
/**
* 员工姓名
* 员工姓名
*/
*/
...
@@ -26,7 +32,14 @@ public class InsuranceRefundCheck implements Serializable {
...
@@ -26,7 +32,14 @@ public class InsuranceRefundCheck implements Serializable {
* 员工身份证号码
* 员工身份证号码
*/
*/
@Schema
(
description
=
"员工身份证号码"
)
@Schema
(
description
=
"员工身份证号码"
)
private
String
empIdCardNo
;
private
String
empIdcardNo
;
/**
* 保单编号
*/
@Schema
(
description
=
"保单编号"
)
private
String
policyNo
;
/**
/**
* 保险公司名称
* 保险公司名称
*/
*/
...
@@ -48,12 +61,6 @@ public class InsuranceRefundCheck implements Serializable {
...
@@ -48,12 +61,6 @@ public class InsuranceRefundCheck implements Serializable {
@Schema
(
description
=
"保单结束日期"
)
@Schema
(
description
=
"保单结束日期"
)
private
String
policyEnd
;
private
String
policyEnd
;
/**
* 退款金额
*/
@Schema
(
description
=
"退款金额"
)
private
String
refundMoney
;
/**
/**
* 备注
* 备注
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
View file @
fe4bcc57
...
@@ -60,6 +60,12 @@ public class InsuranceRefundListVo implements Serializable {
...
@@ -60,6 +60,12 @@ public class InsuranceRefundListVo implements Serializable {
@Schema
(
description
=
"投保岗位"
)
@Schema
(
description
=
"投保岗位"
)
private
String
post
;
private
String
post
;
/**
* 保单编号
*/
@Schema
(
description
=
"保单编号"
)
private
String
policyNo
;
/**
/**
* 商险购买地省code
* 商险购买地省code
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
View file @
fe4bcc57
...
@@ -42,6 +42,12 @@ public class InsuredListVo implements Serializable {
...
@@ -42,6 +42,12 @@ public class InsuredListVo implements Serializable {
@Schema
(
description
=
"员工身份证号"
)
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
private
String
empIdcardNo
;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回"
)
private
Integer
reduceHandleStatus
;
/**
/**
* 投保类型, 1新增、3批增、4替换
* 投保类型, 1新增、3批增、4替换
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
View file @
fe4bcc57
...
@@ -102,9 +102,7 @@ public class InsuredParam implements Serializable {
...
@@ -102,9 +102,7 @@ public class InsuredParam implements Serializable {
/**
/**
* 派单日期
* 派单日期
*/
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"派单日期"
)
@Schema
(
description
=
"派单日期"
)
@ExcelProperty
(
"派单日期"
)
private
String
createTime
;
private
LocalDateTime
createTime
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundMoneyParam.java
View file @
fe4bcc57
...
@@ -16,6 +16,12 @@ import java.io.Serializable;
...
@@ -16,6 +16,12 @@ import java.io.Serializable;
public
class
RefundMoneyParam
implements
Serializable
{
public
class
RefundMoneyParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
/**
* 员工姓名
* 员工姓名
*/
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
fe4bcc57
...
@@ -201,9 +201,9 @@ public class TInsuranceDetailController {
...
@@ -201,9 +201,9 @@ public class TInsuranceDetailController {
* @date 2022-07-19
* @date 2022-07-19
* @since v1.0
* @since v1.0
*/
*/
@PostMapping
(
"/
checkInsuranceRefundList
"
)
@PostMapping
(
"/
saveInsuranceRefund
"
)
public
R
checkInsuranceRefundList
(
@RequestBody
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
){
public
R
saveInsuranceRefund
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"导入减员列表不能为空"
)
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
){
return
tInsuranceDetailService
.
checkInsuranceRefundList
(
insuranceRefundCheckList
);
return
tInsuranceDetailService
.
saveInsuranceRefund
(
insuranceRefundCheckList
);
}
}
/**
/**
...
@@ -215,7 +215,7 @@ public class TInsuranceDetailController {
...
@@ -215,7 +215,7 @@ public class TInsuranceDetailController {
*/
*/
@PostMapping
(
"/settleMonthChange"
)
@PostMapping
(
"/settleMonthChange"
)
@Operation
(
summary
=
"变更结算月"
,
description
=
"变更结算月"
)
@Operation
(
summary
=
"变更结算月"
,
description
=
"变更结算月"
)
public
R
settleMonthChange
(
@RequestBody
List
<
SettleMonthChangeCheckParam
>
settleMonthCheckList
){
public
R
settleMonthChange
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"变更结算月不能为空"
)
List
<
SettleMonthChangeCheckParam
>
settleMonthCheckList
){
return
tInsuranceDetailService
.
settleMonthChange
(
settleMonthCheckList
);
return
tInsuranceDetailService
.
settleMonthChange
(
settleMonthCheckList
);
}
}
...
@@ -228,7 +228,7 @@ public class TInsuranceDetailController {
...
@@ -228,7 +228,7 @@ public class TInsuranceDetailController {
*/
*/
@PostMapping
(
"/deptChange"
)
@PostMapping
(
"/deptChange"
)
@Operation
(
summary
=
"变更所属项目"
,
description
=
"变更所属项目"
)
@Operation
(
summary
=
"变更所属项目"
,
description
=
"变更所属项目"
)
public
R
deptChange
(
@RequestBody
List
<
DeptChangeCheckParam
>
deptChangeCheckList
){
public
R
deptChange
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"变更所属项目不能为空"
)
List
<
DeptChangeCheckParam
>
deptChangeCheckList
){
return
tInsuranceDetailService
.
deptChange
(
deptChangeCheckList
);
return
tInsuranceDetailService
.
deptChange
(
deptChangeCheckList
);
}
}
...
@@ -351,7 +351,6 @@ public class TInsuranceDetailController {
...
@@ -351,7 +351,6 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
selectByTypeId
(
id
);
return
tInsuranceDetailService
.
selectByTypeId
(
id
);
}
}
/**
/**
* 出险
* 出险
*
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
View file @
fe4bcc57
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefundDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -140,4 +141,13 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
...
@@ -140,4 +141,13 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @return {@link List< TInsuranceDetail>}
* @return {@link List< TInsuranceDetail>}
*/
*/
List
<
TInsuranceDetail
>
selectDetailListByIds
(
@Param
(
"idList"
)
String
[]
idList
);
List
<
TInsuranceDetail
>
selectDetailListByIds
(
@Param
(
"idList"
)
String
[]
idList
);
/**
* 查询保单减员退费信息
*
* @author zhaji
* @param refundDetail
* @return {@link TInsuranceRefundDetail}
*/
TInsuranceRefundDetail
selectRefundDetail
(
@Param
(
"param"
)
TInsuranceRefundDetail
refundDetail
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
fe4bcc57
...
@@ -129,13 +129,13 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
...
@@ -129,13 +129,13 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
/***********************减员办理********************************/
/***********************减员办理********************************/
/**
/**
* 减员导入
校验
* 减员导入
*
*
* @author zhaji
* @author zhaji
* @param insuranceRefundCheckList 减员表
* @param insuranceRefundCheckList 减员表
* @return {@link R}
* @return {@link R}
*/
*/
R
checkInsuranceRefundList
(
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
);
R
saveInsuranceRefund
(
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
);
/**
/**
* 已投保列表分页查询
* 已投保列表分页查询
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceRefundService.java
View file @
fe4bcc57
...
@@ -9,7 +9,6 @@ import org.springframework.stereotype.Service;
...
@@ -9,7 +9,6 @@ import org.springframework.stereotype.Service;
* @description 针对表【t_insurance_refund(减员信息表)】的数据库操作Service
* @description 针对表【t_insurance_refund(减员信息表)】的数据库操作Service
* @createDate 2022-07-25 21:06:36
* @createDate 2022-07-25 21:06:36
*/
*/
@Service
public
interface
TInsuranceRefundService
extends
IService
<
TInsuranceRefund
>
{
public
interface
TInsuranceRefundService
extends
IService
<
TInsuranceRefund
>
{
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceCompanyServiceImpl.java
View file @
fe4bcc57
...
@@ -53,6 +53,10 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
...
@@ -53,6 +53,10 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
billingType
)
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
billingType
)){
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
billingType
)
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
billingType
)){
return
R
.
failed
(
"计费方式格式不正确"
);
return
R
.
failed
(
"计费方式格式不正确"
);
}
}
String
companyName
=
insuranceCompany
.
getCompanyName
();
if
(
companyName
.
length
()>
CommonConstants
.
SIXTY_INT
){
return
R
.
failed
(
"保险公司名称过长"
);
}
boolean
b
=
companyIsExists
(
insuranceCompany
.
getCompanyName
());
boolean
b
=
companyIsExists
(
insuranceCompany
.
getCompanyName
());
if
(!
b
){
if
(!
b
){
insuranceCompany
.
setCreateBy
(
user
.
getId
());
insuranceCompany
.
setCreateBy
(
user
.
getId
());
...
@@ -90,6 +94,10 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
...
@@ -90,6 +94,10 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
return
R
.
failed
(
"要修改的保险公司不存在或已被删除"
);
return
R
.
failed
(
"要修改的保险公司不存在或已被删除"
);
}
}
String
companyName
=
one
.
getCompanyName
();
String
companyName
=
one
.
getCompanyName
();
String
newCompanyName
=
insuranceCompany
.
getCompanyName
();
if
(
newCompanyName
.
length
()>
CommonConstants
.
SIXTY_INT
){
return
R
.
failed
(
"要修改的保险公司名称过长"
);
}
//如果当前保险公司名称和修改后的名称不同
//如果当前保险公司名称和修改后的名称不同
if
(!
companyName
.
equals
(
insuranceCompany
.
getCompanyName
())){
if
(!
companyName
.
equals
(
insuranceCompany
.
getCompanyName
())){
//校验旧的保险公司名称是否已存在对应的商险信息
//校验旧的保险公司名称是否已存在对应的商险信息
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
fe4bcc57
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.BeanUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
@@ -36,9 +38,7 @@ import org.springframework.stereotype.Service;
...
@@ -36,9 +38,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.sql.Array
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
...
@@ -73,6 +73,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -73,6 +73,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private
TInsuranceOperateService
tInsuranceOperateService
;
private
TInsuranceOperateService
tInsuranceOperateService
;
@Resource
@Resource
private
CheckDaprUtil
checkDaprUtil
;
private
CheckDaprUtil
checkDaprUtil
;
@Resource
private
TInsuranceRefundService
tInsuranceRefundService
;
/***********************商险办理********************************/
/***********************商险办理********************************/
...
@@ -1423,6 +1425,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1423,6 +1425,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
/***********************减员办理********************************/
/***********************减员办理********************************/
/**
/**
* 减员导入校验
* 减员导入校验
*
*
...
@@ -1430,14 +1434,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1430,14 +1434,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param insuranceRefundCheckList 减员表
* @param insuranceRefundCheckList 减员表
* @return {@link R}
* @return {@link R}
*/
*/
@Override
public
Map
<
String
,
List
<
InsuranceRefundCheck
>>
checkInsuranceRefundList
(
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
){
public
R
checkInsuranceRefundList
(
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
)
{
List
<
InsuranceRefundCheck
>
errorList
=
new
ArrayList
<>(
128
);
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
InsuranceRefundCheck
>
successList
=
new
ArrayList
<>();
if
(!
Common
.
isNotEmpty
(
insuranceRefundCheckList
)){
Map
<
String
,
List
<
InsuranceRefundCheck
>>
map
=
new
HashMap
<>();
return
R
.
failed
(
"当前导入的减员信息为空"
);
}
List
<
InsuranceRefundCheck
>
errorList
=
new
ArrayList
(
128
);
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
for
(
InsuranceRefundCheck
param
:
insuranceRefundCheckList
)
{
for
(
InsuranceRefundCheck
param
:
insuranceRefundCheckList
)
{
//员工姓名
//员工姓名
String
empName
=
param
.
getEmpName
();
String
empName
=
param
.
getEmpName
();
...
@@ -1448,7 +1448,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1448,7 +1448,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//员工身份证
//员工身份证
String
empIdCardNo
=
param
.
getEmpId
C
ardNo
();
String
empIdCardNo
=
param
.
getEmpId
c
ardNo
();
if
(
StringUtils
.
isBlank
(
empIdCardNo
)){
if
(
StringUtils
.
isBlank
(
empIdCardNo
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
errorList
.
add
(
param
);
errorList
.
add
(
param
);
...
@@ -1488,7 +1488,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1488,7 +1488,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
// 身份证号位数校验(18 位合法)
// 身份证号位数校验(18 位合法)
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpId
C
ardNo
())){
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpId
c
ardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
continue
;
...
@@ -1515,6 +1515,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1515,6 +1515,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//当前保单信息的不是已投保状态不能导入
Integer
buyHandleStatus
=
one
.
getBuyHandleStatus
();
Integer
buyHandleStatus
=
one
.
getBuyHandleStatus
();
if
(
CommonConstants
.
THREE_INT
!=
buyHandleStatus
){
if
(
CommonConstants
.
THREE_INT
!=
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_ERROR
);
...
@@ -1546,16 +1547,55 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1546,16 +1547,55 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
one
.
setReduceHandleStatus
(
CommonConstants
.
ONE_INT
);
param
.
setId
(
one
.
getId
());
one
.
setUpdateTime
(
LocalDateTime
.
now
());
successList
.
add
(
param
);
one
.
setUpdateBy
(
user
.
getId
());
}
successList
.
add
(
one
);
map
.
put
(
"successList"
,
successList
);
map
.
put
(
"errorList"
,
errorList
);
return
map
;
};
/**
* 减员导入
*
* @author zhaji
* @param insuranceRefundCheckList 减员表
* @return {@link R}
*/
@Override
public
R
saveInsuranceRefund
(
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(!
Common
.
isNotEmpty
(
insuranceRefundCheckList
)){
return
R
.
failed
(
"当前导入的减员信息为空"
);
}
}
//批量更新减员状态
Map
<
String
,
List
<
InsuranceRefundCheck
>>
refundMap
=
checkInsuranceRefundList
(
insuranceRefundCheckList
);
List
<
InsuranceRefundCheck
>
successList
=
refundMap
.
get
(
"successList"
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
this
.
updateBatchById
(
successList
);
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
())
.
set
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
ONE_INT
);
for
(
InsuranceRefundCheck
refund
:
successList
)
{
TInsuranceRefund
insuranceRefund
=
new
TInsuranceRefund
();
insuranceRefund
.
setInsDetailId
(
refund
.
getId
());
insuranceRefund
.
setEmpName
(
refund
.
getEmpName
());
insuranceRefund
.
setEmpIdcardNo
(
refund
.
getEmpIdcardNo
());
insuranceRefund
.
setEmpName
(
refund
.
getEmpName
());
insuranceRefund
.
setPolicyNo
(
refund
.
getPolicyNo
());
insuranceRefund
.
setReduceHandleStatus
(
CommonConstants
.
ONE_INT
);
insuranceRefund
.
setCreateBy
(
user
.
getId
());
insuranceRefund
.
setCreateName
(
user
.
getNickname
());
insuranceRefund
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceRefund
.
setRemark
(
refund
.
getRemark
());
refundList
.
add
(
insuranceRefund
);
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
refund
.
getId
());
update
(
updateWrapper
);
}
}
return
R
.
ok
(
errorList
);
tInsuranceRefundService
.
saveBatch
(
refundList
);
}
List
<
InsuranceRefundCheck
>
errorList
=
refundMap
.
get
(
"errorList"
);
return
R
.
ok
(
errorList
,
"校验完成,成功:"
+
successList
.
size
()+
"条,失败:"
+
errorList
.
size
()+
"条"
);
}
}
/**
/**
...
@@ -1573,7 +1613,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1573,7 +1613,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!
=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
=
=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuredListVo
record
:
insuranceList
.
getRecords
())
{
for
(
InsuredListVo
record
:
insuranceList
.
getRecords
())
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
@@ -2077,8 +2117,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2077,8 +2117,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceDetail
.
setIsUse
(
CommonConstants
.
ONE_INT
);
insuranceDetail
.
setIsUse
(
CommonConstants
.
ONE_INT
);
insuranceDetail
.
setUpdateBy
(
user
.
getId
());
insuranceDetail
.
setUpdateBy
(
user
.
getId
());
insuranceDetail
.
setUpdateTime
(
LocalDateTime
.
now
());
insuranceDetail
.
setUpdateTime
(
LocalDateTime
.
now
());
updateById
(
insuranceDetail
);
return
R
.
ok
(
updateById
(
insuranceDetail
),
"出险成功"
);
return
null
;
}
}
/**
/**
...
@@ -2091,15 +2130,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2091,15 +2130,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
@Override
public
R
updateRefundMoney
(
List
<
RefundMoneyParam
>
paramList
)
{
public
R
updateRefundMoney
(
List
<
RefundMoneyParam
>
paramList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
TInsuranceRefund
>
insuranceRefundList
=
new
ArrayList
<>();
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
refundMoneyCheck
(
paramList
);
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
refundMoneyCheck
(
paramList
);
map
.
get
(
"errorList"
);
List
<
RefundMoneyParam
>
successList
=
map
.
get
(
"successList"
);
List
<
RefundMoneyParam
>
successList
=
map
.
get
(
"successList"
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
RefundMoneyParam
param
:
successList
)
{
for
(
RefundMoneyParam
param
:
successList
)
{
TInsuranceRefund
insuranceRefund
=
new
TInsuranceRefund
();
insuranceRefund
.
setInsDetailId
(
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
());
insuranceRefundList
.
add
(
insuranceRefund
);
}
tInsuranceRefundService
.
saveBatch
(
insuranceRefundList
);
}
}
return
R
.
ok
(
map
.
get
(
"errorList"
));
return
R
.
ok
(
map
.
get
(
"errorList"
));
}
}
/**
* 校验保单退费
*
* @author zhaji
* @param paramList 变更列表
* @return {@link R}
*/
public
Map
<
String
,
List
<
RefundMoneyParam
>>
refundMoneyCheck
(
List
<
RefundMoneyParam
>
paramList
){
public
Map
<
String
,
List
<
RefundMoneyParam
>>
refundMoneyCheck
(
List
<
RefundMoneyParam
>
paramList
){
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
new
HashMap
<>(
16
);
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
new
HashMap
<>(
16
);
...
@@ -2162,10 +2217,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2162,10 +2217,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//必填格式校通过后查询对应的保单信息
TInsuranceRefundDetail
refundDetail
=
new
TInsuranceRefundDetail
();
refundDetail
.
setEmpName
(
empName
);
refundDetail
.
setEmpIdcardNo
(
empIdcardNo
);
refundDetail
.
setPolicyNo
(
policyNo
);
TInsuranceRefundDetail
tInsuranceRefundDetail
=
this
.
baseMapper
.
selectRefundDetail
(
refundDetail
);
if
(
Common
.
isEmpty
(
tInsuranceRefundDetail
)){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_IS_NULL
);
errorList
.
add
(
param
);
continue
;
}
if
(
null
!=
tInsuranceRefundDetail
.
getRefundMoney
()){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_IS_NOT_NULL
);
errorList
.
add
(
param
);
continue
;
}
param
.
setId
(
tInsuranceRefundDetail
.
getInsDetailId
());
successList
.
add
(
param
);
successList
.
add
(
param
);
}
}
map
.
put
(
"errorList"
,
errorList
);
map
.
put
(
"errorList"
,
errorList
);
map
.
put
(
"successList"
,
successList
);
map
.
put
(
"successList"
,
successList
);
return
map
;
return
map
;
...
@@ -2339,4 +2409,5 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2339,4 +2409,5 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
map
.
put
(
"successList"
,
successList
);
map
.
put
(
"successList"
,
successList
);
return
map
;
return
map
;
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
fe4bcc57
...
@@ -263,6 +263,7 @@
...
@@ -263,6 +263,7 @@
detail.POLICY_END as policyEnd,
detail.POLICY_END as policyEnd,
detail.POLICY_EFFECT as policyEffect,
detail.POLICY_EFFECT as policyEffect,
detail.IS_USE as isUse,
detail.IS_USE as isUse,
detail.INVOICE_NO as isOverdue,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard
detail.BUY_STANDARD as buyStandard
...
@@ -287,11 +288,18 @@
...
@@ -287,11 +288,18 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''
and param.policyEnd == null and param.policyEnd.trim() == ''
"
>
AND detail.POLICY_
START >=
concat(#{param.policyStart}, ' 00:00:00')
AND detail.POLICY_
END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00')
</if>
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''"
>
AND detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
AND detail.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() != ''"
>
and (
(detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_START
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
</if>
<if
test=
"param.invoiceNo != null and param.invoiceNo.trim() != ''"
>
<if
test=
"param.invoiceNo != null and param.invoiceNo.trim() != ''"
>
and detail.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
and detail.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
...
@@ -299,7 +307,7 @@
...
@@ -299,7 +307,7 @@
<if
test=
"param.isUse != null"
>
<if
test=
"param.isUse != null"
>
and detail.IS_USE = #{param.isUse}
and detail.IS_USE = #{param.isUse}
</if>
</if>
<if
test=
"param.isOverdue != null
and param.isOverdue.trim() != ''
"
>
<if
test=
"param.isOverdue != null"
>
and detail.IS_OVERDUE = #{param.isOverdue}
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
</if>
<if
test=
"param.createTime != null and param.createTime.trim() != ''"
>
<if
test=
"param.createTime != null and param.createTime.trim() != ''"
>
...
@@ -358,11 +366,18 @@
...
@@ -358,11 +366,18 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''"
>
AND detail.POLICY_START >= concat(#{param.policyStart}, ' 00:00:00')
AND detail.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() == ''"
>
AND detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
AND detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
and (
(detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_START
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
</if>
<if
test=
"param.invoiceNo != null and param.invoiceNo.trim() != ''"
>
<if
test=
"param.invoiceNo != null and param.invoiceNo.trim() != ''"
>
and detail.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
and detail.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
...
@@ -370,7 +385,7 @@
...
@@ -370,7 +385,7 @@
<if
test=
"param.isUse != null"
>
<if
test=
"param.isUse != null"
>
and detail.IS_USE = #{param.isUse}
and detail.IS_USE = #{param.isUse}
</if>
</if>
<if
test=
"param.isOverdue != null
and param.isOverdue.trim() != ''
"
>
<if
test=
"param.isOverdue != null "
>
and detail.IS_OVERDUE = #{param.isOverdue}
and detail.IS_OVERDUE = #{param.isOverdue}
</if>
</if>
<if
test=
"param.createTime != null and param.createTime.trim() != ''"
>
<if
test=
"param.createTime != null and param.createTime.trim() != ''"
>
...
@@ -414,11 +429,18 @@
...
@@ -414,11 +429,18 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''
and param.policyEnd == null and param.policyEnd.trim() == ''
"
>
AND detail.POLICY_
START >=
concat(#{param.policyStart}, ' 00:00:00')
AND detail.POLICY_
END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00')
</if>
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null and param.policyStart.trim() == ''"
>
AND detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
AND detail.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() != ''"
>
and (
(detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_START
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
</if>
ORDER BY refund.CREATE_TIME DESC
ORDER BY refund.CREATE_TIME DESC
</select>
</select>
...
@@ -466,11 +488,18 @@
...
@@ -466,11 +488,18 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
and detail.POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null and param.policyEnd.trim() == ''"
>
AND detail.POLICY_START >= concat(#{param.policyStart}, ' 00:00:00')
AND detail.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() == ''"
>
AND detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
<if
test=
"param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''"
>
AND detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
and (
(detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_START
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
</if>
ORDER BY refund.CREATE_TIME DESC
ORDER BY refund.CREATE_TIME DESC
</select>
</select>
...
@@ -514,10 +543,10 @@
...
@@ -514,10 +543,10 @@
<if
test=
"param.reduceHandleStatus != null and param.reduceHandleStatus.trim() != ''"
>
<if
test=
"param.reduceHandleStatus != null and param.reduceHandleStatus.trim() != ''"
>
and detail.REDUCE_HANDLE_STATUS like concat('%',replace(replace(#{param.reduceHandleStatus},'_','\_'),'%','\%'),'%')
and detail.REDUCE_HANDLE_STATUS like concat('%',replace(replace(#{param.reduceHandleStatus},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.isOverdue != null
and param.isOverdue.trim() != ''
"
>
<if
test=
"param.isOverdue != null"
>
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.isUse != null
and param.isUse.trim() != ''
"
>
<if
test=
"param.isUse != null"
>
and detail.IS_USE like concat('%',replace(replace(#{param.isUse},'_','\_'),'%','\%'),'%')
and detail.IS_USE like concat('%',replace(replace(#{param.isUse},'_','\_'),'%','\%'),'%')
</if>
</if>
ORDER BY refund.CREATE_TIME DESC
ORDER BY refund.CREATE_TIME DESC
...
@@ -563,15 +592,14 @@
...
@@ -563,15 +592,14 @@
<if
test=
"param.reduceHandleStatus != null and param.reduceHandleStatus.trim() != ''"
>
<if
test=
"param.reduceHandleStatus != null and param.reduceHandleStatus.trim() != ''"
>
and detail.REDUCE_HANDLE_STATUS like concat('%',replace(replace(#{param.reduceHandleStatus},'_','\_'),'%','\%'),'%')
and detail.REDUCE_HANDLE_STATUS like concat('%',replace(replace(#{param.reduceHandleStatus},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.isOverdue != null
and param.isOverdue.trim() != ''
"
>
<if
test=
"param.isOverdue != null "
>
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
</if>
</if>
<if
test=
"param.isUse != null
and param.isUse.trim() != ''
"
>
<if
test=
"param.isUse != null"
>
and detail.IS_USE like concat('%',replace(replace(#{param.isUse},'_','\_'),'%','\%'),'%')
and detail.IS_USE like concat('%',replace(replace(#{param.isUse},'_','\_'),'%','\%'),'%')
</if>
</if>
ORDER BY detail.REFUND_CREATE_TIME DESC
ORDER BY detail.REFUND_CREATE_TIME DESC
</select>
</select>
<select
id=
"selectDetailListByIds"
<select
id=
"selectDetailListByIds"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
select
select
...
@@ -584,7 +612,35 @@
...
@@ -584,7 +612,35 @@
#{item}
#{item}
</foreach>
</foreach>
</select>
</select>
<select
id=
"selectRefundDetail"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefundDetail"
>
select
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
refund.ID as id,
refund.INS_DETAIL_ID as insDetailId,
refund.REFUND_MONEY as refundMoney
from
t_insurance_detail detail,
t_insurance_refund refund
where
detail.DELETE_FLAG = 0
and
detail.ID = refund.INS_DETAIL_ID
and
detail.BUY_HANDLE_STATUS = 5
and
detail.REDUCE_HANDLE_STATUS = 4
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME = #{param.empName}
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and detail.EMP_IDCARD_NO = #{param.empIdcardNo}
</if>
<if
test=
"param.policyNo!= null and param.policyNo.trim() != ''"
>
and detail.POLICY_NO = #{param.policyNo}
</if>
</select>
<update
id=
"updateInsuranceRefund"
>
<update
id=
"updateInsuranceRefund"
>
update
update
t_insurance_detail detail
t_insurance_detail detail
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceOperateMapper.xml
View file @
fe4bcc57
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.
entity.TInsuranceOperate
"
>
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.
mapper.TInsuranceOperateMapper
"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceRefundMapper.xml
View file @
fe4bcc57
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
<id
property=
"id"
column=
"ID"
jdbcType=
"BIGINT"
/>
<id
property=
"id"
column=
"ID"
jdbcType=
"BIGINT"
/>
<result
property=
"insDetailId"
column=
"INS_DETAIL_ID"
jdbcType=
"BIGINT"
/>
<result
property=
"insDetailId"
column=
"INS_DETAIL_ID"
jdbcType=
"BIGINT"
/>
<result
property=
"reduceHandleStatus"
column=
"REDUCE_HANDLE_STATUS"
jdbcType=
"TINYINT"
/>
<result
property=
"reduceHandleStatus"
column=
"REDUCE_HANDLE_STATUS"
jdbcType=
"TINYINT"
/>
<result
property=
"empName"
column=
"EMP_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"empIdcardNo"
column=
"EMP_IDCARD_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"policyNo"
column=
"POLICY_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"refundMoney"
column=
"REFUND_MONEY"
jdbcType=
"DECIMAL"
/>
<result
property=
"refundMoney"
column=
"REFUND_MONEY"
jdbcType=
"DECIMAL"
/>
<result
property=
"remark"
column=
"REMARK"
jdbcType=
"VARCHAR"
/>
<result
property=
"remark"
column=
"REMARK"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
...
@@ -18,6 +21,6 @@
...
@@ -18,6 +21,6 @@
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
ID,INS_DETAIL_ID,REDUCE_HANDLE_STATUS,
ID,INS_DETAIL_ID,REDUCE_HANDLE_STATUS,
REFUND_MONEY,REMARK,CREATE_TIME,
REFUND_MONEY,REMARK,CREATE_TIME,
CREATE_BY,CREATE_NAME
CREATE_BY,CREATE_NAME
,EMP_NAME,EMP_IDCARD_NO,POLICY_NO
</sql>
</sql>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment