TInspectionDataServiceImpl.java 2.43 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
package com.zehong.system.service.impl;

import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInspectionDataMapper;
import com.zehong.system.domain.TInspectionData;
import com.zehong.system.service.ITInspectionDataService;

/**
 * 巡检记录Service业务层处理
 * 
 * @author zehong
15
 * @date 2021-07-21
16 17 18 19 20 21 22 23 24 25 26 27 28 29
 */
@Service
public class TInspectionDataServiceImpl implements ITInspectionDataService 
{
    @Autowired
    private TInspectionDataMapper tInspectionDataMapper;

    /**
     * 查询巡检记录
     * 
     * @param dataId 巡检记录ID
     * @return 巡检记录
     */
    @Override
30
    public TInspectionData selectTInspectionDataById(int dataId)
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
    {
        return tInspectionDataMapper.selectTInspectionDataById(dataId);
    }

    /**
     * 查询巡检记录列表
     * 
     * @param tInspectionData 巡检记录
     * @return 巡检记录
     */
    @Override
    public List<TInspectionData> selectTInspectionDataList(TInspectionData tInspectionData)
    {
        return tInspectionDataMapper.selectTInspectionDataList(tInspectionData);
    }

    /**
     * 新增巡检记录
     * 
     * @param tInspectionData 巡检记录
     * @return 结果
     */
    @Override
    public int insertTInspectionData(TInspectionData tInspectionData)
    {
        tInspectionData.setCreateTime(DateUtils.getNowDate());
        return tInspectionDataMapper.insertTInspectionData(tInspectionData);
    }

    /**
     * 修改巡检记录
     * 
     * @param tInspectionData 巡检记录
     * @return 结果
     */
    @Override
    public int updateTInspectionData(TInspectionData tInspectionData)
    {
69
        tInspectionData.setUpdateTime(DateUtils.getNowDate());
70 71 72 73 74 75 76 77 78 79
        return tInspectionDataMapper.updateTInspectionData(tInspectionData);
    }

    /**
     * 批量删除巡检记录
     * 
     * @param dataIds 需要删除的巡检记录ID
     * @return 结果
     */
    @Override
80
    public int deleteTInspectionDataByIds(int[] dataIds)
81 82 83 84 85 86 87 88 89 90 91
    {
        return tInspectionDataMapper.deleteTInspectionDataByIds(dataIds);
    }

    /**
     * 删除巡检记录信息
     * 
     * @param dataId 巡检记录ID
     * @return 结果
     */
    @Override
92
    public int deleteTInspectionDataById(int dataId)
93 94 95 96
    {
        return tInspectionDataMapper.deleteTInspectionDataById(dataId);
    }
}