Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gf_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianchao
gf_back
Commits
b5d364de
Commit
b5d364de
authored
Dec 09, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
9c3e5e36
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
C00-common/pps-common/src/main/java/pps/core/common/constant/BusinessConstant.java
.../main/java/pps/core/common/constant/BusinessConstant.java
+5
-0
C00-common/pps-common/src/main/java/pps/core/common/utils/BaseUtils.java
...common/src/main/java/pps/core/common/utils/BaseUtils.java
+3
-5
C09-base/pps-core-base/src/main/java/pps/core/base/service/WindPredictionFutureService.java
...va/pps/core/base/service/WindPredictionFutureService.java
+3
-3
No files found.
C00-common/pps-common/src/main/java/pps/core/common/constant/BusinessConstant.java
View file @
b5d364de
...
@@ -65,6 +65,11 @@ public class BusinessConstant {
...
@@ -65,6 +65,11 @@ public class BusinessConstant {
*/
*/
public
static
final
String
LAST_LIMIT_ORACLE
=
"AND ROWNUM = 1"
;
public
static
final
String
LAST_LIMIT_ORACLE
=
"AND ROWNUM = 1"
;
/**
* Oracle
*/
public
static
final
String
ORACLE
=
"Oracle"
;
/**
/**
* 开井
* 开井
*/
*/
...
...
C00-common/pps-common/src/main/java/pps/core/common/utils/BaseUtils.java
View file @
b5d364de
...
@@ -41,12 +41,10 @@ public class BaseUtils {
...
@@ -41,12 +41,10 @@ public class BaseUtils {
* @return {@link String }
* @return {@link String }
*/
*/
public
static
String
getLastLimit
()
{
public
static
String
getLastLimit
()
{
switch
(
DATA_BASE_ID
)
{
if
(
CharSequenceUtil
.
equals
(
DATA_BASE_ID
,
BusinessConstant
.
ORACLE
))
{
case
"Oracle"
:
return
BusinessConstant
.
LAST_LIMIT_ORACLE
;
return
BusinessConstant
.
LAST_LIMIT_ORACLE
;
default
:
return
BusinessConstant
.
LAST_LIMIT
;
}
}
return
BusinessConstant
.
LAST_LIMIT
;
}
}
/**
/**
...
...
C09-base/pps-core-base/src/main/java/pps/core/base/service/WindPredictionFutureService.java
View file @
b5d364de
...
@@ -770,7 +770,7 @@ public class WindPredictionFutureService {
...
@@ -770,7 +770,7 @@ public class WindPredictionFutureService {
private
Map
<
Date
,
WindPredictionFutureEnt
>
getPredictedMap
(
XContext
context
,
String
stationId
,
DateTime
beginTime
,
DateTime
endTime
)
{
private
Map
<
Date
,
WindPredictionFutureEnt
>
getPredictedMap
(
XContext
context
,
String
stationId
,
DateTime
beginTime
,
DateTime
endTime
)
{
QueryWrapper
<
WindPredictionFutureEnt
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
WindPredictionFutureEnt
>
queryWrapper
=
new
QueryWrapper
<>();
String
property
=
context
.
getProperty
(
"x.db.databaseId"
);
String
property
=
context
.
getProperty
(
"x.db.databaseId"
);
if
(
CharSequenceUtil
.
equals
(
property
,
"Oracle"
))
{
if
(
CharSequenceUtil
.
equals
(
property
,
BusinessConstant
.
ORACLE
))
{
queryWrapper
.
select
(
"DATA_TIME"
,
"NVL( MAX( ACTUAL_POWER ), 0 ) AS PREDICTED_POWER"
,
queryWrapper
.
select
(
"DATA_TIME"
,
"NVL( MAX( ACTUAL_POWER ), 0 ) AS PREDICTED_POWER"
,
"NVL( MAX( ACTUAL_WIND_SPEED ), 0 ) AS ACTUAL_WIND_SPEED"
,
"NVL( MAX( WIND_SPEED ), 0 ) AS WIND_SPEED"
);
"NVL( MAX( ACTUAL_WIND_SPEED ), 0 ) AS ACTUAL_WIND_SPEED"
,
"NVL( MAX( WIND_SPEED ), 0 ) AS WIND_SPEED"
);
}
else
{
}
else
{
...
@@ -810,7 +810,7 @@ public class WindPredictionFutureService {
...
@@ -810,7 +810,7 @@ public class WindPredictionFutureService {
private
Map
<
Date
,
BigDecimal
>
getPredictedMap
(
XContext
context
,
List
<
String
>
stationIds
,
Date
beginTime
,
Date
endTime
)
{
private
Map
<
Date
,
BigDecimal
>
getPredictedMap
(
XContext
context
,
List
<
String
>
stationIds
,
Date
beginTime
,
Date
endTime
)
{
QueryWrapper
<
WindPredictionFutureEnt
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
WindPredictionFutureEnt
>
queryWrapper
=
new
QueryWrapper
<>();
String
property
=
context
.
getProperty
(
"x.db.databaseId"
);
String
property
=
context
.
getProperty
(
"x.db.databaseId"
);
if
(
CharSequenceUtil
.
equals
(
property
,
"Oracle"
))
{
if
(
CharSequenceUtil
.
equals
(
property
,
BusinessConstant
.
ORACLE
))
{
queryWrapper
.
select
(
"DATA_TIME"
,
"NVL( SUM( ACTUAL_POWER ), 0 ) AS PREDICTED_POWER"
);
queryWrapper
.
select
(
"DATA_TIME"
,
"NVL( SUM( ACTUAL_POWER ), 0 ) AS PREDICTED_POWER"
);
}
else
{
}
else
{
queryWrapper
.
select
(
"DATA_TIME"
,
"IFNULL( SUM( ACTUAL_POWER ), 0 ) AS PREDICTED_POWER"
);
queryWrapper
.
select
(
"DATA_TIME"
,
"IFNULL( SUM( ACTUAL_POWER ), 0 ) AS PREDICTED_POWER"
);
...
@@ -872,7 +872,7 @@ public class WindPredictionFutureService {
...
@@ -872,7 +872,7 @@ public class WindPredictionFutureService {
private
Map
<
Date
,
ThirdWindPowerGenerationEnt
>
getActivePower15MinuteMap
(
XContext
context
,
String
stationId
,
DateTime
beginTime
,
DateTime
endTime
)
{
private
Map
<
Date
,
ThirdWindPowerGenerationEnt
>
getActivePower15MinuteMap
(
XContext
context
,
String
stationId
,
DateTime
beginTime
,
DateTime
endTime
)
{
QueryWrapper
<
ThirdWindPowerGenerationEnt
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
ThirdWindPowerGenerationEnt
>
queryWrapper
=
new
QueryWrapper
<>();
String
property
=
context
.
getProperty
(
"x.db.databaseId"
);
String
property
=
context
.
getProperty
(
"x.db.databaseId"
);
if
(
CharSequenceUtil
.
equals
(
property
,
"Oracle"
))
{
if
(
CharSequenceUtil
.
equals
(
property
,
BusinessConstant
.
ORACLE
))
{
queryWrapper
.
select
(
"COLLECT_TIME"
,
"NVL( MAX( ACTUAL_WIND_SPEED ), 0 ) AS ACTUAL_WIND_SPEED"
,
"NVL( MAX( ACTUAL_POWER ), 0 ) AS ACTUAL_POWER"
);
queryWrapper
.
select
(
"COLLECT_TIME"
,
"NVL( MAX( ACTUAL_WIND_SPEED ), 0 ) AS ACTUAL_WIND_SPEED"
,
"NVL( MAX( ACTUAL_POWER ), 0 ) AS ACTUAL_POWER"
);
}
else
{
}
else
{
queryWrapper
.
select
(
"COLLECT_TIME"
,
"IFNULL( MAX( ACTUAL_WIND_SPEED ), 0 ) AS ACTUAL_WIND_SPEED"
,
"IFNULL( MAX( ACTUAL_POWER ), 0 ) AS ACTUAL_POWER"
);
queryWrapper
.
select
(
"COLLECT_TIME"
,
"IFNULL( MAX( ACTUAL_WIND_SPEED ), 0 ) AS ACTUAL_WIND_SPEED"
,
"IFNULL( MAX( ACTUAL_POWER ), 0 ) AS ACTUAL_POWER"
);
...
...
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