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
3a85bb48
Commit
3a85bb48
authored
Apr 08, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改概览页面
parent
703de2e1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
149 additions
and
50 deletions
+149
-50
IDayGenerateService.java
...mos/boot/module/hygf/api/service/IDayGenerateService.java
+2
-1
DayGenerateMapper.java
...oot/module/hygf/api/tdenginemapper/DayGenerateMapper.java
+13
-8
MonthPowerMapper.java
...boot/module/hygf/api/tdenginemapper/MonthPowerMapper.java
+1
-1
DayGenerateMapper.xml
.../src/main/resources/mapper/tdengine/DayGenerateMapper.xml
+53
-12
MonthPowerMapper.xml
...i/src/main/resources/mapper/tdengine/MonthPowerMapper.xml
+18
-4
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+34
-1
DayGenerateServiceImpl.java
.../module/hygf/biz/service/impl/DayGenerateServiceImpl.java
+6
-2
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+21
-21
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+1
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IDayGenerateService.java
View file @
3a85bb48
...
...
@@ -12,6 +12,7 @@ import java.util.List;
*/
public
interface
IDayGenerateService
{
List
<
DayGenerate
>
getDayGenerateph
(
List
<
JpStation
>
dto
,
String
sort
,
String
dateTime
);
List
<
DayGenerate
>
getDayGenerateph
(
List
<
JpStation
>
dto
,
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
sort
,
String
dateTime
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/DayGenerateMapper.java
View file @
3a85bb48
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
...
...
@@ -21,16 +22,20 @@ public interface DayGenerateMapper extends BaseMapper<DayGenerate> {
//日发电量排行
// desc 前十名
// asc 后十名
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
DayGenerate
>
getDayGenerateph
(
@Param
(
"dto"
)
List
<
JpStation
>
dto
,
@Param
(
"regionalCompaniesCode"
)
String
regionalCompaniesCode
,
@Param
(
"amosCompanyCode"
)
String
amosCompanyCode
,
@Param
(
"sort"
)
String
sort
,
@Param
(
"dateTime"
)
String
dateTime
);
List
<
DayGenerate
>
getDayGenerateph
(
@Param
(
"dto"
)
List
<
JpStation
>
dto
,
@Param
(
"sort"
)
String
sort
,
@Param
(
"dateTime"
)
String
dateTime
);
List
<
PowerCurveDto
>
getDayGeneratqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
List
<
PowerCurveDto
>
getMonthGenerateqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
List
<
PowerCurveDto
>
getYearGenerateqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
PowerCurveDto
>
getDayGeneratqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
PowerCurveDto
>
getMonthGenerateqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
PowerCurveDto
>
getYearGenerateqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/MonthPowerMapper.java
View file @
3a85bb48
...
...
@@ -31,6 +31,6 @@ public interface MonthPowerMapper extends BaseMapper<MonthPower> {
List
<
PowerCurveDto
>
getAllPower
(
@Param
(
"date"
)
String
month
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
List
<
PowerCurveDto
>
getDayPowercount
(
@Param
(
"date"
)
String
month
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
List
<
PowerCurveDto
>
getDayPowercount
(
@Param
(
"date"
)
String
month
,
@Param
(
"dto"
)
List
<
String
>
statioId
,
@Param
(
"thirdStationId"
)
String
thirdStationId
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/DayGenerateMapper.xml
View file @
3a85bb48
...
...
@@ -16,6 +16,14 @@
<if
test=
"dateTime!=null"
>
and day_time = #{dateTime}
</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>
</where>
<if
test=
"sort=='desc'"
>
ORDER by fullhour desc
...
...
@@ -31,10 +39,21 @@
SELECT
sum(generate)num,
`day_time` date
FROM house_pv_data.td_hygf_station_day_generate where third_station_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
FROM house_pv_data.td_hygf_station_day_generate
<where>
<if
test=
"dto!=null"
>
third_station_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"thirdStationId!=null and thirdStationId != ''"
>
and third_station_id = #{thirdStationId}
</if>
</where>
and year_month = #{date}
GROUP BY `day_time`
</select>
...
...
@@ -42,10 +61,23 @@
SELECT
sum(generate)num,
`month_time` date
FROM house_pv_data.td_hygf_station_month_generate where third_station_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
FROM house_pv_data.td_hygf_station_month_generate
<where>
<if
test=
"dto!=null"
>
third_station_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"thirdStationId!=null and thirdStationId != ''"
>
and third_station_id = #{thirdStationId}
</if>
</where>
and year = #{date}
GROUP BY `month_time`
</select>
...
...
@@ -53,10 +85,19 @@
SELECT
sum(generate)num,
`year_time` date
FROM house_pv_data.td_hygf_station_year_generate where third_station_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
FROM house_pv_data.td_hygf_station_year_generate
<where>
<if
test=
"dto!=null"
>
third_station_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"thirdStationId!=null and thirdStationId != ''"
>
and third_station_id = #{thirdStationId}
</if>
</where>
GROUP BY `year_time`
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/MonthPowerMapper.xml
View file @
3a85bb48
...
...
@@ -77,10 +77,24 @@
SELECT
sum(power)num,
`hour` date
FROM house_pv_data.td_hygf_day_power where tation_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
FROM house_pv_data.td_hygf_day_power
<where>
<if
test=
"dto!=null"
>
tation_id in
<foreach
collection=
"dto"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"thirdStationId!=null and thirdStationId != ''"
>
and tation_id = #{thirdStationId}
</if>
</where>
and year_month_day = #{date}
GROUP BY `hour`
</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 @
3a85bb48
...
...
@@ -673,11 +673,16 @@ public class JpStationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"日满发小时排行"
,
notes
=
"日满发小时排行"
)
@GetMapping
(
value
=
"/getDayGenerateph"
)
@UserLimits
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getDayGenerateph
(
JpStationDto
reviewDto
,
String
type
,
String
dateTime
)
{
//获取权限电站
List
<
JpStation
>
list
=
jpStationServiceImpl
.
getJpStation
(
reviewDto
);
List
<
Map
<
String
,
Object
>>
li
=
new
ArrayList
<>();
List
<
DayGenerate
>
date
=
dayGenerateServiceImpl
.
getDayGenerateph
(
list
,
type
,
dateTime
);
List
<
DayGenerate
>
date
=
dayGenerateServiceImpl
.
getDayGenerateph
(
null
,
reviewDto
.
getRegionalCompaniesCode
(),
reviewDto
.
getAmosCompanyCode
()
,
type
,
dateTime
);
DecimalFormat
format2
=
new
DecimalFormat
(
"0.00"
);
if
(
date
!=
null
&&
!
list
.
isEmpty
())
{
for
(
DayGenerate
dayGenerate
:
date
)
{
...
...
@@ -700,6 +705,34 @@ public class JpStationController extends BaseController {
result
.
setTotal
(
10
);
result
.
setRecords
(
li
);
return
ResponseHelper
.
buildResponse
(
result
);
// List<JpStation> list = jpStationServiceImpl.getJpStation(reviewDto);
// List<Map<String, Object>> li = new ArrayList<>();
// List<DayGenerate> date = dayGenerateServiceImpl.getDayGenerateph(list, type, dateTime);
// DecimalFormat format2 = new DecimalFormat("0.00");
// if (date != null && !list.isEmpty()) {
// for (DayGenerate dayGenerate : date) {
// Map<String, Object> map = new HashMap<>();
// for (JpStation jpStation : list) {
// if (dayGenerate.getThirdStationId().equals(jpStation.getThirdStationId())) {
// map.put("id", jpStation.getSequenceNbr());
// map.put("name", jpStation.getName());
// map.put("address", jpStation.getAddress());
// map.put("fullhour", dayGenerate.getFullhour()!=null?format2.format(dayGenerate.getFullhour()):0);
// li.add(map);
// break;
// }
// }
//
// }
// }
// Page<Map<String, Object>> result = new Page<>();
// result.setCurrent(1);
// result.setTotal(10);
// result.setRecords(li);
// 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/DayGenerateServiceImpl.java
View file @
3a85bb48
...
...
@@ -22,7 +22,11 @@ public class DayGenerateServiceImpl extends BaseService<DayGenerateDto, DayGener
@Autowired
DayGenerateMapper
dayGenerateMapper
;
@Override
public
List
<
DayGenerate
>
getDayGenerateph
(
List
<
JpStation
>
dto
,
String
sort
,
String
dateTime
)
{
return
dayGenerateMapper
.
getDayGenerateph
(
dto
,
sort
,
dateTime
);
public
List
<
DayGenerate
>
getDayGenerateph
(
List
<
JpStation
>
dto
,
String
regionalCompaniesCode
,
String
amosCompanyCode
,
String
sort
,
String
dateTime
)
{
return
dayGenerateMapper
.
getDayGenerateph
(
dto
,
regionalCompaniesCode
,
amosCompanyCode
,
sort
,
dateTime
);
}
}
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 @
3a85bb48
...
...
@@ -109,7 +109,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
if
(
type
.
equals
(
"day"
)){
map
=
gethourList
();
data
=
monthPowerMapper
.
getDayPowercount
(
date
,
statioId
);
data
=
monthPowerMapper
.
getDayPowercount
(
date
,
statioId
,
null
);
}
else
if
(
type
.
equals
(
"month"
)){
map
=
getDayListOfMonth
(
date
);
data
=
monthPowerMapper
.
getMonthPower
(
date
,
statioId
);
...
...
@@ -216,11 +216,11 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
@UserLimits
public
Map
<
String
,
List
<
Object
>>
getGenerateqx
(
String
date
,
String
type
,
JpStationDto
reviewDto
)
{
List
<
String
>
statioId
=
new
ArrayList
();
List
<
JpStation
>
dataJpStation
=
jpStationMapper
.
getJpStation
(
reviewDto
);
for
(
JpStation
jpStation
:
dataJpStation
)
{
statioId
.
add
(
jpStation
.
getThirdStationId
());
}
//
List<String> statioId=new ArrayList();
//
List<JpStation> dataJpStation=jpStationMapper.getJpStation(reviewDto);
//
for (JpStation jpStation : dataJpStation) {
//
statioId.add(jpStation.getThirdStationId());
//
}
List
<
PowerCurveDto
>
data
=
null
;
List
<
Object
>
listx
=
new
ArrayList
<>();
...
...
@@ -231,20 +231,20 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
if
(
type
.
equals
(
"month"
)){
map
=
getDayListOfMonth
(
reviewDto
.
getTimeDateMonth
());
if
(
statioId
!=
null
&&!
statioId
.
isEmpty
())
{
//
if(statioId!=null&&!statioId.isEmpty()) {
data
=
dayGenerateMapper
.
getDayGeneratqx
(
reviewDto
.
getTimeDateMonth
(),
statioId
);
}
data
=
dayGenerateMapper
.
getDayGeneratqx
(
reviewDto
.
getTimeDateMonth
(),
reviewDto
.
getThirdStationId
(),
null
);
//
}
}
else
if
(
type
.
equals
(
"year"
)){
map
=
getyearListOfMonth
(
reviewDto
.
getTimeDateYear
());
if
(
statioId
!=
null
&&!
statioId
.
isEmpty
())
{
data
=
dayGenerateMapper
.
getMonthGenerateqx
(
reviewDto
.
getTimeDateYear
(),
statioId
);
}
//
if(statioId!=null&&!statioId.isEmpty()) {
data
=
dayGenerateMapper
.
getMonthGenerateqx
(
reviewDto
.
getTimeDateYear
(),
reviewDto
.
getThirdStationId
(),
null
);
//
}
}
else
{
map
=
getyearList
();
if
(
statioId
!=
null
&&!
statioId
.
isEmpty
())
{
data
=
dayGenerateMapper
.
getYearGenerateqx
(
null
,
statioId
);
}
//
if(statioId!=null&&!statioId.isEmpty()) {
data
=
dayGenerateMapper
.
getYearGenerateqx
(
null
,
reviewDto
.
getThirdStationId
(),
null
);
//
}
}
listx
=
map
.
get
(
"x"
);
listy
=
map
.
get
(
"y"
);
...
...
@@ -278,17 +278,17 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
@UserLimits
public
Map
<
String
,
List
<
Object
>>
getPowerqxnew
(
String
date
,
JpStationDto
reviewDto
)
{
date
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
);
List
<
String
>
statioId
=
new
ArrayList
();
List
<
JpStation
>
dataJpStation
=
jpStationMapper
.
getJpStation
(
reviewDto
);
for
(
JpStation
jpStation
:
dataJpStation
)
{
statioId
.
add
(
jpStation
.
getThirdStationId
());
}
//
List<String> statioId=new ArrayList();
//
List<JpStation> dataJpStation= jpStationMapper.getJpStation(reviewDto);
//
for (JpStation jpStation : dataJpStation) {
//
statioId.add(jpStation.getThirdStationId());
//
}
List
<
PowerCurveDto
>
data
=
null
;
List
<
Object
>
listx
=
new
ArrayList
<>();
List
<
Object
>
listy
=
new
ArrayList
<>();
Map
<
String
,
List
<
Object
>>
map
=
new
HashMap
<>();
map
=
gethourList
();
data
=
monthPowerMapper
.
getDayPowercount
(
date
,
statioId
);
data
=
monthPowerMapper
.
getDayPowercount
(
date
,
null
,
reviewDto
.
getThirdStationId
()
);
listx
=
map
.
get
(
"x"
);
listy
=
map
.
get
(
"y"
);
if
(
data
!=
null
&&!
data
.
isEmpty
()){
...
...
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 @
3a85bb48
...
...
@@ -174,6 +174,7 @@ public class TdHygfJpInverterWarnServiceImpl
if
(
ObjectUtil
.
isNotNull
(
jpStation
))
{
i
.
setAddress
(
jpStation
.
getAddress
());
i
.
setArea
(
jpStation
.
getArea
());
i
.
setStationName
(
jpStation
.
getName
());
}
});
return
list
;
...
...
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