package com.rongwei.bscommon.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rongwei.bscommon.sys.dao.EquLubricationTaskDetailMapperDao;
import com.rongwei.bscommon.sys.service.EquLubricationTaskDetailService;
import com.rongwei.bsentity.domain.EquLubricationTaskDetailDo;
import com.rongwei.bsentity.domain.EquLubricationTaskDetailVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 设备子系统——润滑明细 服务实现类
 * </p>
 *
 * @author fpy
 * @since 2024-01-12
 */
@Service
public class EquLubricationTaskDetailServiceImpl extends ServiceImpl<EquLubricationTaskDetailMapperDao, EquLubricationTaskDetailDo> implements EquLubricationTaskDetailService {

    @Autowired
    private EquLubricationTaskDetailMapperDao equLubricationTaskDetailMapperDao;

    @Override
    public List<EquLubricationTaskDetailVo> queryAllTaskDetailList(String tenantId) {
        return equLubricationTaskDetailMapperDao.queryAllTaskDetailList(tenantId);
    }

    @Override
    public List<EquLubricationTaskDetailDo> getDetailByMasterId(List<String> lubricationIds) {
        LambdaQueryWrapper<EquLubricationTaskDetailDo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.in(EquLubricationTaskDetailDo::getMasterid,lubricationIds);
        return equLubricationTaskDetailMapperDao.selectList(queryWrapper);
    }
}
