Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
6dc4fb70
You need to sign in or sign up before continuing.
Commit
6dc4fb70
authored
Jul 28, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
3f3aefcc
2b349193
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
359 additions
and
126 deletions
+359
-126
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+5
-5
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+34
-2
TInsuranceCompany.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
+4
-0
TInsuranceDetail.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
+6
-0
TInsuranceSettle.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceSettle.java
+1
-1
TInsuranceType.java
.../cloud/plus/v1/yifu/insurances/entity/TInsuranceType.java
+6
-2
TInsuranceTypeStandard.java
...lus/v1/yifu/insurances/entity/TInsuranceTypeStandard.java
+1
-1
ValidityUtil.java
...yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
+9
-8
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+1
-1
InsuranceBatchParam.java
...cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
+1
-1
InsuranceEditParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceEditParam.java
+1
-1
TInsuranceTypeMapper.java
.../plus/v1/yifu/insurances/mapper/TInsuranceTypeMapper.java
+3
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+239
-85
TInsuranceTypeServiceImpl.java
...fu/insurances/service/impl/TInsuranceTypeServiceImpl.java
+19
-9
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+8
-9
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+2
-1
TInsuranceTypeMapper.xml
...es-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
+19
-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 @
6dc4fb70
...
@@ -189,8 +189,8 @@ public interface CommonConstants {
...
@@ -189,8 +189,8 @@ public interface CommonConstants {
/**
/**
* 月份(阿里编码规约不允许直接使用‘魔法值’)
* 月份(阿里编码规约不允许直接使用‘魔法值’)
* @Author
pwang
* @Author
zhaji
* @Date 20
19-08-02
16:39
* @Date 20
22-07-28
16:39
**/
**/
String
[]
MonthStrArray
=
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
};
String
[]
MonthStrArray
=
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
};
...
@@ -409,14 +409,14 @@ public interface CommonConstants {
...
@@ -409,14 +409,14 @@ public interface CommonConstants {
String
SEVEN_STRING
=
"7"
;
String
SEVEN_STRING
=
"7"
;
/**
/**
* 工资最
小不能小于零
* 工资最
大不能超过9999999.99
*/
*/
public
static
final
String
MONEY_MAX
=
"9999999.99"
;
public
static
final
BigDecimal
MONEY_MAX
=
new
BigDecimal
(
"9999999.99"
)
;
/**
/**
* 工资最小不能小于零
* 工资最小不能小于零
*/
*/
public
static
final
String
MONEY_MIN
=
"0"
;
public
static
final
BigDecimal
MONEY_MIN
=
new
BigDecimal
(
0
)
;
public
static
final
int
TWENTY_INT
=
20
;
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 @
6dc4fb70
...
@@ -100,6 +100,10 @@ public class InsurancesConstants {
...
@@ -100,6 +100,10 @@ public class InsurancesConstants {
* 当前记录是投保中,无法替换
* 当前记录是投保中,无法替换
*/
*/
public
static
final
String
TWO_REPLACE_IS_NOT_ALLOW
=
"当前记录是投保中,无法替换"
;
public
static
final
String
TWO_REPLACE_IS_NOT_ALLOW
=
"当前记录是投保中,无法替换"
;
/**
* 当前记录是投保退回,无法替换
*/
public
static
final
String
FOUR_REPLACE_IS_NOT_ALLOW
=
"当前记录是投保退回,无法替换"
;
/**
/**
* 当前记录已出险,无法替换
* 当前记录已出险,无法替换
*/
*/
...
@@ -121,9 +125,9 @@ public class InsurancesConstants {
...
@@ -121,9 +125,9 @@ public class InsurancesConstants {
*/
*/
public
static
final
String
REDUCE_REPLACE_IS_NOT_ALLOW
=
"当前记录在减员流程中,无法替换"
;
public
static
final
String
REDUCE_REPLACE_IS_NOT_ALLOW
=
"当前记录在减员流程中,无法替换"
;
/**
/**
*
已减员
,无法退回
*
投保状态不是投保中或已投保
,无法退回
*/
*/
public
static
final
String
REDUCE_ROLLBACK_IS_NOT_ALLOW
=
"
已减员
,无法退回"
;
public
static
final
String
REDUCE_ROLLBACK_IS_NOT_ALLOW
=
"
投保状态不是投保中或已投保
,无法退回"
;
/**
/**
* 员工姓名不能为空
* 员工姓名不能为空
*/
*/
...
@@ -160,6 +164,10 @@ public class InsurancesConstants {
...
@@ -160,6 +164,10 @@ public class InsurancesConstants {
* 替换员工未通过实名认证
* 替换员工未通过实名认证
*/
*/
public
static
final
String
REPLACE_EMP_ID_CARD_NO_NOT_FIT
=
"替换员工未通过实名认证"
;
public
static
final
String
REPLACE_EMP_ID_CARD_NO_NOT_FIT
=
"替换员工未通过实名认证"
;
/**
* 替换信息和被替换信息一致,无法替换
*/
public
static
final
String
REPLACE_EMP_INFO_SAME
=
"替换信息和被替换信息一致,无法替换"
;
/**
/**
* 替换员工身份证号格式有误
* 替换员工身份证号格式有误
*/
*/
...
@@ -312,10 +320,34 @@ public class InsurancesConstants {
...
@@ -312,10 +320,34 @@ public class InsurancesConstants {
* 商险投保中,无法登记保单保费
* 商险投保中,无法登记保单保费
*/
*/
public
static
final
String
BUY_HANDLE_TWO_NOT_REGISTERED
=
"商险投保中,无法登记保单保费"
;
public
static
final
String
BUY_HANDLE_TWO_NOT_REGISTERED
=
"商险投保中,无法登记保单保费"
;
/**
* 非投保中状态,无法标记投保成功
*/
public
static
final
String
INSURANCE_BUY_STATUS_NOT_TWO
=
"非投保中状态,无法标记投保成功"
;
/**
* 商险投保退回,无法登记保单保费
*/
public
static
final
String
BUY_HANDLE_FOUR_NOT_REGISTERED
=
"商险投保退回,无法登记保单保费"
;
/**
* 商险结算中,无法登记保单保费
*/
public
static
final
String
SETTLE_HANDLE_TWO_NOT_REGISTERED
=
"商险结算中,无法登记保单保费"
;
/**
* 商险已结算,无法登记保单保费
*/
public
static
final
String
SETTLE_HANDLE_THREE_NOT_REGISTERED
=
"商险已结算,无法登记保单保费"
;
/**
/**
* 保单号不存在或已过期
* 保单号不存在或已过期
*/
*/
public
static
final
String
POLICY_NO_EXIST
=
"保单号不存在或已过期"
;
public
static
final
String
POLICY_NO_EXIST
=
"保单号不存在或已过期"
;
/**
* 保单号不存
*/
public
static
final
String
POLICY_NO_NOT_EXIST
=
"保单号不存"
;
/**
* 保单号信息错误
*/
public
static
final
String
POLICY_NO_ERROR
=
"保单号信息错误"
;
/**
/**
* 保险公司错误
* 保险公司错误
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
View file @
6dc4fb70
...
@@ -10,6 +10,7 @@ import lombok.Data;
...
@@ -10,6 +10,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.NonNull
;
import
lombok.NonNull
;
import
org.checkerframework.common.value.qual.StringVal
;
import
org.checkerframework.common.value.qual.StringVal
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
...
@@ -37,6 +38,7 @@ public class TInsuranceCompany extends BaseEntity {
...
@@ -37,6 +38,7 @@ public class TInsuranceCompany extends BaseEntity {
*/
*/
@NotBlank
(
message
=
"保险公司名称不能为空"
)
@NotBlank
(
message
=
"保险公司名称不能为空"
)
@Schema
(
description
=
"保险公司名称"
)
@Schema
(
description
=
"保险公司名称"
)
@Length
(
max
=
60
,
message
=
"保险公司名称必须小于等于60"
)
private
String
companyName
;
private
String
companyName
;
/**
/**
...
@@ -44,6 +46,7 @@ public class TInsuranceCompany extends BaseEntity {
...
@@ -44,6 +46,7 @@ public class TInsuranceCompany extends BaseEntity {
*/
*/
@NotBlank
(
message
=
"保险公司地址不能为空"
)
@NotBlank
(
message
=
"保险公司地址不能为空"
)
@Schema
(
description
=
"保险公司地址"
)
@Schema
(
description
=
"保险公司地址"
)
@Length
(
max
=
50
,
message
=
"保险公司地址必须小于等于50"
)
private
String
companyAddress
;
private
String
companyAddress
;
/**
/**
...
@@ -51,6 +54,7 @@ public class TInsuranceCompany extends BaseEntity {
...
@@ -51,6 +54,7 @@ public class TInsuranceCompany extends BaseEntity {
*/
*/
@NotBlank
(
message
=
"对接人不能为空"
)
@NotBlank
(
message
=
"对接人不能为空"
)
@Schema
(
description
=
"对接人"
)
@Schema
(
description
=
"对接人"
)
@Length
(
max
=
20
,
message
=
"险种名称必须小于等于20"
)
private
String
companyDocking
;
private
String
companyDocking
;
/**
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
View file @
6dc4fb70
...
@@ -203,6 +203,12 @@ public class TInsuranceDetail extends BaseEntity {
...
@@ -203,6 +203,12 @@ public class TInsuranceDetail extends BaseEntity {
@Schema
(
description
=
"预估保费"
)
@Schema
(
description
=
"预估保费"
)
private
BigDecimal
estimatePremium
;
private
BigDecimal
estimatePremium
;
/**
* 是否标记投保成功标识 0 未标记过 1标记过
*/
@Schema
(
description
=
"是否标记投保成功标识 0 未标记过 1标记过"
)
private
Integer
signFlag
;
/**
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceSettle.java
View file @
6dc4fb70
...
@@ -33,7 +33,7 @@ public class TInsuranceSettle implements Serializable {
...
@@ -33,7 +33,7 @@ public class TInsuranceSettle implements Serializable {
private
String
insDetailId
;
private
String
insDetailId
;
/**
/**
* 结算状态
* 结算状态
1、待结算,2、结算中,3、已结算
*/
*/
@Schema
(
description
=
"结算状态 1、待结算,2、结算中,3、已结算"
)
@Schema
(
description
=
"结算状态 1、待结算,2、结算中,3、已结算"
)
private
String
settleHandleStatus
;
private
String
settleHandleStatus
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceType.java
View file @
6dc4fb70
...
@@ -8,10 +8,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
...
@@ -8,10 +8,10 @@ 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
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
* 险种表
* 险种表
...
@@ -34,6 +34,7 @@ public class TInsuranceType extends BaseEntity {
...
@@ -34,6 +34,7 @@ public class TInsuranceType extends BaseEntity {
*/
*/
@NotBlank
(
message
=
"险种名称不能为空"
)
@NotBlank
(
message
=
"险种名称不能为空"
)
@Schema
(
description
=
"险种名称"
)
@Schema
(
description
=
"险种名称"
)
@Length
(
max
=
50
,
message
=
"险种名称必须小于等于50"
)
private
String
name
;
private
String
name
;
/**
/**
...
@@ -48,6 +49,7 @@ public class TInsuranceType extends BaseEntity {
...
@@ -48,6 +49,7 @@ public class TInsuranceType extends BaseEntity {
*/
*/
@NotBlank
(
message
=
"收款单位名称不能为空"
)
@NotBlank
(
message
=
"收款单位名称不能为空"
)
@Schema
(
description
=
"收款单位名称"
)
@Schema
(
description
=
"收款单位名称"
)
@Length
(
max
=
50
,
message
=
"收款单位名称必须小于等于50"
)
private
String
receiptUnitName
;
private
String
receiptUnitName
;
/**
/**
...
@@ -55,6 +57,7 @@ public class TInsuranceType extends BaseEntity {
...
@@ -55,6 +57,7 @@ public class TInsuranceType extends BaseEntity {
*/
*/
@NotBlank
(
message
=
"收款银行名称不能为空"
)
@NotBlank
(
message
=
"收款银行名称不能为空"
)
@Schema
(
description
=
"收款银行名称"
)
@Schema
(
description
=
"收款银行名称"
)
@Length
(
max
=
50
,
message
=
"收款银行名称必须小于等于50"
)
private
String
bankName
;
private
String
bankName
;
/**
/**
...
@@ -62,6 +65,7 @@ public class TInsuranceType extends BaseEntity {
...
@@ -62,6 +65,7 @@ public class TInsuranceType extends BaseEntity {
*/
*/
@NotBlank
(
message
=
"收款银行账号不能为空"
)
@NotBlank
(
message
=
"收款银行账号不能为空"
)
@Schema
(
description
=
"收款银行账号"
)
@Schema
(
description
=
"收款银行账号"
)
@Length
(
max
=
50
,
message
=
"收款银行账号必须小于等于50"
)
private
String
bankNo
;
private
String
bankNo
;
/**
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceTypeStandard.java
View file @
6dc4fb70
...
@@ -34,7 +34,7 @@ public class TInsuranceTypeStandard extends BaseEntity {
...
@@ -34,7 +34,7 @@ public class TInsuranceTypeStandard extends BaseEntity {
*/
*/
@Schema
(
description
=
"险种主键ID"
)
@Schema
(
description
=
"险种主键ID"
)
@NotBlank
(
message
=
"险种主键ID不能为空"
)
@NotBlank
(
message
=
"险种主键ID不能为空"
)
private
Lo
ng
insuranceTypeId
;
private
Stri
ng
insuranceTypeId
;
/**
/**
* 购买标准
* 购买标准
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
View file @
6dc4fb70
...
@@ -4,6 +4,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -4,6 +4,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ValidityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ValidityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
java.math.BigDecimal
;
import
java.util.StringTokenizer
;
import
java.util.StringTokenizer
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
...
@@ -154,22 +155,22 @@ public class ValidityUtil {
...
@@ -154,22 +155,22 @@ public class ValidityUtil {
/**
/**
* 判断是否是整数或者是携带一位或者两位的小数
* 判断是否是整数或者是携带一位或者两位的小数
* @param
refundM
oney 金额
* @param
m
oney 金额
* @return boolean
* @return boolean
*/
*/
public
static
boolean
validateMoney
(
final
String
refundM
oney
)
{
public
static
boolean
validateMoney
(
final
String
m
oney
)
{
if
(
Common
.
isEmpty
(
refundM
oney
)){
if
(
Common
.
isEmpty
(
m
oney
)){
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
if
(!
BigDecimalUtils
.
isBigDecimal
(
refundM
oney
)){
if
(!
BigDecimalUtils
.
isBigDecimal
(
m
oney
)){
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
if
(!
refundM
oney
.
matches
(
ValidityConstants
.
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
)){
if
(!
m
oney
.
matches
(
ValidityConstants
.
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
)){
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
boolean
max
=
refundMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
<
0
;
BigDecimal
bigDecimalMoney
=
new
BigDecimal
(
money
)
;
boolean
m
in
=
refundMoney
.
compareTo
(
CommonConstants
.
MONEY_MIN
)
>
0
;
boolean
m
ax
=
bigDecimalMoney
.
compareTo
(
CommonConstants
.
MONEY_MAX
)
>
0
;
if
(!
max
||
!
min
){
if
(
max
){
return
Boolean
.
FALSE
;
return
Boolean
.
FALSE
;
}
}
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
6dc4fb70
...
@@ -132,7 +132,7 @@ public class InsuranceAddParam implements Serializable {
...
@@ -132,7 +132,7 @@ public class InsuranceAddParam implements Serializable {
* 险种主键
* 险种主键
*/
*/
@JsonIgnore
@JsonIgnore
private
Lo
ng
insuranceTypeId
;
private
Stri
ng
insuranceTypeId
;
/**
/**
* 商险购买地省code
* 商险购买地省code
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
View file @
6dc4fb70
...
@@ -128,7 +128,7 @@ public class InsuranceBatchParam implements Serializable {
...
@@ -128,7 +128,7 @@ public class InsuranceBatchParam implements Serializable {
* 险种主键
* 险种主键
*/
*/
@JsonIgnore
@JsonIgnore
private
Lo
ng
insuranceTypeId
;
private
Stri
ng
insuranceTypeId
;
/**
/**
* 商险购买地省code
* 商险购买地省code
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceEditParam.java
View file @
6dc4fb70
...
@@ -155,5 +155,5 @@ public class InsuranceEditParam implements Serializable {
...
@@ -155,5 +155,5 @@ public class InsuranceEditParam implements Serializable {
* 险种主键
* 险种主键
*/
*/
@JsonIgnore
@JsonIgnore
private
Lo
ng
insuranceTypeId
;
private
Stri
ng
insuranceTypeId
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceTypeMapper.java
View file @
6dc4fb70
...
@@ -48,4 +48,7 @@ public interface TInsuranceTypeMapper extends BaseMapper<TInsuranceType> {
...
@@ -48,4 +48,7 @@ public interface TInsuranceTypeMapper extends BaseMapper<TInsuranceType> {
* @return {@link IPage< InsuranceTypeVo>}
* @return {@link IPage< InsuranceTypeVo>}
*/
*/
IPage
<
InsuranceTypeVo
>
selectInsuranceTypePage
(
Page
page
,
@Param
(
"insuranceType"
)
TInsuranceType
insuranceType
);
IPage
<
InsuranceTypeVo
>
selectInsuranceTypePage
(
Page
page
,
@Param
(
"insuranceType"
)
TInsuranceType
insuranceType
);
InsuranceTypeVo
getInsuranceTypeDetailById
(
String
id
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
6dc4fb70
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeServiceImpl.java
View file @
6dc4fb70
...
@@ -58,26 +58,38 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
...
@@ -58,26 +58,38 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
* 新增险种信息
* 新增险种信息
*
*
* @author zhaji
* @author zhaji
* @param insuranceType 新增
参数
* @param insuranceType 新增
险种信息
* @return {@link R}
* @return {@link R}
*/
*/
@Override
@Override
public
R
saveInsuranceType
(
TInsuranceType
insuranceType
)
{
public
R
saveInsuranceType
(
TInsuranceType
insuranceType
)
{
if
(
Common
.
isEmpty
(
insuranceType
)){
return
R
.
failed
(
"新增的险种信息为空"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
String
companyId
=
insuranceType
.
getInsuranceCompanyId
();
String
companyId
=
insuranceType
.
getInsuranceCompanyId
();
String
bankNo
=
insuranceType
.
getBankNo
();
String
bankNo
=
insuranceType
.
getBankNo
();
if
(!
Common
.
isNumber
(
bankNo
)){
String
bankName
=
insuranceType
.
getBankName
();
String
receiptUnitName
=
insuranceType
.
getReceiptUnitName
();
if
(!
ValidityUtil
.
validate50
(
insuranceType
.
getName
())){
return
R
.
failed
(
"险种格式不正确"
);
}
if
(!
ValidityUtil
.
validatePositiveInt
(
bankNo
)
||
!
ValidityUtil
.
validate50
(
bankNo
)){
return
R
.
failed
(
"银行账号格式不正确"
);
return
R
.
failed
(
"银行账号格式不正确"
);
}
}
if
(!
ValidityUtil
.
validate50
(
bankName
)){
return
R
.
failed
(
"收款银行格式不正确"
);
}
if
(!
ValidityUtil
.
validate50
(
receiptUnitName
)){
return
R
.
failed
(
"收款单位名称格式不正确"
);
}
LambdaQueryWrapper
<
TInsuranceCompany
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TInsuranceCompany
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
companyId
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
companyWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
companyId
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
insuranceCompany
=
insuranceCompanyService
.
getOne
(
companyWrapper
);
TInsuranceCompany
insuranceCompany
=
insuranceCompanyService
.
getOne
(
companyWrapper
);
if
(
Common
.
isEmpty
(
insuranceCompany
)){
if
(
Common
.
isEmpty
(
insuranceCompany
)){
return
R
.
failed
(
"所属保险公司不存在或已被删除"
);
return
R
.
failed
(
"所属保险公司不存在或已被删除"
);
}
}
if
(!
ValidityUtil
.
validate50
(
insuranceType
.
getName
())){
return
R
.
failed
(
"险种名称过长"
);
}
LambdaQueryWrapper
<
TInsuranceType
>
typeWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TInsuranceType
>
typeWrapper
=
new
LambdaQueryWrapper
<>();
typeWrapper
.
eq
(
TInsuranceType
::
getInsuranceCompanyId
,
companyId
).
eq
(
TInsuranceType:
:
getName
,
insuranceType
.
getName
()).
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
typeWrapper
.
eq
(
TInsuranceType
::
getInsuranceCompanyId
,
companyId
).
eq
(
TInsuranceType:
:
getName
,
insuranceType
.
getName
()).
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceType
type
=
getOne
(
typeWrapper
);
TInsuranceType
type
=
getOne
(
typeWrapper
);
...
@@ -104,12 +116,10 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
...
@@ -104,12 +116,10 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
if
(
Common
.
isEmpty
(
id
)){
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"险种ID不能为空"
);
return
R
.
failed
(
"险种ID不能为空"
);
}
}
InsuranceTypeVo
insuranceTypeVo
=
new
InsuranceTypeVo
();
InsuranceTypeVo
insuranceTypeVo
=
this
.
baseMapper
.
getInsuranceTypeDetailById
(
id
);
TInsuranceType
byId
=
getById
(
id
);
if
(
Common
.
isEmpty
(
insuranceTypeVo
)){
if
(
Common
.
isEmpty
(
byId
)
||
byId
.
getDeleteFlag
()
==
CommonConstants
.
ONE_INT
){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
}
BeanCopyUtils
.
copyProperties
(
byId
,
insuranceTypeVo
);
List
<
TInsuranceTypeRate
>
tInsuranceTypeRates
=
this
.
baseMapper
.
selectInsuranceTypeRateList
(
id
);
List
<
TInsuranceTypeRate
>
tInsuranceTypeRates
=
this
.
baseMapper
.
selectInsuranceTypeRateList
(
id
);
List
<
TInsuranceTypeStandard
>
tInsuranceTypeStandards
=
this
.
baseMapper
.
selectInsuranceTypeStandardList
(
id
);
List
<
TInsuranceTypeStandard
>
tInsuranceTypeStandards
=
this
.
baseMapper
.
selectInsuranceTypeStandardList
(
id
);
insuranceTypeVo
.
setInsuranceTypeRateList
(
tInsuranceTypeRates
);
insuranceTypeVo
.
setInsuranceTypeRateList
(
tInsuranceTypeRates
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
6dc4fb70
...
@@ -46,7 +46,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
...
@@ -46,7 +46,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* 查询购买标准列表
* 查询购买标准列表
*
*
* @author zhaji
* @author zhaji
* @param id
* @param id
购买标准id
* @return {@link R}
* @return {@link R}
*/
*/
@Override
@Override
...
@@ -67,7 +67,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
...
@@ -67,7 +67,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* 删除购买标准
* 删除购买标准
*
*
* @author zhaji
* @author zhaji
* @param id
* @param id
购买标准id
* @return {@link R}
* @return {@link R}
*/
*/
@Override
@Override
...
@@ -100,7 +100,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
...
@@ -100,7 +100,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* 新增购买标准
* 新增购买标准
*
*
* @author zhaji
* @author zhaji
* @param insuranceTypeStandard
* @param insuranceTypeStandard
购买标准
* @return {@link R}
* @return {@link R}
*/
*/
@Override
@Override
...
@@ -110,22 +110,22 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
...
@@ -110,22 +110,22 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
if
(
Common
.
isEmpty
(
insuranceTypeStandard
)){
if
(
Common
.
isEmpty
(
insuranceTypeStandard
)){
return
R
.
failed
(
"新增的购买标准信息为空"
);
return
R
.
failed
(
"新增的购买标准信息为空"
);
}
}
Lo
ng
insuranceTypeId
=
insuranceTypeStandard
.
getInsuranceTypeId
();
Stri
ng
insuranceTypeId
=
insuranceTypeStandard
.
getInsuranceTypeId
();
TInsuranceType
byId
=
tInsuranceTypeService
.
getById
(
insuranceTypeId
);
TInsuranceType
byId
=
tInsuranceTypeService
.
getById
(
insuranceTypeId
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"
当前
险种信息不存在或已被删除"
);
return
R
.
failed
(
"险种信息不存在或已被删除"
);
}
}
String
buyStandard
=
insuranceTypeStandard
.
getBuyStandard
();
String
buyStandard
=
insuranceTypeStandard
.
getBuyStandard
();
String
medicalQuota
=
insuranceTypeStandard
.
getMedicalQuota
();
String
medicalQuota
=
insuranceTypeStandard
.
getMedicalQuota
();
String
dieDisableQuota
=
insuranceTypeStandard
.
getDieDisableQuota
();
String
dieDisableQuota
=
insuranceTypeStandard
.
getDieDisableQuota
();
if
(!
ValidityUtil
.
validateMoney
(
buyStandard
)){
if
(!
ValidityUtil
.
validateMoney
(
buyStandard
)){
return
R
.
failed
(
"
当前
购买标准格式不正确"
);
return
R
.
failed
(
"购买标准格式不正确"
);
}
}
if
(!
ValidityUtil
.
validateMoney
(
medicalQuota
)){
if
(!
ValidityUtil
.
validateMoney
(
medicalQuota
)){
return
R
.
failed
(
"
当前
医疗额度格式不正确"
);
return
R
.
failed
(
"医疗额度格式不正确"
);
}
}
if
(!
ValidityUtil
.
validateMoney
(
dieDisableQuota
)){
if
(!
ValidityUtil
.
validateMoney
(
dieDisableQuota
)){
return
R
.
failed
(
"
当前
身故或残疾额度格式不正确"
);
return
R
.
failed
(
"身故或残疾额度格式不正确"
);
}
}
LambdaQueryWrapper
<
TInsuranceTypeStandard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TInsuranceTypeStandard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceTypeStandard
.
getInsuranceTypeId
())
queryWrapper
.
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
insuranceTypeStandard
.
getInsuranceTypeId
())
...
@@ -137,7 +137,6 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
...
@@ -137,7 +137,6 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
insuranceTypeStandard
.
setCreateBy
(
user
.
getId
());
insuranceTypeStandard
.
setCreateBy
(
user
.
getId
());
insuranceTypeStandard
.
setCreateName
(
user
.
getNickname
());
insuranceTypeStandard
.
setCreateName
(
user
.
getNickname
());
insuranceTypeStandard
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceTypeStandard
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeStandard
),
"新增购买标准成功"
);
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeStandard
),
"新增购买标准成功"
);
}
else
{
}
else
{
return
R
.
failed
(
"当前险种下的购买标准已存在"
);
return
R
.
failed
(
"当前险种下的购买标准已存在"
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
6dc4fb70
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
<result
property=
"settleType"
column=
"SETTLE_TYPE"
jdbcType=
"TINYINT"
/>
<result
property=
"settleType"
column=
"SETTLE_TYPE"
jdbcType=
"TINYINT"
/>
<result
property=
"actualPremium"
column=
"ACTUAL_PREMIUM"
jdbcType=
"DECIMAL"
/>
<result
property=
"actualPremium"
column=
"ACTUAL_PREMIUM"
jdbcType=
"DECIMAL"
/>
<result
property=
"estimatePremium"
column=
"ESTIMATE_PREMIUM"
jdbcType=
"DECIMAL"
/>
<result
property=
"estimatePremium"
column=
"ESTIMATE_PREMIUM"
jdbcType=
"DECIMAL"
/>
<result
property=
"signFlag"
column=
"SIGN_FLAG"
jdbcType=
"TINYINT"
/>
<result
property=
"buyHandleStatus"
column=
"BUY_HANDLE_STATUS"
jdbcType=
"TINYINT"
/>
<result
property=
"buyHandleStatus"
column=
"BUY_HANDLE_STATUS"
jdbcType=
"TINYINT"
/>
<result
property=
"defaultSettleId"
column=
"DEFAULT_SETTLE_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"defaultSettleId"
column=
"DEFAULT_SETTLE_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"reduceHandleStatus"
column=
"REDUCE_HANDLE_STATUS"
jdbcType=
"TINYINT"
/>
<result
property=
"reduceHandleStatus"
column=
"REDUCE_HANDLE_STATUS"
jdbcType=
"TINYINT"
/>
...
@@ -58,7 +59,7 @@
...
@@ -58,7 +59,7 @@
BATCH_DATE,SETTLE_MONTH,INVOICE_NO,
BATCH_DATE,SETTLE_MONTH,INVOICE_NO,
BUY_TYPE,INSURANCE_PROVINCE,INSURANCE_PROVINCE_NAME,INSURANCE_CITY,INSURANCE_CITY_NAME,
BUY_TYPE,INSURANCE_PROVINCE,INSURANCE_PROVINCE_NAME,INSURANCE_CITY,INSURANCE_CITY_NAME,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME,SETTLE_TYPE,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME,SETTLE_TYPE,
ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
SIGN_FLAG,
BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS,
BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME,
CREATE_BY,CREATE_NAME,CREATE_TIME,
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
View file @
6dc4fb70
...
@@ -71,5 +71,24 @@
...
@@ -71,5 +71,24 @@
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
</select>
</select>
<select
id=
"getInsuranceTypeDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo"
>
select
a.ID as id,
a.NAME as name ,
b.COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_COMPANY_ID as insuranceCompanyId,
a.RECEIPT_UNIT_NAME as receiptUnitName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo
from
t_insurance_type a,
t_insurance_company b
where
a.INSURANCE_COMPANY_ID = b.ID
and
a.ID = #{id}
and
a.DELETE_FLAG = 0
</select>
</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