package com.xkrs.dao; import com.xkrs.model.entity.QcInspectionPictureEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface QcInspectionPictureDao extends JpaRepository, JpaSpecificationExecutor { /** * 查询图片信息 * * @param lotNo 批次号 * @param machineNo 机器号 * @param materialNo 物料号 * @param modelNo 模具号 * @param partNo 零件号 * @return */ @Query(value = "select * from qc_inspection_picture where lot_no = ?1 and machine_no = ?2 and material_no = ?3 and model_no = ?4 and part_no = ?5",nativeQuery = true) List selectPicture(String lotNo, String machineNo, String materialNo, String modelNo, String partNo); /** * 修改图片路径信息 * * @param lotNo 批次号 * @param machineNo 机器号 * @param materialNo 物料号 * @param modelNo 模具号 * @param partNo 零件号 * @param picturePath 图片路径 */ @Modifying(clearAutomatically = true) @Query(value = "update qc_inspection_picture set picture_path = ?6 where lot_no = ?1 and machine_no = ?2 and material_no = ?3 and model_no = ?4 and part_no = ?5",nativeQuery = true) void updatePicturePath(String lotNo, String machineNo, String materialNo, String modelNo, String partNo, String picturePath); }