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
5451d6bb
Commit
5451d6bb
authored
Nov 27, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
a5335c61
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
JpInverterDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
+3
-1
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+17
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
View file @
5451d6bb
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
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.JpInverterElectricity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -99,7 +100,8 @@ public class JpInverterDto extends BaseDto {
...
@@ -99,7 +100,8 @@ public class JpInverterDto extends BaseDto {
private
List
<
String
>
stationIds
;
private
List
<
String
>
stationIds
;
private
List
<
JpCollector
>
jpCollectors
;
private
List
<
JpCollector
>
jpCollectors
;
private
List
<
JpInverterElectricity
>
JL
;
private
List
<
JpInverterElectricity
>
ZL
;
@ApiModelProperty
(
value
=
"所属电站名称"
)
@ApiModelProperty
(
value
=
"所属电站名称"
)
private
String
name
;
private
String
name
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpInverterController.java
View file @
5451d6bb
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterElectricityServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpStationServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpStationServiceImpl
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -65,7 +66,8 @@ public class JpInverterController extends BaseController {
...
@@ -65,7 +66,8 @@ public class JpInverterController extends BaseController {
JpStationServiceImpl
jpStationServiceImpl
;
JpStationServiceImpl
jpStationServiceImpl
;
@Autowired
@Autowired
JpCollectorServiceImpl
jpCollectorService
;
JpCollectorServiceImpl
jpCollectorService
;
@Autowired
JpInverterElectricityServiceImpl
jpInverterElectricityService
;
@Autowired
@Autowired
JpPersonStationMapper
pPersonStationMapper
;
JpPersonStationMapper
pPersonStationMapper
;
@Value
(
"classpath:/json/paramsTree.json"
)
@Value
(
"classpath:/json/paramsTree.json"
)
...
@@ -401,6 +403,20 @@ public class JpInverterController extends BaseController {
...
@@ -401,6 +403,20 @@ public class JpInverterController extends BaseController {
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
false
);
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
false
);
List
<
JpCollector
>
jpCollector
=
jpCollectorService
.
getBaseMapper
().
selectList
(
wrapper
);
List
<
JpCollector
>
jpCollector
=
jpCollectorService
.
getBaseMapper
().
selectList
(
wrapper
);
String
[]
names
=
new
String
[]{
"PV1"
,
"PV2"
,
"PV3"
,
"PV4"
};
List
<
String
>
list
=
Arrays
.
asList
(
names
);
LambdaQueryWrapper
<
JpInverterElectricity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JpInverterElectricity:
:
getSnCode
,
snCode
);
queryWrapper
.
eq
(
JpInverterElectricity:
:
getThirdStationId
,
jpInverter
.
getThirdStationId
());
queryWrapper
.
and
(
q
->
q
.
eq
(
JpInverterElectricity:
:
getType
,
"交流"
).
or
().
in
(
JpInverterElectricity:
:
getName
,
list
));
List
<
JpInverterElectricity
>
jpInverterElectricities
=
jpInverterElectricityService
.
getBaseMapper
().
selectList
(
queryWrapper
);
Map
<
String
,
List
<
JpInverterElectricity
>>
collect
=
jpInverterElectricities
.
stream
().
collect
(
Collectors
.
groupingBy
(
JpInverterElectricity:
:
getType
));
jpInverterDto
.
setZL
(
collect
.
get
(
"直流"
));
jpInverterDto
.
setJL
(
collect
.
get
(
"交流"
));
BeanUtils
.
copyProperties
(
jpInverter
,
jpInverterDto
);
BeanUtils
.
copyProperties
(
jpInverter
,
jpInverterDto
);
jpInverterDto
.
setJpCollectors
(
jpCollector
);
jpInverterDto
.
setJpCollectors
(
jpCollector
);
...
...
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