wujian
2024-03-22 0ce25f34a0d627a5cc0d073d24b8c3e569feac15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
package com.jcdm.main.sc.stationConf.service.impl;
 
import java.net.InetAddress;
import java.util.List;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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 extends ServiceImpl<ScStationConfMapper,ScStationConf> 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;
    }
}