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
c86fb96b
Commit
c86fb96b
authored
Jul 25, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:新增减员信息表及相关实体类,操作层代码"
parent
de36924a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
670 additions
and
7 deletions
+670
-7
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+11
-1
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+25
-0
TInsuranceRefund.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceRefund.java
+60
-0
BigDecimalUtils.java
...u/cloud/plus/v1/yifu/insurances/util/BigDecimalUtils.java
+333
-0
InsuranceRefundResultVo.java
...d/plus/v1/yifu/insurances/vo/InsuranceRefundResultVo.java
+1
-1
RefundMoneyParam.java
...fu/cloud/plus/v1/yifu/insurances/vo/RefundMoneyParam.java
+49
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+15
-0
TInsuranceRefundMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceRefundMapper.java
+15
-0
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+10
-0
TInsuranceRefundService.java
...s/v1/yifu/insurances/service/TInsuranceRefundService.java
+13
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+97
-5
TInsuranceRefundServiceImpl.java
.../insurances/service/impl/TInsuranceRefundServiceImpl.java
+18
-0
TInsuranceRefundMapper.xml
...-biz/src/main/resources/mapper/TInsuranceRefundMapper.xml
+23
-0
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
c86fb96b
...
@@ -388,5 +388,15 @@ public interface CommonConstants {
...
@@ -388,5 +388,15 @@ public interface CommonConstants {
String
SIX_STRING
=
"6"
;
String
SIX_STRING
=
"6"
;
String
SEVEN_STRING
=
"7"
;
String
SEVEN_STRING
=
"7"
;
public
static
final
BigDecimal
MONEY_MAX
=
new
BigDecimal
(
"999999.99"
);
/**
* 工资最小不能小于零
*/
public
static
final
String
MONEY_MAX
=
"999999.99"
;
/**
* 工资最小不能小于零
*/
public
static
final
String
MONEY_MIN
=
"0"
;
public
static
final
int
TWENTY_INT
=
20
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
c86fb96b
...
@@ -308,4 +308,29 @@ public class InsurancesConstants {
...
@@ -308,4 +308,29 @@ public class InsurancesConstants {
*/
*/
public
static
final
String
DEPT_NO_CHANGE_SETTLE_HANDLE_STATUS_ERROR
=
"当前保单已结算,无法变更所属项目"
;
public
static
final
String
DEPT_NO_CHANGE_SETTLE_HANDLE_STATUS_ERROR
=
"当前保单已结算,无法变更所属项目"
;
/**
* 退费金额不能为空
*/
public
static
final
String
REFUND_MONEY_NOT_EMPTY
=
"退费金额不能为空"
;
/**
* 退费金额格式不正确
*/
public
static
final
String
REFUND_MONEY_PARSE_ERROR
=
"退费金额格式不正确"
;
/**
* 退费金额不能小于零
*/
public
static
final
String
REFUND_MONEY_MIN_ERROR
=
"退费金额不能小于零"
;
/**
* 退费金额不能大于999999.99
*/
public
static
final
String
REFUND_MONEY_MAX_ERROR
=
"退费金额不能大于999999.99"
;
/**
* 姓名不能超过20个字符
*/
public
static
final
String
EMP_NAME_MAX_LENGTH_ERROR
=
"姓名不能超过20个字符"
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceRefund.java
0 → 100644
View file @
c86fb96b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 减员信息表
* @TableName t_insurance_refund
*/
@Data
@Tag
(
name
=
"减员信息表"
)
public
class
TInsuranceRefund
implements
Serializable
{
/**
* 主键id
*/
private
Long
id
;
/**
* 保单信息主键
*/
private
Long
insDetailId
;
/**
* 减员状态
*/
private
Integer
reduceHandleStatus
;
/**
* 退费金额
*/
private
BigDecimal
refundMoney
;
/**
* 备注
*/
private
String
remark
;
/**
* 减员创建时间
*/
private
Date
createTime
;
/**
* 减员创建人
*/
private
String
createBy
;
/**
* 减员创建人姓名
*/
private
String
createName
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/BigDecimalUtils.java
0 → 100644
View file @
c86fb96b
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundResultVo.java
View file @
c86fb96b
...
@@ -89,6 +89,6 @@ public class InsuranceRefundResultVo implements Serializable {
...
@@ -89,6 +89,6 @@ public class InsuranceRefundResultVo implements Serializable {
/**
/**
* 错误原因
* 错误原因
*/
*/
@Schema
(
description
=
"
减员状态 1待减员 2减员中3减员退回
"
)
@Schema
(
description
=
"
错误原因
"
)
private
String
errorMessage
;
private
String
errorMessage
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundMoneyParam.java
0 → 100644
View file @
c86fb96b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author zhaji
* @description 减员退费导入表
* @date 2022-07-25 17:06:31
*/
@Data
@Tag
(
name
=
"减员退费导入表"
)
public
class
RefundMoneyParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 保单号
*/
@Schema
(
description
=
"保单号"
)
private
String
policyNo
;
/**
* 退费金额
*/
@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 @
c86fb96b
...
@@ -365,4 +365,19 @@ public class TInsuranceDetailController {
...
@@ -365,4 +365,19 @@ 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
tInsuranceDetailService
.
updateRefundMoney
(
paramList
);
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceRefundMapper.java
0 → 100644
View file @
c86fb96b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund
;
/**
* @author Administrator
* @description 针对表【t_insurance_refund(减员信息表)】的数据库操作Mapper
* @createDate 2022-07-25 21:06:36
* @Entity generator.domain.TInsuranceRefund
*/
public
interface
TInsuranceRefundMapper
extends
BaseMapper
<
TInsuranceRefund
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
c86fb96b
...
@@ -247,4 +247,14 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
...
@@ -247,4 +247,14 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R}
* @return {@link R}
*/
*/
R
updateIsUse
(
String
id
);
R
updateIsUse
(
String
id
);
/**
* 更新减员退费
*
* @author zhaji
* @param paramList
* @return {@link R}
*/
R
updateRefundMoney
(
List
<
RefundMoneyParam
>
paramList
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceRefundService.java
0 → 100644
View file @
c86fb96b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund
;
/**
* @author Administrator
* @description 针对表【t_insurance_refund(减员信息表)】的数据库操作Service
* @createDate 2022-07-25 21:06:36
*/
public
interface
TInsuranceRefundService
extends
IService
<
TInsuranceRefund
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
c86fb96b
...
@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
...
@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceDetailMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
...
@@ -36,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -36,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
import
java.sql.Array
;
import
java.sql.Array
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -1575,7 +1577,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1575,7 +1577,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuredList
.
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
:
insuredList
)
{
for
(
InsuredListVo
record
:
insuredList
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
@@ -1603,7 +1605,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1603,7 +1605,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundPageList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceRefundPageList
.
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
(
InsuranceRefundListVo
record
:
insuranceRefundPageList
.
getRecords
())
{
for
(
InsuranceRefundListVo
record
:
insuranceRefundPageList
.
getRecords
())
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
@@ -1630,7 +1632,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1630,7 +1632,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceRefundList
.
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
(
InsuranceRefundListVo
record
:
insuranceRefundList
)
{
for
(
InsuranceRefundListVo
record
:
insuranceRefundList
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
@@ -1659,7 +1661,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1659,7 +1661,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundHandlingPageList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceRefundHandlingPageList
.
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
(
InsuranceRefundHandlingListVo
record
:
insuranceRefundHandlingPageList
.
getRecords
())
{
for
(
InsuranceRefundHandlingListVo
record
:
insuranceRefundHandlingPageList
.
getRecords
())
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
@@ -1694,7 +1696,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1694,7 +1696,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundHandlingList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceRefundHandlingList
.
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
(
InsuranceRefundHandlingListVo
record
:
insuranceRefundHandlingList
)
{
for
(
InsuranceRefundHandlingListVo
record
:
insuranceRefundHandlingList
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
@@ -2056,6 +2058,96 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2056,6 +2058,96 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
null
;
return
null
;
}
}
/**
* 更新减员退费
*
* @author zhaji
* @param paramList
* @return {@link R}
*/
@Override
public
R
updateRefundMoney
(
List
<
RefundMoneyParam
>
paramList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
refundMoneyCheck
(
paramList
);
map
.
get
(
"errorList"
);
List
<
RefundMoneyParam
>
successList
=
map
.
get
(
"successList"
);
for
(
RefundMoneyParam
param
:
successList
)
{
}
return
R
.
ok
(
map
.
get
(
"errorList"
));
}
public
Map
<
String
,
List
<
RefundMoneyParam
>>
refundMoneyCheck
(
List
<
RefundMoneyParam
>
paramList
){
Map
<
String
,
List
<
RefundMoneyParam
>>
map
=
new
HashMap
<>(
16
);
List
<
RefundMoneyParam
>
errorList
=
new
ArrayList
<>();
List
<
RefundMoneyParam
>
successList
=
new
ArrayList
<>();
for
(
RefundMoneyParam
param
:
paramList
)
{
String
refundMoney
=
param
.
getRefundMoney
();
String
policyNo
=
param
.
getPolicyNo
();
String
empName
=
param
.
getEmpName
();
String
empIdcardNo
=
param
.
getEmpIdcardNo
();
//退费金额
if
(
StringUtils
.
isBlank
(
refundMoney
)){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//保单号
if
(
StringUtils
.
isBlank
(
policyNo
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//姓名
if
(
StringUtils
.
isBlank
(
empName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
//身份证号
if
(
StringUtils
.
isBlank
(
empIdcardNo
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
if
(
empName
.
length
()>
CommonConstants
.
TWENTY_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_MAX_LENGTH_ERROR
);
errorList
.
add
(
param
);
continue
;
}
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
empIdcardNo
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
errorList
.
add
(
param
);
continue
;
}
if
(
BigDecimalUtils
.
isBigDecimal
(
refundMoney
)){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_PARSE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
boolean
max
=
refundMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
<
0
;
boolean
min
=
refundMoney
.
compareTo
(
CommonConstants
.
MONEY_MIN
)
>
0
;
if
(
max
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_MAX_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
min
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_MONEY_MIN_ERROR
);
errorList
.
add
(
param
);
continue
;
}
successList
.
add
(
param
);
}
map
.
put
(
"errorList"
,
errorList
);
map
.
put
(
"successList"
,
successList
);
return
map
;
}
/**
/**
* 校验所属项目
* 校验所属项目
*
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceRefundServiceImpl.java
0 → 100644
View file @
c86fb96b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceRefundMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceRefundService
;
import
org.springframework.stereotype.Service
;
/**
* @author Administrator
* @description 针对表【t_insurance_refund(减员信息表)】的数据库操作Service实现
* @createDate 2022-07-25 21:06:36
*/
@Service
public
class
TInsuranceRefundServiceImpl
extends
ServiceImpl
<
TInsuranceRefundMapper
,
TInsuranceRefund
>
implements
TInsuranceRefundService
{
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceRefundMapper.xml
0 → 100644
View file @
c86fb96b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceRefundMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"BIGINT"
/>
<result
property=
"insDetailId"
column=
"INS_DETAIL_ID"
jdbcType=
"BIGINT"
/>
<result
property=
"reduceHandleStatus"
column=
"REDUCE_HANDLE_STATUS"
jdbcType=
"TINYINT"
/>
<result
property=
"refundMoney"
column=
"REFUND_MONEY"
jdbcType=
"DECIMAL"
/>
<result
property=
"remark"
column=
"REMARK"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,INS_DETAIL_ID,REDUCE_HANDLE_STATUS,
REFUND_MONEY,REMARK,CREATE_TIME,
CREATE_BY,CREATE_NAME
</sql>
</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