Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
6132f685
Commit
6132f685
authored
May 09, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口空指针
parent
1798644d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
21 deletions
+28
-21
TdHYGFInverterDayGenerateMapper.java
...f/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
+1
-1
TdHYGFInverterDayGenerateMapper.xml
...urces/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
+1
-1
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+13
-10
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+13
-3
paramsTree.json
...t-module-hygf-biz/src/main/resources/json/paramsTree.json
+0
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
View file @
6132f685
...
...
@@ -11,7 +11,7 @@ import java.util.List;
import
java.util.Map
;
public
interface
TdHYGFInverterDayGenerateMapper
extends
BaseMapper
<
TdHYGFInverterDayGenerate
>
{
List
<
Map
<
String
,
Object
>>
selectDayTrend
(
List
<
String
>
treeParams
,
String
time
,
String
snCode
,
String
thirdStationId
);
List
<
Map
<
String
,
Object
>>
selectDayTrend
(
List
<
String
>
treeParams
,
String
time
,
String
time2
,
String
snCode
,
String
thirdStationId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
TdHYGFInverterDayGenerate
>
selectList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
TdHYGFInverterDayGenerate
>
queryWrapper
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
View file @
6132f685
...
...
@@ -12,7 +12,7 @@
from
house_pv_data.td_hygf_inverter_day_generate
<where>
created_time >= #{time}
created_time >= #{time}
and created_time
<
= #{time2}
<if
test=
"snCode != null and snCode !=''"
>
and sn_code = #{snCode}
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpInverterController.java
View file @
6132f685
...
...
@@ -72,7 +72,6 @@ public class JpInverterController extends BaseController {
private
Resource
paramsTree
;
/**
* 新增户用光伏监盘逆变器表
*
...
...
@@ -226,20 +225,24 @@ public class JpInverterController extends BaseController {
String
thirdStationId
=
treeParams
.
get
(
"thirdStationId"
).
toString
();
if
(
treeParams
.
get
(
"date"
).
equals
(
"day"
)){
time
=
time
+
" 00:00:00"
;
Date
date
=
null
;
try
{
date
=
DateUtils
.
dateParse
(
time
,
null
);
Date
date1
=
DateUtils
.
dateAddHours
(
date
,
-
8
);
time
=
DateUtils
.
dateTimeToDateStringIfTimeEndZero
(
date1
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
String
time2
=
treeParams
.
get
(
"time"
).
toString
()+
" 23:59:59"
;
// Date date = null;
// Date date2 = null;
// try {
// date = DateUtils.dateParse(time, null);
// date2 = DateUtils.dateParse(time2, null);
//// Date date1 = DateUtils.dateAddHours(date, -8);
// time = DateUtils.dateTimeToDateStringIfTimeEndZero(date);
// time2 = DateUtils.dateTimeToDateStringIfTimeEndZero(date2);
// } catch (ParseException e) {
// e.printStackTrace();
// }
List
<
JSONObject
>
treeParams1
=
parseArray
(
JSONObject
.
toJSONString
(
treeParams
.
get
(
"treeParams"
)),
JSONObject
.
class
);
if
(
CollectionUtils
.
isEmpty
(
treeParams1
)){
Map
<
String
,
Object
>
obj
=
new
HashMap
<>();
return
ResponseHelper
.
buildResponse
(
obj
);
}
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
selectDayTrend
(
treeParams1
,
time
,
snCode
,
thirdStationId
));
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
selectDayTrend
(
treeParams1
,
time
,
time2
,
snCode
,
thirdStationId
));
}
else
if
(
treeParams
.
get
(
"date"
).
equals
(
"month"
)){
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
selectMonthTrend
(
time
,
snCode
,
thirdStationId
));
}
else
if
(
treeParams
.
get
(
"date"
).
equals
(
"year"
))
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpInverterServiceImpl.java
View file @
6132f685
...
...
@@ -94,7 +94,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
return
this
.
getBaseMapper
().
selectPageDataTotal
(
jpInverterDto
);
}
public
Map
<
String
,
Object
>
selectDayTrend
(
List
<
JSONObject
>
treeParams
,
String
time
,
String
snCode
,
String
thirdStationId
)
{
public
Map
<
String
,
Object
>
selectDayTrend
(
List
<
JSONObject
>
treeParams
,
String
time
,
String
time2
,
String
snCode
,
String
thirdStationId
)
{
List
<
String
>
key
=
new
ArrayList
<>();
treeParams
.
forEach
(
a
->{
if
(
a
.
get
(
"key"
).
toString
().
startsWith
(
"acc"
)||
a
.
get
(
"key"
).
toString
().
startsWith
(
"acv"
)||
a
.
get
(
"key"
).
toString
().
startsWith
(
"pv"
)){
...
...
@@ -103,9 +103,13 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
key
.
add
(
a
.
get
(
"key"
).
toString
());
}
});
List
<
Map
<
String
,
Object
>>
tdHYGFInverterDayGenerates
=
tdHYGFInverterDayGenerateMapper
.
selectDayTrend
(
key
,
time
,
snCode
,
thirdStationId
);
List
<
Map
<
String
,
Object
>>
tdHYGFInverterDayGenerates
=
tdHYGFInverterDayGenerateMapper
.
selectDayTrend
(
key
,
time
,
time2
,
snCode
,
thirdStationId
);
List
<
String
>
zData
=
new
ArrayList
<>();
tdHYGFInverterDayGenerates
.
forEach
(
e
->
zData
.
add
(
e
.
get
(
"workstatus"
).
toString
())
);
tdHYGFInverterDayGenerates
.
forEach
(
e
->
{
if
(
e
.
get
(
"workstatus"
)
!=
null
)
{
zData
.
add
(
e
.
get
(
"workstatus"
).
toString
());
}
}
);
Set
<
String
>
xData
=
new
TreeSet
<>();
for
(
JSONObject
treeParam
:
treeParams
)
{
List
<
String
>
value
=
new
ArrayList
<>();
...
...
@@ -370,8 +374,14 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
List
<
String
>
value2
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
maps
=
tdHYGFInverterYearGenerateMapper
.
selectYearTrend
(
time
,
snCode
,
thirdStationId
);
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
if
(
map
.
get
(
"daytime"
)
!=
null
)
{
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
}
if
(
map
.
get
(
"generate"
)
!=
null
)
{
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
}
value2
.
add
(
map
.
get
(
"fullhour"
)
==
null
?
"0"
:
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())));
}
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/json/paramsTree.json
View file @
6132f685
...
...
@@ -2,7 +2,6 @@
{
"name"
:
"直流电压"
,
"key"
:
"acv"
,
"unit"
:
"V"
,
"children"
:
[
{
"name"
:
"直流电压PV1"
,
"key"
:
"acv_1"
,
...
...
@@ -25,7 +24,6 @@
{
"name"
:
"直流电流"
,
"key"
:
"acc"
,
"unit"
:
"A"
,
"children"
:
[
{
"name"
:
"直流电流PV1"
,
"key"
:
"acc_1"
,
...
...
@@ -47,7 +45,6 @@
},
{
"name"
:
"直流功率"
,
"key"
:
"pv"
,
"unit"
:
"kW"
,
"children"
:
[
{
"name"
:
"直流功率PV1"
,
"key"
:
"pv_1"
,
...
...
@@ -145,21 +142,18 @@
{
"name"
:
"直流母线电压"
,
"key"
:
"zlmxdy"
,
"unit"
:
"V"
,
"children"
:
[
]
},
{
"name"
:
"直流母线半电压"
,
"key"
:
"zlmxbdy"
,
"unit"
:
"V"
,
"children"
:
[
]
},
{
"name"
:
"绝缘阻抗实时值"
,
"key"
:
"jyzkssz"
,
"unit"
:
"Ω"
,
"children"
:
[
]
}
...
...
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