DeviceLocationService.java
1.63 KB
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
package cn.com.glsx.stdinterface.modules.service;
import cn.com.glsx.stdinterface.dto.DeviceLocationDto;
import cn.com.glsx.stdinterface.modules.mapper.DeviceLocationMapper;
import cn.com.glsx.stdinterface.modules.model.LocationCheckBO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collection;
import java.util.List;
/**
* 设备上点 serviceImpl
*
* @author yll
*/
@Slf4j
@Service
public class DeviceLocationService {
@Autowired
private DeviceLocationMapper deviceLocationMapper;
/**
* 插入或者更新设备上点数据
*
* @param deviceLocationDtoList
*/
public void dropLibrary(Collection<DeviceLocationDto> deviceLocationDtoList) {
try {
Integer num = deviceLocationMapper.batchInsertOrUpdate(deviceLocationDtoList);
log.info("saveOrUpdateDeviceLocationData===" + num);
} catch (Exception e) {
log.error("saveOrUpdateDeviceLocationData===" + e.getMessage());
e.printStackTrace();
}
}
/**
* 获取E盾中的所有设备号集合
*
* @return
*/
public List<String> getAllSnInNewEshield() {
return deviceLocationMapper.selectAllSn();
}
/**
* 获取E盾中的所有上点数据集合
*
* @return
*/
public List<DeviceLocationDto> getAllDeviceLocationData() {
return deviceLocationMapper.getAllDeviceLocationData();
}
/**
* 位置验证
*
* @param checkBO
*/
public void locationCheck(LocationCheckBO checkBO) {
}
}