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
b8066a13
Commit
b8066a13
authored
Sep 20, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改
parent
4d988671
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
23 deletions
+34
-23
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+34
-23
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInverterWarnController.java
View file @
b8066a13
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
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
;
...
@@ -49,6 +50,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -49,6 +50,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
TdHygfJpInverterWarnMapper
tdHygfJpInverterWarnMapper
;
TdHygfJpInverterWarnMapper
tdHygfJpInverterWarnMapper
;
@Autowired
@Autowired
JpStationMapper
jpStationMapper
;
JpStationMapper
jpStationMapper
;
/**
/**
* 新增户用光伏监盘逆变器报警表
* 新增户用光伏监盘逆变器报警表
*
*
...
@@ -72,10 +74,10 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -72,10 +74,10 @@ public class TdHygfJpInverterWarnController extends BaseController {
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新户用光伏监盘逆变器报警表"
,
notes
=
"根据sequenceNbr更新户用光伏监盘逆变器报警表"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新户用光伏监盘逆变器报警表"
,
notes
=
"根据sequenceNbr更新户用光伏监盘逆变器报警表"
)
public
ResponseModel
<
TdHygfJpInverterWarnDto
>
updateBySequenceNbrTdHygfJpInverterWarn
(
@RequestBody
TdHygfJpInverterWarnDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
TdHygfJpInverterWarnDto
>
updateBySequenceNbrTdHygfJpInverterWarn
(
@RequestBody
TdHygfJpInverterWarnDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInverterWarnServiceImpl
.
updateWithModel
(
model
));
return
ResponseHelper
.
buildResponse
(
tdHygfJpInverterWarnServiceImpl
.
updateWithModel
(
model
));
}
}
/**
/**
...
@@ -117,11 +119,22 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -117,11 +119,22 @@ public class TdHygfJpInverterWarnController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器报警表分页查询"
,
notes
=
"户用光伏监盘逆变器报警表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器报警表分页查询"
,
notes
=
"户用光伏监盘逆变器报警表分页查询"
)
public
ResponseModel
<
Page
<
TdHygfJpInverterWarnDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
<
Page
<
TdHygfJpInverterWarnDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
TdHygfJpInverterWarnDto
tdHygfJpInverterWarnDto
)
{
@RequestParam
(
value
=
"size"
)
int
size
,
TdHygfJpInverterWarnDto
tdHygfJpInverterWarnDto
)
{
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
qug
.
eq
(
JpPersonStation:
:
getPersonId
,
getUserInfo
().
getUserId
());
List
<
JpPersonStation
>
pPersonStation
=
pPersonStationMapper
.
selectList
(
qug
);
if
(!
pPersonStation
.
isEmpty
())
{
Page
<
TdHygfJpInverterWarnDto
>
page
=
new
Page
<
TdHygfJpInverterWarnDto
>();
Page
<
TdHygfJpInverterWarnDto
>
page
=
new
Page
<
TdHygfJpInverterWarnDto
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
List
<
String
>
ids
=
pPersonStation
.
stream
().
map
(
i
->
i
.
getStationId
()).
collect
(
Collectors
.
toList
());
tdHygfJpInverterWarnDto
.
setStationIds
(
ids
);
return
ResponseHelper
.
buildResponse
(
return
ResponseHelper
.
buildResponse
(
tdHygfJpInverterWarnServiceImpl
.
queryForTdHygfJpInverterWarnPage
(
page
,
tdHygfJpInverterWarnDto
));
tdHygfJpInverterWarnServiceImpl
.
queryForTdHygfJpInverterWarnPage
(
page
,
tdHygfJpInverterWarnDto
));
}
else
{
return
ResponseHelper
.
buildResponse
(
new
Page
<
TdHygfJpInverterWarnDto
>());
}
}
}
/**
/**
...
@@ -138,36 +151,34 @@ public class TdHygfJpInverterWarnController extends BaseController {
...
@@ -138,36 +151,34 @@ public class TdHygfJpInverterWarnController extends BaseController {
/**
/**
* 获取告警统计
* 获取告警统计
*
**/
**/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器报警表列表全部数据查询"
,
notes
=
"户用光伏监盘逆变器报警表列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器报警表列表全部数据查询"
,
notes
=
"户用光伏监盘逆变器报警表列表全部数据查询"
)
@GetMapping
(
value
=
"/selectcount"
)
@GetMapping
(
value
=
"/selectcount"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectcount
(
JpStationDto
reviewDto
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectcount
(
JpStationDto
reviewDto
)
{
LambdaQueryWrapper
<
JpStation
>
qugda
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JpStation
>
qugda
=
new
LambdaQueryWrapper
<>();
//
获取当前人管理场站
//
获取当前人管理场站
if
(
reviewDto
.
getThirdStationId
()==
null
)
{
if
(
reviewDto
.
getThirdStationId
()
==
null
)
{
//
获取当前人管理场站
//
获取当前人管理场站
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
qug
.
eq
(
JpPersonStation:
:
getPersonId
,
getUserInfo
().
getUserId
());
qug
.
eq
(
JpPersonStation:
:
getPersonId
,
getUserInfo
().
getUserId
());
List
<
JpPersonStation
>
pPersonStation
=
pPersonStationMapper
.
selectList
(
qug
);
List
<
JpPersonStation
>
pPersonStation
=
pPersonStationMapper
.
selectList
(
qug
);
List
ids
=
null
;
List
ids
=
null
;
if
(
pPersonStation
!=
null
&&!
pPersonStation
.
isEmpty
())
{
if
(
pPersonStation
!=
null
&&
!
pPersonStation
.
isEmpty
())
{
ids
=
new
ArrayList
();
ids
=
new
ArrayList
();
for
(
JpPersonStation
jpPersonStation
:
pPersonStation
)
{
for
(
JpPersonStation
jpPersonStation
:
pPersonStation
)
{
ids
.
add
(
jpPersonStation
.
getStationId
());
ids
.
add
(
jpPersonStation
.
getStationId
());
}
}
qugda
.
in
(
ids
!=
null
,
JpStation:
:
getThirdStationId
,
ids
);
qugda
.
in
(
ids
!=
null
,
JpStation:
:
getThirdStationId
,
ids
);
}
}
}
else
{
}
else
{
qugda
.
eq
(
JpStation:
:
getThirdStationId
,
reviewDto
.
getThirdStationId
());
qugda
.
eq
(
JpStation:
:
getThirdStationId
,
reviewDto
.
getThirdStationId
());
}
}
qugda
.
like
(
reviewDto
.
getUserName
()!=
null
,
JpStation:
:
getUserName
,
reviewDto
.
getUserName
());
qugda
.
like
(
reviewDto
.
getUserName
()
!=
null
,
JpStation:
:
getUserName
,
reviewDto
.
getUserName
());
qugda
.
like
(
reviewDto
.
getArea
()!=
null
,
JpStation:
:
getArea
,
reviewDto
.
getArea
());
qugda
.
like
(
reviewDto
.
getArea
()
!=
null
,
JpStation:
:
getArea
,
reviewDto
.
getArea
());
List
<
JpStation
>
pPersonStation
=
jpStationMapper
.
selectList
(
qugda
);
List
<
JpStation
>
pPersonStation
=
jpStationMapper
.
selectList
(
qugda
);
List
<
Map
<
String
,
Object
>>
datalist
=
tdHygfJpInverterWarnMapper
.
getCountTdHygfJpInverterWarn
(
pPersonStation
);
List
<
Map
<
String
,
Object
>>
datalist
=
tdHygfJpInverterWarnMapper
.
getCountTdHygfJpInverterWarn
(
pPersonStation
);
return
ResponseHelper
.
buildResponse
(
datalist
);
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