package com.fidms.web.service.impl;

import java.util.List;
import com.fidms.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fidms.web.mapper.FlowFieldOutputMapper;
import com.fidms.web.domain.FlowFieldOutput;
import com.fidms.web.service.IFlowFieldOutputService;

/**
 * 流场输出Service业务层处理
 * 
 * @author Allen
 * @date 2023-05-08
 */
@Service
public class FlowFieldOutputServiceImpl implements IFlowFieldOutputService 
{
    @Autowired
    private FlowFieldOutputMapper flowFieldOutputMapper;

    /**
     * 查询流场输出
     * 
     * @param id 流场输出主键
     * @return 流场输出
     */
    @Override
    public FlowFieldOutput selectFlowFieldOutputById(Long id)
    {
        return flowFieldOutputMapper.selectFlowFieldOutputById(id);
    }

    /**
     * 查询流场输出列表
     * 
     * @param flowFieldOutput 流场输出
     * @return 流场输出
     */
    @Override
    public List<FlowFieldOutput> selectFlowFieldOutputList(FlowFieldOutput flowFieldOutput)
    {
        return flowFieldOutputMapper.selectFlowFieldOutputList(flowFieldOutput);
    }

    /**
     * 新增流场输出
     * 
     * @param flowFieldOutput 流场输出
     * @return 结果
     */
    @Override
    public int insertFlowFieldOutput(FlowFieldOutput flowFieldOutput)
    {
        flowFieldOutput.setCreateTime(DateUtils.getNowDate());
        flowFieldOutput.setUpdateTime(DateUtils.getNowDate());
        return flowFieldOutputMapper.insertFlowFieldOutput(flowFieldOutput);
    }

    /**
     * 修改流场输出
     * 
     * @param flowFieldOutput 流场输出
     * @return 结果
     */
    @Override
    public int updateFlowFieldOutput(FlowFieldOutput flowFieldOutput)
    {
        flowFieldOutput.setUpdateTime(DateUtils.getNowDate());
        return flowFieldOutputMapper.updateFlowFieldOutput(flowFieldOutput);
    }

    /**
     * 批量删除流场输出
     * 
     * @param ids 需要删除的流场输出主键
     * @return 结果
     */
    @Override
    public int deleteFlowFieldOutputByIds(Long[] ids)
    {
        return flowFieldOutputMapper.deleteFlowFieldOutputByIds(ids);
    }

    /**
     * 删除流场输出信息
     * 
     * @param id 流场输出主键
     * @return 结果
     */
    @Override
    public int deleteFlowFieldOutputById(Long id)
    {
        return flowFieldOutputMapper.deleteFlowFieldOutputById(id);
    }

    @Override
    public List getFlowFieldOutputOption(){return flowFieldOutputMapper.getFlowOutputOption();}
}
