Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
c35b4ebe
Commit
c35b4ebe
authored
Jul 03, 2024
by
lilongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、新增获取并网容量,获取片区指标完成情况接口添加日志
parent
41516a31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
EnergyAccessController.java
...t/module/jxiop/biz/controller/EnergyAccessController.java
+7
-0
EnergyAccessServiceImpl.java
...odule/jxiop/biz/service/impl/EnergyAccessServiceImpl.java
+8
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/EnergyAccessController.java
View file @
c35b4ebe
...
...
@@ -2,9 +2,12 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptor
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.EnergyAccessServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -20,10 +23,13 @@ public class EnergyAccessController extends BaseController {
@Autowired
EnergyAccessServiceImpl
energyAccessServiceImpl
;
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
EnergyAccessController
.
class
);
@RequestMapping
(
value
=
"/getInstalledCapacity"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取并网容量"
,
notes
=
"获取并网容量"
)
public
Page
<
Map
<
String
,
Object
>>
getInstalledCapacity
(
String
current
,
String
pageSize
,
String
code
,
String
sourceStationId
,
String
tp
)
{
logger
.
info
(
"获取并网容量接口入参:current ={},pageSize ={},code = {},sourceStationId = {},tp = {}"
,
current
,
pageSize
,
code
,
sourceStationId
,
tp
);
return
energyAccessServiceImpl
.
getInstalledCapacity
(
current
,
pageSize
,
code
,
sourceStationId
,
tp
);
}
...
...
@@ -31,6 +37,7 @@ public class EnergyAccessController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取片区指标完成情况"
,
notes
=
"获取片区指标完成情况"
)
public
Page
<
Map
<
String
,
Object
>>
getQuotaCompleteInfo
(
String
current
,
String
pageSize
,
String
code
,
String
sourceStationId
,
String
tp
)
{
logger
.
info
(
"获取片区指标完成情况入参:current ={},pageSize ={},code = {},sourceStationId = {},tp = {}"
,
current
,
pageSize
,
code
,
sourceStationId
,
tp
);
return
energyAccessServiceImpl
.
getQuotaCompleteInfo
(
current
,
pageSize
,
code
,
sourceStationId
,
tp
);
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EnergyAccessServiceImpl.java
View file @
c35b4ebe
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jxiop.api.util.Constants
;
import
com.yeejoin.amos.boot.module.jxiop.api.util.HttpRequestUtil
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.EnergyAccessService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -23,6 +23,8 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
@Autowired
private
HttpRequestUtil
httpRequestUtil
;
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
EnergyAccessServiceImpl
.
class
);
@Override
public
Page
<
Map
<
String
,
Object
>>
getInstalledCapacity
(
String
current
,
String
pageSize
,
String
code
,
String
sourceStationId
,
String
tp
)
{
//改为部盾接口
...
...
@@ -42,6 +44,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
Constants
.
resovleRule_data
);
List
returnList
=
data
.
getJSONArray
(
"data"
);
logger
.
info
(
"获取并网容量接口调用对端返回结果:{}"
,
returnList
.
toString
());
Page
<
Map
<
String
,
Object
>>
pageIPage
;
int
newCurrent
=
Integer
.
parseInt
(
current
);
...
...
@@ -63,6 +66,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
}
else
{
pageIPage
.
setRecords
(
returnList
.
subList
(((
newCurrent
-
1
)
*
newPageSize
),
returnList
.
size
()));
}
logger
.
info
(
"获取并网容量接口最终返回结果:{}"
,
pageIPage
.
getRecords
());
return
pageIPage
;
}
...
...
@@ -89,6 +93,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
Constants
.
resovleRule_data
);
List
returnList
=
data
.
getJSONArray
(
"data"
);
logger
.
info
(
"获取片区指标完成情况调用对端返回结果:{}"
,
returnList
.
toString
());
//rate的值去掉百分号,名称字段名统一用name代替
Page
<
Map
<
String
,
Object
>>
pageIPage
;
int
newCurrent
=
Integer
.
parseInt
(
current
);
...
...
@@ -125,6 +130,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
}
else
{
pageIPage
.
setRecords
(
returnList
.
subList
(((
newCurrent
-
1
)
*
newPageSize
),
returnList
.
size
()));
}
logger
.
info
(
"获取片区指标完成情况最终返回结果:{}"
,
pageIPage
.
getRecords
());
return
pageIPage
;
}
}
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