zhangnaisong
2023-10-05 b8bb71260434558a94a61b7e24c6a0895949d102
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
package com.ruoyi.plan.service.impl;
 
import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
 
import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.plan.mapper.ArdEplanMapper;
import com.ruoyi.plan.domain.ArdEplan;
import com.ruoyi.plan.service.IArdEplanService;
 
/**
 * 应急预案Service业务层处理
 *
 * @author ard
 * @date 2023-10-05
 */
@Service
public class ArdEplanServiceImpl implements IArdEplanService {
    @Autowired
    private ArdEplanMapper ardEplanMapper;
 
    /**
     * 查询应急预案
     *
     * @param id 应急预案主键
     * @return 应急预案
     */
    @Override
    public ArdEplan selectArdEplanById(String id) {
        return ardEplanMapper.selectArdEplanById(id);
    }
 
    /**
     * 查询应急预案列表
     *
     * @param ardEplan 应急预案
     * @return 应急预案
     */
    @Override
    public List<ArdEplan> selectArdEplanList(ArdEplan ardEplan) {
        return ardEplanMapper.selectArdEplanList(ardEplan);
    }
 
    /**
     * 新增应急预案
     *
     * @param ardEplan 应急预案
     * @return 结果
     */
    @Override
    public int insertArdEplan(ArdEplan ardEplan) {
                ardEplan.setId(IdUtils.simpleUUID());
                ardEplan.setUserId(SecurityUtils.getUserId());
                ardEplan.setCreateBy(SecurityUtils.getUsername());
                ardEplan.setCreateTime(DateUtils.getNowDate());
            return ardEplanMapper.insertArdEplan(ardEplan);
    }
 
    /**
     * 修改应急预案
     *
     * @param ardEplan 应急预案
     * @return 结果
     */
    @Override
    public int updateArdEplan(ArdEplan ardEplan) {
                ardEplan.setUpdateBy(SecurityUtils.getUsername());
                ardEplan.setUpdateTime(DateUtils.getNowDate());
        return ardEplanMapper.updateArdEplan(ardEplan);
    }
 
    /**
     * 批量删除应急预案
     *
     * @param ids 需要删除的应急预案主键
     * @return 结果
     */
    @Override
    public int deleteArdEplanByIds(String[] ids) {
        return ardEplanMapper.deleteArdEplanByIds(ids);
    }
 
    /**
     * 删除应急预案信息
     *
     * @param id 应急预案主键
     * @return 结果
     */
    @Override
    public int deleteArdEplanById(String id) {
        return ardEplanMapper.deleteArdEplanById(id);
    }
}