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
5ef01947
Commit
5ef01947
authored
Sep 20, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置
parent
e5e69bcc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
86 additions
and
9 deletions
+86
-9
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+1
-1
TdHygfJpInverterWarnMapper.java
...e/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
+7
-0
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+4
-4
TdHygfJpInverterWarnMapper.xml
.../resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
+18
-0
AmosHygfApplication.java
...z/src/main/java/com/yeejoin/amos/AmosHygfApplication.java
+1
-1
TDengineServerConfig.java
...mos/boot/module/hygf/biz/config/TDengineServerConfig.java
+0
-1
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+1
-1
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+54
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
5ef01947
...
@@ -18,6 +18,6 @@ import java.util.Map;
...
@@ -18,6 +18,6 @@ import java.util.Map;
public
interface
JpStationMapper
extends
BaseMapper
<
JpStation
>
{
public
interface
JpStationMapper
extends
BaseMapper
<
JpStation
>
{
List
<
JpStationDto
>
queryForDealerReviewPage
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
List
<
JpStationDto
>
queryForDealerReviewPage
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
JpStationDto
queryCount
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
JpStationDto
queryCount
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
Map
<
String
,
Object
>
countState
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
List
<
Map
<
String
,
Object
>
>
countState
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
View file @
5ef01947
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.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
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 户用光伏监盘逆变器报警表 Mapper 接口
* 户用光伏监盘逆变器报警表 Mapper 接口
...
@@ -11,4 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -11,4 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
TdHygfJpInverterWarnMapper
extends
BaseMapper
<
TdHygfJpInverterWarn
>
{
public
interface
TdHygfJpInverterWarnMapper
extends
BaseMapper
<
TdHygfJpInverterWarn
>
{
List
<
Map
<
String
,
Object
>>
getCountTdHygfJpInverterWarn
(
@Param
(
"dto"
)
List
<
JpStation
>
dto
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
5ef01947
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
<if
test=
"dto.name!=null"
>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
</if>
<if
test=
"dto.
nauserName
me!=null"
>
<if
test=
"dto.
userNa
me!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.
nauserName
me}),"%")
and hygf_jp_station.user_name like concat(concat("%",#{dto.
userNa
me}),"%")
</if>
</if>
<if
test=
"dto.address!=null"
>
<if
test=
"dto.address!=null"
>
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
and hygf_jp_station.address like concat(concat("%",#{dto.address}),"%")
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
count(*) countBuiltNum
count(*) countBuiltNum
from hygf_jp_station
from hygf_jp_station
<where>
<where>
<if
test=
"dto.
nauserName
me!=null"
>
<if
test=
"dto.
userNa
me!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
</if>
<if
test=
"dto.area!=null"
>
<if
test=
"dto.area!=null"
>
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<if
test=
"dto.name!=null"
>
<if
test=
"dto.name!=null"
>
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
</if>
</if>
<if
test=
"dto.
nauserName
me!=null"
>
<if
test=
"dto.
userNa
me!=null"
>
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
and hygf_jp_station.user_name like concat(concat("%",#{dto.userName}),"%")
</if>
</if>
<if
test=
"dto.statioId!=null"
>
<if
test=
"dto.statioId!=null"
>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
View file @
5ef01947
...
@@ -2,4 +2,22 @@
...
@@ -2,4 +2,22 @@
<!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 `state`,count(`state`) num
FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if
test=
"dto!=null"
>
third_station_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item.stationId}
</foreach>
</if>
</where>
GROUP BY `state`
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/AmosHygfApplication.java
View file @
5ef01947
...
@@ -47,7 +47,7 @@ import java.net.InetAddress;
...
@@ -47,7 +47,7 @@ import java.net.InetAddress;
@EnableScheduling
@EnableScheduling
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"com.yeejoin.amos.boot.module.**.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
,
"com.yeejoin.amos.boot.module.common.biz.*"
})
"com.yeejoin.amos.boot.module.**.api.tdenginemapper"
,
"com.yeejoin.amos.boot.module.**.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
,
"com.yeejoin.amos.boot.module.common.biz.*"
})
@ComponentScan
(
basePackages
=
{
"org.typroject"
,
"com.yeejoin.amos"
})
@ComponentScan
(
basePackages
=
{
"org.typroject"
,
"com.yeejoin.amos"
})
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
DataSourceTransactionManagerAutoConfiguration
.
class
,
MybatisAutoConfiguration
.
class
})
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
DataSourceTransactionManagerAutoConfiguration
.
class
,
MybatisAutoConfiguration
.
class
})
public
class
AmosHygfApplication
{
public
class
AmosHygfApplication
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/config/TDengineServerConfig.java
View file @
5ef01947
...
@@ -74,7 +74,6 @@ public class TDengineServerConfig {
...
@@ -74,7 +74,6 @@ public class TDengineServerConfig {
@Bean
@Bean
public
PaginationInterceptor
paginationInterceptor
()
{
public
PaginationInterceptor
paginationInterceptor
()
{
PaginationInterceptor
paginationInterceptor
=
new
PaginationInterceptor
();
PaginationInterceptor
paginationInterceptor
=
new
PaginationInterceptor
();
paginationInterceptor
.
setDialectType
(
"mysql"
);
return
paginationInterceptor
;
return
paginationInterceptor
;
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
5ef01947
...
@@ -130,7 +130,7 @@ public class JpStationController extends BaseController {
...
@@ -130,7 +130,7 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/countState"
)
@GetMapping
(
value
=
"/countState"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站列表"
,
notes
=
"场站列表"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
countState
(
JpStationDto
reviewDto
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>
>>
countState
(
JpStationDto
reviewDto
)
{
//获取当前人管理场站
//获取当前人管理场站
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInverterWarnController.java
View file @
5ef01947
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
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.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpPersonStation
;
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.mapper.JpPersonStationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInverterWarnServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInverterWarnServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -30,7 +43,12 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -30,7 +43,12 @@ public class TdHygfJpInverterWarnController extends BaseController {
@Autowired
@Autowired
TdHygfJpInverterWarnServiceImpl
tdHygfJpInverterWarnServiceImpl
;
TdHygfJpInverterWarnServiceImpl
tdHygfJpInverterWarnServiceImpl
;
@Autowired
JpPersonStationMapper
pPersonStationMapper
;
@Autowired
TdHygfJpInverterWarnMapper
tdHygfJpInverterWarnMapper
;
@Autowired
JpStationMapper
jpStationMapper
;
/**
/**
* 新增户用光伏监盘逆变器报警表
* 新增户用光伏监盘逆变器报警表
*
*
...
@@ -117,4 +135,39 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -117,4 +135,39 @@ public class TdHygfJpInverterWarnController extends BaseController {
public
ResponseModel
<
List
<
TdHygfJpInverterWarnDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
TdHygfJpInverterWarnDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInverterWarnServiceImpl
.
queryForTdHygfJpInverterWarnList
());
return
ResponseHelper
.
buildResponse
(
tdHygfJpInverterWarnServiceImpl
.
queryForTdHygfJpInverterWarnList
());
}
}
/**
* 获取告警统计
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器报警表列表全部数据查询"
,
notes
=
"户用光伏监盘逆变器报警表列表全部数据查询"
)
@GetMapping
(
value
=
"/selectcount"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectcount
(
JpStationDto
reviewDto
)
{
LambdaQueryWrapper
<
JpStation
>
qugda
=
new
LambdaQueryWrapper
<>();
//获取当前人管理场站
if
(
reviewDto
.
getThirdStationId
()==
null
){
//获取当前人管理场站
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
qug
.
eq
(
JpPersonStation:
:
getPersonId
,
getUserInfo
().
getUserId
());
List
<
JpPersonStation
>
pPersonStation
=
pPersonStationMapper
.
selectList
(
qug
);
List
ids
=
null
;
if
(
pPersonStation
!=
null
&&!
pPersonStation
.
isEmpty
()){
ids
=
new
ArrayList
();
for
(
JpPersonStation
jpPersonStation
:
pPersonStation
)
{
ids
.
add
(
jpPersonStation
.
getStationId
());
}
qugda
.
in
(
ids
!=
null
,
JpStation:
:
getThirdStationId
,
ids
);
}
}
else
{
qugda
.
eq
(
JpStation:
:
getThirdStationId
,
reviewDto
.
getThirdStationId
());
}
qugda
.
like
(
reviewDto
.
getUserName
()!=
null
,
JpStation:
:
getUserName
,
reviewDto
.
getUserName
());
qugda
.
like
(
reviewDto
.
getArea
()!=
null
,
JpStation:
:
getArea
,
reviewDto
.
getArea
());
List
<
JpStation
>
pPersonStation
=
jpStationMapper
.
selectList
(
qugda
);
List
<
Map
<
String
,
Object
>>
datalist
=
tdHygfJpInverterWarnMapper
.
getCountTdHygfJpInverterWarn
(
pPersonStation
);
return
ResponseHelper
.
buildResponse
(
datalist
);
}
}
}
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