Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
ecef59d9
Commit
ecef59d9
authored
May 20, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改报警统计错误
parent
d5ad231b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
13 deletions
+103
-13
TdHygfJpInverterWarnMapper.java
...e/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
+9
-2
TdHygfJpInverterWarnMapper.xml
.../resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
+64
-0
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+19
-7
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+11
-4
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 @
ecef59d9
...
...
@@ -33,10 +33,17 @@ public interface TdHygfJpInverterWarnMapper extends BaseMapper<TdHygfJpInverterW
@UserEmpower
(
field
=
{
"regional_companies_code"
},
dealerField
=
{
"amos_company_code"
,
"regional_companies_code"
},
fieldConditions
=
{
"eq"
,
"in"
},
relationship
=
"and"
)
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
List
<
String
>
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
,
String
stationName
);
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
List
<
String
>
state
,
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
,
String
stationName
);
@UserEmpower
(
field
=
{
"regional_companies_code"
},
dealerField
=
{
"amos_company_code"
,
"regional_companies_code"
},
fieldConditions
=
{
"eq"
,
"in"
},
relationship
=
"and"
)
int
selectWarnListTotal
(
List
<
String
>
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
,
String
stationName
);
int
selectWarnListTotal
(
List
<
String
>
state
,
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
,
String
stationName
);
@UserEmpower
(
field
=
{
"regional_companies_code"
},
dealerField
=
{
"amos_company_code"
,
"regional_companies_code"
},
fieldConditions
=
{
"eq"
,
"in"
},
relationship
=
"and"
)
int
selectWarnTotal
(
List
<
String
>
state
,
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
);
@Select
(
"SELECT * from td_hygf_jp_inverter_warn WHERE (third_station_id = #{thirdStationId} AND sn_code = #{sncode} AND created_time = #{createdTime})"
)
TdHygfJpInverterWarn
getInverTerWarnByparams
(
@Param
(
"createdTime"
)
long
createdTime
,
@Param
(
"sncode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
View file @
ecef59d9
...
...
@@ -80,6 +80,27 @@
<!-- <if test="handlerStatus != null and handlerStatus != ''">-->
<!-- AND handler_status = #{handlerStatus}-->
<!-- </if>-->
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"amosCompanyCode != null and amosCompanyCode != ''"
>
AND amos_company_code = #{amosCompanyCode}
</if>
<if
test=
"thirdStationId != null and thirdStationId != ''"
>
AND third_station_id = #{thirdStationId}
</if>
<!-- <if test="type != null and type != ''">-->
<!-- AND type = #{type}-->
<!-- </if>-->
<if
test=
"level != null and level != ''"
>
AND `level` = #{level}
</if>
<if
test=
"level != null and level != ''"
>
AND `level` = #{level}
</if>
<if
test=
"level != null and level != ''"
>
AND `level` = #{level}
</if>
<if
test=
"level != null and level != ''"
>
AND `level` = #{level}
</if>
...
...
@@ -127,6 +148,18 @@
#{item}
</foreach>
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"amosCompanyCode != null and amosCompanyCode != ''"
>
AND amos_company_code = #{amosCompanyCode}
</if>
<if
test=
"thirdStationId != null and thirdStationId != ''"
>
AND third_station_id = #{thirdStationId}
</if>
<!-- <if test="type != null and type != ''">-->
<!-- AND type = #{type}-->
<!-- </if>-->
<!-- <if test="handlerStatus != null and handlerStatus != ''">-->
<!-- AND handler_status = #{handlerStatus}-->
<!-- </if>-->
...
...
@@ -166,6 +199,37 @@
</select>
<select
id=
"selectWarnTotal"
resultType=
"int"
>
SELECT
count (1)
FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if
test=
"state != null and state.size>0"
>
`state` in
<foreach
collection=
"state"
item=
"item"
open=
'('
close=
')'
separator=
","
>
#{item}
</foreach>
</if>
<if
test=
"regionalCompaniesCode != null and regionalCompaniesCode != ''"
>
AND regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"amosCompanyCode != null and amosCompanyCode != ''"
>
AND amos_company_code = #{amosCompanyCode}
</if>
<if
test=
"thirdStationId != null and thirdStationId != ''"
>
AND third_station_id = #{thirdStationId}
</if>
<!-- <if test="type != null and type != ''">-->
<!-- AND type = #{type}-->
<!-- </if>-->
</where>
</select>
<select
id=
"queryAlarmNumber"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto"
>
SELECT
`state`
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInverterWarnController.java
View file @
ecef59d9
...
...
@@ -231,6 +231,10 @@ public class TdHygfJpInverterWarnController extends BaseController {
@UserLimits
public
ResponseModel
<
Page
<
TdHygfJpInverterWarnDto
>>
selectWarnList
(
@RequestParam
(
required
=
false
)
List
<
String
>
state
,
@RequestParam
(
required
=
false
)
String
handlerStatus
,
@RequestParam
(
required
=
false
)
String
regionalCompaniesCode
,
@RequestParam
(
required
=
false
)
String
amosCompanyCode
,
@RequestParam
(
required
=
false
)
String
thirdStationId
,
@RequestParam
(
required
=
false
)
String
type
,
@RequestParam
(
required
=
false
)
String
level
,
@RequestParam
(
required
=
false
)
String
stationName
,
@RequestParam
(
required
=
false
)
String
minvalue
,
...
...
@@ -286,7 +290,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
}
List
<
TdHygfJpInverterWarnDto
>
maps
=
tdHygfJpInverterWarnServiceImpl
.
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
current
,
size
,
handlerStatus
,
stationName
);
List
<
TdHygfJpInverterWarnDto
>
maps
=
tdHygfJpInverterWarnServiceImpl
.
selectWarnList
(
state
,
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
current
,
size
,
handlerStatus
,
stationName
);
for
(
TdHygfJpInverterWarnDto
map
:
maps
)
{
// if (nameMaps.containsKey(map.getThirdStationId())) {
// map.setStationName(nameMaps.get(map.getThirdStationId()));
...
...
@@ -295,7 +299,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
map
.
setTimeLongFormat
(
te
);
}
result
.
setTotal
(
tdHygfJpInverterWarnServiceImpl
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
,
stationName
));
result
.
setTotal
(
tdHygfJpInverterWarnServiceImpl
.
selectWarnListTotal
(
state
,
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
,
stationName
));
List
<
Long
>
waringIds
=
maps
.
stream
().
map
(
tdHygfJpInverterWarnDto
->
tdHygfJpInverterWarnDto
.
getCreatedTime
()).
collect
(
Collectors
.
toList
());
if
(
waringIds
.
size
()
==
0
)
{
waringIds
=
Arrays
.
asList
(
0L
);
...
...
@@ -321,12 +325,20 @@ public class TdHygfJpInverterWarnController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏逆变器报警表统计数据查询"
,
notes
=
"户用光伏逆变器报警表统计数据查询"
)
@GetMapping
(
value
=
"/queryAlarmNumber"
)
@UserLimits
public
ResponseModel
<
Map
<
String
,
Object
>>
queryAlarmNumber
(
@RequestParam
(
required
=
false
)
String
regionalCompaniesCode
,
@RequestParam
(
required
=
false
)
String
amosCompanyCode
,
@RequestParam
(
required
=
false
)
String
thirdStationId
,
@RequestParam
(
required
=
false
)
String
type
public
ResponseModel
<
Map
<
String
,
Object
>>
queryAlarmNumber
(
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
)
{
Map
<
String
,
Object
>
result
=
tdHygfJpInverterWarnServiceImpl
.
queryAlarmNumber
(
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
);
// Map<String, Object> result = tdHygfJpInverterWarnServiceImpl.queryAlarmNumber(regionalCompaniesCode, amosCompanyCode, thirdStationId, type);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
int
wcl
=
tdHygfJpInverterWarnServiceImpl
.
selectWarnTotal
(
Arrays
.
asList
(
"未处理"
),
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
);
int
ycl
=
tdHygfJpInverterWarnServiceImpl
.
selectWarnTotal
(
Arrays
.
asList
(
"已处理"
,
"已恢复"
),
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
);
result
.
put
(
"wcl"
,
wcl
);
result
.
put
(
"ycl"
,
ycl
);
return
ResponseHelper
.
buildResponse
(
result
);
}
...
...
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 @
ecef59d9
...
...
@@ -172,8 +172,8 @@ public class TdHygfJpInverterWarnServiceImpl
return
tdHygfJpInverterWarnDto
;
}
public
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
List
<
String
>
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
,
String
stationName
)
{
List
<
TdHygfJpInverterWarnDto
>
list
=
tdHygfJpInverterWarnMapper
.
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
(
current
-
1
)
*
size
,
size
,
handlerStatus
,
stationName
);
public
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
List
<
String
>
state
,
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
,
String
stationName
)
{
List
<
TdHygfJpInverterWarnDto
>
list
=
tdHygfJpInverterWarnMapper
.
selectWarnList
(
state
,
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
(
current
-
1
)
*
size
,
size
,
handlerStatus
,
stationName
);
list
.
forEach
(
i
->
{
JpStation
jpStation
=
jpStationServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
JpStation
>()
.
eq
(
JpStation:
:
getThirdStationId
,
i
.
getThirdStationId
()));
...
...
@@ -186,8 +186,15 @@ public class TdHygfJpInverterWarnServiceImpl
return
list
;
}
public
int
selectWarnListTotal
(
List
<
String
>
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
,
String
stationName
)
{
return
tdHygfJpInverterWarnMapper
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
,
stationName
);
public
int
selectWarnListTotal
(
List
<
String
>
state
,
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
,
String
stationName
)
{
return
tdHygfJpInverterWarnMapper
.
selectWarnListTotal
(
state
,
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
,
stationName
);
}
public
int
selectWarnTotal
(
List
<
String
>
state
,
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
)
{
return
tdHygfJpInverterWarnMapper
.
selectWarnTotal
(
state
,
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
);
}
public
Map
<
String
,
Object
>
queryAlarmNumber
(
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
)
{
...
...
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