bug修复
This commit is contained in:
parent
baab5cbf4a
commit
bfbf1b721a
@ -25,10 +25,10 @@ public class UDPServerApp {
|
|||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void startUdpApp() {
|
public void startUdpApp() {
|
||||||
if (port == null) {
|
if (port == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log.info("启动udp……");
|
log.info("启动udp中……");
|
||||||
Bootstrap bootstrap = new Bootstrap();
|
Bootstrap bootstrap = new Bootstrap();
|
||||||
EventLoopGroup workGroup = new NioEventLoopGroup();
|
EventLoopGroup workGroup = new NioEventLoopGroup();
|
||||||
bootstrap.group(workGroup).channel(NioDatagramChannel.class)
|
bootstrap.group(workGroup).channel(NioDatagramChannel.class)
|
||||||
@ -37,14 +37,15 @@ public class UDPServerApp {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initChannel(NioDatagramChannel ch) throws Exception {
|
protected void initChannel(NioDatagramChannel ch) throws Exception {
|
||||||
ch.pipeline().addLast(udpServerHandler);
|
ch.pipeline().addLast(udpServerHandler);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
Channel channel = bootstrap.bind("127.0.0.1", port).sync().channel();
|
Channel channel = bootstrap.bind("127.0.0.1", port).sync().channel();
|
||||||
//channel.closeFuture().sync().await();
|
//channel.closeFuture().sync().await();
|
||||||
|
log.info("启动udp成功……");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
log.error("udp启动err:", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
|
||||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||||
|
import com.zhgd.xmgl.enums.ParamEnum;
|
||||||
import com.zhgd.xmgl.modules.poisonous.entity.PoisonousGasDevCurrentData;
|
import com.zhgd.xmgl.modules.poisonous.entity.PoisonousGasDevCurrentData;
|
||||||
import com.zhgd.xmgl.modules.poisonous.service.IPoisonousGasDevCurrentDataService;
|
import com.zhgd.xmgl.modules.poisonous.service.IPoisonousGasDevCurrentDataService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -178,5 +178,10 @@ public class PoisonousGasDevCurrentDataController {
|
|||||||
return Result.success(poisonousGasDevCurrentDataService.countPoisonousGasDevCurrentDataGasType(paramMap));
|
return Result.success(poisonousGasDevCurrentDataService.countPoisonousGasDevCurrentDataGasType(paramMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取有毒气体类型列表", notes = "获取有毒气体类型列表")
|
||||||
|
@GetMapping(value = "/getPoisonousGasDevAlarmGasTypeEnum")
|
||||||
|
public Result<ParamEnum.PoisonousGasDevAlarmGasTypeEnum[]> getPoisonousGasDevAlarmGasTypeEnum() {
|
||||||
|
ParamEnum.PoisonousGasDevAlarmGasTypeEnum[] values = ParamEnum.PoisonousGasDevAlarmGasTypeEnum.values();
|
||||||
|
return Result.success(values);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user