地质所 沉降监测网建设项目
chenhuan
2024-05-21 259f95deb2ea38287d488d12060d7600c36cd92a
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
package com.javaweb.geo.service.impl;
 
import java.util.List;
 
import com.javaweb.common.utils.DateUtils;
import com.javaweb.common.utils.IdGenerate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.javaweb.geo.mapper.HoleLogMapper;
import com.javaweb.geo.domain.HoleLog;
import com.javaweb.geo.service.IHoleLogService;
import com.javaweb.common.core.text.Convert;
import org.springframework.util.ObjectUtils;
 
/**
 * 钻孔日志Service业务层处理
 *
 * @author cxy
 * @date 2024-05-21
 */
@Service
public class HoleLogServiceImpl implements IHoleLogService {
    @Autowired
    private HoleLogMapper holeLogMapper;
 
    /**
     * 查询钻孔日志
     *
     * @param id 钻孔日志ID
     * @return 钻孔日志
     */
    @Override
    public HoleLog selectHoleLogById(String id) {
        return holeLogMapper.selectHoleLogById(id);
    }
 
    /**
     * 查询钻孔日志列表
     *
     * @param holeLog 钻孔日志
     * @return 钻孔日志
     */
    @Override
    public List<HoleLog> selectHoleLogList(HoleLog holeLog) {
        return holeLogMapper.selectHoleLogList(holeLog);
    }
 
    /**
     * 新增钻孔日志
     *
     * @param holeLog 钻孔日志
     * @return 结果
     */
    @Override
    public int insertHoleLog(HoleLog holeLog) {
        if(ObjectUtils.isEmpty(holeLog.getId())){
            holeLog.setId(IdGenerate.nextId());
        }
        return holeLogMapper.insertHoleLog(holeLog);
    }
 
    /**
     * 修改钻孔日志
     *
     * @param holeLog 钻孔日志
     * @return 结果
     */
    @Override
    public int updateHoleLog(HoleLog holeLog) {
        return holeLogMapper.updateHoleLog(holeLog);
    }
 
    /**
     * 删除钻孔日志对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHoleLogByIds(String ids) {
        return holeLogMapper.deleteHoleLogByIds(Convert.toStrArray(ids));
    }
 
    /**
     * 删除钻孔日志信息
     *
     * @param id 钻孔日志ID
     * @return 结果
     */
    @Override
    public int deleteHoleLogById(String id) {
        return holeLogMapper.deleteHoleLogById(id);
    }
}