package com.dcs.hnyz.service.impl;

import java.util.List;
import com.dcs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dcs.hnyz.mapper.DcsGroupTaskLineMapper;
import com.dcs.hnyz.domain.DcsGroupTaskLine;
import com.dcs.hnyz.service.IDcsGroupTaskLineService;

/**
 * 任务动作组明细Service业务层处理
 *
 * @author wuhb
 * @date 2025-08-04
 */
@Service
public class DcsGroupTaskLineServiceImpl implements IDcsGroupTaskLineService
{
    @Autowired
    private DcsGroupTaskLineMapper dcsGroupTaskLineMapper;

    /**
     * 查询任务动作组明细
     *
     * @param lineId 任务动作组明细主键
     * @return 任务动作组明细
     */
    @Override
    public DcsGroupTaskLine selectDcsGroupTaskLineByLineId(Long lineId)
    {
        return dcsGroupTaskLineMapper.selectDcsGroupTaskLineByLineId(lineId);
    }

    /**
     * 查询任务动作组明细列表
     *
     * @param dcsGroupTaskLine 任务动作组明细
     * @return 任务动作组明细
     */
    @Override
    public List<DcsGroupTaskLine> selectDcsGroupTaskLineList(DcsGroupTaskLine dcsGroupTaskLine)
    {
        return dcsGroupTaskLineMapper.selectDcsGroupTaskLineList(dcsGroupTaskLine);
    }

    /**
     * 新增任务动作组明细
     *
     * @param dcsGroupTaskLine 任务动作组明细
     * @return 结果
     */
    @Override
    public int insertDcsGroupTaskLine(DcsGroupTaskLine dcsGroupTaskLine)
    {
        dcsGroupTaskLine.setCreateTime(DateUtils.getNowDate());
        return dcsGroupTaskLineMapper.insertDcsGroupTaskLine(dcsGroupTaskLine);
    }

    /**
     * 修改任务动作组明细
     *
     * @param dcsGroupTaskLine 任务动作组明细
     * @return 结果
     */
    @Override
    public int updateDcsGroupTaskLine(DcsGroupTaskLine dcsGroupTaskLine)
    {
        dcsGroupTaskLine.setUpdateTime(DateUtils.getNowDate());
        return dcsGroupTaskLineMapper.updateDcsGroupTaskLine(dcsGroupTaskLine);
    }

    /**
     * 批量删除任务动作组明细
     *
     * @param lineIds 需要删除的任务动作组明细主键
     * @return 结果
     */
    @Override
    public int deleteDcsGroupTaskLineByLineIds(Long[] lineIds)
    {
        return dcsGroupTaskLineMapper.deleteDcsGroupTaskLineByLineIds(lineIds);
    }

    /**
     * 删除任务动作组明细信息
     *
     * @param lineId 任务动作组明细主键
     * @return 结果
     */
    @Override
    public int deleteDcsGroupTaskLineByLineId(Long lineId)
    {
        return dcsGroupTaskLineMapper.deleteDcsGroupTaskLineByLineId(lineId);
    }
}
