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
4f712cbf
Commit
4f712cbf
authored
Apr 06, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险到期调整
parent
06731025
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
29 deletions
+105
-29
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+2
-0
InsuranceSearchVo.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceSearchVo.java
+9
-0
InsuranceWarnExportVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceWarnExportVo.java
+7
-0
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+4
-1
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+15
-4
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+68
-24
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
4f712cbf
...
...
@@ -351,6 +351,8 @@ public interface CommonConstants {
// 给量大的表导出使用
int
EXCEL_EXPORT_LIMIT_3
=
30000
;
int
EXCEL_EXPORT_LIMIT_1
=
10000
;
String
USER
=
"用户"
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceSearchVo.java
View file @
4f712cbf
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.util.List
;
...
...
@@ -12,6 +15,12 @@ import java.util.List;
*/
@Data
public
class
InsuranceSearchVo
extends
TBusinessInsuranceVo
{
/**
* 商险购买地
*/
@Schema
(
name
=
"商险购买地市"
)
private
String
insuranceHandleCityName
;
private
List
<
String
>
idList
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceWarnExportVo.java
View file @
4f712cbf
...
...
@@ -206,6 +206,13 @@ public class InsuranceWarnExportVo implements Serializable {
@ExcelProperty
(
value
=
"商险购买地市"
)
@Schema
(
name
=
"商险购买地市"
)
private
String
insuranceCityName
;
/**
* 商险购买地
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"商险购买地市"
)
@Schema
(
name
=
"商险购买地市"
)
private
String
insuranceHandleCityName
;
/**
* 是否有效 0有效 1无效
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
4f712cbf
...
...
@@ -286,8 +286,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage
<
TBusinessInsuranceVo
>
getInsuranceExpireWarnVoPage
(
Page
<
TBusinessInsuranceVo
>
page
,
@Param
(
"param"
)
InsuranceSearchVo
param
,
@Param
(
"domains"
)
List
<
TSettleDomainSelectVo
>
domains
);
List
<
TBusinessInsuranceVo
>
pageDiy
(
@Param
(
"param"
)
InsuranceSearchVo
searchVo
,
@Param
(
"domains"
)
List
<
TSettleDomainSelectVo
>
domains
);
List
<
InsuranceWarnExportVo
>
noPageDiy
(
@Param
(
"param"
)
InsuranceSearchVo
searchVo
,
@Param
(
"domains"
)
List
<
TSettleDomainSelectVo
>
listSelectVO
);
List
<
InsuranceWarnExportVo
>
noPageDiy
(
@Param
(
"param"
)
InsuranceSearchVo
searchVo
,
@Param
(
"domains"
)
List
<
TSettleDomainSelectVo
>
listSelectVO
);
int
noPageCountDiy
(
@Param
(
"param"
)
InsuranceSearchVo
searchVo
,
@Param
(
"domains"
)
List
<
TSettleDomainSelectVo
>
listSelectVO
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
4f712cbf
...
...
@@ -7431,11 +7431,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
condition
.
setInsuranceProvinces
(
provinces
);
condition
.
setInsuranceCitys
(
citys
);
}
IPage
<
TBusinessInsuranceVo
>
recordsPage
=
new
Page
<>();
recordsPage
.
setTotal
(
baseMapper
.
noPageCountDiy
(
condition
,
null
));
int
limitStart
=
(
int
)(
page
.
getCurrent
()-
1
)*(
int
)
page
.
getSize
();
int
limitEnd
=
(
int
)
page
.
getSize
();
condition
.
setLimitStart
(
limitStart
);
condition
.
setLimitEnd
(
limitEnd
);
recordsPage
.
setPages
(
page
.
getPages
());
recordsPage
.
setSize
(
page
.
getSize
());
recordsPage
.
setCurrent
(
page
.
getCurrent
());
if
(
Common
.
isNotNull
(
sdRes
)
&&
Common
.
isNotNull
(
sdRes
.
getData
()))
{
re
turn
baseMapper
.
getInsuranceExpireWarnVoPage
(
page
,
condition
,
sdRes
.
getData
().
getListSelectVO
(
));
re
cordsPage
.
setRecords
(
baseMapper
.
pageDiy
(
condition
,
sdRes
.
getData
().
getListSelectVO
()
));
}
else
{
re
turn
baseMapper
.
getInsuranceExpireWarnVoPage
(
page
,
condition
,
null
);
re
cordsPage
.
setRecords
(
baseMapper
.
pageDiy
(
condition
,
null
)
);
}
return
recordsPage
;
}
@Override
...
...
@@ -7661,10 +7672,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
WriteSheet
writeSheet
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
_1
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
_1
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
writeSheet
=
EasyExcel
.
writerSheet
(
InsurancesConstants
.
INSURANCE_ALERT_EXPORT
+
index
).
build
();
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
4f712cbf
...
...
@@ -1641,17 +1641,24 @@
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
AND a.EMP_IDCARD_NO like CONCAT('%' ,#{param.empIdcardNo},'%')
</if>
<if
test=
"param.insuranceCityName != null and param.insuranceCityName.trim() != ''"
>
AND a.INSURANCE_CITY_NAME like CONCAT(#{param.insuranceCityName},'%')
</if>
<if
test=
"param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''"
>
AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%')
</if>
<if
test=
"param.idList != null and param.idList.size() > 0"
>
and a.id in
<foreach
collection=
"param.idList"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
<if
test=
"param.insuranceProvinces != null and param.insuranceProvinces != null"
>
and (1 = 2
<if
test=
"param.insuranceProvinces != null"
>
<if
test=
"param.insuranceProvinces.size() > 0"
>
and
a.INSURANCE_PROVINCE in
or
a.INSURANCE_PROVINCE in
<foreach
collection=
"param.insuranceProvinces"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
...
...
@@ -1659,15 +1666,16 @@
</if>
</if>
<if
test=
"param.insuranceCitys != null
and param.insuranceCitys != null
"
>
<if
test=
"param.insuranceCitys != null"
>
<if
test=
"param.insuranceCitys.size() > 0"
>
and a.INSURANCE_CITY in
<foreach
collection=
"param.insuranceCitys"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
or a.INSURANCE_CITY in
<foreach
collection=
"param.insuranceCitys"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
</if>
<if
test=
"param.insuranceCitys != null and param.insuranceProvinces != null"
>
<
!--<
if test="param.insuranceCitys != null and param.insuranceProvinces != null">
<if test="param.insuranceCitys.size() > 0 and param.insuranceProvinces.size() > 0">
and (
a.INSURANCE_PROVINCE in
...
...
@@ -1682,51 +1690,87 @@
</foreach>
)
</if>
</if>-->
<if
test=
"param == null"
>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if
test=
"domains != null"
>
<if
test=
"domains.size() > 0"
>
or a.SETTLEMENT_ORGAN in
<foreach
collection=
"domains"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
</if>
</if>
)
</if>
<!--数据权限判断-->
AND (a.CREATE_BY = #{param.createBy}
<if
test=
"domains != null"
>
<if
test=
"domains.size() > 0"
>
or a.SETTLEMENT_ORGAN in
<foreach
collection=
"domains"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
<if
test=
"param == null"
>
<!--数据权限判断-->
AND (a.CREATE_BY = #{param.createBy}
<if
test=
"domains != null"
>
<if
test=
"domains.size() > 0"
>
or a.SETTLEMENT_ORGAN in
<foreach
collection=
"domains"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
</if>
)
</if>
)
</where>
</sql>
<select
id=
"getInsuranceExpireWarnVoPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo"
>
<include
refid=
"expire_sql_param"
/>
from t_insurance_detail a
<include
refid=
"expire_sql_param"
/>
,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from t_insurance_detail a
<include
refid=
"expire_sql_where"
/>
) a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include
refid=
"expire_sql_where"
/>
order by a.CREATE_TIME desc
</select>
<select
id=
"noPageDiy"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo"
>
<include
refid=
"expire_export_sql_param"
/>
from t_insurance_detail a
<select
id=
"pageDiy"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo"
>
<include
refid=
"expire_sql_param"
/>
,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from t_insurance_detail a
<include
refid=
"expire_sql_where"
/>
order by a.CREATE_TIME desc
<if
test=
"param != null and param.limitStart != null"
>
limit #{param.limitStart},#{param.limitEnd}
</if>
) a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</select>
<select
id=
"noPageDiy"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo"
>
<include
refid=
"expire_export_sql_param"
/>
from
(select * from t_insurance_detail a
<include
refid=
"expire_sql_where"
/>
order by a.CREATE_TIME desc
<if
test=
"param != null and param.limitStart != null"
>
limit #{param.limitStart},#{param.limitEnd}
</if>
)a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
group by a.id
</select>
<select
id=
"noPageCountDiy"
resultType=
"java.lang.Integer"
>
select
count(1)
from t_insurance_detail a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
<!--
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
-->
<include
refid=
"expire_sql_where"
/>
order by a.CREATE_TIME desc
</select>
<update
id=
"batchexpireIgnore"
>
<if
test=
"idList != null and idList.size() > 0"
>
...
...
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