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
c55b1084
Commit
c55b1084
authored
Nov 28, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
7c64b560
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
17 deletions
+38
-17
JpInverterDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
+2
-2
TdHYGFInverterDayGenerateMapper.xml
...urces/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
+1
-1
TdHygfJpInverterWarnMapper.xml
.../resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
+3
-3
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+14
-3
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+15
-5
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+3
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
View file @
c55b1084
...
@@ -100,8 +100,8 @@ public class JpInverterDto extends BaseDto {
...
@@ -100,8 +100,8 @@ public class JpInverterDto extends BaseDto {
private
List
<
String
>
stationIds
;
private
List
<
String
>
stationIds
;
private
List
<
JpCollector
>
jpCollectors
;
private
List
<
JpCollector
>
jpCollectors
;
private
List
<
JpInverterElectricity
>
JL
;
private
List
<
JpInverterElectricity
>
interflow
;
private
List
<
JpInverterElectricity
>
ZL
;
private
List
<
JpInverterElectricity
>
directCurrent
;
@ApiModelProperty
(
value
=
"所属电站名称"
)
@ApiModelProperty
(
value
=
"所属电站名称"
)
private
String
name
;
private
String
name
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
View file @
c55b1084
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
from
from
house_pv_data.td_hygf_inverter_day_generate
house_pv_data.td_hygf_inverter_day_generate
<where>
<where>
created_time >=
(#{time} - 8h )
created_time >=
#{time}
<if
test=
"snCode != null and snCode !=''"
>
<if
test=
"snCode != null and snCode !=''"
>
and sn_code = #{snCode}
and sn_code = #{snCode}
</if>
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
View file @
c55b1084
...
@@ -71,10 +71,10 @@
...
@@ -71,10 +71,10 @@
AND `level` = #{level}
AND `level` = #{level}
</if>
</if>
<if
test=
"minvalue != null and minvalue != ''"
>
<if
test=
"minvalue != null and minvalue != ''"
>
AND time_long >=
#{minvalue}
AND time_long >=
(#{minvalue}*1000)
</if>
</if>
<if
test=
"maxValue != null and maxValue != ''"
>
<if
test=
"maxValue != null and maxValue != ''"
>
AND time_long
<![CDATA[<=]]>
#{maxValue}
AND time_long
<![CDATA[<=]]>
(#{maxValue}*1000)
</if>
</if>
<if
test=
"snCode != null and snCode != ''"
>
<if
test=
"snCode != null and snCode != ''"
>
AND sn_code like #{snCode}
AND sn_code like #{snCode}
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
AND level = #{level}
AND level = #{level}
</if>
</if>
<if
test=
"minvalue != null and minvalue != ''"
>
<if
test=
"minvalue != null and minvalue != ''"
>
time_long >= #{minvalue}
AND
time_long >= #{minvalue}
</if>
</if>
<if
test=
"maxValue != null and maxValue != ''"
>
<if
test=
"maxValue != null and maxValue != ''"
>
AND time_long
<![CDATA[<=]]>
#{maxValue}
AND time_long
<![CDATA[<=]]>
#{maxValue}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpInverterController.java
View file @
c55b1084
...
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
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.StringUtils
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl
;
...
@@ -27,6 +28,7 @@ import java.io.IOException;
...
@@ -27,6 +28,7 @@ import java.io.IOException;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -228,7 +230,16 @@ public class JpInverterController extends BaseController {
...
@@ -228,7 +230,16 @@ public class JpInverterController extends BaseController {
String
thirdStationId
=
treeParams
.
get
(
"thirdStationId"
).
toString
();
String
thirdStationId
=
treeParams
.
get
(
"thirdStationId"
).
toString
();
if
(
treeParams
.
get
(
"date"
).
equals
(
"day"
)){
if
(
treeParams
.
get
(
"date"
).
equals
(
"day"
)){
time
=
time
+
" 00:00:00"
;
time
=
time
+
" 00:00:00"
;
List
<
JSONObject
>
treeParams1
=
parseArray
(
JSONObject
.
toJSONString
(
treeParams
.
get
(
"treeParams"
)),
JSONObject
.
class
);
Date
date
=
null
;
try
{
date
=
DateUtils
.
dateParse
(
time
,
null
);
Date
date1
=
DateUtils
.
dateAddHours
(
date
,
-
8
);
time
=
DateUtils
.
dateTimeToDateStringIfTimeEndZero
(
date1
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
List
<
JSONObject
>
treeParams1
=
parseArray
(
JSONObject
.
toJSONString
(
treeParams
.
get
(
"treeParams"
)),
JSONObject
.
class
);
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
selectDayTrend
(
treeParams1
,
time
,
snCode
,
thirdStationId
));
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
selectDayTrend
(
treeParams1
,
time
,
snCode
,
thirdStationId
));
}
else
if
(
treeParams
.
get
(
"date"
).
equals
(
"month"
)){
}
else
if
(
treeParams
.
get
(
"date"
).
equals
(
"month"
)){
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
selectMonthTrend
(
time
,
snCode
,
thirdStationId
));
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
selectMonthTrend
(
time
,
snCode
,
thirdStationId
));
...
@@ -414,8 +425,8 @@ public class JpInverterController extends BaseController {
...
@@ -414,8 +425,8 @@ public class JpInverterController extends BaseController {
List
<
JpInverterElectricity
>
jpInverterElectricities
=
jpInverterElectricityService
.
getBaseMapper
().
selectList
(
queryWrapper
);
List
<
JpInverterElectricity
>
jpInverterElectricities
=
jpInverterElectricityService
.
getBaseMapper
().
selectList
(
queryWrapper
);
Map
<
String
,
List
<
JpInverterElectricity
>>
collect
=
jpInverterElectricities
.
stream
().
collect
(
Collectors
.
groupingBy
(
JpInverterElectricity:
:
getType
));
Map
<
String
,
List
<
JpInverterElectricity
>>
collect
=
jpInverterElectricities
.
stream
().
collect
(
Collectors
.
groupingBy
(
JpInverterElectricity:
:
getType
));
jpInverterDto
.
set
ZL
(
collect
.
get
(
"直流"
));
jpInverterDto
.
set
DirectCurrent
(
collect
.
get
(
"直流"
));
jpInverterDto
.
set
JL
(
collect
.
get
(
"交流"
));
jpInverterDto
.
set
Interflow
(
collect
.
get
(
"交流"
));
BeanUtils
.
copyProperties
(
jpInverter
,
jpInverterDto
);
BeanUtils
.
copyProperties
(
jpInverter
,
jpInverterDto
);
jpInverterDto
.
setJpCollectors
(
jpCollector
);
jpInverterDto
.
setJpCollectors
(
jpCollector
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInverterWarnController.java
View file @
c55b1084
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
...
@@ -244,18 +245,27 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -244,18 +245,27 @@ public class TdHygfJpInverterWarnController extends BaseController {
@RequestParam
(
required
=
false
)
String
maxValue
,
@RequestParam
(
required
=
false
)
String
maxValue
,
@RequestParam
(
required
=
false
)
String
snCode
,
@RequestParam
(
required
=
false
)
String
snCode
,
@RequestParam
(
required
=
false
)
List
<
String
>
stationId
,
@RequestParam
(
required
=
false
)
List
<
String
>
stationId
,
@RequestParam
(
required
=
false
)
List
<
String
>
time
,
@RequestParam
(
required
=
false
)
String
[]
time
,
@RequestParam
(
required
=
false
)
Integer
current
,
@RequestParam
(
required
=
false
)
Integer
current
,
@RequestParam
(
required
=
false
)
Integer
size
,
@RequestParam
(
required
=
false
)
Integer
size
,
@RequestParam
(
required
=
false
)
String
content
)
{
@RequestParam
(
required
=
false
)
String
content
)
{
Page
<
TdHygfJpInverterWarnDto
>
result
=
new
Page
<>();
Page
<
TdHygfJpInverterWarnDto
>
result
=
new
Page
<>();
result
.
setCurrent
(
current
);
result
.
setSize
(
size
);
JpStationDto
reviewDto
=
new
JpStationDto
();
JpStationDto
reviewDto
=
new
JpStationDto
();
Map
<
String
,
String
>
nameMaps
=
new
HashMap
<>();
Map
<
String
,
String
>
nameMaps
=
new
HashMap
<>();
if
(
null
!=
stationName
&&
stationName
!=
""
){
if
(
null
!=
stationName
&&
stationName
!=
""
){
reviewDto
.
setName
(
stationName
);
reviewDto
.
setName
(
stationName
);
}
}
List
<
JpStation
>
jpStation
=
jpStationMapper
.
getJpStation
(
reviewDto
);
List
<
JpStation
>
jpStation
=
jpStationMapper
.
getJpStation
(
reviewDto
);
if
(
CollectionUtil
.
isEmpty
(
jpStation
)){
result
.
setTotal
(
0
);
List
<
TdHygfJpInverterWarnDto
>
list
=
new
ArrayList
<>();
result
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
result
);
}
nameMaps
=
jpStation
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
JpStation:
:
getName
));
nameMaps
=
jpStation
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
JpStation:
:
getName
));
if
(
null
==
stationId
){
if
(
null
==
stationId
){
...
@@ -266,8 +276,9 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -266,8 +276,9 @@ public class TdHygfJpInverterWarnController extends BaseController {
if
(
null
!=
time
){
if
(
null
!=
time
){
try
{
try
{
startTime
=
String
.
valueOf
(
DateUtils
.
dateParse
(
time
.
get
(
0
),
null
).
getTime
());
startTime
=
String
.
valueOf
(
DateUtils
.
dateParse
(
time
[
0
].
replace
(
"["
,
""
),
null
).
getTime
());
endTime
=
String
.
valueOf
(
DateUtils
.
dateParse
(
time
.
get
(
1
),
null
).
getTime
());
Date
date
=
DateUtils
.
dateParse
(
time
[
1
].
replace
(
"]"
,
""
),
null
);
endTime
=
String
.
valueOf
(
DateUtils
.
dateAddDays
(
date
,
1
).
getTime
());
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -286,8 +297,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -286,8 +297,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
map
.
setTimeLongFormat
(
TimeUtil
map
.
setTimeLongFormat
(
TimeUtil
.
longFormat
(
map
.
getTimeLong
()));
.
longFormat
(
map
.
getTimeLong
()));
}
}
result
.
setCurrent
(
current
);
result
.
setSize
(
size
);
result
.
setTotal
(
tdHygfJpInverterWarnServiceImpl
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
));
result
.
setTotal
(
tdHygfJpInverterWarnServiceImpl
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
));
result
.
setRecords
(
maps
);
result
.
setRecords
(
maps
);
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
...
...
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 @
c55b1084
...
@@ -267,7 +267,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
...
@@ -267,7 +267,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value2
.
add
(
map
.
get
(
"fullhour"
)
.
toString
(
));
value2
.
add
(
map
.
get
(
"fullhour"
)
==
null
?
"0"
:
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())
));
}
}
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -294,7 +294,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
...
@@ -294,7 +294,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value2
.
add
(
map
.
get
(
"fullhour"
)
.
toString
(
));
value2
.
add
(
map
.
get
(
"fullhour"
)
==
null
?
"0"
:
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())
));
}
}
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -321,7 +321,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
...
@@ -321,7 +321,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
xData
.
add
(
map
.
get
(
"daytime"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value1
.
add
(
map
.
get
(
"generate"
).
toString
());
value2
.
add
(
map
.
get
(
"fullhour"
)
.
toString
(
));
value2
.
add
(
map
.
get
(
"fullhour"
)
==
null
?
"0"
:
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())
));
}
}
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
yData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
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