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
d945ba06
Commit
d945ba06
authored
Nov 27, 2021
by
郭武斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)修改车库门控制
parent
a0c3110f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
17 deletions
+38
-17
JcsControlServerClient.java
.../boot/module/common/api/feign/JcsControlServerClient.java
+18
-2
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+20
-15
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/JcsControlServerClient.java
View file @
d945ba06
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
/**
/**
*
*
* <pre>
* <pre>
...
@@ -29,6 +29,21 @@ public interface JcsControlServerClient {
...
@@ -29,6 +29,21 @@ public interface JcsControlServerClient {
*/
*/
@GetMapping
(
value
=
"/v1/wksendbell/{codestr}/{type}"
)
@GetMapping
(
value
=
"/v1/wksendbell/{codestr}/{type}"
)
FeignClientResult
<
String
>
sendBellAction
(
@PathVariable
(
"codestr"
)
String
areasStr
,
@PathVariable
(
"type"
)
String
type
);
FeignClientResult
<
String
>
sendBellAction
(
@PathVariable
(
"codestr"
)
String
areasStr
,
@PathVariable
(
"type"
)
String
type
);
/**
*
* <pre>
* 打开/关闭消防警铃(自动关闭时间单位为:秒)
* </pre>
*
* @param areasStr
* @param type
* @param closttime
* @return
*/
@GetMapping
(
value
=
"/v1/wksendbell/{codestr}/{type}/{closttime}"
)
FeignClientResult
<
String
>
sendBellActionWithTime
(
@PathVariable
(
"codestr"
)
String
areasStr
,
@PathVariable
(
"type"
)
String
type
,
@PathVariable
(
"closttime"
)
long
closttime
);
/**
/**
*
*
...
@@ -89,5 +104,6 @@ public interface JcsControlServerClient {
...
@@ -89,5 +104,6 @@ public interface JcsControlServerClient {
@GetMapping
(
value
=
"/v1/controlequip/kndwrite/{ip}/{port}/{num}/{result}"
)
@GetMapping
(
value
=
"/v1/controlequip/kndwrite/{ip}/{port}/{num}/{result}"
)
FeignClientResult
<
String
>
writeStateAction
(
@PathVariable
(
"ip"
)
String
ip
,
@PathVariable
(
"port"
)
int
port
,
FeignClientResult
<
String
>
writeStateAction
(
@PathVariable
(
"ip"
)
String
ip
,
@PathVariable
(
"port"
)
int
port
,
@PathVariable
(
"num"
)
int
whichone
,
@PathVariable
(
"result"
)
String
stateStr
);
@PathVariable
(
"num"
)
int
whichone
,
@PathVariable
(
"result"
)
String
stateStr
);
}
}
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 @
d945ba06
...
@@ -628,7 +628,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -628,7 +628,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
*/
*/
List
<
ControllerDto
>
controllerDtoList
=
controllerService
.
queryAllForList
();
List
<
ControllerDto
>
controllerDtoList
=
controllerService
.
queryAllForList
();
StringBuilder
bellNumSb
=
new
StringBuilder
();
StringBuilder
bellNumSb
=
new
StringBuilder
();
StringBuilder
broadcastNumSb
=
new
StringBuilder
();
//
StringBuilder broadcastNumSb = new StringBuilder();
for
(
ControllerDto
controllerDto
:
controllerDtoList
)
{
for
(
ControllerDto
controllerDto
:
controllerDtoList
)
{
// 消防警铃
// 消防警铃
if
(
controllerDto
.
getType
().
equals
(
ControllerTypeEnum
.
BELL
.
getCode
()))
{
if
(
controllerDto
.
getType
().
equals
(
ControllerTypeEnum
.
BELL
.
getCode
()))
{
...
@@ -640,14 +640,14 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -640,14 +640,14 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
}
}
}
// 广播
// 广播
if
(
controllerDto
.
getType
().
equals
(
ControllerTypeEnum
.
BROADCAST
.
getCode
()))
{
//
if (controllerDto.getType().equals(ControllerTypeEnum.BROADCAST.getCode())) {
List
<
String
>
broadcastList
=
controllerEquipMap
.
get
(
controllerDto
.
getSequenceNbr
());
//
List<String> broadcastList = controllerEquipMap.get(controllerDto.getSequenceNbr());
if
(!
ValidationUtil
.
isEmpty
(
broadcastList
))
{
//
if (!ValidationUtil.isEmpty(broadcastList)) {
for
(
String
num
:
broadcastList
)
{
//
for (String num : broadcastList) {
broadcastNumSb
.
append
(
num
).
append
(
","
);
//
broadcastNumSb.append(num).append(",");
}
//
}
}
//
}
}
//
}
}
}
/**
/**
* 打开消防警铃
* 打开消防警铃
...
@@ -655,16 +655,21 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -655,16 +655,21 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
if
(!
ValidationUtil
.
isEmpty
(
bellNumSb
.
toString
()))
{
if
(!
ValidationUtil
.
isEmpty
(
bellNumSb
.
toString
()))
{
String
bellNum
=
bellNumSb
.
toString
();
String
bellNum
=
bellNumSb
.
toString
();
bellNum
=
bellNum
.
substring
(
0
,
bellNum
.
length
()
-
1
);
bellNum
=
bellNum
.
substring
(
0
,
bellNum
.
length
()
-
1
);
jcsControlServerClient
.
sendBellAction
(
bellNum
,
"1"
);
String
[]
bellNums
=
bellNum
.
split
(
","
);
for
(
int
i
=
0
;
i
<
bellNums
.
length
;
i
++)
{
//打开15s后自动关闭
jcsControlServerClient
.
sendBellActionWithTime
(
bellNums
[
i
],
"1"
,
15
);
}
}
}
/**
/**
* 播放广播
* 播放广播
*/
*/
if
(!
ValidationUtil
.
isEmpty
(
broadcastNumSb
.
toString
()))
{
//
if (!ValidationUtil.isEmpty(broadcastNumSb.toString())) {
String
broadcastNum
=
broadcastNumSb
.
toString
();
//
String broadcastNum = broadcastNumSb.toString();
broadcastNum
=
broadcastNum
.
substring
(
0
,
broadcastNum
.
length
()
-
1
);
//
broadcastNum = broadcastNum.substring(0, broadcastNum.length() - 1);
jcsControlServerClient
.
sendFileAction
(
broadcastNum
,
"1490075199246.mp3"
);
//
jcsControlServerClient.sendFileAction(broadcastNum, "1490075199246.mp3");
}
//
}
/**
/**
* 打开北站车库门
* 打开北站车库门
*/
*/
...
...
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