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;
|
import org.springframework.stereotype.Service;
|
import com.jcdm.main.sc.stationConf.mapper.ScStationConfMapper;
|
import com.jcdm.main.sc.stationConf.domain.ScStationConf;
|
import com.jcdm.main.sc.stationConf.service.IScStationConfService;
|
|
/**
|
* 工位终端配置Service业务层处理
|
*
|
* @author Yi
|
* @date 2024-01-06
|
*/
|
@Service
|
public class ScStationConfServiceImpl implements IScStationConfService
|
{
|
@Autowired
|
private ScStationConfMapper scStationConfMapper;
|
|
/**
|
* 查询工位终端配置
|
*
|
* @param id 工位终端配置主键
|
* @return 工位终端配置
|
*/
|
@Override
|
public ScStationConf selectScStationConfById(Long id)
|
{
|
return scStationConfMapper.selectScStationConfById(id);
|
}
|
|
/**
|
* 查询工位终端配置列表
|
*
|
* @param scStationConf 工位终端配置
|
* @return 工位终端配置
|
*/
|
@Override
|
public List<ScStationConf> selectScStationConfList(ScStationConf scStationConf)
|
{
|
return scStationConfMapper.selectScStationConfList(scStationConf);
|
}
|
|
/**
|
* 新增工位终端配置
|
*
|
* @param scStationConf 工位终端配置
|
* @return 结果
|
*/
|
@Override
|
public int insertScStationConf(ScStationConf scStationConf)
|
{
|
scStationConf.setCreateTime(DateUtils.getNowDate());
|
return scStationConfMapper.insertScStationConf(scStationConf);
|
}
|
|
/**
|
* 修改工位终端配置
|
*
|
* @param scStationConf 工位终端配置
|
* @return 结果
|
*/
|
@Override
|
public int updateScStationConf(ScStationConf scStationConf)
|
{
|
scStationConf.setUpdateTime(DateUtils.getNowDate());
|
return scStationConfMapper.updateScStationConf(scStationConf);
|
}
|
|
/**
|
* 批量删除工位终端配置
|
*
|
* @param ids 需要删除的工位终端配置主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteScStationConfByIds(Long[] ids)
|
{
|
return scStationConfMapper.deleteScStationConfByIds(ids);
|
}
|
|
/**
|
* 删除工位终端配置信息
|
*
|
* @param id 工位终端配置主键
|
* @return 结果
|
*/
|
@Override
|
public int deleteScStationConfById(Long id)
|
{
|
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;
|
}
|
}
|