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
2106c8b6
Commit
2106c8b6
authored
Nov 23, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
cb9353b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
JpInverterDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
+3
-0
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+18
-5
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 @
2106c8b6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
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
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
;
...
@@ -97,6 +98,8 @@ public class JpInverterDto extends BaseDto {
...
@@ -97,6 +98,8 @@ public class JpInverterDto extends BaseDto {
private
List
<
String
>
stationIds
;
private
List
<
String
>
stationIds
;
private
List
<
JpCollector
>
jpCollectors
;
@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 @
2106c8b6
...
@@ -7,10 +7,13 @@ import com.alibaba.fastjson.JSON;
...
@@ -7,10 +7,13 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
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.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.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -60,6 +63,8 @@ public class JpInverterController extends BaseController {
...
@@ -60,6 +63,8 @@ public class JpInverterController extends BaseController {
JpInverterServiceImpl
jpInverterServiceImpl
;
JpInverterServiceImpl
jpInverterServiceImpl
;
@Autowired
@Autowired
JpStationServiceImpl
jpStationServiceImpl
;
JpStationServiceImpl
jpStationServiceImpl
;
@Autowired
JpCollectorServiceImpl
jpCollectorService
;
@Autowired
@Autowired
JpPersonStationMapper
pPersonStationMapper
;
JpPersonStationMapper
pPersonStationMapper
;
...
@@ -375,10 +380,7 @@ public class JpInverterController extends BaseController {
...
@@ -375,10 +380,7 @@ public class JpInverterController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/snCode/{snCode}"
)
@GetMapping
(
value
=
"/snCode/{snCode}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个户用光伏监盘逆变器表"
,
notes
=
"根据sequenceNbr查询单个户用光伏监盘逆变器表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个户用光伏监盘逆变器表"
,
notes
=
"根据sequenceNbr查询单个户用光伏监盘逆变器表"
)
public
ResponseModel
<
JpInverter
>
selectOneBySnCode
(
@PathVariable
String
snCode
)
{
public
ResponseModel
<
JpInverterDto
>
selectOneBySnCode
(
@PathVariable
String
snCode
)
{
// JpInverterDto jpInverter= jpInverterServiceImpl.queryBySeq(sequenceNbr);
LambdaQueryWrapper
<
JpInverter
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JpInverter
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
JpInverter:
:
getSnCode
,
snCode
);
query
.
eq
(
JpInverter:
:
getSnCode
,
snCode
);
JpInverter
jpInverter
=
jpInverterServiceImpl
.
getBaseMapper
().
selectOne
(
query
);
JpInverter
jpInverter
=
jpInverterServiceImpl
.
getBaseMapper
().
selectOne
(
query
);
...
@@ -387,7 +389,18 @@ public class JpInverterController extends BaseController {
...
@@ -387,7 +389,18 @@ public class JpInverterController extends BaseController {
jpInverter
.
setMonthPowerGeneration
(
jpInverter
.
getMonthPowerGeneration
()!=
null
?
jpInverter
.
getMonthPowerGeneration
()/
1000
:
0
);
jpInverter
.
setMonthPowerGeneration
(
jpInverter
.
getMonthPowerGeneration
()!=
null
?
jpInverter
.
getMonthPowerGeneration
()/
1000
:
0
);
jpInverter
.
setYearPowerGeneration
(
jpInverter
.
getYearPowerGeneration
()!=
null
?
jpInverter
.
getYearPowerGeneration
()/
1000
:
0
);
jpInverter
.
setYearPowerGeneration
(
jpInverter
.
getYearPowerGeneration
()!=
null
?
jpInverter
.
getYearPowerGeneration
()/
1000
:
0
);
jpInverter
.
setTotalPowerGeneration
(
jpInverter
.
getTotalPowerGeneration
()!=
null
?
jpInverter
.
getTotalPowerGeneration
()/
1000
:
0
);
jpInverter
.
setTotalPowerGeneration
(
jpInverter
.
getTotalPowerGeneration
()!=
null
?
jpInverter
.
getTotalPowerGeneration
()/
1000
:
0
);
return
ResponseHelper
.
buildResponse
(
jpInverter
);
JpInverterDto
jpInverterDto
=
new
JpInverterDto
();
LambdaQueryWrapper
<
JpCollector
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
JpCollector:
:
getSnCode
,
jpInverter
.
getCollectorSnCode
());
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
false
);
List
<
JpCollector
>
jpCollector
=
jpCollectorService
.
getBaseMapper
().
selectList
(
wrapper
);
BeanUtils
.
copyProperties
(
jpInverter
,
jpInverterDto
);
jpInverterDto
.
setJpCollectors
(
jpCollector
);
return
ResponseHelper
.
buildResponse
(
jpInverterDto
);
}
}
}
}
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