2022-02-12 08:48:57 +08:00
package com.xkrs.dao ;
2022-02-28 13:55:17 +08:00
import com.xkrs.model.entity.QcInspectionPicture ;
2022-02-12 08:48:57 +08:00
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 ;
2022-02-28 15:44:43 +08:00
import java.util.List ;
2022-02-12 08:48:57 +08:00
@Component
2022-02-28 13:55:17 +08:00
public interface QcInspectionPictureDao extends JpaRepository < QcInspectionPicture , Long > , JpaSpecificationExecutor < QcInspectionPicture > {
2022-02-12 08:48:57 +08:00
/ * *
2022-02-28 15:44:43 +08:00
* 查询图片信息
2022-02-28 13:55:17 +08:00
*
2022-02-28 15:44:43 +08:00
* @param lotNo 批次号
* @param machineNo 机器号
* @param materialNo 物料号
* @param modelNo 模具号
* @param partNo 零件号
2022-02-12 08:48:57 +08:00
* @return
* /
2022-02-28 15:44:43 +08:00
@Query ( value = " from QcInspectionPicture where lotNo = ?1 and machineNo = ?2 and materialNo = ?3 and modelNo = ?4 and partNo = ?5 " )
List < QcInspectionPicture > selectPicture ( String lotNo , String machineNo , String materialNo , String modelNo , String partNo ) ;
2022-02-12 08:48:57 +08:00
/ * *
2022-02-28 15:44:43 +08:00
* 修改图片路径信息
2022-02-28 13:55:17 +08:00
*
2022-02-28 15:44:43 +08:00
* @param lotNo 批次号
* @param machineNo 机器号
* @param materialNo 物料号
* @param modelNo 模具号
* @param partNo 零件号
* @param picturePath 图片路径
2022-02-12 08:48:57 +08:00
* /
2022-02-28 13:55:17 +08:00
@Modifying ( clearAutomatically = true )
2022-02-28 15:44:43 +08:00
@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 ) ;
2022-02-12 08:48:57 +08:00
}