Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
0debde2b
Commit
0debde2b
authored
Feb 18, 2024
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
3e8fcfb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
DataAnalysisComponent.java
...rc/main/java/com/dsk/component/DataAnalysisComponent.java
+11
-5
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/component/DataAnalysisComponent.java
View file @
0debde2b
...
@@ -59,19 +59,20 @@ public class DataAnalysisComponent {
...
@@ -59,19 +59,20 @@ public class DataAnalysisComponent {
//文件处理
//文件处理
for
(
CbProjectFile
file
:
fileList
)
{
for
(
CbProjectFile
file
:
fileList
)
{
if
(
file
.
getDelFlag
()
==
0
)
{
if
(
file
.
getDelFlag
()
==
0
)
{
//文件下载
//文件下载
InputStream
inputStream
=
ossService
.
downFileIO
(
file
.
getFileOssId
());
InputStream
inputStream
=
ossService
.
downFileIO
(
file
.
getFileOssId
());
if
(
ObjectUtil
.
isNull
(
inputStream
))
{
if
(
ObjectUtil
.
isNull
(
inputStream
))
{
file
.
setFailRemark
(
"文件数据不存在"
);
file
.
setFileParseStatus
(
3
);
file
.
setFileParseStatus
(
3
);
file
.
setFailRemark
(
"文件数据不存在"
);
projectFileService
.
updateById
(
file
);
projectFileService
.
updateById
(
file
);
break
;
break
;
}
}
//解析数据
//解析数据
List
<
CbQuantitySummary
>
importList
=
new
ExcelUtils
<>(
CbQuantitySummary
.
class
).
importExcelAllSheet
(
inputStream
,
1
);
List
<
CbQuantitySummary
>
importList
=
new
ExcelUtils
<>(
CbQuantitySummary
.
class
).
importExcelAllSheet
(
inputStream
,
1
);
if
(
importList
.
isEmpty
())
{
if
(
importList
.
isEmpty
())
{
file
.
setFailRemark
(
"表格中不存在待导入数据!"
);
file
.
setFileParseStatus
(
3
);
file
.
setFileParseStatus
(
3
);
file
.
setFailRemark
(
"表格中不存在待导入数据!"
);
projectFileService
.
updateById
(
file
);
projectFileService
.
updateById
(
file
);
break
;
break
;
}
}
...
@@ -106,10 +107,15 @@ public class DataAnalysisComponent {
...
@@ -106,10 +107,15 @@ public class DataAnalysisComponent {
}
}
}
}
file
.
setFileParseStatus
(
2
);
file
.
setFileParseStatus
(
2
);
projectFileService
.
updateById
(
file
);
boolean
b
=
projectFileService
.
updateById
(
file
);
}
catch
(
Exception
e
){
if
(!
b
)
{
throw
new
ServiceException
(
"文件状态更新失败!"
);
}
}
catch
(
Exception
e
)
{
status
.
setRollbackOnly
();
status
.
setRollbackOnly
();
file
.
setFileParseStatus
(
3
);
file
.
setFailRemark
(
e
.
getMessage
());
projectFileService
.
updateById
(
file
);
}
}
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
});
});
...
...
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