package com.yeejoin.amos.boot.module.ugp.api.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Weld;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

/**
 * 焊口信息表 Mapper 接口
 *
 * @author system_generator
 * @date 2022-09-22
 */
@Mapper
public interface WeldMapper extends BaseMapper<Weld> {
   @Select ("select project_id,super_inspec_status from tz_ugp_weld where project_id =#{projectId}")
    List<WeldDto> select(Long projectId);

   @Select("SELECT * from tz_ugp_weld where code = #{code} and project_id =#{projectId}")
    Weld getWeldByCodeAndProjectId(String code,Long projectId);

     IPage<WeldDto> queryForWeldPage(IPage<WeldDto> page, Set<String> codes,@RequestBody(required = false) WeldDto weldDto) ;


    @Select("select * from tz_ugp_weld where `code` =#{code}")
    WeldDto getSqe(@Param("code") String code);

    List<Weld> getWeldList(String region,@Param("ids")Set<String> ids);

}
