package org.jeecg.modules.checkData.dynamicStaticGeometricData.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItem;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetail;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetailVO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemVO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.mapper.RailInspectionEquipmentItemDetailMapper;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.mapper.RailInspectionEquipmentItemMapper;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.service.IRailInspectionEquipmentItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

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

/**
 * <p>
 * 检查数据-动静态几何尺寸数据-轨检仪静态检查数据-检查项目 服务实现类
 * </p>
 *
 * @author hkl
 * @since 2023-07-16
 */
@Service
public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInspectionEquipmentItemMapper, RailInspectionEquipmentItem> implements IRailInspectionEquipmentItemService {

    @Resource
    private RailInspectionEquipmentItemDetailMapper railInspectionEquipmentItemDetailMapper;

    @Override
    public List<RailInspectionEquipmentItemVO> queryList(String railInspectionEquipmentId) {
        return this.baseMapper.queryList(railInspectionEquipmentId);
    }

    @Override
    public void uploadFile(String railInspectionEquipmentId, MultipartFile file) {
        throw new NullPointerException();
    }

    @Override
    public List<RailInspectionEquipmentItemDetailVO> detailList(String railInspectionEquipmentItemId) {
        LambdaQueryWrapper<RailInspectionEquipmentItemDetail> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(RailInspectionEquipmentItemDetail::getRailInspectionEquipmentItemId,railInspectionEquipmentItemId);


        List<RailInspectionEquipmentItemDetail> itemDetails = railInspectionEquipmentItemDetailMapper.selectList(lambdaQueryWrapper);

        return null;
    }
}
