Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-plan
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
INET-TWO
server
dcs-plan
Commits
14fdf92f
Commit
14fdf92f
authored
Oct 09, 2024
by
侯彦文
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
8feff26c
a923cb11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
EasyExcelUtils.java
.../java/com/yonde/dcs/plan/common/utils/EasyExcelUtils.java
+1
-1
ICMPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/ICMPlanExcelListenner.java
+11
-2
No files found.
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/utils/EasyExcelUtils.java
View file @
14fdf92f
...
...
@@ -124,7 +124,7 @@ public class EasyExcelUtils {
response
.
setContentType
(
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
);
response
.
setCharacterEncoding
(
"utf-8"
);
String
fileName
=
URLEncoder
.
encode
(
rawFileName
,
"UTF-8"
).
replaceAll
(
"\\+"
,
"%20"
);
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename
*=utf-8''
"
+
fileName
+
".xlsx"
);
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename
=
"
+
fileName
+
".xlsx"
);
}
/**
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/ICMPlanExcelListenner.java
View file @
14fdf92f
...
...
@@ -6,6 +6,7 @@ import com.alibaba.excel.event.AnalysisEventListener;
import
com.alibaba.excel.util.BeanMapUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.StringUtils
;
import
com.google.common.collect.Lists
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.utils.SearchUtil
;
import
com.yonde.dcs.plan.common.vo.ExtICMExternalInterfacePlanVO
;
...
...
@@ -15,6 +16,7 @@ import com.yonde.dcs.plan.core.util.CommonUtils;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.data.search.SortItem
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
...
...
@@ -184,8 +186,15 @@ public class ICMPlanExcelListenner extends AnalysisEventListener<ExtICMPlanExcel
public
ExtICMExternalInterfacePlanVO
getICMPlanByPlanNumber
(
String
planNumber
)
{
//根据文件编号查询ICM计划
DxPageImpl
<
ExtICMExternalInterfacePlanVO
>
ICMPlanPage
=
extICMExternalInterfacePlanService
.
findRecursion
(
SearchUtil
.
buildQuery
(
"planNumber"
,
SearchItem
.
Operator
.
EQ
,
planNumber
));
SortItem
sortByModifyTime
=
new
SortItem
(
"createTime"
,
"desc"
);
SearchItems
icmPlanSearch
=
new
SearchItems
();
SearchItem
numberFilter
=
new
SearchItem
(
"planNumber"
,
SearchItem
.
Operator
.
EQ
,
planNumber
,
(
Object
)
null
);
SearchItem
latestFilter
=
new
SearchItem
(
"latest"
,
SearchItem
.
Operator
.
EQ
,
true
,
(
Object
)
null
);
icmPlanSearch
.
addItem
(
numberFilter
);
icmPlanSearch
.
addItem
(
latestFilter
);
SearchQueryCondition
searchQuery
=
SearchQueryCondition
.
builder
().
searchItems
(
icmPlanSearch
).
sortItem
(
Lists
.
newArrayList
(
new
SortItem
[]{
sortByModifyTime
})).
build
();
//根据计划编码查询出最新版本的计划
DxPageImpl
<
ExtICMExternalInterfacePlanVO
>
ICMPlanPage
=
extICMExternalInterfacePlanService
.
findRecursion
(
searchQuery
);
if
(!
CollectionUtils
.
isEmpty
(
ICMPlanPage
.
getContent
()))
{
ExtICMExternalInterfacePlanVO
extICMPlanVOForDB
=
DxPageUtils
.
getFirst
(
ICMPlanPage
);
return
extICMPlanVOForDB
;
...
...
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