2022-02-28 13:55:17 +08:00
package com.xkrs.dao ;
2022-02-28 19:53:50 +08:00
import com.xkrs.model.entity.QcInspectionFileEntity ;
2022-02-28 13:55:17 +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-28 13:55:17 +08:00
2022-02-28 15:44:43 +08:00
import java.util.List ;
2022-02-28 13:55:17 +08:00
/ * *
* @Author : XinYi Song
* @Date : 2022 / 1 / 20 15 : 23
* /
2022-02-28 18:45:47 +08:00
@Repository
2022-02-28 19:53:50 +08:00
public interface QcInspectionFileDao extends JpaRepository < QcInspectionFileEntity , Long > , JpaSpecificationExecutor < QcInspectionFileEntity > {
2022-02-28 13:55:17 +08:00
/ * *
* 查询文件信息
*
* @param lotNo 批次号
* @param machineNo 机器号
* @param materialNo 物料号
* @param modelNo 模具号
* @param partNo 零件号
* @return
* /
2022-02-28 16:48:02 +08:00
@Query ( value = " select * from qc_inspection_file 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 < QcInspectionFileEntity > selectFile ( String lotNo , String machineNo , String materialNo , String modelNo , String partNo ) ;
2022-02-28 13:55:17 +08:00
/ * *
* 修改模板上传信息
*
* @param lotNo 批次号
* @param machineNo 机器号
* @param materialNo 物料号
* @param modelNo 模具号
* @param partNo 零件号
* @param templatePath 模版路径
* /
@Modifying ( clearAutomatically = true )
2022-02-28 16:48:02 +08:00
@Query ( value = " update qc_inspection_file set template_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 13:55:17 +08:00
void updateTemplatePath ( String lotNo , String machineNo , String materialNo , String modelNo , String partNo , String templatePath ) ;
/ * *
* 修改模板载下信息
*
* @param lotNo 批次号
* @param machineNo 机器号
* @param materialNo 物料号
* @param modelNo 模具号
* @param partNo 零件号
* @param filePath 文件路径
* /
@Modifying ( clearAutomatically = true )
2022-02-28 16:48:02 +08:00
@Query ( value = " update qc_inspection_file set file_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 13:55:17 +08:00
void updateFilePath ( String lotNo , String machineNo , String materialNo , String modelNo , String partNo , String filePath ) ;
}