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