industrial_measurement/src/main/java/com/xkrs/dao/QcInspectionPictureDao.java

43 lines
1.7 KiB
Java
Raw Normal View History

2022-02-12 08:48:57 +08:00
package com.xkrs.dao;
2022-02-28 19:53:50 +08:00
import com.xkrs.model.entity.QcInspectionPictureEntity;
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;
2022-02-28 18:45:47 +08:00
import org.springframework.stereotype.Repository;
2022-02-12 08:48:57 +08:00
2022-02-28 15:44:43 +08:00
import java.util.List;
2022-02-28 18:45:47 +08:00
@Repository
2022-02-28 19:53:50 +08:00
public interface QcInspectionPictureDao extends JpaRepository<QcInspectionPictureEntity, Long>, JpaSpecificationExecutor<QcInspectionPictureEntity> {
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 16:48:02 +08:00
@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)
2022-02-28 19:53:50 +08:00
List<QcInspectionPictureEntity> 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 16:48:02 +08:00
@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)
2022-02-28 15:44:43 +08:00
void updatePicturePath(String lotNo, String machineNo, String materialNo, String modelNo, String partNo, String picturePath);
2022-02-12 08:48:57 +08:00
}