Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ask_data_ai_admin
Project
Project
Details
Activity
Releases
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
linyangyang
ask_data_ai_admin
Commits
a5f5931e
Commit
a5f5931e
authored
Jul 24, 2025
by
林洋洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板修改
parent
5bb40bed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
ExcelTools.java
...k-data-ai-biz/src/main/java/com/ask/tools/ExcelTools.java
+25
-0
科环集团电力运营日报模板.docx
...-ai/ask-data-ai-boot/src/main/resources/科环集团电力运营日报模板.docx
+0
-0
No files found.
ask-data-ai/ask-data-ai-biz/src/main/java/com/ask/tools/ExcelTools.java
View file @
a5f5931e
...
@@ -8,6 +8,7 @@ import com.ask.mapper.AskHistoryCollectDataMapper;
...
@@ -8,6 +8,7 @@ import com.ask.mapper.AskHistoryCollectDataMapper;
import
com.ask.mapper.AskReportDictMapper
;
import
com.ask.mapper.AskReportDictMapper
;
import
com.ask.utils.ConvertUtils
;
import
com.ask.utils.ConvertUtils
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.ai.tool.annotation.Tool
;
import
org.springframework.ai.tool.annotation.Tool
;
...
@@ -145,6 +146,9 @@ public class ExcelTools {
...
@@ -145,6 +146,9 @@ public class ExcelTools {
case
3
:
case
3
:
handleType3
(
askReportDict
.
getKey
(),
params
,
paramMap
,
result
);
handleType3
(
askReportDict
.
getKey
(),
params
,
paramMap
,
result
);
break
;
break
;
case
4
:
handleTypeSum
(
askReportDict
.
getKey
(),
params
,
paramMap
,
result
);
break
;
default
:
default
:
// Handle other types if necessary
// Handle other types if necessary
break
;
break
;
...
@@ -201,6 +205,27 @@ public class ExcelTools {
...
@@ -201,6 +205,27 @@ public class ExcelTools {
paramMap
.
put
(
key
,
percentageResult
);
paramMap
.
put
(
key
,
percentageResult
);
}
}
private
void
handleTypeSum
(
String
key
,
List
<
AskReportDict
.
Params
>
params
,
Map
<
String
,
Object
>
paramMap
,
Map
<
String
,
Double
>
result
)
{
AskReportDict
.
Params
param
=
params
.
get
(
0
);
if
(
param
==
null
)
{
return
;
}
String
keyC
=
params
.
get
(
0
).
getParam
();
if
(
StringUtils
.
isEmpty
(
keyC
))
{
return
;
}
AtomicReference
<
Double
>
realValue
=
new
AtomicReference
<>(
0.0
);
result
.
forEach
((
mapKey
,
value
)
->
{
if
(
mapKey
.
contains
(
keyC
))
{
realValue
.
set
(
realValue
.
get
()
+
value
);
}
});
if
(
realValue
.
get
()
!=
0.0
)
{
paramMap
.
put
(
key
,
realValue
.
get
());
}
}
private
Double
getParamValue
(
AskReportDict
.
Params
param
,
LocalDateTime
startTime
,
LocalDateTime
endTime
)
{
private
Double
getParamValue
(
AskReportDict
.
Params
param
,
LocalDateTime
startTime
,
LocalDateTime
endTime
)
{
try
{
try
{
if
(
param
.
getType
()
==
1
)
{
if
(
param
.
getType
()
==
1
)
{
...
...
ask-data-ai/ask-data-ai-boot/src/main/resources/科环集团电力运营日报模板.docx
View file @
a5f5931e
No preview for this file type
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