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
a9da08ca
Commit
a9da08ca
authored
Sep 20, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加逆变器告警接口
parent
ca7fe384
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
34 deletions
+37
-34
TdHygfJpInverterWarnMapper.java
...e/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
+4
-1
TdHygfJpInverterWarnMapper.xml
.../resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
+18
-16
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+15
-17
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
View file @
a9da08ca
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
@@ -16,6 +17,8 @@ import java.util.Map;
...
@@ -16,6 +17,8 @@ import java.util.Map;
*/
*/
public
interface
TdHygfJpInverterWarnMapper
extends
BaseMapper
<
TdHygfJpInverterWarn
>
{
public
interface
TdHygfJpInverterWarnMapper
extends
BaseMapper
<
TdHygfJpInverterWarn
>
{
List
<
Map
<
String
,
Object
>>
getCountTdHygfJpInverterWarn
(
@Param
(
"dto"
)
List
<
JpStation
>
dto
);
List
<
Map
<
String
,
Object
>>
getCountTdHygfJpInverterWarn
(
@Param
(
"dto"
)
List
<
JpStation
>
dto
);
List
<
TdHygfJpInverterWarnDto
>
list
(
@Param
(
"param"
)
TdHygfJpInverterWarnDto
tdHygfJpInverterWarnDto
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
View file @
a9da08ca
<?xml version="1.0" encoding="UTF-8"?>
<?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">
<!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.TdHygfJpInverterWarnMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper"
>
<select
id=
"getCountTdHygfJpInverterWarn"
resultType=
"map"
>
<select
id=
"getCountTdHygfJpInverterWarn"
resultType=
"map"
>
SELECT `state`,count(`state`) num
SELECT `state`,count(`state`) num
FROM house_pv_data.td_hygf_jp_inverter_warn
FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<where>
<if
test=
"dto!=null"
>
<if
test=
"dto!=null"
>
third_station_id in
third_station_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
#{item.stationId}
</foreach>
</foreach>
</if>
</if>
</where>
</where>
GROUP BY `state`
GROUP BY `state`
</select>
</select>
<select
id=
"list"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if
test=
"param.state!=null"
>
`state` = #{param.state}
</if>
</where>
</select>
</mapper>
</mapper>
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 @
a9da08ca
...
@@ -11,6 +11,9 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -11,6 +11,9 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn
;
...
@@ -30,24 +33,19 @@ public class TdHygfJpInverterWarnServiceImpl
...
@@ -30,24 +33,19 @@ public class TdHygfJpInverterWarnServiceImpl
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
TdHygfJpInverterWarnDto
>
queryForTdHygfJpInverterWarnPage
(
Page
<
TdHygfJpInverterWarnDto
>
page
,
public
Page
<
TdHygfJpInverterWarnDto
>
queryForTdHygfJpInverterWarnPage
(
Page
<
TdHygfJpInverterWarnDto
>
page
Param
,
TdHygfJpInverterWarnDto
tdHygfJpInverterWarnDto
)
{
TdHygfJpInverterWarnDto
tdHygfJpInverterWarnDto
)
{
Page
<
TdHygfJpInverterWarn
>
entiryPage
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
int
pageNum
=
(
int
)
pageParam
.
getCurrent
();
LambdaQueryWrapper
<
TdHygfJpInverterWarn
>
wrapper
=
new
LambdaQueryWrapper
<>();
int
pageSize
=
(
int
)
pageParam
.
getSize
();
if
(
tdHygfJpInverterWarnDto
.
getState
()
!=
null
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
wrapper
.
eq
(
TdHygfJpInverterWarn:
:
getState
,
tdHygfJpInverterWarnDto
.
getState
());
List
<
TdHygfJpInverterWarnDto
>
list
=
this
.
baseMapper
.
list
(
tdHygfJpInverterWarnDto
);
}
PageInfo
<
TdHygfJpInverterWarnDto
>
page
=
new
PageInfo
(
list
);
entiryPage
=
(
Page
<
TdHygfJpInverterWarn
>)
this
.
page
(
entiryPage
,
wrapper
);
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
TdHygfJpInverterWarnDto
>
pagenew
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
TdHygfJpInverterWarnDto
>();
if
(!
ValidationUtil
.
isEmpty
(
entiryPage
.
getRecords
()))
{
pagenew
.
setCurrent
(
pageNum
);
page
.
setTotal
(
entiryPage
.
getTotal
());
pagenew
.
setTotal
(
page
.
getTotal
());
page
.
setPages
(
entiryPage
.
getPages
());
pagenew
.
setSize
(
pageSize
);
page
.
setCurrent
(
entiryPage
.
getCurrent
());
pagenew
.
setRecords
(
page
.
getList
());
page
.
setSize
(
entiryPage
.
getSize
());
return
pagenew
;
if
(!
ValidationUtil
.
isEmpty
(
entiryPage
.
getRecords
()))
page
.
setRecords
(
Bean
.
toModels
(
entiryPage
.
getRecords
(),
this
.
getModelClass
()));
}
return
page
;
}
}
/**
/**
...
...
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