Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
plant
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
qinhu
plant
Commits
5f874a73
Commit
5f874a73
authored
4 years ago
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hbase配置引入
parent
4a17a880
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
117 additions
and
3161 deletions
+117
-3161
PowerPlantRunner.java
...wise/sc/energy/power/plant/business/PowerPlantRunner.java
+2
-2
BaseController.java
...nergy/power/plant/business/controller/BaseController.java
+2
-2
CharacterParamController.java
...r/plant/business/controller/CharacterParamController.java
+2
-6
CondensateController.java
...power/plant/business/controller/CondensateController.java
+0
-24
DeviceInfoController.java
...power/plant/business/controller/DeviceInfoController.java
+2
-2
MenuController.java
...nergy/power/plant/business/controller/MenuController.java
+0
-44
PlantInfoController.java
.../power/plant/business/controller/PlantInfoController.java
+2
-2
RuntimeOptionController.java
...er/plant/business/controller/RuntimeOptionController.java
+1
-3
SpindleController.java
...gy/power/plant/business/controller/SpindleController.java
+0
-34
TestController.java
...nergy/power/plant/business/controller/TestController.java
+0
-33
UnitInfoController.java
...y/power/plant/business/controller/UnitInfoController.java
+2
-2
UserInfoController.java
...y/power/plant/business/controller/UserInfoController.java
+4
-5
IndexRealDataController.java
...r/plant/business/controller2/IndexRealDataController.java
+0
-160
TendencyController.java
.../power/plant/business/controller2/TendencyController.java
+0
-44
Oscillogram.java
...se/sc/energy/power/plant/business/domain/Oscillogram.java
+37
-0
OscillogramQuery.java
.../energy/power/plant/business/domain/OscillogramQuery.java
+38
-1
DataBaseService.java
.../energy/power/plant/business/service/DataBaseService.java
+0
-111
IBaseService.java
.../sc/energy/power/plant/business/service/IBaseService.java
+1
-1
ICharacterParamService.java
.../power/plant/business/service/ICharacterParamService.java
+1
-4
IDetectionService.java
...nergy/power/plant/business/service/IDetectionService.java
+1
-1
IDeviceInfoService.java
...ergy/power/plant/business/service/IDeviceInfoService.java
+1
-1
IPlantInfoService.java
...nergy/power/plant/business/service/IPlantInfoService.java
+1
-6
IRuntimeOptionService.java
...y/power/plant/business/service/IRuntimeOptionService.java
+1
-1
IService.java
...wise/sc/energy/power/plant/business/service/IService.java
+0
-21
ISpindleService.java
.../energy/power/plant/business/service/ISpindleService.java
+0
-11
IUnitInfoService.java
...energy/power/plant/business/service/IUnitInfoService.java
+1
-1
IUserInfoService.java
...energy/power/plant/business/service/IUserInfoService.java
+1
-2
IndexRealTimeDataService.java
...ower/plant/business/service/IndexRealTimeDataService.java
+0
-676
IndexRealTimeDataServiceV0.java
...er/plant/business/service/IndexRealTimeDataServiceV0.java
+0
-678
IndexRealTimeDataServiceV2.java
...er/plant/business/service/IndexRealTimeDataServiceV2.java
+0
-681
MenuService.java
...e/sc/energy/power/plant/business/service/MenuService.java
+0
-157
SpindleServiceImpl.java
...ergy/power/plant/business/service/SpindleServiceImpl.java
+0
-49
TendencyService.java
.../energy/power/plant/business/service/TendencyService.java
+0
-334
BaseServiceImpl.java
...gy/power/plant/business/service/impl/BaseServiceImpl.java
+2
-5
CharacterParamServiceImpl.java
...lant/business/service/impl/CharacterParamServiceImpl.java
+2
-4
DetectionServiceImpl.java
...wer/plant/business/service/impl/DetectionServiceImpl.java
+2
-2
DeviceInfoServiceImpl.java
...er/plant/business/service/impl/DeviceInfoServiceImpl.java
+3
-12
PlantInfoServiceImpl.java
...wer/plant/business/service/impl/PlantInfoServiceImpl.java
+2
-2
RuntimeOptionServiceImpl.java
...plant/business/service/impl/RuntimeOptionServiceImpl.java
+1
-1
UnitInfoServiceImpl.java
...ower/plant/business/service/impl/UnitInfoServiceImpl.java
+2
-3
UserInfoServiceImpl.java
...ower/plant/business/service/impl/UserInfoServiceImpl.java
+2
-15
ScheduledModel.java
...e/sc/energy/power/plant/business/task/ScheduledModel.java
+1
-18
No files found.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/PowerPlantRunner.java
View file @
5f874a73
...
...
@@ -5,8 +5,8 @@ import cn.wise.sc.energy.power.plant.business.domain.vo.DeviceInfoVo;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.PlantInfoVo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.UnitInfoVo
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IDeviceInfoService
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IPlantInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IDeviceInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IPlantInfoService
;
import
com.alibaba.fastjson.JSON
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller
2
/BaseController.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/BaseController.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.wise.sc.energy.power.plant.business.domain.AbstractEntity
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IBaseService
;
import
cn.wise.sc.energy.power.plant.business.service.IBaseService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.EntityQuery
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller
2
/CharacterParamController.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/CharacterParamController.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
;
import
cn.wise.sc.energy.power.plant.business.bean.DataPower
;
import
cn.wise.sc.energy.power.plant.business.bean.TimeModelQuery
;
import
cn.wise.sc.energy.power.plant.business.domain.TendencyQuery
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.service2.ICharacterParamService
;
import
cn.wise.sc.energy.power.plant.business.service2.impl.BaseServiceImpl
;
import
cn.wise.sc.energy.power.plant.business.service.ICharacterParamService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/CondensateController.java
deleted
100644 → 0
View file @
4a17a880
//package cn.wise.sc.energy.power.plant.business.controller;
//
//import cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse;
//import io.swagger.annotations.Api;
//import org.springframework.web.bind.annotation.CrossOrigin;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @description: 冷凝水监控 控制器
// * @author: qh
// * @create: 2020-05-20 16:04
// */
//@Deprecated
//@CrossOrigin
//@RestController
//@RequestMapping("/condensate")
//public class CondensateController {
//
// public BaseResponse<String> test() {
// return null;
// }
//
//}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller
2
/DeviceInfoController.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/DeviceInfoController.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.DeviceInfoVo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IDeviceInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IDeviceInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/MenuController.java
deleted
100644 → 0
View file @
4a17a880
//package cn.wise.sc.energy.power.plant.business.controller;
//
//import cn.wise.sc.energy.power.plant.business.service.MenuService;
//import cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.context.annotation.Description;
//import org.springframework.web.bind.annotation.CrossOrigin;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @description: 菜单
// * @author: qh
// * @create: 2020-05-23 09:30
// **/
//@Deprecated
//@CrossOrigin
//@RestController
//@RequestMapping("/menu")
//public class MenuController {
//
// final
// MenuService menuService;
//
// public MenuController(MenuService menuService) {
// this.menuService = menuService;
// }
//
// @GetMapping("/menuInfo")
// @ApiOperation("获取菜单信息")
// public BaseResponse<String> getMenuInfo() {
// return menuService.getMenuInfo();
// }
//
//
// @GetMapping("/characterInfo")
// @ApiOperation("获取测点信息")
// public BaseResponse<String> getCharacterInfo(String key) {
// return menuService.getCharacterInfo(key);
// }
//
//}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller
2
/PlantInfoController.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/PlantInfoController.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IPlantInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IPlantInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller
2
/RuntimeOptionController.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/RuntimeOptionController.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
;
import
cn.wise.sc.energy.power.plant.business.domain.Oscillogram
;
import
cn.wise.sc.energy.power.plant.business.domain.OscillogramRowMapper
;
import
com.spring4all.spring.boot.starter.hbase.api.HbaseTemplate
;
import
com.spring4all.spring.boot.starter.hbase.api.RowMapper
;
import
io.swagger.annotations.Api
;
import
org.apache.hadoop.conf.Configuration
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/SpindleController.java
deleted
100644 → 0
View file @
4a17a880
//package cn.wise.sc.energy.power.plant.business.controller;
//
//import cn.wise.sc.energy.power.plant.business.bean.TimeModelQuery;
//import cn.wise.sc.energy.power.plant.business.service.ISpindleService;
//import cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse;
//import io.swagger.annotations.Api;
//import org.springframework.web.bind.annotation.CrossOrigin;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @description: 转轴监控
// * @author: qh
// * @create: 2020-05-20 16:13
// */
//@Deprecated
//@CrossOrigin
//@RestController
//@RequestMapping("/spindle")
//public class SpindleController {
//
// final ISpindleService iSpindleService;
//
// public SpindleController(ISpindleService iSpindleService) {
// this.iSpindleService = iSpindleService;
// }
//
// @GetMapping
// public BaseResponse<String> getDataByTime(TimeModelQuery timeModelQuery, String key) {
// return null;
// }
//
//}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/TestController.java
deleted
100644 → 0
View file @
4a17a880
//package cn.wise.sc.energy.power.plant.business.controller;
//
//import cn.wise.sc.energy.power.plant.common.kafka.service.IndicatorService;
//import org.springframework.web.bind.annotation.CrossOrigin;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @description:
// * @author: qh
// * @create: 2020-05-18 14:57
// **/
//@RestController
//@RequestMapping("/test")
//@CrossOrigin
//public class TestController {
//
// final
// IndicatorService indicatorService;
//
// public TestController(IndicatorService indicatorService) {
// this.indicatorService = indicatorService;
// }
//
// @GetMapping
// public void test(){
// indicatorService.sendMessage("thermalpower_plant_1","sssssssss");
// }
//
//
//
//}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller
2
/UnitInfoController.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/UnitInfoController.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IUnitInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IUnitInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller
2
/UserInfoController.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller/UserInfoController.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller
;
import
cn.wise.sc.energy.power.plant.business.domain.PageQuery
;
import
cn.wise.sc.energy.power.plant.business.domain.UserInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.UserInfoQuery
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.service2.IUserInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IUserInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
...
...
@@ -45,7 +43,8 @@ public class UserInfoController {
public
BaseResponse
<
Boolean
>
add
(
UserInfoQuery
userInfo
)
{
return
iUserInfoService
.
addUserInfo
(
userInfo
);
}
@PutMapping
(
"/new"
)
@PutMapping
(
"/edit"
)
public
BaseResponse
<
Boolean
>
edit
(
UserInfoQuery
userInfo
)
{
return
iUserInfoService
.
edit
(
userInfo
);
}
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller2/IndexRealDataController.java
deleted
100644 → 0
View file @
4a17a880
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller2
;
import
cn.wise.sc.energy.power.plant.business.bean.DataPower
;
import
cn.wise.sc.energy.power.plant.business.service.IndexRealTimeDataService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Random
;
/**
* @description: 首页大屏实时数据展示
* @author: qh
* @create: 2020-05-25 10:23
**/
@CrossOrigin
@RestController
@RequestMapping
(
"/indexRealData"
)
public
class
IndexRealDataController
{
final
IndexRealTimeDataService
indexRealTimeDataService
;
public
IndexRealDataController
(
IndexRealTimeDataService
indexRealTimeDataService
)
{
this
.
indexRealTimeDataService
=
indexRealTimeDataService
;
}
//
// @GetMapping("/vibration")
// @ApiOperation("首页实时数据 三相电压/电流 定子电压/电流 (汇总实时数据)")
// public BaseResponse<DataPower> vibrationData(String plantCode) {
//
// return indexRealTimeDataService.realTimeDataVoltage(plantCode);
// }
@GetMapping
(
"/powerTendency"
)
@ApiOperation
(
"首页各机组功率趋势图"
)
public
BaseResponse
<
DataPower
>
powerTendency
(
String
plantCode
)
{
return
indexRealTimeDataService
.
getIndexPowerInit
(
plantCode
);
}
@GetMapping
(
"/unitLubrication"
)
@ApiOperation
(
"各机组振动棒状对比图数据"
)
public
BaseResponse
<
DataPower
>
realTimeDataUnitLubrication
(
String
plantCode
)
{
return
indexRealTimeDataService
.
realTimeDataUnitLubrication
(
plantCode
);
}
@GetMapping
(
"/bearingBushC"
)
@ApiOperation
(
"各机组轴瓦温度柱状图"
)
public
BaseResponse
<
DataPower
>
bearingBushC
(
String
plantCode
)
{
return
indexRealTimeDataService
.
realTimeDataBearingBushC
(
plantCode
);
}
@GetMapping
(
"/3DModel"
)
@ApiOperation
(
"3D图测点"
)
public
BaseResponse
<
DataPower
>
realTimeData3DModel
(
String
unitId
,
String
plantCode
)
{
return
indexRealTimeDataService
.
realTimeData3DModel
(
unitId
,
plantCode
);
}
@GetMapping
(
"/alarm"
)
@ApiOperation
(
"获取各机组报警点数对比"
)
public
BaseResponse
<
List
<
DataPower
>>
realTimeDataAlarm
()
{
DataPower
dataPower
=
get
();
//模拟报警点数的假数据
DataPower
dataPower2
=
new
DataPower
();
dataPower2
.
getXAxis
().
add
(
"热工参数"
);
dataPower2
.
getXAxis
().
add
(
"机械参数"
);
dataPower2
.
getXAxis
().
add
(
"电气参数"
);
dataPower2
.
getXAxis
().
add
(
"环境参数"
);
dataPower2
.
getXAxis
().
add
(
"辅助参数"
);
DataPower
.
PowerPoints
powerPoints
=
new
DataPower
.
PowerPoints
();
powerPoints
.
setName
(
"一号机组"
);
powerPoints
.
getValue
().
add
(
new
Random
().
nextInt
(
30
)
+
""
);
powerPoints
.
getValue
().
add
(
new
Random
().
nextInt
(
20
)
+
""
);
powerPoints
.
getValue
().
add
(
new
Random
().
nextInt
(
10
)
+
""
);
powerPoints
.
getValue
().
add
(
new
Random
().
nextInt
(
10
)
+
""
);
powerPoints
.
getValue
().
add
(
new
Random
().
nextInt
(
10
)
+
""
);
DataPower
.
PowerPoints
powerPoints1
=
new
DataPower
.
PowerPoints
();
powerPoints1
.
setName
(
"二号机组"
);
powerPoints1
.
getValue
().
add
(
new
Random
().
nextInt
(
30
)
+
""
);
powerPoints1
.
getValue
().
add
(
new
Random
().
nextInt
(
20
)
+
""
);
powerPoints1
.
getValue
().
add
(
new
Random
().
nextInt
(
10
)
+
""
);
powerPoints1
.
getValue
().
add
(
new
Random
().
nextInt
(
10
)
+
""
);
powerPoints1
.
getValue
().
add
(
new
Random
().
nextInt
(
10
)
+
""
);
dataPower2
.
getDataList
().
add
(
powerPoints
);
dataPower2
.
getDataList
().
add
(
powerPoints1
);
List
<
DataPower
>
dataPowers
=
new
ArrayList
<>(
2
);
dataPowers
.
add
(
dataPower2
);
dataPowers
.
add
(
dataPower
);
return
BaseResponse
.
okData
(
dataPowers
);
}
@GetMapping
(
"/alarm2"
)
@ApiOperation
(
"获取各机组报警点数对比"
)
public
BaseResponse
<
List
<
DataPower
>>
realTimeDataAlarm2
()
{
DataPower
dataPower
=
get
();
//模拟报警点数的假数据
DataPower
dataPower2
=
new
DataPower
();
dataPower2
.
getXAxis
().
add
(
"一号机组"
);
dataPower2
.
getXAxis
().
add
(
"二号机组"
);
DataPower
.
PowerPoints
powerPoints
=
new
DataPower
.
PowerPoints
();
powerPoints
.
setName
(
"一号机组"
);
powerPoints
.
getValue
().
add
(
getTotal
(
dataPower
.
getDataList
(),
0
));
DataPower
.
PowerPoints
powerPoints1
=
new
DataPower
.
PowerPoints
();
powerPoints1
.
setName
(
"二号机组"
);
powerPoints1
.
getValue
().
add
(
getTotal
(
dataPower
.
getDataList
(),
1
));
dataPower2
.
getDataList
().
add
(
powerPoints
);
dataPower2
.
getDataList
().
add
(
powerPoints1
);
List
<
DataPower
>
dataPowers
=
new
ArrayList
<>(
2
);
dataPowers
.
add
(
dataPower
);
dataPowers
.
add
(
dataPower2
);
return
BaseResponse
.
okData
(
dataPowers
);
}
private
String
getTotal
(
List
<
DataPower
.
PowerPoints
>
powerPoints
,
int
count
)
{
int
rts
=
0
;
for
(
DataPower
.
PowerPoints
powerPoints1
:
powerPoints
)
{
rts
+=
Integer
.
parseInt
(
powerPoints1
.
getValue
().
get
(
count
));
}
return
rts
+
""
;
}
private
DataPower
get
()
{
//模拟报警点数的假数据
DataPower
dataPower
=
new
DataPower
();
dataPower
.
getXAxis
().
add
(
"一号机组"
);
dataPower
.
getXAxis
().
add
(
"二号机组"
);
DataPower
.
PowerPoints
powerPoints
=
new
DataPower
.
PowerPoints
();
powerPoints
.
setName
(
"一级报警"
);
powerPoints
.
getValue
().
add
(
new
Random
().
nextInt
(
30
)
+
""
);
powerPoints
.
getValue
().
add
(
new
Random
().
nextInt
(
20
)
+
""
);
DataPower
.
PowerPoints
powerPoints1
=
new
DataPower
.
PowerPoints
();
powerPoints1
.
setName
(
"二级报警"
);
powerPoints1
.
getValue
().
add
(
new
Random
().
nextInt
(
30
)
+
""
);
powerPoints1
.
getValue
().
add
(
new
Random
().
nextInt
(
20
)
+
""
);
DataPower
.
PowerPoints
powerPoints2
=
new
DataPower
.
PowerPoints
();
powerPoints2
.
setName
(
"三级报警"
);
powerPoints2
.
getValue
().
add
(
new
Random
().
nextInt
(
30
)
+
""
);
powerPoints2
.
getValue
().
add
(
new
Random
().
nextInt
(
20
)
+
""
);
dataPower
.
getDataList
().
add
(
powerPoints
);
dataPower
.
getDataList
().
add
(
powerPoints1
);
dataPower
.
getDataList
().
add
(
powerPoints2
);
return
dataPower
;
}
}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/controller2/TendencyController.java
deleted
100644 → 0
View file @
4a17a880
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
controller2
;
import
cn.wise.sc.energy.power.plant.business.bean.TimeModelQuery
;
import
cn.wise.sc.energy.power.plant.business.service.TendencyService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @description: 趋势图
* @author: qh
* @create: 2020-05-23 11:51
**/
@Slf4j
@CrossOrigin
@RestController
@RequestMapping
(
"/tendency"
)
public
class
TendencyController
{
final
RedissonClient
redissonClient
;
final
TendencyService
tendencyService
;
public
TendencyController
(
RedissonClient
redissonClient
,
TendencyService
tendencyService
)
{
this
.
redissonClient
=
redissonClient
;
this
.
tendencyService
=
tendencyService
;
}
@PostMapping
public
BaseResponse
<
String
>
getInitData
(
@RequestBody
List
<
String
>
keys
,
TimeModelQuery
timeModelQuery
,
Integer
status
)
{
return
tendencyService
.
getInitData
(
keys
,
timeModelQuery
,
status
);
}
}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/domain/Oscillogram.java
View file @
5f874a73
...
...
@@ -2,6 +2,8 @@ package cn.wise.sc.energy.power.plant.business.domain;
import
lombok.Data
;
import
java.util.List
;
/**
* @description: 波形图
* @author: qh
...
...
@@ -10,4 +12,39 @@ import lombok.Data;
@Data
public
class
Oscillogram
{
/**
* 功率谱数据
*/
private
List
<
Data
>
power
;
/**
* 阶次比数据
*/
private
List
<
Data
>
orderRatio
;
/**
* 相位谱数据
*/
private
List
<
Data
>
phaseSpectrum
;
public
static
class
Data
{
/**
* 测点对应KKS编码
*/
private
String
kKSCode
;
/**
* 幅值(Y轴坐标值)
*/
private
List
<
Double
>
data
;
/**
* 频率(X轴坐标值)
*/
private
List
<
Double
>
index
;
}
}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/domain/OscillogramQuery.java
View file @
5f874a73
...
...
@@ -2,6 +2,8 @@ package cn.wise.sc.energy.power.plant.business.domain;
import
lombok.Data
;
import
java.util.List
;
/**
* @description: 波形图入参
* @author: qh
...
...
@@ -23,7 +25,7 @@ public class OscillogramQuery {
@Data
@
lombok
.
Data
public
static
class
Record
{
/**
...
...
@@ -41,6 +43,41 @@ public class OscillogramQuery {
*/
private
String
generationFreq
;
/**
* 旋转方向(0:顺时针,1:逆时针)
*/
private
Integer
direction
;
/**
* 记录类型(0:连续采样,1定时采样:)
*/
private
Integer
recordFlag
;
private
List
<
Data
>
data
;
}
@lombok
.
Data
public
static
class
Data
{
/**
* 测点对应KKS编码
*/
private
String
kKSCode
;
/**
* 样包采样周期数
*/
private
Long
period
;
/**
* 各键相点相对起始时间偏移
*/
private
Long
keyPhaseOffset
;
/**
* 数据区域
*/
private
String
data
;
}
}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/DataBaseService.java
deleted
100644 → 0
View file @
4a17a880
//package cn.wise.sc.energy.power.plant.business.service;
//
//import cn.wise.sc.energy.power.plant.business.bean.BasicOption;
//import cn.wise.sc.energy.power.plant.business.bean.TurbineOption;
//import cn.wise.sc.energy.power.plant.common.core.exception.ResponseEnum;
//import com.alibaba.fastjson.JSON;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.jdbc.core.JdbcTemplate;
//import org.springframework.stereotype.Component;
//
//import java.util.List;
//
///**
// * @description: 数据库操作
// * @author: qh
// * @create: 2020-05-23 09:36
// */
//@Slf4j
//@Component
//public class DataBaseService {
//
// final JdbcTemplate jdbcTemplate;
//
// /**
// * 根据plantCode获取电厂配置
// */
// private final String GET_TURBINE_CONFIG_BY_PLANT_CODE = "SELECT basicoption FROM turbineoption WHERE plantcode = ?";
//
// /**
// * 获取所有电厂配置
// */
// private final String GET_TURBINE_CONFIG = "SELECT basicoption FROM turbineoption";
//
// /**
// * 获取所有电厂信息
// */
// private final String GET_TURBINE = "SELECT plantcode,plantname,basicoption FROM turbineoption";
//
// public DataBaseService(JdbcTemplate jdbcTemplate) {
// this.jdbcTemplate = jdbcTemplate;
// }
//
// /**
// * 根据plantCode获取电厂配置文件信息
// *
// * @param plantCode 电厂编码
// * @return 配置文件
// */
// public String getTurbineConfigJson(String plantCode) {
//
// //判断plantCode不为空
// ResponseEnum.BAD_LICENCE_TYPE.assertNotEmpty(plantCode);
//
// List<String> rts = jdbcTemplate.query(GET_TURBINE_CONFIG_BY_PLANT_CODE, new String[]{plantCode}, (resultSet, i) -> resultSet.getNString(1));
//
// if (rts != null && rts.size() > 0) {
// return rts.get(0);
// } else {
// log.info("没有找到相关电厂配置信息! 电厂编号:{}", plantCode);
// throw new RuntimeException("没有找到相关数据");
// }
// }
//
// /**
// * 获取所有电厂配置文件信息
// *
// * @return 配置文件
// */
// public List<String> getAllTurbineConfigJson() {
//
// return jdbcTemplate.query(GET_TURBINE_CONFIG, new String[]{}, (resultSet, i) -> resultSet.getNString(1)
// );
// }
//
// /**
// * 获取所有电厂信息
// * @return 电厂信息集合
// */
// public List<TurbineOption> getAllTurbine() {
// return jdbcTemplate.query(GET_TURBINE, new String[]{}, (resultSet, i) -> {
//
// TurbineOption turbineOption = new TurbineOption();
// turbineOption.setPlantCode(resultSet.getNString(1));
// turbineOption.setPlantName(resultSet.getNString(2));
// String basicOptionStr = resultSet.getNString(3);
//
// ResponseEnum.LICENCE_NOT_FOUND.assertNotEmpty(basicOptionStr);
// turbineOption.setBasicOption(JSON.parseObject(basicOptionStr,BasicOption.class));
//
// return turbineOption;
// }
//
// );
// }
//
// /**
// * 获取所有信息
// *
// * @return
// */
// public List<TurbineOption> getAllTurbineOption() {
// return jdbcTemplate.query(GET_TURBINE, new String[]{}, (resultSet, i) -> {
// TurbineOption turbineOption = new TurbineOption();
// turbineOption.setPlantCode(resultSet.getNString(1));
// turbineOption.setPlantName(resultSet.getNString(2));
// turbineOption.setBasicOption(JSON.parseObject(resultSet.getNString(3), BasicOption.class));
// return turbineOption;
// }
// );
// }
//}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/IBaseService.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IBaseService.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.domain.AbstractEntity
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/ICharacterParamService.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/ICharacterParamService.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.bean.DataPower
;
import
cn.wise.sc.energy.power.plant.business.bean.TimeModelQuery
;
...
...
@@ -6,11 +6,8 @@ import cn.wise.sc.energy.power.plant.business.domain.CharacterParamInfo;
import
cn.wise.sc.energy.power.plant.business.domain.vo.CharacterParamInfoVo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
net.opentsdb.client.api.query.response.QueryResponse
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/IDetectionService.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IDetectionService.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.domain.DetectionItem
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/IDeviceInfoService.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IDeviceInfoService.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.domain.DeviceInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.DeviceInfoVo
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/IPlantInfoService.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IPlantInfoService.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.domain.PlantInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.PlantInfoVo
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @description: 电厂信息服务层
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/IRuntimeOptionService.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IRuntimeOptionService.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.domain.RuntimeOptionInfo
;
import
org.springframework.stereotype.Service
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IService.java
deleted
100644 → 0
View file @
4a17a880
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.bean.TimeModelQuery
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
/**
* @description: 基础接口
* @author: qh
* @create: 2020-05-20 18:00
*/
public
interface
IService
{
/**
* 根据时间和测点查询 数据
*
* @param timeModelQuery 时间段
* @param key 测点
* @return
*/
BaseResponse
<
String
>
getDataByTime
(
TimeModelQuery
timeModelQuery
,
String
key
);
}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/ISpindleService.java
deleted
100644 → 0
View file @
4a17a880
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
/**
* @description: 转轴监控
* @author: qh
* @create: 2020-05-20 18:00
**/
public
interface
ISpindleService
extends
IService
{
}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/IUnitInfoService.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IUnitInfoService.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.domain.UnitInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/IUserInfoService.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IUserInfoService.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.domain.UserInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.UserInfoQuery
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
org.springframework.data.domain.Page
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IndexRealTimeDataService.java
deleted
100644 → 0
View file @
4a17a880
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IndexRealTimeDataServiceV0.java
deleted
100644 → 0
View file @
4a17a880
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/IndexRealTimeDataServiceV2.java
deleted
100644 → 0
View file @
4a17a880
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/MenuService.java
deleted
100644 → 0
View file @
4a17a880
//package cn.wise.sc.energy.power.plant.business.service;
//
//import cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse;
//import com.alibaba.fastjson.JSON;
//import org.redisson.api.RBucket;
//import org.redisson.api.RedissonClient;
//import org.springframework.scheduling.annotation.Async;
//import org.springframework.stereotype.Component;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.concurrent.atomic.AtomicReference;
//
///**
// * @description: 菜单配置
// * @author: qh
// * @create: 2020-05-23 10:20
// **/
//@Component
//public class MenuService {
//
// final
// DataBaseService baseService;
// final
// RedissonClient redissonClient;
//
// public MenuService(DataBaseService baseService, RedissonClient redissonClient) {
// this.baseService = baseService;
// this.redissonClient = redissonClient;
// }
//
// /**
// * 获取菜单信息
// * <p>
// * // * @param plantCode 菜单编码
// *
// * @return String
// */
// public BaseResponse<String> getMenuInfo() {
//
// List<TurbineOption> configJsons = baseService.getAllTurbineOption();
// List<TurbineOption> rts = new ArrayList<>(configJsons.size());
// for (TurbineOption configJson : configJsons) {
// if (JSON.toJSONString(configJson).contains("阻尼器")) {
// continue;
// }
// //去掉配置里面的测点
// configJson.getBasicOption().getDevices().stream()
// .forEach(device -> device.getUnitInfoVos().stream()
// .forEach(unit -> unit.setCharacterParamInfoVo(null)));
// rts.add(configJson);
// }
//
// return BaseResponse.okData(JSON.toJSONString(rts));
// }
//
// /**
// * 初始化redis信息
// */
// @Async
// public void initRedis() {
// List<String> configJsons = baseService.getAllTurbineConfigJson();
// for (String configJson : configJsons) {
// //解析配置文件 拆分部件 初始化redis
// List<UnitInfoVo> units = getUnitInfoVos(configJson);
// //判断是否已经存进去了
// UnitInfoVo firstUnit = units.get(0);
// RBucket<Object> firstUnitInfo = redissonClient.getBucket(firstUnit.getUnitid());
// if (firstUnitInfo.isExists()) {
// return;
// }
// BasicOption basicOption = JSON.parseObject(configJson, BasicOption.class);
//
// //redis缓存机组信息
// for (Devices device : basicOption.getDevices()) {
// RBucket<String> rBucket = redissonClient.getBucket(basicOption.getDepartment() + ":" + device.getDevicename());
// rBucket.set(JSON.toJSONString(device));
// }
//
// //redis缓存部件信息
// for (UnitInfoVo unit : units) {
// RBucket<Object> bucket = redissonClient.getBucket(basicOption.getDepartment() + ":" + unit.getUnitid());
// bucket.set(JSON.toJSONString(unit));
// }
// }
// }
//
// /**
// * 获取部件信息
// *
// * @param configJson 电厂配置文件
// * @return 部件集合
// */
// private List<UnitInfoVo> getUnitInfoVos(String configJson) {
// //解析配置文件 UnitInfoVo
// BasicOption basicOption = JSON.parseObject(configJson, BasicOption.class);
// //获取部件信息
// List<UnitInfoVo> units = new ArrayList<>();
// basicOption.getDevices().stream()
// .forEach(device -> units.addAll(device.getUnitInfoVos()));
// return units;
// }
//
// /**
// * 获取配置文件里面的
// *
// * @param configJson 配置文件
// * @return 测点集合
// */
// private List<CharacterParamInfoVo> getCharacters(String configJson) {
//
// //解析配置文件 拆分characters
// BasicOption basicOption = JSON.parseObject(configJson, BasicOption.class);
//
// //获取测点信息
// List<CharacterParamInfoVo> characters = new ArrayList<>();
// basicOption.getDevices().stream()
// .forEach(device -> device.getUnitInfoVos().stream()
// .forEach(unit -> characters.addAll(unit.getCharacters())));
// return characters;
// }
//
// /**
// * 获取测点信息
// *
// * @param key 部件编号
// * @return String
// */
// public BaseResponse<String> getCharacterInfo(String key) {
// AtomicReference<List<CharacterParamInfoVo>> characters = new AtomicReference<>();
// RBucket<String> bucket = redissonClient.getBucket(key);
// if (bucket.isExists()) {
// return BaseResponse.okData(bucket.get());
// } else {
// List<String> allTurbineConfigJson = baseService.getAllTurbineConfigJson();
// List<BasicOption> basicOptions = new ArrayList<>(allTurbineConfigJson.size());
// for (String turbineConfigJson : allTurbineConfigJson) {
// if (turbineConfigJson.contains("阻尼器")) {
// continue;
// }
// basicOptions.add(JSON.parseObject(turbineConfigJson, BasicOption.class));
// }
// basicOptions.stream().forEach(basicOption -> {
// basicOption.getDevices().stream().forEach(devices -> {
// UnitInfoVo units1 = devices.getUnitInfoVos().stream().filter(units ->
// key.equals(units.getUnitid())
// ).findFirst().orElse(null);
// if (units1 != null) {
// characters.set(units1.getCharacters());
// }
// });
// });
// bucket.set(JSON.toJSONString(characters.get()));
// }
// return BaseResponse.okData(JSON.toJSONString(characters.get()));
// }
//}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/SpindleServiceImpl.java
deleted
100644 → 0
View file @
4a17a880
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
;
import
cn.wise.sc.energy.power.plant.business.bean.TimeModelQuery
;
import
cn.wise.sc.energy.power.plant.business.opentsdb.OpentsdbOkHttpClient
;
import
cn.wise.sc.energy.power.plant.business.opentsdb.bean.QueryExt
;
import
cn.wise.sc.energy.power.plant.business.opentsdb.bean.QueryRequestExt
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
cn.wise.sc.energy.power.plant.common.core.exception.ResponseEnum
;
import
net.opentsdb.client.api.query.response.QueryResponse
;
import
net.opentsdb.client.bean.Aggregator
;
import
net.opentsdb.client.bean.QueryResult
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @description: 转轴监控
* @author: qh
* @create: 2020-05-20 17:39
*/
@Service
public
class
SpindleServiceImpl
implements
ISpindleService
{
@Override
public
BaseResponse
<
String
>
getDataByTime
(
TimeModelQuery
timeModelQuery
,
String
key
)
{
QueryResponse
queryResponse
=
null
;
try
{
queryResponse
=
OpentsdbOkHttpClient
.
query
(
QueryRequestExt
.
builder
()
.
start
(
"1589529222621"
)
.
end
(
"1589529223621"
)
.
build
()
.
addQuery
(
QueryExt
.
builder
()
.
aggregator
(
Aggregator
.
AVG
)
.
metric
(
"rm000000000000000000001292"
)
.
build
()));
}
catch
(
Exception
e
)
{
ResponseEnum
.
BUSINESS_ERROR
.
assertNotNull
(
null
);
}
ResponseEnum
.
LICENCE_NOT_FOUND
.
assertNotNull
(
queryResponse
);
List
<
QueryResult
>
results
=
queryResponse
.
getResults
();
// todo results处理
return
null
;
}
}
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/TendencyService.java
deleted
100644 → 0
View file @
4a17a880
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/impl/BaseServiceImpl.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/impl/BaseServiceImpl.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
.
impl
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.wise.sc.energy.power.plant.business.domain.AbstractEntity
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IBaseService
;
import
cn.wise.sc.energy.power.plant.business.service.IBaseService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.EntityQuery
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.support.SimpleJpaRepository
;
import
javax.persistence.Entity
;
import
javax.persistence.EntityManager
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.Type
;
import
java.util.ArrayList
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/impl/CharacterParamServiceImpl.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/impl/CharacterParamServiceImpl.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
.
impl
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
.
impl
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.energy.power.plant.business.bean.DataPower
;
...
...
@@ -13,12 +13,10 @@ import cn.wise.sc.energy.power.plant.business.opentsdb.bean.QueryExt;
import
cn.wise.sc.energy.power.plant.business.opentsdb.bean.QueryRequestExt
;
import
cn.wise.sc.energy.power.plant.business.repository.CharacterParamRepository
;
import
cn.wise.sc.energy.power.plant.business.repository.UnitInfoRepository
;
import
cn.wise.sc.energy.power.plant.business.service
2
.ICharacterParamService
;
import
cn.wise.sc.energy.power.plant.business.service.ICharacterParamService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
cn.wise.sc.energy.power.plant.common.core.exception.ResponseEnum
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Range
;
import
lombok.extern.slf4j.Slf4j
;
import
net.opentsdb.client.api.query.response.QueryResponse
;
import
net.opentsdb.client.bean.Aggregator
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/impl/DetectionServiceImpl.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/impl/DetectionServiceImpl.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
.
impl
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
.
impl
;
import
cn.wise.sc.energy.power.plant.business.domain.DetectionItem
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IDetectionService
;
import
cn.wise.sc.energy.power.plant.business.service.IDetectionService
;
import
cn.wise.sc.energy.power.plant.common.core.exception.ResponseEnum
;
import
org.redisson.api.RBucket
;
import
org.redisson.api.RQueue
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/impl/DeviceInfoServiceImpl.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/impl/DeviceInfoServiceImpl.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
.
impl
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.wise.sc.energy.power.plant.business.domain.CharacterParamInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.DeviceInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.UnitInfo
;
...
...
@@ -12,15 +11,11 @@ import cn.wise.sc.energy.power.plant.business.domain.vo.UnitInfoVo;
import
cn.wise.sc.energy.power.plant.business.opentsdb.OpentsdbOkHttpClient
;
import
cn.wise.sc.energy.power.plant.business.opentsdb.bean.QueryExt
;
import
cn.wise.sc.energy.power.plant.business.opentsdb.bean.QueryRequestExt
;
import
cn.wise.sc.energy.power.plant.business.repository.CharacterParamRepository
;
import
cn.wise.sc.energy.power.plant.business.repository.UnitInfoRepository
;
import
cn.wise.sc.energy.power.plant.business.service2.ICharacterParamService
;
import
cn.wise.sc.energy.power.plant.business.service2.IDeviceInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
cn.wise.sc.energy.power.plant.business.service.ICharacterParamService
;
import
cn.wise.sc.energy.power.plant.business.service.IDeviceInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.exception.ResponseEnum
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
net.opentsdb.client.api.query.request.QueryRequest
;
import
net.opentsdb.client.api.query.response.QueryResponse
;
import
net.opentsdb.client.bean.Aggregator
;
import
net.opentsdb.client.bean.QueryResult
;
...
...
@@ -29,12 +24,8 @@ import org.springframework.data.domain.Example;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
import
javax.persistence.EntityManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Path
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
java.io.IOException
;
import
java.net.URISyntaxException
;
import
java.util.ArrayList
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/impl/PlantInfoServiceImpl.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/impl/PlantInfoServiceImpl.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
.
impl
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
.
impl
;
import
cn.wise.sc.energy.power.plant.business.domain.DeviceInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.PlantInfo
;
import
cn.wise.sc.energy.power.plant.business.repository.DeviceInfoRepository
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IPlantInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IPlantInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
cn.wise.sc.energy.power.plant.common.core.exception.ResponseEnum
;
import
com.alibaba.fastjson.JSON
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/impl/RuntimeOptionServiceImpl.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/impl/RuntimeOptionServiceImpl.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
.
impl
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
.
impl
;
/**
* @description: 运行时设置服务实现
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/impl/UnitInfoServiceImpl.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/impl/UnitInfoServiceImpl.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
.
impl
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.wise.sc.energy.power.plant.business.domain.UnitInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.UnitInfoVo
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IUnitInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IUnitInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.exception.ResponseEnum
;
import
org.springframework.data.domain.Example
;
import
org.springframework.stereotype.Service
;
import
javax.persistence.EntityManager
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service
2
/impl/UserInfoServiceImpl.java
→
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/service/impl/UserInfoServiceImpl.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
2
.
impl
;
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
service
.
impl
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.energy.power.plant.business.domain.CharacterParamInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.UserInfo
;
import
cn.wise.sc.energy.power.plant.business.domain.UserInfoQuery
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.EntityVo
;
import
cn.wise.sc.energy.power.plant.business.repository.UserInfoRepository
;
import
cn.wise.sc.energy.power.plant.business.service
2
.IUserInfoService
;
import
cn.wise.sc.energy.power.plant.business.service.IUserInfoService
;
import
cn.wise.sc.energy.power.plant.common.core.bean.BaseResponse
;
import
cn.wise.sc.energy.power.plant.common.core.exception.BusinessException
;
import
cn.wise.sc.energy.power.plant.common.core.exception.BusinessExceptionAssert
;
import
cn.wise.sc.energy.power.plant.common.core.exception.ResponseEnum
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Example
;
import
org.springframework.data.domain.ExampleMatcher
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Path
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
java.util.List
;
import
java.util.Optional
;
/**
* @description:
...
...
This diff is collapsed.
Click to expand it.
power-bussiness/src/main/java/cn/wise/sc/energy/power/plant/business/task/ScheduledModel.java
View file @
5f874a73
package
cn
.
wise
.
sc
.
energy
.
power
.
plant
.
business
.
task
;
import
cn.wise.sc.energy.power.plant.business.bean.DataPower
;
import
cn.wise.sc.energy.power.plant.business.controller2.IndexRealDataController
;
import
cn.wise.sc.energy.power.plant.business.domain.vo.CharacterParamInfoVo
;
import
cn.wise.sc.energy.power.plant.business.service.IndexRealTimeDataService
;
import
cn.wise.sc.energy.power.plant.business.service.IndexRealTimeDataServiceV2
;
import
cn.wise.sc.energy.power.plant.business.service2.ICharacterParamService
;
import
cn.wise.sc.energy.power.plant.business.service.ICharacterParamService
;
import
com.alibaba.fastjson.JSON
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
...
...
@@ -31,26 +27,13 @@ public class ScheduledModel {
final
WebSocketServer2
webSocketServer2
;
final
IndexRealDataController
indexRealDataController
;
final
IndexRealTimeDataServiceV2
indexRealTimeDataServiceV2
;
final
IndexRealTimeDataService
indexRealTimeDataService
;
final
ICharacterParamService
iCharacterParamService
;
public
ScheduledModel
(
WebSocketServer
webSocketServer
,
IndexRealTimeDataService
indexRealTimeDataService
,
WebSocketServer2
webSocketServer2
,
IndexRealDataController
indexRealDataController
,
IndexRealTimeDataServiceV2
indexRealTimeDataServiceV2
,
ICharacterParamService
iCharacterParamService
)
{
this
.
webSocketServer
=
webSocketServer
;
this
.
indexRealTimeDataService
=
indexRealTimeDataService
;
this
.
webSocketServer2
=
webSocketServer2
;
this
.
indexRealDataController
=
indexRealDataController
;
this
.
indexRealTimeDataServiceV2
=
indexRealTimeDataServiceV2
;
this
.
iCharacterParamService
=
iCharacterParamService
;
}
...
...
This diff is collapsed.
Click to expand it.
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