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
9d229f51
Commit
9d229f51
authored
Sep 20, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
a998de8f
ae3bb228
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
250 additions
and
60 deletions
+250
-60
JpCollectorMapper.java
...n/amos/boot/module/hygf/api/mapper/JpCollectorMapper.java
+6
-1
JpInverterMapper.java
...in/amos/boot/module/hygf/api/mapper/JpInverterMapper.java
+2
-1
TimeUtil.java
.../com/yeejoin/amos/boot/module/hygf/api/util/TimeUtil.java
+26
-0
JpCollectorMapper.xml
...api/src/main/resources/mapper/mysql/JpCollectorMapper.xml
+29
-0
pom.xml
amos-boot-system-jxiop/amos-boot-module-hygf-biz/pom.xml
+1
-1
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+23
-3
TdHygfJpCollectorHistoryController.java
...gf/biz/controller/TdHygfJpCollectorHistoryController.java
+6
-4
TdHygfJpInvertorElecHistoryController.java
...biz/controller/TdHygfJpInvertorElecHistoryController.java
+31
-18
TdHygfJpCollectorHistoryServiceImpl.java
...biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
+21
-7
TdHygfJpInvertorElecHistoryServiceImpl.java
.../service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
+45
-19
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+23
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+2
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+29
-2
AnalysisFanStationController.java
...le/jxiop/biz/controller/AnalysisFanStationController.java
+4
-2
AnalysisFanStationImpl.java
...module/jxiop/biz/service/impl/AnalysisFanStationImpl.java
+2
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpCollectorMapper.java
View file @
9d229f51
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 户用光伏监盘采集器表 Mapper 接口
...
...
@@ -10,5 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2023-09-19
*/
public
interface
JpCollectorMapper
extends
BaseMapper
<
JpCollector
>
{
List
<
Map
<
String
,
Object
>>
queryCountStatus
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpInverterMapper.java
View file @
9d229f51
...
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -15,5 +16,5 @@ import java.util.Map;
*/
public
interface
JpInverterMapper
extends
BaseMapper
<
JpInverter
>
{
Map
<
String
,
Object
>
queryCountStatus
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
List
<
Map
<
String
,
Object
>
>
queryCountStatus
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/util/TimeUtil.java
0 → 100644
View file @
9d229f51
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
util
;
import
java.util.Calendar
;
import
java.util.Date
;
public
class
TimeUtil
{
public
static
long
getStartTimeOfDay
(
Date
day
)
{
Calendar
todayStart
=
Calendar
.
getInstance
();
todayStart
.
setTime
(
day
);
todayStart
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
todayStart
.
set
(
Calendar
.
MINUTE
,
0
);
todayStart
.
set
(
Calendar
.
SECOND
,
0
);
todayStart
.
set
(
Calendar
.
MILLISECOND
,
0
);
return
todayStart
.
getTime
().
getTime
();
}
public
static
long
getEndTimeOfDay
(
Date
day
)
{
Calendar
todayEnd
=
Calendar
.
getInstance
();
todayEnd
.
set
(
Calendar
.
HOUR_OF_DAY
,
23
);
todayEnd
.
set
(
Calendar
.
MINUTE
,
59
);
todayEnd
.
set
(
Calendar
.
SECOND
,
59
);
todayEnd
.
set
(
Calendar
.
MILLISECOND
,
999
);
return
todayEnd
.
getTime
().
getTime
();
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpCollectorMapper.xml
View file @
9d229f51
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.JpCollectorMapper"
>
<select
id=
"queryCountStatus"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
select
hygf_jp_collector.`status`,
count(hygf_jp_collector.sequence_nbr) num
from hygf_jp_collector left JOIN hygf_jp_station
on hygf_jp_station.third_station_id=hygf_jp_collector.third_station_id
<where>
<if
test=
"dto.nauserNameme!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
<if
test=
"dto.area!=null"
>
and hygf_jp_station.area like concat(concat("%",#{dto.area}),"%")
</if>
<if
test=
"dto.statioId!=null"
>
and hygf_jp_station.third_station_id in
<foreach
collection=
"dto.statioId"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
</foreach>
</if>
<if
test=
"dto.thirdStationId!=null"
>
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
</if>
</where>
GROUP BY hygf_jp_collector.`status`
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/pom.xml
View file @
9d229f51
...
...
@@ -49,7 +49,7 @@
<dependency>
<groupId>
com.qiyuesuo.sdk
</groupId>
<artifactId>
sdk-java
</artifactId>
<version>
3.
6.3
</version>
<version>
3.
0.0
</version>
</dependency>
</dependencies>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
9d229f51
...
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpPersonStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PersonnelBusiness
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpCollectorMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpPersonStationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper
;
import
com.yeejoin.amos.boot.module.standard.api.entity.PublicAgencyUser
;
...
...
@@ -43,6 +45,11 @@ public class JpStationController extends BaseController {
JpPersonStationMapper
pPersonStationMapper
;
@Autowired
JpStationMapper
jpStationMapper
;
@Autowired
JpCollectorMapper
jpCollectorMapper
;
@Autowired
JpInverterMapper
jpInverterMapper
;
/**
* 新增第三方场站
*
...
...
@@ -135,11 +142,24 @@ public class JpStationController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getpStation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备监控"
,
notes
=
"设备监控"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getpStation
(
JpStationDto
reviewDto
)
{
//获取当前人管理场站
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
qug
.
eq
(
JpPersonStation:
:
getPersonId
,
getUserInfo
().
getUserId
());
List
<
JpPersonStation
>
pPersonStation
=
pPersonStationMapper
.
selectList
(
qug
);
reviewDto
.
setStatioId
(
pPersonStation
.
isEmpty
()?
null
:
pPersonStation
);
List
<
Map
<
String
,
Object
>>
listCollector
=
jpCollectorMapper
.
queryCountStatus
(
reviewDto
);
List
<
Map
<
String
,
Object
>>
listInverter
=
jpInverterMapper
.
queryCountStatus
(
reviewDto
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"collector"
,
listCollector
);
map
.
put
(
"inverter"
,
listInverter
);
return
ResponseHelper
.
buildResponse
(
map
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpCollectorHistoryController.java
View file @
9d229f51
...
...
@@ -24,6 +24,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpCollectorHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpCollectorHistoryServiceImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -66,8 +67,9 @@ public class TdHygfJpCollectorHistoryController extends BaseController {
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新户用光伏监盘采集器历史表"
,
notes
=
"根据sequenceNbr更新户用光伏监盘采集器历史表"
)
public
ResponseModel
<
TdHygfJpCollectorHistoryDto
>
updateBySequenceNbrTdHygfJpCollectorHistory
(
@RequestBody
TdHygfJpCollectorHistoryDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
updateWithModel
(
model
));
public
ResponseModel
<
TdHygfJpCollectorHistoryDto
>
updateBySequenceNbrTdHygfJpCollectorHistory
(
@RequestBody
TdHygfJpCollectorHistoryDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
updateWithModel
(
model
));
}
...
...
@@ -125,8 +127,8 @@ public class TdHygfJpCollectorHistoryController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/day"
)
public
ResponseModel
<
List
<
TdHygfJpCollectorHistory
Dto
>>
dayList
(
@RequestParam
(
value
=
"id"
)
long
id
,
public
ResponseModel
<
List
<
TdHygfJpCollectorHistory
>>
dayList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"day"
)
@DateTimeFormat
()
Date
day
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
dayList
(
id
,
day
));
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
dayList
(
id
,
day
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInvertorElecHistoryController.java
View file @
9d229f51
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInvertorElecHistoryServiceImpl
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInvertorElecHistoryServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 户用光伏监盘逆变器电能历史表
...
...
@@ -54,8 +67,9 @@ public class TdHygfJpInvertorElecHistoryController extends BaseController {
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新户用光伏监盘逆变器电能历史表"
,
notes
=
"根据sequenceNbr更新户用光伏监盘逆变器电能历史表"
)
public
ResponseModel
<
TdHygfJpInvertorElecHistoryDto
>
updateBySequenceNbrTdHygfJpInvertorElecHistory
(
@RequestBody
TdHygfJpInvertorElecHistoryDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
updateWithModel
(
model
));
public
ResponseModel
<
TdHygfJpInvertorElecHistoryDto
>
updateBySequenceNbrTdHygfJpInvertorElecHistory
(
@RequestBody
TdHygfJpInvertorElecHistoryDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
updateWithModel
(
model
));
}
...
...
@@ -110,12 +124,11 @@ public class TdHygfJpInvertorElecHistoryController extends BaseController {
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器电能历史表列表全部数据查询"
,
notes
=
"户用光伏监盘逆变器电能历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
TdHygfJpInvertorElecHistoryDto
>>
selectForList
(
@RequestParam
(
value
=
"type"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
queryForTdHygfJpInvertorElecHistoryList
());
@GetMapping
(
value
=
"/list/day"
)
public
ResponseModel
<
List
<
TdHygfJpInvertorElecHistory
>>
dayList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"day"
)
@DateTimeFormat
()
Date
day
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
dayList
(
id
,
day
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
View file @
9d229f51
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpCollectorHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpCollectorHistoryService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpCollectorHistoryMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil
;
/**
* 户用光伏监盘采集器历史表服务实现类
...
...
@@ -25,6 +27,10 @@ import com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpCollectorHis
public
class
TdHygfJpCollectorHistoryServiceImpl
extends
BaseService
<
TdHygfJpCollectorHistoryDto
,
TdHygfJpCollectorHistory
,
TdHygfJpCollectorHistoryMapper
>
implements
ITdHygfJpCollectorHistoryService
{
@Autowired
private
JpCollectorServiceImpl
jpCollectorServiceImpl
;
/**
* 分页查询
*/
...
...
@@ -36,9 +42,16 @@ public class TdHygfJpCollectorHistoryServiceImpl
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpCollectorHistoryDto
>
dayList
(
long
id
,
Date
day
)
{
LambdaQueryWrapper
<
TdHygfJpCollectorHistory
>
warpper
=
new
LambdaQueryWrapper
<>();
warpper
.
between
(
TdHygfJpCollectorHistory:
:
getTime
,
day
,
warpper
);
return
this
.
queryForList
(
""
,
false
);
public
List
<
TdHygfJpCollectorHistory
>
dayList
(
long
id
,
Date
day
)
{
JpCollector
collector
=
jpCollectorServiceImpl
.
getById
(
id
);
if
(
collector
!=
null
)
{
LambdaQueryChainWrapper
<
TdHygfJpCollectorHistory
>
warpper
=
this
.
lambdaQuery
()
.
between
(
TdHygfJpCollectorHistory:
:
getTime
,
TimeUtil
.
getStartTimeOfDay
(
day
),
TimeUtil
.
getEndTimeOfDay
(
day
))
.
eq
(
TdHygfJpCollectorHistory:
:
getSnCode
,
collector
.
getSnCode
())
.
eq
(
TdHygfJpCollectorHistory:
:
getThirdStationId
,
collector
.
getThirdStationId
());
return
this
.
baseMapper
.
selectList
(
warpper
);
}
return
new
ArrayList
<>();
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
View file @
9d229f51
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInvertorElecHistoryMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpInvertorElecHistoryService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
org.
typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
org.
springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpInvertorElecHistoryService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInvertorElecHistoryMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil
;
/**
* 户用光伏监盘逆变器电能历史表服务实现类
...
...
@@ -16,18 +25,34 @@ import java.util.List;
* @date 2023-09-19
*/
@Service
public
class
TdHygfJpInvertorElecHistoryServiceImpl
extends
BaseService
<
TdHygfJpInvertorElecHistoryDto
,
TdHygfJpInvertorElecHistory
,
TdHygfJpInvertorElecHistoryMapper
>
implements
ITdHygfJpInvertorElecHistoryService
{
/**
* 分页查询
*/
public
Page
<
TdHygfJpInvertorElecHistoryDto
>
queryForTdHygfJpInvertorElecHistoryPage
(
Page
<
TdHygfJpInvertorElecHistoryDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
public
class
TdHygfJpInvertorElecHistoryServiceImpl
extends
BaseService
<
TdHygfJpInvertorElecHistoryDto
,
TdHygfJpInvertorElecHistory
,
TdHygfJpInvertorElecHistoryMapper
>
implements
ITdHygfJpInvertorElecHistoryService
{
@Autowired
private
JpInverterServiceImpl
jpInvertorServiceImpl
;
/**
* 分页查询
*/
public
Page
<
TdHygfJpInvertorElecHistoryDto
>
queryForTdHygfJpInvertorElecHistoryPage
(
Page
<
TdHygfJpInvertorElecHistoryDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpInvertorElecHistoryDto
>
queryForTdHygfJpInvertorElecHistoryList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpInvertorElecHistory
>
dayList
(
long
id
,
Date
day
)
{
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
LambdaQueryChainWrapper
<
TdHygfJpInvertorElecHistory
>
warpper
=
this
.
lambdaQuery
()
.
between
(
TdHygfJpInvertorElecHistory:
:
getTime
,
TimeUtil
.
getStartTimeOfDay
(
day
),
TimeUtil
.
getEndTimeOfDay
(
day
))
.
eq
(
TdHygfJpInvertorElecHistory:
:
getSnCode
,
invertor
.
getSnCode
())
.
eq
(
TdHygfJpInvertorElecHistory:
:
getThirdStationId
,
invertor
.
getThirdStationId
());
return
this
.
baseMapper
.
selectList
(
warpper
);
}
return
new
ArrayList
<>();
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/BigScreenAnalyseController.java
View file @
9d229f51
...
...
@@ -223,4 +223,27 @@ public class BigScreenAnalyseController extends BaseController {
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"场站预警信息统计图 - 雷达图"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/equipWarningRadarMap"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
assessIndexRadarMap
(
@RequestParam
(
required
=
false
,
value
=
"stationCode"
)
String
stationCode
)
{
List
<
Map
<
String
,
Object
>>
list
=
idxBizFanHealthIndexMapper
.
equipWarningRadarMap
(
stationCode
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
List
<
String
>>
resultData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
List
<
String
>
data
=
new
ArrayList
<>();
list
.
forEach
(
item
->
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"text"
,
item
.
get
(
"warningName"
));
resultList
.
add
(
map
);
data
.
add
(
item
.
get
(
"num"
).
toString
());
});
resultData
.
add
(
data
);
resultMap
.
put
(
"radar"
,
resultList
);
resultMap
.
put
(
"array"
,
resultData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
View file @
9d229f51
...
...
@@ -28,4 +28,6 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List
<
Map
<
String
,
Object
>>
getHealthInfoByStation
(
@Param
(
"areaCode"
)
String
areaCode
);
List
<
Map
<
String
,
Object
>>
equipWarningRadarMap
(
@Param
(
"stationCode"
)
String
stationCode
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
9d229f51
...
...
@@ -216,6 +216,33 @@
a.STATION
</select>
<select
id=
"equipWarningRadarMap"
resultType=
"java.util.Map"
>
SELECT
a.warningName,
count( 1 ) AS num
FROM
(
SELECT
WARNING_NAME AS warningName
FROM
idx_biz_fan_warning_record
<where>
<if
test=
"stationCode != null and stationCode != ''"
>
station = #{stationCode}
</if>
</where>
UNION ALL
SELECT
WARNING_NAME AS warningName
FROM
idx_biz_pv_warning_record
<where>
<if
test=
"stationCode != null and stationCode != ''"
>
station = #{stationCode}
</if>
</where>
) a
GROUP BY
a.warningName
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/AnalysisFanStationController.java
View file @
9d229f51
...
...
@@ -30,18 +30,20 @@ public class AnalysisFanStationController {
AnalysisFanStationImpl
analysisFanStationImpl
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分析-风站
- 场站风速
"
)
@ApiOperation
(
value
=
"分析-风站
/光伏 - 场站风速/辐照强度
"
)
@GetMapping
(
"/getStationWindSpeedStatistics"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getStationWindSpeedStatistics
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
String
gatewayId
=
""
;
String
equipmentIndexName
=
"总辐射累计"
;
if
(
null
!=
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
gatewayId
=
stationBasic
.
getBoosterGatewayId
();
if
(
null
==
type
){
gatewayId
=
stationBasic
.
getFanGatewayId
();
equipmentIndexName
=
"瞬时风速"
;
}
}
Map
<
String
,
Object
>
detailsWindSpeed
=
analysisFanStationImpl
.
getStationWindSpeedStatistics
(
gatewayId
);
Map
<
String
,
Object
>
detailsWindSpeed
=
analysisFanStationImpl
.
getStationWindSpeedStatistics
(
gatewayId
,
equipmentIndexName
);
return
ResponseHelper
.
buildResponse
(
detailsWindSpeed
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/AnalysisFanStationImpl.java
View file @
9d229f51
...
...
@@ -18,8 +18,8 @@ public class AnalysisFanStationImpl {
@Autowired
private
TemporaryDataMapper
temporaryDataMapper
;
public
Map
<
String
,
Object
>
getStationWindSpeedStatistics
(
String
gatewayId
){
List
<
Map
<
String
,
String
>>
list
=
temporaryDataMapper
.
getStationWindSpeedStatistics
(
gatewayId
,
"瞬时风速"
);
public
Map
<
String
,
Object
>
getStationWindSpeedStatistics
(
String
gatewayId
,
String
equipmentIndexName
){
List
<
Map
<
String
,
String
>>
list
=
temporaryDataMapper
.
getStationWindSpeedStatistics
(
gatewayId
,
equipmentIndexName
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
String
>
valueList
=
new
ArrayList
<>();
Set
<
String
>
time
=
new
TreeSet
<>();
...
...
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