package com.xkrs.dao; import com.xkrs.model.entity.QcInspectionPicture; 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.Component; import java.util.List; @Component public interface QcInspectionPictureDao extends JpaRepository, JpaSpecificationExecutor { /** * 查询图片信息 * * @param lotNo 批次号 * @param machineNo 机器号 * @param materialNo 物料号 * @param modelNo 模具号 * @param partNo 零件号 * @return */ @Query(value = "from QcInspectionPicture where lotNo = ?1 and machineNo = ?2 and materialNo = ?3 and modelNo = ?4 and partNo = ?5") 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 QcInspectionPicture set picturePath = ?6 where lotNo = ?1 and machineNo = ?2 and materialNo = ?3 and modelNo = ?4 and partNo = ?5") void updatePicturePath(String lotNo, String machineNo, String materialNo, String modelNo, String partNo, String picturePath); }