wujian
2024-03-22 0ce25f34a0d627a5cc0d073d24b8c3e569feac15
提交 | 用户 | 时间
e57a89 1 package com.jcdm.main.sc.stationConf.service.impl;
2
3 import java.net.InetAddress;
4 import java.util.List;
0ce25f 5
W 6 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
e57a89 7 import com.jcdm.common.utils.DateUtils;
8 import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Service;
10 import com.jcdm.main.sc.stationConf.mapper.ScStationConfMapper;
11 import com.jcdm.main.sc.stationConf.domain.ScStationConf;
12 import com.jcdm.main.sc.stationConf.service.IScStationConfService;
13
14 /**
15  * 工位终端配置Service业务层处理
16  * 
17  * @author Yi
18  * @date 2024-01-06
19  */
20 @Service
0ce25f 21 public class ScStationConfServiceImpl extends ServiceImpl<ScStationConfMapper,ScStationConf> implements IScStationConfService
e57a89 22 {
23     @Autowired
24     private ScStationConfMapper scStationConfMapper;
25
26     /**
27      * 查询工位终端配置
28      * 
29      * @param id 工位终端配置主键
30      * @return 工位终端配置
31      */
32     @Override
33     public ScStationConf selectScStationConfById(Long id)
34     {
35         return scStationConfMapper.selectScStationConfById(id);
36     }
37
38     /**
39      * 查询工位终端配置列表
40      * 
41      * @param scStationConf 工位终端配置
42      * @return 工位终端配置
43      */
44     @Override
45     public List<ScStationConf> selectScStationConfList(ScStationConf scStationConf)
46     {
47         return scStationConfMapper.selectScStationConfList(scStationConf);
48     }
49
50     /**
51      * 新增工位终端配置
52      * 
53      * @param scStationConf 工位终端配置
54      * @return 结果
55      */
56     @Override
57     public int insertScStationConf(ScStationConf scStationConf)
58     {
59         scStationConf.setCreateTime(DateUtils.getNowDate());
60         return scStationConfMapper.insertScStationConf(scStationConf);
61     }
62
63     /**
64      * 修改工位终端配置
65      * 
66      * @param scStationConf 工位终端配置
67      * @return 结果
68      */
69     @Override
70     public int updateScStationConf(ScStationConf scStationConf)
71     {
72         scStationConf.setUpdateTime(DateUtils.getNowDate());
73         return scStationConfMapper.updateScStationConf(scStationConf);
74     }
75
76     /**
77      * 批量删除工位终端配置
78      * 
79      * @param ids 需要删除的工位终端配置主键
80      * @return 结果
81      */
82     @Override
83     public int deleteScStationConfByIds(Long[] ids)
84     {
85         return scStationConfMapper.deleteScStationConfByIds(ids);
86     }
87
88     /**
89      * 删除工位终端配置信息
90      * 
91      * @param id 工位终端配置主键
92      * @return 结果
93      */
94     @Override
95     public int deleteScStationConfById(Long id)
96     {
97         return scStationConfMapper.deleteScStationConfById(id);
98     }
99
100     @Override
101     public String getIpv4() {
102         String ipv4 = "";
103         try {
104             InetAddress localhost = InetAddress.getLocalHost();
105             ipv4 = localhost.getHostAddress();
106         } catch (Exception ex) {
107             ex.printStackTrace();
108         }
109         return ipv4;
110     }
111 }