Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-charging-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d9c21f76
authored
Nov 14, 2023
by
叶立庆
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/platform/platform-charging-server
2 parents
54d81f9f
384640ac
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
platform-charging/pom.xml
platform-charging/src/main/java/cn/com/glsx/charging/modules/controller/ParamSettingController.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/controller/TimeSettingController.java
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/ModelChargingReqHandler.java
platform-charging/pom.xml
View file @
d9c21f7
...
@@ -110,6 +110,12 @@
...
@@ -110,6 +110,12 @@
<groupId>
cn.com.glsx
</groupId>
<groupId>
cn.com.glsx
</groupId>
<artifactId>
platform-evbusiness-api
</artifactId>
<artifactId>
platform-evbusiness-api
</artifactId>
<version>
1.0.0-SNAPSHOT
</version>
<version>
1.0.0-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
com.google.code.google-collections
</groupId>
<artifactId>
google-collect
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
platform-charging/src/main/java/cn/com/glsx/charging/modules/controller/ParamSettingController.java
View file @
d9c21f7
...
@@ -11,6 +11,7 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.ParamSettingRsp;
...
@@ -11,6 +11,7 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.ParamSettingRsp;
import
com.glsx.plat.core.annotation.ResponseResultBody
;
import
com.glsx.plat.core.annotation.ResponseResultBody
;
import
com.glsx.plat.core.web.Result
;
import
com.glsx.plat.core.web.Result
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -35,8 +36,12 @@ public class ParamSettingController extends BaseController {
...
@@ -35,8 +36,12 @@ public class ParamSettingController extends BaseController {
@Operation
(
summary
=
"充电桩工作参数设置"
,
description
=
"充电桩工作参数设置"
)
@Operation
(
summary
=
"充电桩工作参数设置"
,
description
=
"充电桩工作参数设置"
)
@GetMapping
(
"/configDown"
)
@GetMapping
(
"/configDown"
)
public
Result
<
String
>
configDown
(
@Param
(
"pileId"
)
String
pileId
,
public
Result
<
String
>
configDown
(
@Parameter
(
name
=
"pileId"
,
description
=
"充电桩编码"
,
required
=
true
)
@Param
(
"pileId"
)
String
pileId
,
@Parameter
(
name
=
"authStatus"
,
description
=
"是否允许工作,0 表示允许正常工作 1 表示停止使用,锁定充电桩"
,
required
=
true
)
@Param
(
"authStatus"
)
Byte
authStatus
,
@Param
(
"authStatus"
)
Byte
authStatus
,
@Parameter
(
name
=
"maxPower"
,
description
=
"充电桩最大允许输出功率,1 表示 1%,最大 100%,最小 30%"
,
required
=
true
)
@Param
(
"maxPower"
)
Byte
maxPower
)
{
@Param
(
"maxPower"
)
Byte
maxPower
)
{
log
.
info
(
"充电桩编号:{}"
,
pileId
);
log
.
info
(
"充电桩编号:{}"
,
pileId
);
log
.
info
(
"工作参数 是否允许工作: {}"
,
authStatus
);
log
.
info
(
"工作参数 是否允许工作: {}"
,
authStatus
);
...
...
platform-charging/src/main/java/cn/com/glsx/charging/modules/controller/TimeSettingController.java
View file @
d9c21f7
...
@@ -14,6 +14,7 @@ import cn.hutool.core.util.HexUtil;
...
@@ -14,6 +14,7 @@ import cn.hutool.core.util.HexUtil;
import
com.glsx.plat.core.annotation.ResponseResultBody
;
import
com.glsx.plat.core.annotation.ResponseResultBody
;
import
com.glsx.plat.core.web.Result
;
import
com.glsx.plat.core.web.Result
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -45,7 +46,9 @@ public class TimeSettingController extends BaseController {
...
@@ -45,7 +46,9 @@ public class TimeSettingController extends BaseController {
*/
*/
@Operation
(
summary
=
"对时设置"
,
description
=
"对时设置"
)
@Operation
(
summary
=
"对时设置"
,
description
=
"对时设置"
)
@GetMapping
(
"/sync"
)
@GetMapping
(
"/sync"
)
public
Result
<
String
>
sync
(
@Param
(
"pileId"
)
String
pileId
)
{
public
Result
<
String
>
sync
(
@Parameter
(
name
=
"pileId"
,
description
=
"充电桩编码"
,
required
=
true
)
@Param
(
"pileId"
)
String
pileId
)
{
Date
date
=
new
Date
();
Date
date
=
new
Date
();
String
cp56Time2a
=
ByteUtils
.
cp56Time2a
(
date
);
String
cp56Time2a
=
ByteUtils
.
cp56Time2a
(
date
);
...
...
platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/handler/ModelChargingReqHandler.java
View file @
d9c21f7
...
@@ -22,8 +22,7 @@ public class ModelChargingReqHandler implements TcpHandler<ModelChargingReq, Mod
...
@@ -22,8 +22,7 @@ public class ModelChargingReqHandler implements TcpHandler<ModelChargingReq, Mod
// 查业务系统
// 查业务系统
log
.
info
(
"请求验证的桩号{}"
,
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getPileId
()));
log
.
info
(
"请求验证的桩号{}"
,
Ocpp16Helper
.
bcdToStr
(
req
.
getData
().
getPileId
()));
data
.
setPileId
(
req
.
getData
().
getPileId
());
data
.
setPileId
(
req
.
getData
().
getPileId
());
byte
[]
modelcodeByte
=
new
byte
[]{(
byte
)
0x00
,
0x01
};
data
.
setModelCode
(
Ocpp16Helper
.
strToBcd
(
"256"
,
data
.
getModelCode
()));
data
.
setModelCode
(
modelcodeByte
);
byte
[]
byteArray
=
new
byte
[]{(
byte
)
0x9C
,
0x40
,
0x01
,
0x00
};
byte
[]
byteArray
=
new
byte
[]{(
byte
)
0x9C
,
0x40
,
0x01
,
0x00
};
data
.
setValleyDreRate
(
byteArray
);
data
.
setValleyDreRate
(
byteArray
);
data
.
setValleyEleRate
(
byteArray
);
data
.
setValleyEleRate
(
byteArray
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment