package com.ruoyi.wzCk.ckDetail.service.impl;

import java.util.List;

import com.ruoyi.wzCk.ckDetail.domain.WzOutboundOrderB;
import com.ruoyi.wzCk.ckDetail.mapper.WzOutboundOrderBMapper;
import com.ruoyi.wzCk.ckDetail.service.IWzOutboundOrderBService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 物资出库明细_基础数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class WzOutboundOrderBServiceImpl implements IWzOutboundOrderBService
{
    @Autowired
    private WzOutboundOrderBMapper wzOutboundOrderBMapper;

    /**
     * 查询物资出库明细_基础数据
     * 
     * @param id 物资出库明细_基础数据主键
     * @return 物资出库明细_基础数据
     */
    @Override
    public WzOutboundOrderB selectWzOutboundOrderBById(Long id)
    {
        return wzOutboundOrderBMapper.selectWzOutboundOrderBById(id);
    }

    /**
     * 查询物资出库明细_基础数据列表
     * 
     * @param wzOutboundOrderB 物资出库明细_基础数据
     * @return 物资出库明细_基础数据
     */
    @Override
    public List<WzOutboundOrderB> selectWzOutboundOrderBList(WzOutboundOrderB wzOutboundOrderB)
    {
        return wzOutboundOrderBMapper.selectWzOutboundOrderBList(wzOutboundOrderB);
    }

    /**
     * 新增物资出库明细_基础数据
     * 
     * @param wzOutboundOrderB 物资出库明细_基础数据
     * @return 结果
     */
    @Override
    public int insertWzOutboundOrderB(WzOutboundOrderB wzOutboundOrderB)
    {
        return wzOutboundOrderBMapper.insertWzOutboundOrderB(wzOutboundOrderB);
    }

    /**
     * 修改物资出库明细_基础数据
     * 
     * @param wzOutboundOrderB 物资出库明细_基础数据
     * @return 结果
     */
    @Override
    public int updateWzOutboundOrderB(WzOutboundOrderB wzOutboundOrderB)
    {
        return wzOutboundOrderBMapper.updateWzOutboundOrderB(wzOutboundOrderB);
    }

    /**
     * 批量删除物资出库明细_基础数据
     * 
     * @param ids 需要删除的物资出库明细_基础数据主键
     * @return 结果
     */
    @Override
    public int deleteWzOutboundOrderBByIds(Long[] ids)
    {
        return wzOutboundOrderBMapper.deleteWzOutboundOrderBByIds(ids);
    }

    /**
     * 删除物资出库明细_基础数据信息
     * 
     * @param id 物资出库明细_基础数据主键
     * @return 结果
     */
    @Override
    public int deleteWzOutboundOrderBById(Long id)
    {
        return wzOutboundOrderBMapper.deleteWzOutboundOrderBById(id);
    }

    /**
     * 获取项目成本的组成部分，根据任务号查询物资出库单信息组成材料费
     *
     * @param taskno 任务号
     * @return 结果
     */
    @Override
    public List<WzOutboundOrderB> selectProjectCostFromCkDetailByTaskNo(String taskno) {
        return wzOutboundOrderBMapper.selectProjectCostFromCkDetailByTaskNo(taskno);
    }

    /**
     * 获取项目成本的组成部分，根据出库单号查询物资出库单信息组成材料费
     *
     * @param ckdh 出库单号
     * @return 结果
     */
    @Override
    public List<WzOutboundOrderB> selectProjectCostFromCkDetailByCkdh(String ckdh) {
        return wzOutboundOrderBMapper.selectProjectCostFromCkDetailByCkdh(ckdh);
    }

    /**
     * 根据出库单号查询对应的物资出库单信息总条数
     *
     * @param ckdh 出库单号
     * @return 结果
     */
    @Override
    public Integer getCkDetailDataCountByCkdh(String ckdh) {
        return wzOutboundOrderBMapper.getCkDetailDataCountByCkdh(ckdh);
    }
}
