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
c12f7f05
Commit
c12f7f05
authored
Apr 07, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
66f50370
70daa26e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
153 additions
and
29 deletions
+153
-29
pom.xml
amos-boot-system-jxiop/amos-boot-module-jxiop-api/pom.xml
+6
-0
BuDunGenDto.java
...m/yeejoin/amos/boot/module/jxiop/api/dto/BuDunGenDto.java
+12
-0
BuDunPvFanDto.java
...yeejoin/amos/boot/module/jxiop/api/dto/BuDunPvFanDto.java
+10
-0
BudunStationValueDto.java
.../amos/boot/module/jxiop/api/dto/BudunStationValueDto.java
+9
-0
Constants.java
...om/yeejoin/amos/boot/module/jxiop/api/util/Constants.java
+11
-0
HttpRequestUtil.java
...join/amos/boot/module/jxiop/api/util/HttpRequestUtil.java
+69
-0
MonitorService.java
...in/amos/boot/module/jxiop/biz/service/MonitorService.java
+2
-0
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+1
-1
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+7
-7
MonitorService.java
...in/amos/boot/module/jxiop/biz/service/MonitorService.java
+26
-0
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+0
-0
TestServiceImpl.java
...s/boot/module/jxiop/biz/service/impl/TestServiceImpl.java
+0
-21
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/pom.xml
View file @
c12f7f05
...
@@ -19,5 +19,11 @@
...
@@ -19,5 +19,11 @@
<artifactId>
amos-boot-module-common-api
</artifactId>
<artifactId>
amos-boot-module-common-api
</artifactId>
<version>
${amos-biz-boot.version}
</version>
<version>
${amos-biz-boot.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
5.7.22
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/BuDunGenDto.java
0 → 100644
View file @
c12f7f05
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
dto
;
import
lombok.Data
;
@Data
public
class
BuDunGenDto
{
private
Double
day
;
private
Double
month
;
private
Double
year
;
private
Double
year_complete
;
private
Double
year_hour_number
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/BuDunPvFanDto.java
0 → 100644
View file @
c12f7f05
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
dto
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
BuDunPvFanDto
{
List
<
BudunStationValueDto
>
fan
;
List
<
BudunStationValueDto
>
pv
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/BudunStationValueDto.java
0 → 100644
View file @
c12f7f05
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
dto
;
import
lombok.Data
;
@Data
public
class
BudunStationValueDto
{
private
String
station_name
;
private
Double
value
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/util/Constants.java
View file @
c12f7f05
...
@@ -69,6 +69,17 @@ public class Constants {
...
@@ -69,6 +69,17 @@ public class Constants {
* 江西电建证书字典key
* 江西电建证书字典key
*/
*/
public
static
final
String
JXIOP_DICT_CERTIFICATES
=
"jxIop:dict:certificates"
;
public
static
final
String
JXIOP_DICT_CERTIFICATES
=
"jxIop:dict:certificates"
;
public
static
final
String
BASE_URL
=
"http://iiet-jepcc.powerchina.cn:8088/screen_api"
;
public
static
final
String
REQUEST_GET
=
"GET"
;
public
static
final
String
REQUEST_POST
=
"POST"
;
public
static
final
String
get_province_item_url
=
"method=scene_screen.data_interface.get_province_item"
;
public
static
final
String
get_month_generation_trend_url
=
"method=scene_screen.data_interface.get_month_generation_trend"
;
public
static
final
String
get_area_item_url
=
"method=scene_screen.data_interface.get_area_item"
;
public
static
final
String
get_month_top_url
=
"method=scene_screen.data_interface.get_month_top"
;
public
static
final
String
get_hours_num_top
=
"scene_screen.data_interface.get_hours_num_top"
;
public
static
final
String
resovleRule_data
=
"data"
;
public
static
final
String
areaChinese
=
"区域"
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/util/HttpRequestUtil.java
0 → 100644
View file @
c12f7f05
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
api
.
util
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
@Component
public
class
HttpRequestUtil
{
public
String
sendRequest
(
String
requestMethod
,
String
url
,
String
params
,
HashMap
<
String
,
String
>
headMap
)
{
String
respone
=
""
;
if
(
requestMethod
.
equals
(
"POST"
))
{
respone
=
HttpUtil
.
createPost
(
url
).
headerMap
(
headMap
,
false
).
body
(
params
).
execute
().
body
();
}
if
(
requestMethod
.
equals
(
"GET"
))
{
respone
=
HttpUtil
.
createGet
(
url
).
headerMap
(
headMap
,
true
).
body
(
params
).
execute
().
body
();
}
return
respone
;
}
public
JSONArray
handlerResponseByResultResolverule
(
String
resultResovle
,
String
response
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
response
);
JSONArray
jsonArray
=
new
JSONArray
();
if
(
ObjectUtil
.
isNotEmpty
(
resultResovle
))
{
String
[]
rules
=
resultResovle
.
split
(
","
);
if
(
rules
.
length
>
0
)
{
for
(
int
i
=
0
;
i
<
rules
.
length
;
i
++)
{
try
{
jsonObject
=
(
JSONObject
)
jsonObject
.
get
(
rules
[
i
]);
if
(
jsonObject
==
null
)
{
jsonArray
=
(
JSONArray
)
jsonObject
.
get
(
rules
[
i
]);
}
}
catch
(
Exception
exception
)
{
jsonArray
=
(
JSONArray
)
jsonObject
.
get
(
rules
[
i
]);
}
}
}
if
(
jsonArray
.
size
()
==
0
)
{
jsonArray
.
add
(
jsonObject
);
}
}
return
jsonArray
;
}
public
<
T
>
List
<
T
>
getResPonse
(
String
apiurl
,
String
requestMethod
,
String
requestParmInfo
,
String
ResultResolveRule
,
Class
<
T
>
tClass
)
{
String
respone
=
""
;
String
params
=
""
;
JSONArray
jsonArray
=
null
;
List
<
T
>
result
=
new
ArrayList
<>();
try
{
respone
=
sendRequest
(
requestMethod
,
apiurl
,
requestParmInfo
,
null
);
jsonArray
=
handlerResponseByResultResolverule
(
ResultResolveRule
,
respone
);
if
(!
ObjectUtils
.
isEmpty
(
jsonArray
))
{
result
=
JSONArray
.
parseArray
(
jsonArray
.
toJSONString
(),
tClass
);
}
}
catch
(
Exception
exception
)
{
return
result
;
}
return
result
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/MonitorService.java
View file @
c12f7f05
...
@@ -27,4 +27,6 @@ public interface MonitorService {
...
@@ -27,4 +27,6 @@ public interface MonitorService {
* @return Map<String, Object>
* @return Map<String, Object>
*/
*/
Map
<
String
,
Object
>
qyAccessSituation
();
Map
<
String
,
Object
>
qyAccessSituation
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/constants/CommonConstans.java
View file @
c12f7f05
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.constants;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.constants;
import
com.sun.javafx.logging.PulseLogger
;
import
com.sun.javafx.logging.PulseLogger
;
import
org.checkerframework.checker.units.qual.C
;
import
org.checkerframework.checker.units.qual.C
;
import
org.elasticsearch.search.fetch.subphase.FieldAndFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -181,7 +182,6 @@ public class CommonConstans {
...
@@ -181,7 +182,6 @@ public class CommonConstans {
public
static
final
String
TOTAL_RADIATION
=
"辐照度"
;
public
static
final
String
TOTAL_RADIATION
=
"辐照度"
;
public
static
final
String
ACTIVE_POWER
=
"有功功率"
;
public
static
final
String
ACTIVE_POWER
=
"有功功率"
;
//------------------监盘服务改造新增常量结束------------------------------
//------------------监盘服务改造新增常量结束------------------------------
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/DemoController.java
View file @
c12f7f05
...
@@ -94,8 +94,8 @@ public class DemoController extends BaseController {
...
@@ -94,8 +94,8 @@ public class DemoController extends BaseController {
Logger
logger
=
LoggerFactory
.
getLogger
(
DemoController
.
class
);
Logger
logger
=
LoggerFactory
.
getLogger
(
DemoController
.
class
);
@Autowired
@Autowired
StationBasicServiceImpl
stationBasicServiceimpl
;
StationBasicServiceImpl
stationBasicServiceimpl
;
@Autowired
//
@Autowired
TestServiceImpl
testServiceimpl
;
//
TestServiceImpl testServiceimpl;
@Autowired
@Autowired
EmqKeeper
emqKeeper
;
EmqKeeper
emqKeeper
;
@Autowired
@Autowired
...
@@ -511,16 +511,16 @@ public class DemoController extends BaseController {
...
@@ -511,16 +511,16 @@ public class DemoController extends BaseController {
commonServiceImpl
.
getListDataByCondtions
(
queryConditon
,
null
,
ESEquipments
.
class
);
commonServiceImpl
.
getListDataByCondtions
(
queryConditon
,
null
,
ESEquipments
.
class
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"测试feign调用"
)
@ApiOperation
(
value
=
"测试feign调用"
)
@GetMapping
(
"/testFeignCall"
)
@GetMapping
(
"/testFeignCall"
)
public
List
<
CoreValuesDto
>
testFeignCall
()
{
public
List
<
CoreValuesDto
>
testFeignCall
()
{
List
<
CoreValuesDto
>
coreValuesDtos
=
coreCommonService
.
getValuesByStationNamesAndPointsNames
(
null
,
null
);
//
List<CoreValuesDto> coreValuesDtos =coreCommonService.getValuesByStationNamesAndPointsNames(null,null);
// monitorService.getTotalData();
// monitorService.getTotalData();
//
monitorService.getNationWideInfo("江西省","gis");
monitorService
.
getNationWideInfo
(
"江西省"
,
"gis"
);
monitorService
.
getCompletionOfPowerIndicatorsByProvinceName
(
1
,
20
,
"陕西省"
);
//
monitorService.getCompletionOfPowerIndicatorsByProvinceName(1,20,"陕西省");
// Double sum = coreCommonService.getSumOfByPointName(coreValuesDtos, CommonConstans.DAY_POWER_GENERATION);
// Double sum = coreCommonService.getSumOfByPointName(coreValuesDtos, CommonConstans.DAY_POWER_GENERATION);
// Double avg = coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.DAY_POWER_GENERATION);
// Double avg = coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.DAY_POWER_GENERATION);
return
coreValuesDtos
;
return
null
;
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/MonitorService.java
View file @
c12f7f05
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.RegionNationWideDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.RegionNationWideDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.ResultsData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -35,4 +37,28 @@ public interface MonitorService {
...
@@ -35,4 +37,28 @@ public interface MonitorService {
* @return 有功功率
* @return 有功功率
*/
*/
public
HashMap
<
String
,
String
>
getActivePowerByAreaName
(
String
areaName
);
public
HashMap
<
String
,
String
>
getActivePowerByAreaName
(
String
areaName
);
/**
* @description 根据地区名称获取发电数据
* @param areaName
* @return
*/
public
Page
<
HashMap
<
String
,
String
>>
getDetailsOnPowergeneration
(
String
areaName
);
/**
* @description 根据地区名称获取社会贡献数据
* @param areaName
* @param stationId
* @return
*/
public
Page
<
SocialContributionDto
>
getSocialContributionDtoList
(
String
areaName
,
String
stationId
)
;
/**
* @description 根据地区名称获取发电量完成度排名前五的数据
* @param areaName
* @return
*/
public
Page
<
HashMap
<
String
,
String
>>
getPowerGenerationTrendsOfCompletionTopFive
(
String
areaName
);
public
Page
<
HashMap
<
String
,
String
>>
getPowerGenerationTrendsOfCompletionTopThree
(
String
tabValue
,
String
areaName
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
c12f7f05
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/TestServiceImpl.java
deleted
100644 → 0
View file @
66f50370
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.netflix.loadbalancer.RetryRule
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.Test
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.TestMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.ItestService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
TestServiceImpl
implements
ItestService
{
@Autowired
TestMapper
testMapper
;
public
List
<
Test
>
getList
(){
return
testMapper
.
selectList
(
new
QueryWrapper
<
Test
>().
isNotNull
(
"name"
));
}
}
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