Commit 1559d160 authored by wanghao's avatar wanghao

1 扫托盘 上料 测试

parent ae6876e7
package com.zehong.system.service.impl;
import java.net.SocketAddress;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;
import com.serotonin.modbus4j.ModbusMaster;
import com.serotonin.modbus4j.exception.ErrorResponseException;
import com.serotonin.modbus4j.exception.ModbusInitException;
......@@ -15,16 +8,22 @@ import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TEquipmentInfo;
import com.zehong.system.domain.TStoreyInfo;
import com.zehong.system.mapper.TEquipmentInfoMapper;
import com.zehong.system.mapper.TStoreyInfoMapper;
import com.zehong.system.modbus.util.Modbus4jUtils;
import com.zehong.system.service.IRobotArmCommandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TStoreyInfoMapper;
import com.zehong.system.domain.TStoreyInfo;
import com.zehong.system.service.ITStoreyInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;
/**
* 老化层信息Service业务层处理
......@@ -35,6 +34,7 @@ import javax.annotation.Resource;
@Service
public class TStoreyInfoServiceImpl implements ITStoreyInfoService
{
public static final Logger log = LoggerFactory.getLogger(TStoreyInfoServiceImpl.class);
@Resource
private TStoreyInfoMapper tStoreyInfoMapper;
......@@ -201,6 +201,7 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
}
}
} catch (ModbusInitException | ModbusTransportException | ErrorResponseException e) {
log.info("equipmentinfo -> ip = {} port = {}" + equipmentInfo.getfPowerOutageIp(), equipmentInfo.getfPowerOutagePort());
throw new RuntimeException(e);
} finally {
// 建议在这里关闭master连接,避免资源泄露
......@@ -284,6 +285,7 @@ public class TStoreyInfoServiceImpl implements ITStoreyInfoService
}
}
} catch (ModbusInitException | ModbusTransportException | ErrorResponseException e) {
log.info("equipmentinfo -> ip = {} port = {}" + equipmentInfo.getfPowerOutageIp(), equipmentInfo.getfPowerOutagePort());
throw new RuntimeException(e);
} finally {
// 建议在这里关闭master连接,避免资源泄露
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment