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
c8da2863
Commit
c8da2863
authored
Nov 14, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加场站统计接口
parent
c1c650ed
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
17 deletions
+29
-17
JpStationDto.java
...m/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
+8
-0
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+1
-1
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+1
-1
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+17
-8
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+2
-7
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
View file @
c8da2863
...
...
@@ -12,6 +12,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 第三方场站
...
...
@@ -157,4 +158,11 @@ public class JpStationDto extends BaseDto {
private
Double
fullhour
;
/**
*
* 实时功率比/
* **/
List
<
Map
<
String
,
Object
>>
powerRatio
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
c8da2863
...
...
@@ -33,7 +33,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List
<
DropDown
>
getDealer
(
@Param
(
"regionalCompaniesCode"
)
String
regionalCompaniesCode
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
JpStation
getCountJpStationdata
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
JpStation
Dto
getCountJpStationdata
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
@UserEmpower
(
field
={
"regional_companies_code"
,
"amos_company_code"
}
,
fieldConditions
={
"in"
,
"in"
}
,
relationship
=
"and"
)
List
<
Map
<
String
,
Object
>>
getcountState
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
c8da2863
...
...
@@ -215,7 +215,7 @@
<select
id=
"getCountJpStationdata"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.
entity.JpStation
"
>
<select
id=
"getCountJpStationdata"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.
dto.JpStationDto
"
>
select
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
c8da2863
...
...
@@ -388,9 +388,14 @@ public class JpStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"电站发电量统计"
,
notes
=
"电站发电量统计"
)
@GetMapping
(
value
=
"/getCountJpStationdata"
)
@UserLimits
public
ResponseModel
<
List
<
JpStation
>>
getCountJpStationdata
(
JpStationDto
reviewDto
)
{
JpStation
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
List
<
JpStation
>
list
=
new
ArrayList
<>();
public
ResponseModel
<
List
<
JpStationDto
>>
getCountJpStationdata
(
JpStationDto
reviewDto
)
{
JpStationDto
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
List
<
Map
<
String
,
Object
>>
powerRatio
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
String
.
format
(
"%.2f"
,
jpStation
.
getRealTimePower
()/
jpStation
.
getRatedPower
()));
powerRatio
.
add
(
map
);
jpStation
.
setPowerRatio
(
powerRatio
);
List
<
JpStationDto
>
list
=
new
ArrayList
<>();
list
.
add
(
jpStation
);
return
ResponseHelper
.
buildResponse
(
list
);
}
...
...
@@ -412,7 +417,7 @@ public class JpStationController extends BaseController {
@GetMapping
(
value
=
"/getEnergyConservation"
)
@UserLimits
public
ResponseModel
<
Map
<
String
,
Object
>>
getEnergyConservation
(
JpStationDto
reviewDto
)
{
JpStation
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
JpStation
Dto
jpStation
=
jpStationMapper
.
getCountJpStationdata
(
reviewDto
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
DecimalFormat
format2
=
new
DecimalFormat
(
"#.00"
);
//炭
...
...
@@ -537,12 +542,16 @@ public class JpStationController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"登录人场站"
,
notes
=
"登录人场站"
)
@GetMapping
(
value
=
"/getuserJpStation"
)
public
ResponseModel
<
List
<
JpStation
>>
getuserJpStation
(
JpStationDto
reviewDto
)
{
List
<
JpStation
>
list
=
jpStationServiceImpl
.
getJpStation
(
reviewDto
);
return
ResponseHelper
.
buildResponse
(
list
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工率曲线"
,
notes
=
"电站监控电量收益"
)
@GetMapping
(
value
=
"/test"
)
public
Object
getPowerqx
(
JpStationDto
reviewDto
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpStationServiceImpl.java
View file @
c8da2863
...
...
@@ -392,10 +392,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
list
=
getJpStationDtoyear
(
dataJpStation
,
listyear
);
break
;
default
:
list
=
getJpStationDtoAll
(
dataJpStation
);
}
PageInfo
<
JpStationDto
>
page
=
new
PageInfo
(
list
);
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JpStationDto
>
pagenew
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JpStationDto
>();
...
...
@@ -419,14 +416,12 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd
.
setStationContact
(
jpStation
.
getStationContact
());
hd
.
setState
(
jpStation
.
getState
());
hd
.
setAccumulatedPower
(
jpStation
.
getAccumulatedPower
());
hd
.
setFullhour
(
jpStation
.
getAccumulatedPower
()/
jpStation
.
getCapacity
(
));
hd
.
setFullhour
(
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
jpStation
.
getAccumulatedPower
()/
jpStation
.
getCapacity
())
));
hd
.
setAccumulatedPower
(
jpStation
.
getAccumulatedPower
());
hd
.
setDayIncome
(
null
);
ld
.
add
(
hd
);
}
return
ld
;
}
...
...
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