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
ae13f19c
Commit
ae13f19c
authored
Dec 20, 2024
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改统计问题
parent
18a592a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
26 deletions
+43
-26
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+43
-26
No files found.
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 @
ae13f19c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
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.HYGFMaintenanceTicketsDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.StdUserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HYGFMaintenanceTicketsMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpCollectorMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.UserEmpowerMapper
;
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
jdk.nashorn.internal.ir.annotations.Ignore
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.util.ObjectUtil
;
/**
* 户用光伏监盘逆变器报警表服务实现类
...
...
@@ -48,6 +57,8 @@ public class TdHygfJpInverterWarnServiceImpl
JpInverterMapper
jpInverterMapper
;
@Autowired
JpCollectorMapper
jpCollectorMapper
;
@Autowired
private
UserEmpowerMapper
userEmpowerMapper
;
/**
* 分页查询
*/
...
...
@@ -241,21 +252,27 @@ public class TdHygfJpInverterWarnServiceImpl
public
Map
<
String
,
Object
>
queryStateNumber
(
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
thirdStationId
,
String
type
)
{
List
<
String
>
thirdStationIds
=
null
;
if
(
regionalCompaniesCode
==
null
&&
amosCompanyCode
==
null
)
{
thirdStationIds
=
null
;
}
else
{
// 查询所有场站
List
<
JpStationDto
>
jpStationDtos
=
jpStationServiceImpl
.
queryAllPowerStation
(
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
);
if
(!
CollectionUtils
.
isEmpty
(
jpStationDtos
))
{
thirdStationIds
=
jpStationDtos
.
stream
().
map
(
JpStation
->
JpStation
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
}
}
List
<
String
>
thirdStationIds
=
null
;
String
userid
=
RequestContext
.
getExeUserId
();
LambdaQueryWrapper
<
StdUserEmpower
>
qu
=
new
LambdaQueryWrapper
();
qu
.
eq
(
StdUserEmpower:
:
getAmosUserId
,
userid
);
qu
.
eq
(
StdUserEmpower:
:
getPermissionType
,
"HYGF"
);
StdUserEmpower
stdUserEmpower
=
userEmpowerMapper
.
selectOne
(
qu
);
if
(
regionalCompaniesCode
==
null
&&
amosCompanyCode
==
null
&&
stdUserEmpower
!=
null
&&
stdUserEmpower
.
getAmosOrgCode
().
contains
(
"all"
))
{
thirdStationIds
=
null
;
}
else
{
// 查询所有场站
List
<
JpStationDto
>
jpStationDtos
=
jpStationServiceImpl
.
queryAllPowerStation
(
regionalCompaniesCode
,
amosCompanyCode
,
thirdStationId
,
type
);
if
(!
CollectionUtils
.
isEmpty
(
jpStationDtos
))
{
thirdStationIds
=
jpStationDtos
.
stream
().
map
(
JpStation
->
JpStation
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
}
}
...
...
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