From 49ac5ceb9f6b2e065e5d1c61aad2de63399304e1 Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期一, 08 一月 2024 15:58:30 +0800 Subject: [PATCH] 工位终端优化 --- jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/impl/ScStationConfServiceImpl.java | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/impl/ScStationConfServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/impl/ScStationConfServiceImpl.java index f29f9d5..c269781 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/impl/ScStationConfServiceImpl.java +++ b/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/service/impl/ScStationConfServiceImpl.java @@ -1,5 +1,6 @@ package com.jcdm.main.sc.stationConf.service.impl; +import java.net.InetAddress; import java.util.List; import com.jcdm.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -93,4 +94,16 @@ { return scStationConfMapper.deleteScStationConfById(id); } + + @Override + public String getIpv4() { + String ipv4 = ""; + try { + InetAddress localhost = InetAddress.getLocalHost(); + ipv4 = localhost.getHostAddress(); + } catch (Exception ex) { + ex.printStackTrace(); + } + return ipv4; + } } -- Gitblit v1.9.3