package com.xkrs.dao; import com.xkrs.model.entity.PictureEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Component; import java.util.Optional; /** * @Author: XinYi Song * @Date: 2022/1/19 16:41 */ @Component public interface PictureDao extends JpaRepository, JpaSpecificationExecutor { /** * 查询图片信息 * * @param lotNo 批次号 * @param machineNo 机器号 * @param materialNo 物料号 * @param modelNo 模具号 * @param machineTypeNo 机种号 * @param craftItemName 工艺项目名称 * @return */ @Query(value = "SELECT * FROM qc_inspection_picture WHERE lot_no = ? AND machine_no = ? AND material_no = ? AND model_no = ? AND machine_type_no = ? AND craft_item_name = ? ", nativeQuery = true) Optional selectPicture(String lotNo, String machineNo, String materialNo, String modelNo, String machineTypeNo, String craftItemName); }