|
@@ -15,6 +15,7 @@ import com.zd.laboratory.netty.NettyPushMsgService;
|
|
|
import com.zd.laboratory.service.ILabExitPointRelayService;
|
|
import com.zd.laboratory.service.ILabExitPointRelayService;
|
|
|
import com.zd.laboratory.socket.command.Symbol;
|
|
import com.zd.laboratory.socket.command.Symbol;
|
|
|
import com.zd.laboratory.socket.service.SocketService;
|
|
import com.zd.laboratory.socket.service.SocketService;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
@@ -28,6 +29,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
* @author cyl
|
|
* @author cyl
|
|
|
* @date 2022/11/11
|
|
* @date 2022/11/11
|
|
|
*/
|
|
*/
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
@Service
|
|
|
public class LabExitPointRelayServiceImpl implements ILabExitPointRelayService {
|
|
public class LabExitPointRelayServiceImpl implements ILabExitPointRelayService {
|
|
|
|
|
|
|
@@ -99,7 +101,7 @@ public class LabExitPointRelayServiceImpl implements ILabExitPointRelayService {
|
|
|
String commandStr = RelayConstants.AT_STACH + relay.getRelayBit() + "=" + RelayConstants.AT_OPEN + RelayConstants.SPACE_WRAP;
|
|
String commandStr = RelayConstants.AT_STACH + relay.getRelayBit() + "=" + RelayConstants.AT_OPEN + RelayConstants.SPACE_WRAP;
|
|
|
NettyPushMsgService.push(relayCode, commandStr.getBytes());
|
|
NettyPushMsgService.push(relayCode, commandStr.getBytes());
|
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
|
- //e.printStackTrace();
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
boolean flag = true;
|
|
boolean flag = true;
|
|
@@ -120,7 +122,7 @@ public class LabExitPointRelayServiceImpl implements ILabExitPointRelayService {
|
|
|
lightPointSet.add(lineJoinPointVO);
|
|
lightPointSet.add(lineJoinPointVO);
|
|
|
}
|
|
}
|
|
|
} catch (InterruptedException e) {
|
|
} catch (InterruptedException e) {
|
|
|
- //e.printStackTrace();
|
|
|
|
|
|
|
+ log.error("异常信息:", e);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
relayListMap.put("lightPointSet",lightPointSet);
|
|
relayListMap.put("lightPointSet",lightPointSet);
|
|
@@ -162,7 +164,7 @@ public class LabExitPointRelayServiceImpl implements ILabExitPointRelayService {
|
|
|
String commandStr = RelayConstants.AT_STACH + relay.getRelayBit() + "=" + RelayConstants.AT_CLOSE + RelayConstants.SPACE_WRAP;
|
|
String commandStr = RelayConstants.AT_STACH + relay.getRelayBit() + "=" + RelayConstants.AT_CLOSE + RelayConstants.SPACE_WRAP;
|
|
|
NettyPushMsgService.push(relayCode, commandStr.getBytes());
|
|
NettyPushMsgService.push(relayCode, commandStr.getBytes());
|
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
|
- //e.printStackTrace();
|
|
|
|
|
|
|
+ log.error("异常信息:", e);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if(lightPointSet!=null && lightPointSet.size()>0){
|
|
if(lightPointSet!=null && lightPointSet.size()>0){
|
|
@@ -174,7 +176,7 @@ public class LabExitPointRelayServiceImpl implements ILabExitPointRelayService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} catch (InterruptedException e) {
|
|
} catch (InterruptedException e) {
|
|
|
- //e.printStackTrace();
|
|
|
|
|
|
|
+ log.error("异常信息:", e);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
relayListMap.put("lightPointSet",newLightPointSet);
|
|
relayListMap.put("lightPointSet",newLightPointSet);
|