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
f92490cd
Commit
f92490cd
authored
Apr 12, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev0124-01' into dev0124
parents
768b09ae
3bc6ac0a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
487 additions
and
96 deletions
+487
-96
TdJpStation.java
...ldapi/face/orm/houseapi/entity/tdeingine/TdJpStation.java
+23
-0
TdJpStationMapper.java
...seholdapi/face/orm/mapper/tdengine/TdJpStationMapper.java
+15
-0
GoLangDataAcquisitionServiceImpl.java
...i/face/service/impl/GoLangDataAcquisitionServiceImpl.java
+27
-0
ImasterDataServiceImpl.java
...ouseholdapi/face/service/impl/ImasterDataServiceImpl.java
+29
-1
KsolarDataAcquisitionServiceImpl.java
...i/face/service/impl/KsolarDataAcquisitionServiceImpl.java
+37
-1
DayGenerate.java
...yeejoin/amos/boot/module/hygf/api/entity/DayGenerate.java
+22
-0
MonthGenerate.java
...ejoin/amos/boot/module/hygf/api/entity/MonthGenerate.java
+12
-0
TdHygfJpInverterWarn.java
...mos/boot/module/hygf/api/entity/TdHygfJpInverterWarn.java
+9
-0
YearGenerate.java
...eejoin/amos/boot/module/hygf/api/entity/YearGenerate.java
+11
-0
JpStationMapper.java
...oin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
+4
-0
IDayGenerateService.java
...mos/boot/module/hygf/api/service/IDayGenerateService.java
+2
-1
DayGenerateMapper.java
...oot/module/hygf/api/tdenginemapper/DayGenerateMapper.java
+32
-13
MonthGenerateMapper.java
...t/module/hygf/api/tdenginemapper/MonthGenerateMapper.java
+15
-1
MonthPowerMapper.java
...boot/module/hygf/api/tdenginemapper/MonthPowerMapper.java
+1
-1
TdHYGFInverterDayGenerateMapper.java
...f/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
+6
-2
TdHYGFInverterMonthGenerateMapper.java
...api/tdenginemapper/TdHYGFInverterMonthGenerateMapper.java
+9
-0
TdHYGFInverterYearGenerateMapper.java
.../api/tdenginemapper/TdHYGFInverterYearGenerateMapper.java
+8
-0
TdHygfJpInverterWarnMapper.java
...e/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
+5
-2
YearGenerateMapper.java
...ot/module/hygf/api/tdenginemapper/YearGenerateMapper.java
+15
-1
DayGenerateMapper.xml
.../src/main/resources/mapper/tdengine/DayGenerateMapper.xml
+60
-14
MonthGenerateMapper.xml
...rc/main/resources/mapper/tdengine/MonthGenerateMapper.xml
+3
-0
MonthPowerMapper.xml
...i/src/main/resources/mapper/tdengine/MonthPowerMapper.xml
+18
-4
TdHygfJpInverterWarnMapper.xml
.../resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
+10
-2
YearGenerateMapper.xml
...src/main/resources/mapper/tdengine/YearGenerateMapper.xml
+3
-1
TDengineServerConfig.java
...mos/boot/module/hygf/biz/config/TDengineServerConfig.java
+14
-1
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+20
-20
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+34
-1
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+29
-23
DayGenerateServiceImpl.java
.../module/hygf/biz/service/impl/DayGenerateServiceImpl.java
+6
-2
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+0
-0
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+0
-0
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+8
-5
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/TdJpStation.java
0 → 100644
View file @
f92490cd
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
houseapi
.
entity
.
tdeingine
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @description:
* @author: tw
* @createDate: 2024/4/2
*/
@Data
@TableName
(
value
=
"td_hygf_jp_station"
,
autoResultMap
=
true
)
public
class
TdJpStation
implements
Serializable
{
private
Long
createdTime
;
private
String
thirdStationId
;
//采集电站id
private
String
regionalCompaniesCode
;
//区域公司code
private
String
amosCompanyCode
;
//经销商code
private
String
thirdCode
;
//厂商标识
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/tdengine/TdJpStationMapper.java
0 → 100644
View file @
f92490cd
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
mapper
.
tdengine
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TdJpStation
;
/**
* @description:
* @author: tw
* @createDate: 2024/4/2
*/
public
interface
TdJpStationMapper
extends
BaseMapper
<
TdJpStation
>
{
}
\ No newline at end of file
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoLangDataAcquisitionServiceImpl.java
View file @
f92490cd
...
...
@@ -101,6 +101,10 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Autowired
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
@Autowired
TdJpStationMapper
tdJpStationMapper
;
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Async
...
...
@@ -204,6 +208,29 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
else
{
jpStationMapper
.
insert
(
jpStation
);
}
//增加td 电站区域公司,经销商绑定表
TdJpStation
tdJpStation
=
tdJpStationMapper
.
selectOne
(
new
QueryWrapper
<
TdJpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"third_station_id"
,
stationIds
.
get
(
i
)));
//判断是否存在
if
(
ObjectUtils
.
isEmpty
(
tdJpStation
))
{
tdJpStation
=
new
TdJpStation
();
}
tdJpStation
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdJpStation
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdJpStation
.
setThirdStationId
(
stationIds
.
get
(
i
));
tdJpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
tdJpStation
.
setCreatedTime
(
System
.
currentTimeMillis
());
if
(!
ObjectUtils
.
isEmpty
(
tdJpStation
.
getCreatedTime
()))
{
tdJpStationMapper
.
updateById
(
tdJpStation
);
}
else
{
tdJpStationMapper
.
insert
(
tdJpStation
);
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/ImasterDataServiceImpl.java
View file @
f92490cd
...
...
@@ -114,7 +114,8 @@ public class ImasterDataServiceImpl implements ImasterDataService {
private
TdHYGFStationYearGenerateMapper
tdHYGFStationYearGenerateMapper
;
@Autowired
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
@Autowired
TdJpStationMapper
tdJpStationMapper
;
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
...
...
@@ -299,6 +300,33 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
else
{
jpStationMapper
.
insert
(
jpStation
);
}
//增加td 电站区域公司,经销商绑定表
TdJpStation
tdJpStation
=
tdJpStationMapper
.
selectOne
(
new
QueryWrapper
<
TdJpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
HUAWEI
.
getCode
()).
eq
(
"third_station_id"
,
imasterStationList
.
getPlantCode
()));
//判断是否存在
if
(
ObjectUtils
.
isEmpty
(
tdJpStation
))
{
tdJpStation
=
new
TdJpStation
();
}
tdJpStation
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdJpStation
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdJpStation
.
setThirdStationId
(
imasterStationList
.
getPlantCode
());
tdJpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
tdJpStation
.
setCreatedTime
(
System
.
currentTimeMillis
());
if
(!
ObjectUtils
.
isEmpty
(
tdJpStation
.
getCreatedTime
()))
{
tdJpStationMapper
.
updateById
(
tdJpStation
);
}
else
{
tdJpStationMapper
.
insert
(
tdJpStation
);
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/KsolarDataAcquisitionServiceImpl.java
View file @
f92490cd
...
...
@@ -108,7 +108,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
private
TdHYGFStationYearGenerateMapper
tdHYGFStationYearGenerateMapper
;
@Autowired
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
@Autowired
TdJpStationMapper
tdJpStationMapper
;
@Scheduled
(
cron
=
"${dataRequstScheduled.keshida}"
)
@Override
public
void
stationList
()
{
...
...
@@ -237,6 +239,40 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpStationMapper
.
insert
(
jpStation
);
}
//增加td 电站区域公司,经销商绑定表
TdJpStation
tdJpStation
=
tdJpStationMapper
.
selectOne
(
new
QueryWrapper
<
TdJpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()).
eq
(
"third_station_id"
,
ksolarStation
.
getStationId
()));
//判断是否存在
if
(
ObjectUtils
.
isEmpty
(
tdJpStation
))
{
tdJpStation
=
new
TdJpStation
();
}
tdJpStation
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdJpStation
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdJpStation
.
setThirdStationId
(
ksolarStation
.
getStationId
());
tdJpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
tdJpStation
.
setCreatedTime
(
System
.
currentTimeMillis
());
if
(!
ObjectUtils
.
isEmpty
(
tdJpStation
.
getCreatedTime
()))
{
tdJpStationMapper
.
updateById
(
tdJpStation
);
}
else
{
tdJpStationMapper
.
insert
(
tdJpStation
);
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/DayGenerate.java
View file @
f92490cd
...
...
@@ -51,4 +51,26 @@ public class DayGenerate {
// 日收益
private
Double
income
;
@TableField
(
"regional_companies_code"
)
private
String
regionalCompaniesCode
;
@TableField
(
"amos_company_code"
)
private
String
amosCompanyCode
;
@TableField
(
"station_name"
)
private
String
stationName
;
@TableField
(
"station_state"
)
private
String
stationState
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/MonthGenerate.java
View file @
f92490cd
...
...
@@ -53,4 +53,16 @@ public class MonthGenerate {
// 月收益
@TableField
(
"income"
)
private
Double
income
;
@TableField
(
"regional_companies_code"
)
private
String
regionalCompaniesCode
;
@TableField
(
"amos_company_code"
)
private
String
amosCompanyCode
;
@TableField
(
"station_name"
)
private
String
stationName
;
@TableField
(
"station_state"
)
private
String
stationState
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/TdHygfJpInverterWarn.java
View file @
f92490cd
...
...
@@ -99,4 +99,13 @@ public class TdHygfJpInverterWarn {
@TableField
(
"handler_status"
)
private
String
handlerStatus
;
@TableField
(
"station_name"
)
private
String
stationName
;
//名称
@TableField
(
"regional_companies_code"
)
private
String
regionalCompaniesCode
;
//区域公司code
@TableField
(
"amos_company_code"
)
private
String
amosCompanyCode
;
//经销商code
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/YearGenerate.java
View file @
f92490cd
...
...
@@ -51,4 +51,15 @@ public class YearGenerate {
// 年收益
@TableField
(
"income"
)
private
Double
income
;
@TableField
(
"regional_companies_code"
)
private
String
regionalCompaniesCode
;
@TableField
(
"amos_company_code"
)
private
String
amosCompanyCode
;
@TableField
(
"station_name"
)
private
String
stationName
;
@TableField
(
"station_state"
)
private
String
stationState
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/JpStationMapper.java
View file @
f92490cd
...
...
@@ -20,7 +20,11 @@ import java.util.Map;
* @date 2023-09-19
*/
public
interface
JpStationMapper
extends
BaseMapper
<
JpStation
>
{
@UserEmpower
(
field
={
"hygf_jp_station.regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
JpStationDto
>
queryForDealerReviewPage
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
JpStationDto
queryCount
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
List
<
Map
<
String
,
Object
>>
countState
(
@Param
(
"dto"
)
JpStationDto
reviewDto
);
List
<
Map
<
String
,
Double
>>
getPowerqx
(
String
dateType
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IDayGenerateService.java
View file @
f92490cd
...
...
@@ -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 @
f92490cd
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
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PowerCurveDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DayGenerate
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
...
...
@@ -18,17 +22,32 @@ public interface DayGenerateMapper extends BaseMapper<DayGenerate> {
//日发电量排行
// desc 前十名
// asc 后十名
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
);
List
<
DayGenerate
>
selectPagenewDayGenerate
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"dto"
)
List
<
String
>
statioId
,
@Param
(
"dateTime"
)
String
dateTime
);
@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
);
@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"
)
List
<
DayGenerate
>
selectPagenewDayGenerate
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"dto"
)
List
<
String
>
statioId
,
@Param
(
"dateTime"
)
String
dateTime
,
@Param
(
"stationState"
)
String
stationState
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
Integer
selectCount
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
DayGenerate
>
queryWrapper
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
DayGenerate
>
selectList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
DayGenerate
>
queryWrapper
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/MonthGenerateMapper.java
View file @
f92490cd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DayGenerate
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.MonthGenerate
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.YearGenerate
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
MonthGenerateMapper
extends
BaseMapper
<
MonthGenerate
>
{
List
<
MonthGenerate
>
selectPagenewMonthGenerate
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"dto"
)
List
<
String
>
statioId
,
@Param
(
"dateTime"
)
String
dateTime
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
MonthGenerate
>
selectPagenewMonthGenerate
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"dto"
)
List
<
String
>
statioId
,
@Param
(
"dateTime"
)
String
dateTime
,
@Param
(
"stationState"
)
String
stationState
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
MonthGenerate
>
selectList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
MonthGenerate
>
queryWrapper
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
Integer
selectCount
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
MonthGenerate
>
queryWrapper
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/MonthPowerMapper.java
View file @
f92490cd
...
...
@@ -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/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
View file @
f92490cd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterDayGenerate
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -9,6 +13,6 @@ import java.util.Map;
public
interface
TdHYGFInverterDayGenerateMapper
extends
BaseMapper
<
TdHYGFInverterDayGenerate
>
{
List
<
Map
<
String
,
Object
>>
selectDayTrend
(
List
<
String
>
treeParams
,
String
time
,
String
snCode
,
String
thirdStationId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
TdHYGFInverterDayGenerate
>
selectList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
TdHYGFInverterDayGenerate
>
queryWrapper
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterMonthGenerateMapper.java
View file @
f92490cd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterDayGenerate
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterMonthGenerate
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -10,4 +15,8 @@ public interface TdHYGFInverterMonthGenerateMapper extends BaseMapper<TdHYGFInve
List
<
Map
<
String
,
Object
>>
selectMonthTrend
(
String
time
,
String
snCode
,
String
thirdStationId
);
Map
<
String
,
Object
>
selectMonthTotal
(
String
time
,
String
snCode
,
String
thirdStationId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
TdHYGFInverterMonthGenerate
>
selectList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
TdHYGFInverterMonthGenerate
>
queryWrapper
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterYearGenerateMapper.java
View file @
f92490cd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterMonthGenerate
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterTotalGenerate
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterYearGenerate
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -14,4 +19,7 @@ public interface TdHYGFInverterYearGenerateMapper extends BaseMapper<TdHYGFInver
Map
<
String
,
Object
>
selectYearTotal
(
String
time
,
String
snCode
,
String
thirdStationId
);
List
<
TdHYGFInverterTotalGenerate
>
selectTotalSum
(
String
time
,
String
snCode
,
String
thirdStationId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
TdHYGFInverterYearGenerate
>
selectList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
TdHYGFInverterYearGenerate
>
queryWrapper
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHygfJpInverterWarnMapper.java
View file @
f92490cd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInverterWarn
;
...
...
@@ -29,9 +30,11 @@ public interface TdHygfJpInverterWarnMapper extends BaseMapper<TdHygfJpInverterW
TdHygfJpInverterWarnDto
getByTime
(
@Param
(
"createdTime"
)
long
createdTime
);
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
);
int
selectWarnListTotal
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
,
String
stationName
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
int
selectWarnListTotal
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
,
String
stationName
);
@Select
(
"SELECT * from td_hygf_jp_inverter_warn WHERE (third_station_id = #{thirdStationId} AND sn_code = #{sncode} AND created_time = #{createdTime})"
)
TdHygfJpInverterWarn
getInverTerWarnByparams
(
@Param
(
"createdTime"
)
long
createdTime
,
@Param
(
"sncode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/YearGenerateMapper.java
View file @
f92490cd
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
tdenginemapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DayGenerate
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.MonthGenerate
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.YearGenerate
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -12,6 +17,15 @@ import java.util.List;
* @createDate: 2023/11/8
*/
public
interface
YearGenerateMapper
extends
BaseMapper
<
YearGenerate
>
{
List
<
YearGenerate
>
selectPagenewYearGenerate
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"dto"
)
List
<
String
>
statioId
,
@Param
(
"dateTime"
)
String
dateTime
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
YearGenerate
>
selectPagenewYearGenerate
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"dto"
)
List
<
String
>
statioId
,
@Param
(
"dateTime"
)
String
dateTime
,
@Param
(
"stationState"
)
String
stationState
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
YearGenerate
>
selectList
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
YearGenerate
>
queryWrapper
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
Integer
selectCount
(
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
YearGenerate
>
queryWrapper
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/DayGenerateMapper.xml
View file @
f92490cd
...
...
@@ -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,32 +39,67 @@
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>
and year_month = #{date}
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>
and year_month = #{date}
</where>
GROUP BY `day_time`
</select>
<select
id=
"getMonthGenerateqx"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerCurveDto"
>
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>
and year = #{date}
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>
and year = #{date}
</where>
GROUP BY `month_time`
</select>
<select
id=
"getYearGenerateqx"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.PowerCurveDto"
>
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>
...
...
@@ -76,6 +119,9 @@
<if
test=
"dateTime!=null and dateTime != ''"
>
and day_time = #{dateTime}
</if>
<if
test=
"stationState!=null and stationState != ''"
>
and station_state = #{stationState}
</if>
</where>
LIMIT #{current} ,#{size}
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/MonthGenerateMapper.xml
View file @
f92490cd
...
...
@@ -15,6 +15,9 @@
<if
test=
"dateTime!=null and dateTime != ''"
>
and month_time = #{dateTime}
</if>
<if
test=
"stationState!=null and stationState != ''"
>
and station_state = #{stationState}
</if>
</where>
LIMIT #{current} ,#{size}
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/MonthPowerMapper.xml
View file @
f92490cd
...
...
@@ -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-api/src/main/resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
View file @
f92490cd
...
...
@@ -89,7 +89,7 @@
<if
test=
"snCode != null and snCode != ''"
>
AND sn_code like #{snCode}
</if>
<if
test=
"stationId.size >0 "
>
<if
test=
"stationId
!= null and stationId
.size >0 "
>
AND third_station_id in
<foreach
collection=
"stationId"
item=
"item"
open=
'('
close=
')'
separator=
","
>
#{item}
...
...
@@ -104,6 +104,9 @@
<if
test=
"content != null and content != ''"
>
AND content like #{content}
</if>
<if
test=
"stationName != null and stationName != ''"
>
AND station_name like #{stationName}
</if>
</where>
ORDER BY start_time desc
limit #{current},#{size}
...
...
@@ -133,7 +136,7 @@
<if
test=
"snCode != null and snCode != ''"
>
AND sn_code like #{snCode}
</if>
<if
test=
"stationId.size >0 "
>
<if
test=
"stationId
!= null and stationId
.size >0 "
>
AND third_station_id in
<foreach
collection=
"stationId"
item=
"item"
open=
'('
close=
')'
separator=
","
>
#{item}
...
...
@@ -148,6 +151,11 @@
<if
test=
"content != null and content != ''"
>
AND content like #{content}
</if>
<if
test=
"stationName != null and stationName != ''"
>
AND station_name like #{stationName}
</if>
</where>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/YearGenerateMapper.xml
View file @
f92490cd
...
...
@@ -15,7 +15,9 @@
<if
test=
"dateTime!=null and dateTime != ''"
>
and year = #{dateTime}
</if>
<if
test=
"stationState!=null and stationState != ''"
>
and station_state = #{stationState}
</if>
</where>
LIMIT #{current} ,#{size}
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/config/TDengineServerConfig.java
View file @
f92490cd
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.config;
import
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
;
import
com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean
;
import
com.github.pagehelper.PageInterceptor
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpowerInterceptor
;
import
org.apache.ibatis.plugin.Interceptor
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionTemplate
;
...
...
@@ -56,7 +57,13 @@ public class TDengineServerConfig {
""
+
";"
);
interceptor
.
setProperties
(
properties
);
bean
.
setPlugins
(
new
Interceptor
[]
{
interceptor
,
paginationInterceptor
()});
bean
.
setPlugins
(
new
Interceptor
[]
{
interceptor
,
userEmpowerInterceptor
(),
paginationInterceptor
()
});
return
bean
.
getObject
();
}
...
...
@@ -66,6 +73,12 @@ public class TDengineServerConfig {
return
new
DataSourceTransactionManager
(
dataSource
);
}
@Bean
public
UserEmpowerInterceptor
userEmpowerInterceptor
()
{
UserEmpowerInterceptor
userEmpowerInterceptor
=
new
UserEmpowerInterceptor
();
return
userEmpowerInterceptor
;
}
@Bean
(
name
=
"tdengineSqlSessionTemplate"
)
public
SqlSessionTemplate
tdengineSqlSessionTemplate
(
@Qualifier
(
"tdengineSqlSessionFactory"
)
SqlSessionFactory
sqlSessionFactory
)
throws
Exception
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpInverterController.java
View file @
f92490cd
...
...
@@ -260,32 +260,32 @@ public class JpInverterController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/jpInverterDayReport"
)
@ApiOperation
(
httpMethod
=
"
GE
T"
,
value
=
"逆变器日报表"
,
notes
=
"逆变器日报表"
)
@ApiOperation
(
httpMethod
=
"
POS
T"
,
value
=
"逆变器日报表"
,
notes
=
"逆变器日报表"
)
public
ResponseModel
<
Page
<
TdHYGFInverterDayGenerate
>>
jpInverterDayReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
(
required
=
false
)
DataDto
dataDto
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isEmpty
(
dataDto
.
getTime
())){
//
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
//
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
if
(
StringUtils
.
isEmpty
(
dataDto
.
getTime
())){
dataDto
.
setTime
(
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
));
}
// List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterDayReport
(
current
,
size
,
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
stationIds
));
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterDayReport
(
current
,
size
,
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
null
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/jpInverterDayReportExport"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器日报表导出"
,
notes
=
"逆变器日报表导出"
)
public
void
jpInverterDayReportExport
(
@RequestBody
(
required
=
false
)
DataDto
dataDto
,
HttpServletResponse
response
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
//
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
//
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
if
(
StringUtils
.
isEmpty
(
dataDto
.
getTime
())){
dataDto
.
setTime
(
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
));
}
//List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
List
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGenerates
=
jpInverterServiceImpl
.
jpInverterDayReportExport
(
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
stationIds
);
List
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGenerates
=
jpInverterServiceImpl
.
jpInverterDayReportExport
(
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
null
);
try
{
setResponseHeadForDowload
(
response
,
"逆变器日报表.xls"
);
EasyExcel
.
write
(
response
.
getOutputStream
()).
head
(
TdHYGFInverterDayGenerate
.
class
).
excelType
(
ExcelTypeEnum
.
XLS
).
sheet
(
"逆变器日报表"
).
doWrite
(
tdHYGFInverterDayGenerates
);
...
...
@@ -299,27 +299,27 @@ public class JpInverterController extends BaseController {
public
ResponseModel
<
Page
<
TdHYGFInverterMonthGenerate
>>
jpInverterMonthReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
(
required
=
false
)
DataDto
dataDto
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
//
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
//
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
if
(
StringUtils
.
isEmpty
(
dataDto
.
getTime
())){
dataDto
.
setTime
(
DateUtil
.
format
(
new
Date
(),
"yyyy-MM"
));
}
// List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterMonthReport
(
current
,
size
,
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
stationIds
));
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterMonthReport
(
current
,
size
,
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
null
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/jpInverterMonthReportExport"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器月报表导出"
,
notes
=
"逆变器月报表导出"
)
public
void
jpInverterMonthReportExport
(
@RequestBody
(
required
=
false
)
DataDto
dataDto
,
HttpServletResponse
response
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
//
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
//
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
if
(
StringUtils
.
isEmpty
(
dataDto
.
getTime
())){
dataDto
.
setTime
(
DateUtil
.
format
(
new
Date
(),
"yyyy-MM"
));
}
// List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
List
<
TdHYGFInverterMonthGenerate
>
tdHYGFInverterMonthGenerates
=
jpInverterServiceImpl
.
jpInverterMonthReportExport
(
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
stationIds
);
List
<
TdHYGFInverterMonthGenerate
>
tdHYGFInverterMonthGenerates
=
jpInverterServiceImpl
.
jpInverterMonthReportExport
(
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
null
);
try
{
setResponseHeadForDowload
(
response
,
"逆变器月报表.xls"
);
EasyExcel
.
write
(
response
.
getOutputStream
()).
head
(
TdHYGFInverterMonthGenerate
.
class
).
excelType
(
ExcelTypeEnum
.
XLS
).
sheet
(
"逆变器月报表"
).
doWrite
(
tdHYGFInverterMonthGenerates
);
...
...
@@ -334,27 +334,27 @@ public class JpInverterController extends BaseController {
public
ResponseModel
<
Page
<
TdHYGFInverterYearGenerate
>>
jpInverterYearReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestBody
(
required
=
false
)
DataDto
dataDto
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
//
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
//
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
if
(
StringUtils
.
isEmpty
(
dataDto
.
getTime
())){
dataDto
.
setTime
(
DateUtil
.
format
(
new
Date
(),
"yyyy"
));
}
// List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterYearReport
(
current
,
size
,
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
stationIds
));
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterYearReport
(
current
,
size
,
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
null
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/jpInverterYearReportExport"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器年报表导出"
,
notes
=
"逆变器年报表导出"
)
public
void
jpInverterYearReportExport
(
@RequestBody
(
required
=
false
)
DataDto
dataDto
,
HttpServletResponse
response
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
//
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
//
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
if
(
StringUtils
.
isEmpty
(
dataDto
.
getTime
())){
dataDto
.
setTime
(
DateUtil
.
format
(
new
Date
(),
"yyyy"
));
}
// List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
List
<
TdHYGFInverterYearGenerate
>
tdHYGFInverterYearGenerates
=
jpInverterServiceImpl
.
jpInverterYearReportExport
(
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
stationIds
);
List
<
TdHYGFInverterYearGenerate
>
tdHYGFInverterYearGenerates
=
jpInverterServiceImpl
.
jpInverterYearReportExport
(
dataDto
.
getTime
(),
dataDto
.
getSnCodes
(),
null
);
try
{
setResponseHeadForDowload
(
response
,
"逆变器年报表.xls"
);
EasyExcel
.
write
(
response
.
getOutputStream
()).
head
(
TdHYGFInverterYearGenerate
.
class
).
excelType
(
ExcelTypeEnum
.
XLS
).
sheet
(
"逆变器年报表"
).
doWrite
(
tdHYGFInverterYearGenerates
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
f92490cd
...
...
@@ -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/controller/TdHygfJpInverterWarnController.java
View file @
f92490cd
...
...
@@ -245,24 +245,24 @@ public class TdHygfJpInverterWarnController extends BaseController {
Page
<
TdHygfJpInverterWarnDto
>
result
=
new
Page
<>();
result
.
setCurrent
(
current
);
result
.
setSize
(
size
);
JpStationDto
reviewDto
=
new
JpStationDto
();
Map
<
String
,
String
>
nameMaps
=
new
HashMap
<>();
if
(
null
!=
stationName
&&
stationName
!=
""
)
{
reviewDto
.
setName
(
stationName
);
}
List
<
JpStation
>
jpStation
=
jpStationMapper
.
getJpStation
(
reviewDto
);
if
(
CollectionUtil
.
isEmpty
(
jpStation
))
{
result
.
setTotal
(
0
);
List
<
TdHygfJpInverterWarnDto
>
list
=
new
ArrayList
<>();
result
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
result
);
}
nameMaps
=
jpStation
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
JpStation:
:
getName
,
(
existing
,
replacement
)
->
existing
));
if
(
null
==
stationId
)
{
stationId
=
jpStation
.
stream
().
map
(
JpStation:
:
getThirdStationId
).
collect
(
Collectors
.
toList
());
}
//
JpStationDto reviewDto = new JpStationDto();
//
Map<String, String> nameMaps = new HashMap<>();
//
if (null != stationName && stationName != "") {
//
reviewDto.setName(stationName);
//
}
//
List<JpStation> jpStation = jpStationMapper.getJpStation(reviewDto);
//
if (CollectionUtil.isEmpty(jpStation)) {
//
result.setTotal(0);
//
List<TdHygfJpInverterWarnDto> list = new ArrayList<>();
//
result.setRecords(list);
//
return ResponseHelper.buildResponse(result);
//
//
}
//
nameMaps = jpStation.stream().collect(Collectors.toMap(JpStation::getThirdStationId, JpStation::getName, (existing, replacement) -> existing));
//
//
if (null == stationId) {
//
stationId = jpStation.stream().map(JpStation::getThirdStationId).collect(Collectors.toList());
//
}
String
startTime
=
""
;
String
endTime
=
""
;
if
(
null
!=
time
)
{
...
...
@@ -281,16 +281,22 @@ public class TdHygfJpInverterWarnController extends BaseController {
if
(
StringUtils
.
isNotEmpty
(
content
))
{
content
=
'%'
+
content
+
'%'
;
}
List
<
TdHygfJpInverterWarnDto
>
maps
=
tdHygfJpInverterWarnServiceImpl
.
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
current
,
size
,
handlerStatus
);
if
(
StringUtils
.
isNotEmpty
(
stationName
))
{
stationName
=
'%'
+
stationName
+
'%'
;
}
List
<
TdHygfJpInverterWarnDto
>
maps
=
tdHygfJpInverterWarnServiceImpl
.
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
current
,
size
,
handlerStatus
,
stationName
);
for
(
TdHygfJpInverterWarnDto
map
:
maps
)
{
if
(
nameMaps
.
containsKey
(
map
.
getThirdStationId
()))
{
map
.
setStationName
(
nameMaps
.
get
(
map
.
getThirdStationId
()));
}
//
if (nameMaps.containsKey(map.getThirdStationId())) {
//
map.setStationName(nameMaps.get(map.getThirdStationId()));
//
}
String
te
=
map
.
getTimeLong
()
!=
null
?
TimeUtil
.
longFormat
(
map
.
getTimeLong
())
:
""
;
map
.
setTimeLongFormat
(
te
);
}
result
.
setTotal
(
tdHygfJpInverterWarnServiceImpl
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
));
result
.
setTotal
(
tdHygfJpInverterWarnServiceImpl
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
,
stationName
));
List
<
Long
>
waringIds
=
maps
.
stream
().
map
(
tdHygfJpInverterWarnDto
->
tdHygfJpInverterWarnDto
.
getCreatedTime
()).
collect
(
Collectors
.
toList
());
if
(
waringIds
.
size
()
==
0
)
{
waringIds
=
Arrays
.
asList
(
0L
);
...
...
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 @
f92490cd
...
...
@@ -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/JpInverterServiceImpl.java
View file @
f92490cd
This diff is collapsed.
Click to expand it.
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 @
f92490cd
This diff is collapsed.
Click to expand it.
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 @
f92490cd
...
...
@@ -40,7 +40,8 @@ public class TdHygfJpInverterWarnServiceImpl
@Autowired
HYGFMaintenanceTicketsMapper
hygfMaintenanceTicketsMapper
;
@Autowired
TdHygfJpInverterWarnMapper
tdHygfJpInverterWarnMapper
;
/**
* 分页查询
*/
...
...
@@ -165,20 +166,21 @@ public class TdHygfJpInverterWarnServiceImpl
return
tdHygfJpInverterWarnDto
;
}
public
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
)
{
List
<
TdHygfJpInverterWarnDto
>
list
=
t
his
.
getBaseMapper
().
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
(
current
-
1
)
*
size
,
size
,
handlerStatus
);
public
List
<
TdHygfJpInverterWarnDto
>
selectWarnList
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
Integer
current
,
Integer
size
,
String
handlerStatus
,
String
stationName
)
{
List
<
TdHygfJpInverterWarnDto
>
list
=
t
dHygfJpInverterWarnMapper
.
selectWarnList
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
(
current
-
1
)
*
size
,
size
,
handlerStatus
,
stationName
);
list
.
forEach
(
i
->
{
JpStation
jpStation
=
jpStationServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
JpStation
>()
.
eq
(
JpStation:
:
getThirdStationId
,
i
.
getThirdStationId
()));
if
(
ObjectUtil
.
isNotNull
(
jpStation
))
{
i
.
setAddress
(
jpStation
.
getAddress
());
i
.
setArea
(
jpStation
.
getArea
());
i
.
setStationName
(
jpStation
.
getName
());
}
});
return
list
;
}
public
int
selectWarnListTotal
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
)
{
return
t
his
.
getBaseMapper
().
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
);
public
int
selectWarnListTotal
(
String
state
,
String
level
,
String
minvalue
,
String
maxValue
,
String
snCode
,
List
<
String
>
stationId
,
String
startTime
,
String
endTime
,
String
content
,
String
handlerStatus
,
String
stationName
)
{
return
t
dHygfJpInverterWarnMapper
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
,
stationName
);
}
}
\ No newline at end of file
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