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
3d52eb9f
Commit
3d52eb9f
authored
Dec 13, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/insurance-1.3.0' into feature-1.3-zhaji
parents
3bb70e9b
11efed77
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
33 deletions
+38
-33
InsuranceExportListVO.java
...oud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
+0
-7
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+24
-18
TInsurancePolicyServiceImpl.java
...s/service/insurance/impl/TInsurancePolicyServiceImpl.java
+6
-0
TInsurancePolicyMapper.xml
...in/resources/mapper/insurances/TInsurancePolicyMapper.xml
+8
-8
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
View file @
3d52eb9f
...
...
@@ -6,7 +6,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
/**
...
...
@@ -153,12 +152,6 @@ public class InsuranceExportListVO implements Serializable {
@Schema
(
description
=
"身故或残疾额度"
)
private
String
dieDisableQuota
;
/**
* 实际保费
*/
@Schema
(
description
=
"实际保费"
)
private
BigDecimal
actualPremium
;
/**
* 结算月
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
3d52eb9f
...
...
@@ -2139,8 +2139,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
success
.
getBuyStandard
())
//排除替换类型
.
ne
(
TInsuranceDetail:
:
getBuyType
,
CommonConstants
.
FOUR_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -2148,9 +2146,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail
oldDetail
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
oldDetail
);
detail
.
setPolicyStart
(
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStartNew
()));
detail
.
setPolicyEnd
(
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEndNew
()));
detail
.
setBuyType
(
success
.
getBuyType
());
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyStartNew
())){
detail
.
setPolicyStart
(
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyStartNew
()));
}
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyEndNew
())){
detail
.
setPolicyEnd
(
LocalDateUtil
.
parseLocalDate
(
success
.
getPolicyEndNew
()));
}
if
(
Objects
.
nonNull
(
success
.
getBuyType
())){
detail
.
setBuyType
(
success
.
getBuyType
());
}
detailList
.
add
(
detail
);
//变更记录
tBusinessOperateService
.
saveModificationRecord
(
detail
.
getId
(),
oldDetail
,
detail
,
success
.
getReason
());
...
...
@@ -2208,41 +2212,41 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
if
(
StringUtils
.
isBlank
(
param
.
getId
())){
R
.
failed
(
InsurancesConstants
.
ID_IS_EMPTY
);
return
R
.
failed
(
InsurancesConstants
.
ID_IS_EMPTY
);
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())
&&
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())
&&
Objects
.
isNull
(
param
.
getBuyType
())){
R
.
failed
(
InsurancesConstants
.
CHOOSE_ONE_OF_THREE
);
return
R
.
failed
(
InsurancesConstants
.
CHOOSE_ONE_OF_THREE
);
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyStart
())){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
R
.
failed
(
InsurancesConstants
.
POLICY_START_NEW_PARSE_ERROR
);
return
R
.
failed
(
InsurancesConstants
.
POLICY_START_NEW_PARSE_ERROR
);
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyEnd
())){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
R
.
failed
(
InsurancesConstants
.
POLICY_END_NEW_PARSE_ERROR
);
return
R
.
failed
(
InsurancesConstants
.
POLICY_END_NEW_PARSE_ERROR
);
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyStart
())
&&
StringUtils
.
isNotBlank
(
param
.
getPolicyEnd
())){
if
(!
LocalDateUtil
.
compareDate
(
param
.
getPolicyStart
(),
param
.
getPolicyEnd
())){
R
.
failed
(
InsurancesConstants
.
POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW
);
return
R
.
failed
(
InsurancesConstants
.
POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW
);
}
}
if
(
StringUtils
.
isBlank
(
param
.
getReason
())){
R
.
failed
(
InsurancesConstants
.
REASON_EMPTY
);
return
R
.
failed
(
InsurancesConstants
.
REASON_EMPTY
);
}
if
(
StringUtils
.
isNotBlank
(
param
.
getReason
())
&&
!
ValidityUtil
.
validate50
(
param
.
getReason
())){
R
.
failed
(
InsurancesConstants
.
REASON_MORE_THAN_50
);
return
R
.
failed
(
InsurancesConstants
.
REASON_MORE_THAN_50
);
}
TInsuranceDetail
byId
=
this
.
getById
(
param
.
getId
());
if
(!
Optional
.
ofNullable
(
byId
).
isPresent
()){
R
.
failed
(
InsurancesConstants
.
NOT_FOUND_INSURANCE_RECORD
);
return
R
.
failed
(
InsurancesConstants
.
NOT_FOUND_INSURANCE_RECORD
);
}
if
(
byId
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
R
.
failed
(
InsurancesConstants
.
REPLACE_NOT_ALLOW
);
if
(
byId
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
&&
param
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
){
return
R
.
failed
(
InsurancesConstants
.
REPLACE_NOT_ALLOW
);
}
if
(
byId
.
getBuyHandleStatus
()
!=
CommonConstants
.
THREE_INT
&&
byId
.
getBuyHandleStatus
()
!=
CommonConstants
.
FIVE_INT
){
R
.
failed
(
InsurancesConstants
.
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
);
return
R
.
failed
(
InsurancesConstants
.
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
);
}
TInsuranceDetail
old
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
byId
,
old
);
...
...
@@ -3745,8 +3749,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyStart
()))
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
param
.
getPolicyEnd
()))
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
())
//排除替换类型
.
ne
(
TInsuranceDetail:
:
getBuyType
,
CommonConstants
.
FOUR_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
)
...
...
@@ -3760,6 +3762,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setErrorMessage
(
InsurancesConstants
.
CURRENT_STATUS_NOT_CHANGE_INSURANCE_RECORD
);
continue
;
}
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
&&
Objects
.
nonNull
(
param
.
getBuyType
())
&&
param
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_NOT_ALLOW
);
continue
;
}
}
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsurancePolicyServiceImpl.java
View file @
3d52eb9f
...
...
@@ -118,6 +118,12 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(!
Optional
.
ofNullable
(
one
).
isPresent
()){
this
.
save
(
policy
);
//第一次新增插入变更记录表为insert,前端会将insert渲染为批量导入
TBusinessOperate
operate
=
new
TBusinessOperate
();
operate
.
setBusinessId
(
policy
.
getId
());
operate
.
setDifferenceInfo
(
"insert"
);
tBusinessOperateService
.
save
(
operate
);
}
}
return
R
.
ok
();
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsurancePolicyMapper.xml
View file @
3d52eb9f
...
...
@@ -35,11 +35,11 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''
and param.policyEnd == null and param.policyEnd.trim() == ''
"
>
AND POLICY_
END
<![CDATA[ >= ]]>
#{param.policyStart}
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''"
>
AND POLICY_
START
<![CDATA[ >= ]]>
concat(#{param.policyStart},'')
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''
and param.policyStart == null and param.policyStart.trim() == ''
"
>
AND POLICY_
START
<![CDATA[ <= ]]>
#{param.policyEnd}
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
AND POLICY_
END
<![CDATA[ <= ]]>
concat(#{param.policyEnd},'')
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
...
...
@@ -61,11 +61,11 @@
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''
and param.policyEnd == null and param.policyEnd.trim() == ''
"
>
AND POLICY_
END
<![CDATA[ >= ]]>
#{param.policyStart}
<if
test=
"param.policyStart != null and param.policyStart.trim() != ''"
>
AND POLICY_
START
<![CDATA[ >= ]]>
concat(#{param.policyStart},'')
</if>
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''
and param.policyStart == null and param.policyStart.trim() == ''
"
>
AND POLICY_
START
<![CDATA[ <= ]]>
#{param.policyEnd}
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
AND POLICY_
END
<![CDATA[ <= ]]>
concat(#{param.policyEnd},'')
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
...
...
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