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
e79c0dc8
Commit
e79c0dc8
authored
Nov 14, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码 户用光伏TD实体类增加
parent
553ae040
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
682 additions
and
2 deletions
+682
-2
JpInverterDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
+6
-0
TdHYGFInverterDayGenerate.java
...oot/module/hygf/api/entity/TdHYGFInverterDayGenerate.java
+124
-0
TdHYGFInverterMonthGenerate.java
...t/module/hygf/api/entity/TdHYGFInverterMonthGenerate.java
+43
-0
TdHYGFInverterYearGenerate.java
...ot/module/hygf/api/entity/TdHYGFInverterYearGenerate.java
+43
-0
JpCollectorMapper.java
...n/amos/boot/module/hygf/api/mapper/JpCollectorMapper.java
+9
-0
JpInverterMapper.java
...in/amos/boot/module/hygf/api/mapper/JpInverterMapper.java
+8
-0
TdHYGFInverterDayGenerateMapper.java
...f/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
+7
-0
TdHYGFInverterMonthGenerateMapper.java
...api/tdenginemapper/TdHYGFInverterMonthGenerateMapper.java
+7
-0
TdHYGFInverterYearGenerateMapper.java
.../api/tdenginemapper/TdHYGFInverterYearGenerateMapper.java
+7
-0
TdHygfJpInverterWarnMapper.java
...e/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
+3
-1
JpCollectorMapper.xml
...api/src/main/resources/mapper/mysql/JpCollectorMapper.xml
+47
-0
JpInverterMapper.xml
...-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
+40
-0
TdHYGFInverterDayGenerateMapper.xml
...urces/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
+5
-0
TdHYGFInverterMonthGenerateMapper.xml
...ces/mapper/tdengine/TdHYGFInverterMonthGenerateMapper.xml
+5
-0
TdHYGFInverterYearGenerateMapper.xml
...rces/mapper/tdengine/TdHYGFInverterYearGenerateMapper.xml
+5
-0
TdHygfJpInverterWarnMapper.xml
.../resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
+44
-0
JpCollectorController.java
...oot/module/hygf/biz/controller/JpCollectorController.java
+17
-0
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+62
-0
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+36
-0
JpCollectorServiceImpl.java
.../module/hygf/biz/service/impl/JpCollectorServiceImpl.java
+14
-0
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+22
-1
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+7
-0
paramsTree.json
...t-module-hygf-biz/src/main/resources/json/paramsTree.json
+121
-0
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 @
e79c0dc8
...
...
@@ -99,4 +99,10 @@ public class JpInverterDto extends BaseDto {
@ApiModelProperty
(
value
=
"所属电站名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"筛选用 最小值"
)
private
Double
minValue
;
@ApiModelProperty
(
value
=
"筛选用 最大值"
)
private
Double
maxValue
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/TdHYGFInverterDayGenerate.java
0 → 100644
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@TableName
(
value
=
"td_hygf_inverter_day_generate"
,
autoResultMap
=
true
)
public
class
TdHYGFInverterDayGenerate
implements
Serializable
{
/**
* 创建时间
*/
private
Long
createdTime
;
/**
* 第三方场站id
*/
private
String
thirdStationId
;
/**
* sncode
*/
private
String
snCode
;
/**
* 工作状态
*/
private
String
workStatus
;
/**
* 交流电压1
*/
private
Double
dcv1
;
/**
* 交流电压2
*/
private
Double
dcv2
;
/**
* 交流电压3
*/
private
Double
dcv3
;
/**
* 交流电压4
*/
private
Double
dcv4
;
/**
* 交流电流1
*/
private
Double
dcc1
;
/**
* 交流电流2
*/
private
Double
dcc2
;
/**
* 交流电流3
*/
private
Double
dcc3
;
/**
* 交流电流4
*/
private
Double
dcc4
;
/**
* 直流电压1
*/
private
Double
acv1
;
/**
* 直流电压2
*/
private
Double
acv2
;
/**
* 直流电压3
*/
private
Double
acv3
;
/**
* 直流电压4
*/
private
Double
acv4
;
/**
* 直流电流1
*/
private
Double
acc1
;
/**
* 直流电流2
*/
private
Double
acc2
;
/**
* 直流电流3
*/
private
Double
acc3
;
/**
* 直流电流4
*/
private
Double
acc4
;
/**
* 总功率
*/
private
Double
totalPower
;
/**
* 频率
*/
private
String
frequency
;
/**
* 功率因数
*/
private
Double
powerFactor
;
/**
* 日发电量
*/
private
Double
dayGen
;
/**
* 月发电量
*/
private
Double
monthGen
;
/**
* 年发电量
*/
private
Double
yearGen
;
/**
* 累计发电量
*/
private
Double
totalGen
;
/**
* IGBT温度
*/
private
Double
igbtTmep
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/TdHYGFInverterMonthGenerate.java
0 → 100644
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author DELL
*/
@Data
@TableName
(
value
=
"td_hygf_inverter_month_generate"
,
autoResultMap
=
true
)
public
class
TdHYGFInverterMonthGenerate
implements
Serializable
{
/**
* 创建时间
*/
private
Long
createdTime
;
/**
* 第三方场站id
*/
private
String
thirdStationId
;
/**
* sncode
*/
private
String
snCode
;
/**
*日 yyyy-MM
*/
private
String
monthTime
;
/**
*月 yyyy
*/
private
String
year
;
/**
* 发电量
*/
private
Double
generate
;
/**
* 满发小时数
*/
private
Double
fullhour
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/TdHYGFInverterYearGenerate.java
0 → 100644
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author DELL
*/
@Data
@TableName
(
value
=
"td_hygf_inverter_year_generate"
,
autoResultMap
=
true
)
public
class
TdHYGFInverterYearGenerate
implements
Serializable
{
/**
* 创建时间
*/
private
Long
createdTime
;
/**
* 第三方场站id
*/
private
String
thirdStationId
;
/**
* sncode
*/
private
String
snCode
;
/**
*日 yyyy-MM
*/
private
String
yearTime
;
/**
*月 yyyy
*/
private
String
year
;
/**
* 发电量
*/
private
Double
generate
;
/**
* 满发小时数
*/
private
Double
fullhour
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpCollectorMapper.java
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto
;
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
;
...
...
@@ -16,4 +18,11 @@ import java.util.Map;
*/
public
interface
JpCollectorMapper
extends
BaseMapper
<
JpCollector
>
{
List
<
Map
<
String
,
Object
>>
queryCollectorCountStatus
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
List
<
JpCollectorDto
>
selectPageData
(
@Param
(
"dto"
)
JpCollectorDto
reviewDto
,
Integer
current
,
Integer
size
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
int
selectPageDataTota
(
@Param
(
"dto"
)
JpCollectorDto
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 @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -17,4 +19,10 @@ import java.util.Map;
public
interface
JpInverterMapper
extends
BaseMapper
<
JpInverter
>
{
List
<
Map
<
String
,
Object
>>
queryInverterCountStatus
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
List
<
JpInverterDto
>
selectPageData
(
@Param
(
"dto"
)
JpInverterDto
reviewDto
,
int
current
,
int
size
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
int
selectPageDataTotal
(
@Param
(
"dto"
)
JpInverterDto
reviewDto
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
0 → 100644
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterDayGenerate
;
public
interface
TdHYGFInverterDayGenerateMapper
extends
BaseMapper
<
TdHYGFInverterDayGenerate
>
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterMonthGenerateMapper.java
0 → 100644
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterMonthGenerate
;
public
interface
TdHYGFInverterMonthGenerateMapper
extends
BaseMapper
<
TdHYGFInverterMonthGenerate
>
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterYearGenerateMapper.java
0 → 100644
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterYearGenerate
;
public
interface
TdHYGFInverterYearGenerateMapper
extends
BaseMapper
<
TdHYGFInverterYearGenerate
>
{
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
View file @
e79c0dc8
...
...
@@ -25,4 +25,6 @@ public interface TdHygfJpInverterWarnMapper extends BaseMapper<TdHygfJpInverterW
List
<
TdHygfJpInverterWarnDto
>
list
(
@Param
(
"param"
)
TdHygfJpInverterWarnDto
tdHygfJpInverterWarnDto
);
TdHygfJpInverterWarnDto
getByTime
(
@Param
(
"createdTime"
)
long
createdTime
);
}
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
String
state
,
String
level
,
String
minValue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpCollectorMapper.xml
View file @
e79c0dc8
...
...
@@ -39,4 +39,51 @@
GROUP BY hygf_jp_collector.`state`
</select>
<select
id=
"selectPageData"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto"
>
select
state,
sn_code,
station_name,
update_time,
type
from
hygf_jp_collector hjc
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where>
<if
test=
"dto.snCode != null and dto.snCode != ''"
>
sn_code = #{dto.snCode}
</if>
<if
test=
"dto.type != null and dto.type !=''"
>
type = #{dto.type}
</if>
<if
test=
"dto.state != null and dto.state !=''"
>
state = #{dto.state}
</if>
</where>
limit #{current},#{size}
</select>
<select
id=
"selectPageDataTota"
resultType=
"int"
>
select
state,
sn_code,
station_name,
update_time,
type
from
hygf_jp_collector hjc
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where>
<if
test=
"dto.snCode != null and dto.snCode != ''"
>
sn_code = #{dto.snCode}
</if>
<if
test=
"dto.type != null and dto.type !=''"
>
type = #{dto.type}
</if>
<if
test=
"dto.state != null and dto.state !=''"
>
state = #{dto.state}
</if>
</where>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
View file @
e79c0dc8
...
...
@@ -35,4 +35,44 @@
</where>
GROUP BY hygf_jp_inverter.`state`
</select>
<select
id=
"selectPageData"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto"
>
select
hjc. *
from
hygf_jp_inverter hjc
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where>
<if
test=
"dto.snCode != null and dto.snCode != ''"
>
sn_code = #{dto.snCode}
</if>
<if
test=
"dto.minValue != null and dto.minValue !=''"
>
capacity >= #{dto.type}
</if>
<if
test=
"dto.maxValue != null and dto.maxValue !=''"
>
capacity
<![CDATA[<=]]>
#{dto.maxValue}
</if>
</where>
limit #{current},#{size}
</select>
<select
id=
"selectPageDataTotal"
resultType=
"int"
>
select
count(1)
from
hygf_jp_inverter hjc
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where>
<if
test=
"dto.snCode != null and dto.snCode != ''"
>
sn_code = #{dto.snCode}
</if>
<if
test=
"dto.minValue != null and dto.minValue !=''"
>
capacity >= #{dto.type}
</if>
<if
test=
"dto.maxValue != null and dto.maxValue !=''"
>
capacity
<![CDATA[<=]]>
#{dto.maxValue}
</if>
</where>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
0 → 100644
View file @
e79c0dc8
<?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.tdenginemapper.TdHYGFInverterDayGenerateMapper"
>
</mapper>
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHYGFInverterMonthGenerateMapper.xml
0 → 100644
View file @
e79c0dc8
<?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.tdenginemapper.TdHYGFInverterMonthGenerateMapper"
>
</mapper>
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHYGFInverterYearGenerateMapper.xml
0 → 100644
View file @
e79c0dc8
<?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.tdenginemapper.TdHYGFInverterYearGenerateMapper"
>
</mapper>
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
View file @
e79c0dc8
...
...
@@ -46,4 +46,48 @@
</if>
</where>
</select>
<select
id=
"selectWarnList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto"
>
SELECT
`level` ,
`state` ,
third_station_id,
sn_code,
content,
start_time
FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if
test=
"state != null and state != ''"
>
AND state = #{state}
</if>
<if
test=
"level != null and level != ''"
>
AND level = #{level}
</if>
<if
test=
"minValue != null and minValue != ''"
>
time_long >= #{minvalue}
</if>
<if
test=
"maxValue != null and maxValue != ''"
>
AND time_long [
<![CDATA[<=]]>
]#{maxValue}
</if>
<if
test=
"snCode != null and snCode != ''"
>
AND sn_code = #{snCode}
</if>
<if
test=
"stationId.size >0 "
>
AND third_station_id in
<foreach
collection=
"stationId"
item=
"item"
open=
'('
close=
')'
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"startTime != null and startTime != ''"
>
AND start_time >= #{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
AND start_time [
<![CDATA[<=]]>
] #{endTime}
</if>
<if
test=
"content"
>
AND content like #{content}
</if>
</where>
limit #{current},#{size}
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpCollectorController.java
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterServiceImpl
;
...
...
@@ -174,4 +175,20 @@ public class JpCollectorController extends BaseController {
public
ResponseModel
<
List
<
JpCollectorDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
queryForJpCollectorList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryForDataPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器表分页查询"
,
notes
=
"户用光伏监盘采集器表分页查询"
)
public
ResponseModel
<
Page
<
JpCollectorDto
>>
queryForDataPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpCollectorDto
jpCollectorDto
)
{
Page
<
JpCollectorDto
>
page
=
new
Page
<
JpCollectorDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setTotal
(
jpCollectorServiceImpl
.
selectPageDataTota
(
jpCollectorDto
));
page
.
setRecords
(
jpCollectorServiceImpl
.
selectPageData
(
jpCollectorDto
,(
current
-
1
)*
size
,
size
));
return
ResponseHelper
.
buildResponse
(
page
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpInverterController.java
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
org.springframework.core.io.Resource
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterServiceImpl
;
...
...
@@ -25,6 +34,8 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.JpPersonStationMapper;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
/**
* 户用光伏监盘逆变器表
*
...
...
@@ -42,6 +53,10 @@ public class JpInverterController extends BaseController {
@Autowired
JpPersonStationMapper
pPersonStationMapper
;
@Value
(
"classpath:/json/paramsTree.json"
)
private
Resource
paramsTree
;
/**
* 新增户用光伏监盘逆变器表
...
...
@@ -151,4 +166,51 @@ public class JpInverterController extends BaseController {
public
ResponseModel
<
List
<
JpInverterDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
queryForJpInverterList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/queryForDataPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器表分页查询"
,
notes
=
"户用光伏监盘采集器表分页查询"
)
public
ResponseModel
<
Page
<
JpInverterDto
>>
queryForDataPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpInverterDto
jpInverterDto
)
{
Page
<
JpInverterDto
>
page
=
new
Page
<
JpInverterDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setTotal
(
jpInverterServiceImpl
.
selectPageDataTota
(
jpInverterDto
));
page
.
setRecords
(
jpInverterServiceImpl
.
selectPageData
(
jpInverterDto
,(
current
-
1
)*
size
,
size
));
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectParamTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器图标 选择参数树"
,
notes
=
"逆变器图标 选择参数树"
)
public
ResponseModel
<
List
<
Map
>>
selectParamTree
()
{
String
json
=
null
;
try
{
json
=
IOUtils
.
toString
(
paramsTree
.
getInputStream
(),
java
.
lang
.
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
List
<
Map
>
list
=
parseArray
(
json
,
Map
.
class
);
return
ResponseHelper
.
buildResponse
(
list
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/jpInverterTrend"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器图标 折线图"
,
notes
=
"逆变器图标 折线图"
)
public
void
jpInverterTrend
(
List
<
String
>
treeParams
,
String
type
,
String
time
,
String
snCode
,
String
thirdStationId
){
if
(
CollectionUtils
.
isNotEmpty
(
treeParams
)){
jpInverterServiceImpl
.
selectDayTrend
(
treeParams
,
time
,
snCode
,
thirdStationId
);
}
// jpInverterServiceImpl.
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInverterWarnController.java
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpPersonStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
...
...
@@ -230,4 +231,39 @@ public class TdHygfJpInverterWarnController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
collector
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器报警表列表全部数据查询"
,
notes
=
"户用光伏监盘逆变器报警表列表全部数据查询"
)
@GetMapping
(
value
=
"/selectWarnList"
)
@UserLimits
public
ResponseModel
<
List
<
TdHygfJpInverterWarnDto
>>
selectWarnList
(
@RequestParam
(
required
=
false
)
String
state
,
@RequestParam
(
required
=
false
)
String
level
,
@RequestParam
(
required
=
false
)
String
minvalue
,
@RequestParam
(
required
=
false
)
String
maxValue
,
@RequestParam
(
required
=
false
)
String
snCode
,
@RequestParam
(
required
=
false
)
List
<
String
>
stationId
,
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
,
@RequestParam
(
required
=
false
)
Integer
current
,
@RequestParam
(
required
=
false
)
Integer
size
,
@RequestParam
(
required
=
false
)
String
content
)
{
JpStationDto
reviewDto
=
new
JpStationDto
();
Map
<
String
,
String
>
nameMaps
=
new
HashMap
<>();
List
<
JpStation
>
jpStation
=
jpStationMapper
.
getJpStation
(
reviewDto
);
nameMaps
=
jpStation
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
JpStation:
:
getName
));
if
(
null
==
stationId
){
stationId
=
jpStation
.
stream
().
map
(
JpStation:
:
getThirdStationId
).
collect
(
Collectors
.
toList
());
}
List
<
TdHygfJpInverterWarnDto
>
maps
=
tdHygfJpInverterWarnServiceImpl
.
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,(
current
-
1
)*
size
,
size
);
for
(
TdHygfJpInverterWarnDto
map
:
maps
)
{
if
(
nameMaps
.
containsKey
(
map
.
getThirdStationId
())){
map
.
setStationName
(
nameMaps
.
get
(
map
.
getThirdStationId
()));
}
}
return
ResponseHelper
.
buildResponse
(
maps
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpCollectorServiceImpl.java
View file @
e79c0dc8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpCollectorMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IJpCollectorService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
org.apache.ibatis.annotations.Param
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -66,4 +68,15 @@ public class JpCollectorServiceImpl extends BaseService<JpCollectorDto, JpCollec
public
List
<
JpCollectorDto
>
queryForJpCollectorList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@UserLimits
public
List
<
JpCollectorDto
>
selectPageData
(
JpCollectorDto
jpCollectorDto
,
int
current
,
int
size
)
{
return
this
.
getBaseMapper
().
selectPageData
(
jpCollectorDto
,
current
,
size
);
}
@UserLimits
public
int
selectPageDataTota
(
@Param
(
"dto"
)
JpCollectorDto
reviewDto
)
{
return
this
.
getBaseMapper
().
selectPageDataTota
(
reviewDto
);
}
}
\ 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/JpInverterServiceImpl.java
View file @
e79c0dc8
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -11,7 +12,6 @@ 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.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IJpInverterService
;
...
...
@@ -25,6 +25,9 @@ import com.yeejoin.amos.boot.module.hygf.api.service.IJpInverterService;
@Service
public
class
JpInverterServiceImpl
extends
BaseService
<
JpInverterDto
,
JpInverter
,
JpInverterMapper
>
implements
IJpInverterService
{
/**
* 分页查询
*/
...
...
@@ -60,4 +63,21 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
public
List
<
JpInverterDto
>
queryForJpInverterList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@UserLimits
public
List
<
JpInverterDto
>
selectPageData
(
JpInverterDto
jpInverterDto
,
int
current
,
int
size
)
{
return
this
.
getBaseMapper
().
selectPageData
(
jpInverterDto
,
current
,
size
);
}
@UserLimits
public
long
selectPageDataTota
(
JpInverterDto
jpInverterDto
)
{
return
this
.
getBaseMapper
().
selectPageDataTotal
(
jpInverterDto
);
}
public
void
selectDayTrend
(
List
<
String
>
treeParams
,
String
time
,
String
snCode
,
String
thirdStationId
)
{
}
}
\ 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/TdHygfJpInverterWarnServiceImpl.java
View file @
e79c0dc8
...
...
@@ -11,6 +11,7 @@ import java.util.stream.Collectors;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -27,6 +28,7 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn;
import
com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpInverterWarnService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
/**
* 户用光伏监盘逆变器报警表服务实现类
...
...
@@ -127,4 +129,8 @@ public class TdHygfJpInverterWarnServiceImpl
return
tdHygfJpInverterWarnDto
;
}
public
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
){
return
this
.
getBaseMapper
().
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,(
current
-
1
)*
size
,
size
);
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/json/paramsTree.json
0 → 100644
View file @
e79c0dc8
[
{
"name"
:
"直流电压"
,
"code"
:
"voltage"
,
"children"
:
[
{
"name"
:
"直流电压PV1"
,
"code"
:
"voltage_PV1"
},
{
"name"
:
"直流电压PV2"
,
"code"
:
"voltage_PV2"
},
{
"name"
:
"直流电压PV3"
,
"code"
:
"voltage_PV3"
},
{
"name"
:
"直流电压PV4"
,
"code"
:
"voltage_PV4"
}
]
},
{
"name"
:
"直流电流"
,
"code"
:
"current"
,
"children"
:
[
{
"name"
:
"直流电流PV1"
,
"code"
:
"current_PV1"
},
{
"name"
:
"直流电流PV2"
,
"code"
:
"current_PV2"
},
{
"name"
:
"直流电流PV3"
,
"code"
:
"current_PV3"
},
{
"name"
:
"直流电流PV4"
,
"code"
:
"current_PV4"
}
]
},
{
"name"
:
"直流功率"
,
"code"
:
"power"
,
"children"
:
[
{
"name"
:
"直流功率PV1"
,
"code"
:
"power_PV1"
},
{
"name"
:
"直流功率PV2"
,
"code"
:
"power_PV2"
},
{
"name"
:
"直流功率PV3"
,
"code"
:
"power_PV3"
},
{
"name"
:
"直流功率PV4"
,
"code"
:
"power_PV4"
}
]},
{
"name"
:
"U_交流电压"
,
"code"
:
"1"
,
"children"
:
[
]
},
{
"name"
:
"V_交流电压"
,
"code"
:
"2"
,
"children"
:
[
]
},
{
"name"
:
"W_交流电压"
,
"code"
:
"3"
,
"children"
:
[
]
},
{
"name"
:
"U_交流电流"
,
"code"
:
"4"
,
"children"
:
[
]
},
{
"name"
:
"W_交流电流"
,
"code"
:
"5"
,
"children"
:
[
]
},
{
"name"
:
"V_交流电流"
,
"code"
:
"6"
,
"children"
:
[
]
},
{
"name"
:
"交流输出频率"
,
"code"
:
"7"
,
"children"
:
[
]
},
{
"name"
:
"总功率"
,
"code"
:
"8"
,
"children"
:
[
]
},
{
"name"
:
"当日电量"
,
"code"
:
"9"
,
"children"
:
[
]
},
{
"name"
:
"累计电量"
,
"code"
:
"10"
,
"children"
:
[
]
},
{
"name"
:
"IGBT温度"
,
"code"
:
"11"
,
"children"
:
[
]
}
]
\ No newline at end of file
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