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
702da3e5
Commit
702da3e5
authored
Nov 11, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-licancan' into 'develop'
Feature licancan See merge request
!272
parents
aac0b056
98355d56
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
37 deletions
+116
-37
Dockerfile
yifu-insurances/yifu-insurances-biz/Dockerfile
+1
-1
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+9
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+35
-36
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+71
-0
No files found.
yifu-insurances/yifu-insurances-biz/Dockerfile
View file @
702da3e5
...
...
@@ -10,6 +10,6 @@ COPY ${JAR_FILE} app.jar
EXPOSE
5002
ENV
TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx
1024
m -Djava.security.egd=file:/dev/./urandom"
ENV
TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx
256
m -Djava.security.egd=file:/dev/./urandom"
CMD
sleep 60; java -jar app.jar $JAVA_OPTS
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
702da3e5
...
...
@@ -113,6 +113,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
List
<
InsuredListVo
>
getInsuredList
(
@Param
(
"param"
)
InsuredParam
param
);
/**
* 已投保列表不分页查询统计(excel导出统计)
*
* @author licancan
* @param param
* @return {@link long}
*/
long
getInsuredListCount
(
@Param
(
"param"
)
InsuredParam
param
);
/**
* 已减员列表分页查询
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
702da3e5
...
...
@@ -3375,35 +3375,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Common
.
isNotNull
(
param
.
getAuthSql
())
&&
param
.
getAuthSql
().
contains
(
"1=2 CONCAT"
))
{
param
.
setAuthSql
(
param
.
getAuthSql
().
replace
(
"1=2 CONCAT"
,
"CONCAT"
));
}
List
<
InsuredListVo
>
insuredList
;
insuredList
=
this
.
baseMapper
.
getInsuredList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuredList
)){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
InsuredListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
try
{
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuredListVo
record
:
insuredList
)
{
//购买月数
record
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
record
.
getPolicyStart
().
toString
(),
record
.
getPolicyEnd
().
toString
()));
if
(
data
!=
null
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
if
(
null
!=
jsonObject
)
{
record
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
}
}
}
}
}
catch
(
Exception
e
){
for
(
InsuredListVo
record
:
insuredList
)
{
record
.
setProjectName
(
CommonConstants
.
EMPTY_STRING
);
}
}
}
List
<
InsuredListVo
>
list
=
new
ArrayList
<>();
//处理导出
String
fileName
=
"商险已投保人员名册"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
long
count
=
insuredList
.
size
(
);
long
count
=
this
.
baseMapper
.
getInsuredListCount
(
param
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
...
...
@@ -3422,28 +3398,51 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 获取实际记录
param
.
setLimitStart
(
i
);
param
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
if
(
Common
.
isNotNull
(
insuredList
)){
list
=
this
.
baseMapper
.
getInsuredList
(
param
);
if
(
Common
.
isNotNull
(
list
)){
//处理封面抬头
//根据项目编码获取项目名称
Map
<
String
,
ProjectSetInfoVo
>
data
=
null
;
try
{
List
<
String
>
collect
=
list
.
stream
().
map
(
InsuredListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
data
=
null
;
}
util
=
new
ExcelUtil
<>(
InsuredListVo
.
class
);
for
(
InsuredListVo
vo:
insuredList
){
for
(
InsuredListVo
vo:
list
){
//购买月数
vo
.
setBuyMonth
(
LocalDateUtil
.
betweenMonth
(
vo
.
getPolicyStart
().
toString
(),
vo
.
getPolicyEnd
().
toString
()));
if
(
Objects
.
nonNull
(
data
))
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
vo
.
getDeptNo
());
if
(
null
!=
jsonObject
)
{
vo
.
setInvoiceTitle
(
Optional
.
ofNullable
(
jsonObject
.
getInvoiceTitleInsurance
()).
orElse
(
""
));
}
}
util
.
convertEntityAsso
(
vo
,
null
,
null
,
null
,
allFields
);
}
}
if
(
Common
.
isNotNull
(
insuredL
ist
)){
if
(
Common
.
isNotNull
(
l
ist
)){
writeSheet
=
EasyExcel
.
writerSheet
(
"sheet"
+
index
).
build
();
excelWriter
.
write
(
insuredL
ist
,
writeSheet
);
excelWriter
.
write
(
l
ist
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
insuredL
ist
)){
insuredL
ist
.
clear
();
if
(
Common
.
isNotNull
(
l
ist
)){
l
ist
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"sheet"
+
index
).
build
();
excelWriter
.
write
(
insuredL
ist
,
writeSheet
);
excelWriter
.
write
(
l
ist
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
insuredL
ist
)){
insuredL
ist
.
clear
();
if
(
Common
.
isNotNull
(
l
ist
)){
l
ist
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
702da3e5
...
...
@@ -608,6 +608,77 @@
${param.authSql}
</if>
ORDER BY a.CREATE_TIME DESC
<if
test=
"param != null"
>
<if
test=
"param.limitStart != null"
>
limit #{param.limitStart},#{param.limitEnd}
</if>
</if>
</select>
<select
id=
"getInsuredListCount"
resultType=
"java.lang.Long"
>
select
count(1)
from
t_insurance_detail a
where
a.DELETE_FLAG = 0
and
a.BUY_HANDLE_STATUS = 3
<if
test=
"param.createName != null and param.createName.trim() != ''"
>
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.buyType != null"
>
and a.BUY_TYPE = #{param.buyType}
</if>
<if
test=
"param.reduceHandleStatus != null"
>
and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.empIdcardNo != null and param.empIdcardNo.trim() != ''"
>
and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and a.DEPT_NO = #{param.deptNo}
</if>
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.policyNo != null and param.policyNo.trim() != ''"
>
and a.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 a.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 a.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 (
(a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(a.POLICY_START
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_START
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')) OR
(a.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<if
test=
"param.createStartTime != null and param.createStartTime.trim() != ''"
>
AND a.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.createStartTime}, ' 00:00:00')
</if>
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND a.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
<if
test=
"param.invoiceNo != null and param.invoiceNo.trim() != ''"
>
and a.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.isUse != null"
>
and a.IS_USE = #{param.isUse}
</if>
<if
test=
"param.isOverdue != null "
>
and a.IS_OVERDUE = #{param.isOverdue}
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
ORDER BY a.CREATE_TIME DESC
</select>
<!-- 已减员列表分页查询-->
<select
id=
"getInsuranceRefundPageList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
...
...
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