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
bddb2076
Commit
bddb2076
authored
Nov 27, 2021
by
郭武斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)修改警铃车库门一键控制
parent
2454630f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
7 deletions
+46
-7
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+46
-7
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
bddb2076
...
@@ -11,6 +11,8 @@ import java.util.stream.Collectors;
...
@@ -11,6 +11,8 @@ import java.util.stream.Collectors;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.joda.time.DateTime
;
import
org.joda.time.DateTime
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -77,6 +79,9 @@ import com.yeejoin.amos.component.rule.config.RuleConfig;
...
@@ -77,6 +79,9 @@ import com.yeejoin.amos.component.rule.config.RuleConfig;
public
class
AlertCalledServiceImpl
extends
BaseService
<
AlertCalledDto
,
AlertCalled
,
AlertCalledMapper
>
public
class
AlertCalledServiceImpl
extends
BaseService
<
AlertCalledDto
,
AlertCalled
,
AlertCalledMapper
>
implements
IAlertCalledService
{
implements
IAlertCalledService
{
private
final
Logger
logger
=
LogManager
.
getLogger
(
AlertCalledServiceImpl
.
class
);
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
@Autowired
...
@@ -608,8 +613,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -608,8 +613,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return
alertCalledMapper
.
getTodayAlertCalled
();
return
alertCalledMapper
.
getTodayAlertCalled
();
}
}
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
public
Boolean
controlEquip
()
{
public
Boolean
controlEquip
()
throws
Exception
{
/**
/**
* 获取控制器设备
* 获取控制器设备
*/
*/
...
@@ -659,7 +663,14 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -659,7 +663,14 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
for
(
int
i
=
0
;
i
<
bellNums
.
length
;
i
++)
for
(
int
i
=
0
;
i
<
bellNums
.
length
;
i
++)
{
{
//打开15s后自动关闭
//打开15s后自动关闭
jcsControlServerClient
.
sendBellActionWithTime
(
bellNums
[
i
],
"1"
,
15
);
try
{
jcsControlServerClient
.
sendBellActionWithTime
(
bellNums
[
i
],
"1"
,
15
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"打开警铃【"
+
bellNums
[
i
]+
"】异常!"
);
}
}
}
}
}
/**
/**
...
@@ -677,9 +688,23 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -677,9 +688,23 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
if
(!
ValidationUtil
.
isEmpty
(
northDoor
))
{
if
(!
ValidationUtil
.
isEmpty
(
northDoor
))
{
ControllerDto
controllerDto
=
northDoor
.
get
(
0
);
ControllerDto
controllerDto
=
northDoor
.
get
(
0
);
// 打开北站车库门
// 打开北站车库门
jcsControlServerClient
.
writeStateAction
(
controllerDto
.
getIp
(),
controllerDto
.
getPort
(),
100
,
"1,1,1,1"
);
try
{
jcsControlServerClient
.
writeStateAction
(
controllerDto
.
getIp
(),
controllerDto
.
getPort
(),
100
,
"1,1,1,1"
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"打开北站车库门【"
+
controllerDto
.
getIp
()+
"】异常!"
);
}
// 打开北站车库门弱电警铃
// 打开北站车库门弱电警铃
jcsControlServerClient
.
writeStateAction
(
controllerDto
.
getIp
(),
controllerDto
.
getPort
(),
107
,
"1"
);
try
{
jcsControlServerClient
.
writeStateAction
(
controllerDto
.
getIp
(),
controllerDto
.
getPort
(),
107
,
"1"
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"打开北站弱电警铃【"
+
controllerDto
.
getIp
()+
"】异常!"
);
}
}
}
/**
/**
* 打开南站车库门
* 打开南站车库门
...
@@ -688,9 +713,23 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -688,9 +713,23 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
if
(!
ValidationUtil
.
isEmpty
(
southDoor
))
{
if
(!
ValidationUtil
.
isEmpty
(
southDoor
))
{
ControllerDto
controllerDto
=
southDoor
.
get
(
0
);
ControllerDto
controllerDto
=
southDoor
.
get
(
0
);
// 打开南站车库门
// 打开南站车库门
jcsControlServerClient
.
writeStateAction
(
controllerDto
.
getIp
(),
controllerDto
.
getPort
(),
100
,
"1"
);
try
{
jcsControlServerClient
.
writeStateAction
(
controllerDto
.
getIp
(),
controllerDto
.
getPort
(),
100
,
"1"
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"打开南站车库门【"
+
controllerDto
.
getIp
()+
"】异常!"
);
}
// 打开南站车库门弱电警铃
// 打开南站车库门弱电警铃
jcsControlServerClient
.
writeStateAction
(
controllerDto
.
getIp
(),
controllerDto
.
getPort
(),
107
,
"1"
);
try
{
jcsControlServerClient
.
writeStateAction
(
controllerDto
.
getIp
(),
controllerDto
.
getPort
(),
107
,
"1"
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"打开南站弱电警铃【"
+
controllerDto
.
getIp
()+
"】异常!"
);
}
}
}
return
true
;
return
true
;
...
...
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