TSafeEquipmentStandingBookServiceImpl.java 3.61 KB
Newer Older
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 99 100 101 102 103 104 105 106 107 108
package com.zehong.system.service.impl;

import java.util.List;
import java.util.Map;

import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.form.TSafeEquipmentStandingBookForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSafeEquipmentStandingBookMapper;
import com.zehong.system.domain.TSafeEquipmentStandingBook;
import com.zehong.system.service.ITSafeEquipmentStandingBookService;

/**
 * 用户加装安全装置台账Service业务层处理
 * 
 * @author zehong
 * @date 2022-02-09
 */
@Service
public class TSafeEquipmentStandingBookServiceImpl implements ITSafeEquipmentStandingBookService 
{
    @Autowired
    private TSafeEquipmentStandingBookMapper tSafeEquipmentStandingBookMapper;

    /**
     * 查询用户加装安全装置台账
     * 
     * @param safeEquipmentId 用户加装安全装置台账ID
     * @return 用户加装安全装置台账
     */
    @Override
    public TSafeEquipmentStandingBook selectTSafeEquipmentStandingBookById(Long safeEquipmentId)
    {
        return tSafeEquipmentStandingBookMapper.selectTSafeEquipmentStandingBookById(safeEquipmentId);
    }

    /**
     * 查询用户加装安全装置台账列表
     * 
     * @param tSafeEquipmentStandingBook 用户加装安全装置台账
     * @return 用户加装安全装置台账
     */
    @Override
    public List<TSafeEquipmentStandingBook> selectTSafeEquipmentStandingBookList(TSafeEquipmentStandingBookForm tSafeEquipmentStandingBook)
    {
        return tSafeEquipmentStandingBookMapper.selectTSafeEquipmentStandingBookList(tSafeEquipmentStandingBook);
    }

    /**
     * 新增用户加装安全装置台账
     * 
     * @param tSafeEquipmentStandingBook 用户加装安全装置台账
     * @return 结果
     */
    @Override
    public int insertTSafeEquipmentStandingBook(TSafeEquipmentStandingBook tSafeEquipmentStandingBook)
    {
        tSafeEquipmentStandingBook.setCreateTime(DateUtils.getNowDate());
        return tSafeEquipmentStandingBookMapper.insertTSafeEquipmentStandingBook(tSafeEquipmentStandingBook);
    }

    /**
     * 修改用户加装安全装置台账
     * 
     * @param tSafeEquipmentStandingBook 用户加装安全装置台账
     * @return 结果
     */
    @Override
    public int updateTSafeEquipmentStandingBook(TSafeEquipmentStandingBook tSafeEquipmentStandingBook)
    {
        tSafeEquipmentStandingBook.setUpdateTime(DateUtils.getNowDate());
        return tSafeEquipmentStandingBookMapper.updateTSafeEquipmentStandingBook(tSafeEquipmentStandingBook);
    }

    /**
     * 批量删除用户加装安全装置台账
     * 
     * @param safeEquipmentIds 需要删除的用户加装安全装置台账ID
     * @return 结果
     */
    @Override
    public int deleteTSafeEquipmentStandingBookByIds(Long[] safeEquipmentIds)
    {
        return tSafeEquipmentStandingBookMapper.deleteTSafeEquipmentStandingBookByIds(safeEquipmentIds);
    }
    @Override
    public List<Map<String,Object>> selectCountByYears()
    {
        return tSafeEquipmentStandingBookMapper.selectCountByYears();
    }
    @Override
    public List<Map<String,Object>> selectCountByUserType(){
        return tSafeEquipmentStandingBookMapper.selectCountByUserType();
    }

    /**
     * 删除用户加装安全装置台账信息
     * 
     * @param safeEquipmentId 用户加装安全装置台账ID
     * @return 结果
     */
    @Override
    public int deleteTSafeEquipmentStandingBookById(Long safeEquipmentId)
    {
        return tSafeEquipmentStandingBookMapper.deleteTSafeEquipmentStandingBookById(safeEquipmentId);
    }
}