客户端开门开发
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,7 +11,6 @@
|
|||||||
.mtj.tmp/
|
.mtj.tmp/
|
||||||
|
|
||||||
# Package Files #
|
# Package Files #
|
||||||
*.jar
|
|
||||||
*.war
|
*.war
|
||||||
*.nar
|
*.nar
|
||||||
*.ear
|
*.ear
|
||||||
|
|||||||
@@ -16,6 +16,11 @@
|
|||||||
<groupId>smartvenue</groupId>
|
<groupId>smartvenue</groupId>
|
||||||
<artifactId>netty-model</artifactId>
|
<artifactId>netty-model</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.pc15</groupId>
|
||||||
|
<artifactId>fc-card</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
package com.sv.intergration;
|
package com.sv.intergration;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对接场馆门禁
|
* 对接场馆门禁
|
||||||
*/
|
*/
|
||||||
public interface DoorService {
|
public interface DoorService {
|
||||||
|
|
||||||
|
Logger logger = LoggerFactory.getLogger(DoorService.class);
|
||||||
|
|
||||||
|
void enterOpenDoor();
|
||||||
|
|
||||||
|
void outOpenDoor();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.sv.intergration.impl;
|
||||||
|
|
||||||
|
import Net.PC15.Command.CommandDetial;
|
||||||
|
import Net.PC15.Connector.ConnectorAllocator;
|
||||||
|
import Net.PC15.Connector.E_ControllerType;
|
||||||
|
import Net.PC15.Connector.TCPClient.TCPClientDetial;
|
||||||
|
import Net.PC15.FC8800.Command.Door.OpenDoor;
|
||||||
|
import Net.PC15.FC8800.Command.Door.Parameter.OpenDoor_Parameter;
|
||||||
|
import Net.PC15.FC8800.FC8800Identity;
|
||||||
|
import com.sv.intergration.DoorService;
|
||||||
|
|
||||||
|
public class OldDoorService implements DoorService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void enterOpenDoor() {
|
||||||
|
try {
|
||||||
|
logger.info("----init open door tcp ----");
|
||||||
|
ConnectorAllocator connector = ConnectorAllocator.GetAllocator();
|
||||||
|
TCPClientDetial tcpClientDetial = new TCPClientDetial("192.168.1.150", Integer.valueOf("8000"));
|
||||||
|
connector.GetCommandCount(tcpClientDetial);
|
||||||
|
connector.OpenForciblyConnect(tcpClientDetial);
|
||||||
|
CommandDetial detial = new CommandDetial();
|
||||||
|
detial.Connector = tcpClientDetial;
|
||||||
|
detial.Identity = new FC8800Identity("MC-5824T28085603", "FFFFFFFF", E_ControllerType.FC8900);
|
||||||
|
OpenDoor_Parameter openDoorParameter = new OpenDoor_Parameter(detial);
|
||||||
|
|
||||||
|
openDoorParameter.Door.SetDoor(1, 1);
|
||||||
|
OpenDoor openDoor = new OpenDoor(openDoorParameter);
|
||||||
|
boolean command = connector.AddCommand(openDoor);
|
||||||
|
if (openDoor.getIsTimeout()) {
|
||||||
|
logger.info("----open door timeout ----");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("----open door error ----", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void outOpenDoor() {
|
||||||
|
try {
|
||||||
|
logger.info("----init open door tcp ----");
|
||||||
|
ConnectorAllocator connector = ConnectorAllocator.GetAllocator();
|
||||||
|
TCPClientDetial tcpClientDetial = new TCPClientDetial("192.168.1.150", Integer.valueOf("8000"));
|
||||||
|
connector.GetCommandCount(tcpClientDetial);
|
||||||
|
connector.OpenForciblyConnect(tcpClientDetial);
|
||||||
|
CommandDetial detial = new CommandDetial();
|
||||||
|
detial.Connector = tcpClientDetial;
|
||||||
|
detial.Identity = new FC8800Identity("MC-5824T28085603", "FFFFFFFF", E_ControllerType.FC8900);
|
||||||
|
OpenDoor_Parameter openDoorParameter = new OpenDoor_Parameter(detial);
|
||||||
|
|
||||||
|
openDoorParameter.Door.SetDoor(2, 1);
|
||||||
|
OpenDoor openDoor = new OpenDoor(openDoorParameter);
|
||||||
|
boolean command = connector.AddCommand(openDoor);
|
||||||
|
if (openDoor.getIsTimeout()) {
|
||||||
|
logger.info("----open door timeout ----");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("----open door error ----", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
other/libs/FCardIO.jar
Normal file
BIN
other/libs/FCardIO.jar
Normal file
Binary file not shown.
@@ -1,2 +1,6 @@
|
|||||||
mvn install:install-file "-Dfile=framework-core-2.1.5.jar" "-DgroupId=com.ydd.framwork.core" "-DartifactId=framework-core" "-Dversion=2.1.5" "-Dpackaging=jar"
|
mvn install:install-file "-Dfile=framework-core-2.1.5.jar" "-DgroupId=com.ydd.framwork.core" "-DartifactId=framework-core" "-Dversion=2.1.5" "-Dpackaging=jar"
|
||||||
mvn install:install-file "-Dfile=wechat-base-1.0.47-RELEASE.jar" "-DgroupId=com.dw.ccm.wechat.base" "-DartifactId=wechat-base" "-Dversion=1.0.47-RELEASE" "-Dpackaging=jar"
|
mvn install:install-file "-Dfile=wechat-base-1.0.47-RELEASE.jar" "-DgroupId=com.dw.ccm.wechat.base" "-DartifactId=wechat-base" "-Dversion=1.0.47-RELEASE" "-Dpackaging=jar"
|
||||||
|
|
||||||
|
|
||||||
|
-- 老场地门禁API
|
||||||
|
mvn install:install-file "-Dfile=FCardIO.jar" "-DgroupId=net.pc15" "-DartifactId=fc-card" "-Dversion=1.0.0" "-Dpackaging=jar"
|
||||||
|
|||||||
Reference in New Issue
Block a user