package cn.ezhizao.project.business.service.impl;

import cn.ezhizao.project.business.domain.BizCarrier;
import cn.ezhizao.project.business.domain.BizDaywork;
import cn.ezhizao.project.business.domain.BizDayworkItem;
import cn.ezhizao.project.business.mapper.BizDayworkMapper;
import cn.ezhizao.project.business.service.IBizDayworkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;


/**
 * 报工Service业务层处理
 *
 * @author ezhizao
 * @date 2023-11-29
 */
@Service
public class BizDayworkServiceImpl extends ServiceImpl<BizDayworkMapper, BizDaywork> implements IBizDayworkService {
    @Resource
    private BizDayworkMapper bizDayworkMapper;

    /**
     * 查询报工列表
     *
     * @param bizDaywork 报工
     * @return 报工
     */
    @Override
    public List<BizDaywork> getList(BizDaywork bizDaywork) {
        return bizDayworkMapper.getList(bizDaywork);
    }

    @Override
    public BizDaywork getDayworkInfoById(BizDaywork bizDaywork) {
        return bizDayworkMapper.getDayworkInfoById(bizDaywork);
    }

    /**
     * 物理删除
     * @param bizDaywork
     * @return 删除结果
     */
    @Override
    public int physicalDelete(BizDaywork bizDaywork) {
        return bizDayworkMapper.physicalDelete(bizDaywork);
    }

    @Override
    public int turnoverDelete(BizDaywork bizDaywork) {
        return bizDayworkMapper.turnoverDelete(bizDaywork);
    }

    @Override
    public List<BizCarrier> getAvailableCarrierList(BizCarrier bizCarrier) {
        return bizDayworkMapper.getAvailableCarrierList(bizCarrier);
    }

    @Override
    public BizDaywork getLotInfo(BizDaywork daywork) {
        return bizDayworkMapper.getLotInfo(daywork);
    }

    @Override
    public Integer getLotNumber(Long productionPlanDetailId) {
        return bizDayworkMapper.getLotNumber(productionPlanDetailId);
    }

    @Override
    public Integer getdayworkNum(Long productionPlanDetailId) {
        return bizDayworkMapper.getdayworkNum(productionPlanDetailId);
    }


}
