bug修复
This commit is contained in:
parent
baab5cbf4a
commit
bfbf1b721a
@ -25,10 +25,10 @@ public class UDPServerApp {
|
||||
|
||||
@PostConstruct
|
||||
public void startUdpApp() {
|
||||
if (port == null) {
|
||||
return;
|
||||
}
|
||||
log.info("启动udp……");
|
||||
if (port == null) {
|
||||
return;
|
||||
}
|
||||
log.info("启动udp中……");
|
||||
Bootstrap bootstrap = new Bootstrap();
|
||||
EventLoopGroup workGroup = new NioEventLoopGroup();
|
||||
bootstrap.group(workGroup).channel(NioDatagramChannel.class)
|
||||
@ -37,14 +37,15 @@ public class UDPServerApp {
|
||||
|
||||
@Override
|
||||
protected void initChannel(NioDatagramChannel ch) throws Exception {
|
||||
ch.pipeline().addLast(udpServerHandler);
|
||||
ch.pipeline().addLast(udpServerHandler);
|
||||
}
|
||||
});
|
||||
try {
|
||||
Channel channel = bootstrap.bind("127.0.0.1", port).sync().channel();
|
||||
//channel.closeFuture().sync().await();
|
||||
log.info("启动udp成功……");
|
||||
} 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.zhgd.jeecg.common.api.vo.Result;
|
||||
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.enums.ParamEnum;
|
||||
import com.zhgd.xmgl.modules.poisonous.entity.PoisonousGasDevCurrentData;
|
||||
import com.zhgd.xmgl.modules.poisonous.service.IPoisonousGasDevCurrentDataService;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -178,5 +178,10 @@ public class PoisonousGasDevCurrentDataController {
|
||||
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