完善图片上传功能
This commit is contained in:
@ -7,6 +7,8 @@ import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: XinYi Song
|
||||
* @Date: 2022/1/20 15:23
|
||||
@ -24,7 +26,8 @@ public interface QcInspectionFileDao extends JpaRepository<QcInspectionFile, Lon
|
||||
* @param partNo 零件号
|
||||
* @return
|
||||
*/
|
||||
QcInspectionFile selectFile(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
|
||||
@Query(value = "from QcInspectionFile where lotNo = ?1 and machineNo = ?2 and materialNo = ?3 and modelNo = ?4 and partNo = ?5")
|
||||
List<QcInspectionFile> selectFile(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
|
||||
|
||||
/**
|
||||
* 修改模板上传信息
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.xkrs.dao;
|
||||
|
||||
import com.xkrs.model.entity.QcInspectionFile;
|
||||
import com.xkrs.model.entity.QcInspectionPicture;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
@ -8,45 +7,36 @@ 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<QcInspectionPicture, Long>, JpaSpecificationExecutor<QcInspectionPicture> {
|
||||
|
||||
/**
|
||||
* 根据机种号,批次号,机器号,产品号查询文件信息
|
||||
* 查询图片信息
|
||||
*
|
||||
* @param fileModelNumber
|
||||
* @param fileBatchNumber
|
||||
* @param fileMachineCode
|
||||
* @param fileProductNumber
|
||||
* @param lotNo 批次号
|
||||
* @param machineNo 机器号
|
||||
* @param materialNo 物料号
|
||||
* @param modelNo 模具号
|
||||
* @param partNo 零件号
|
||||
* @return
|
||||
*/
|
||||
QcInspectionFile findByFileModelNumberAndFileBatchNumberAndFileMachineCodeAndFileProductNumber(String fileModelNumber, String fileBatchNumber, String fileMachineCode, String fileProductNumber);
|
||||
@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);
|
||||
|
||||
/**
|
||||
* 根据机种号,批次号,机器号,产品号修改模板上传信息
|
||||
* 修改图片路径信息
|
||||
*
|
||||
* @param fileModelNumber
|
||||
* @param fileBatchNumber
|
||||
* @param fileMachineCode
|
||||
* @param fileProductNumber
|
||||
* @param fileUploadPath
|
||||
* @param lotNo 批次号
|
||||
* @param machineNo 机器号
|
||||
* @param materialNo 物料号
|
||||
* @param modelNo 模具号
|
||||
* @param partNo 零件号
|
||||
* @param picturePath 图片路径
|
||||
*/
|
||||
@Modifying(clearAutomatically = true)
|
||||
@Query(value = "update file set file_upload_path = ?5 where file_model_number = ?1 and file_batch_number = ?2 and file_machine_code = ?3 and file_product_number = ?4", nativeQuery = true)
|
||||
void updateFileUploadPath(String fileModelNumber, String fileBatchNumber, String fileMachineCode, String fileProductNumber, String fileUploadPath);
|
||||
|
||||
/**
|
||||
* 根据机种号,批次号,机器号,产品号修改模板载下信息
|
||||
*
|
||||
* @param fileModelNumber
|
||||
* @param fileBatchNumber
|
||||
* @param fileMachineCode
|
||||
* @param fileProductNumber
|
||||
* @param fileDownloadPath
|
||||
*/
|
||||
@Modifying(clearAutomatically = true)
|
||||
@Query(value = "update file set file_download_path = ?5 where file_model_number = ?1 and file_batch_number = ?2 and file_machine_code = ?3 and file_product_number = ?4", nativeQuery = true)
|
||||
void updateFileDownloadPath(String fileModelNumber, String fileBatchNumber, String fileMachineCode, String fileProductNumber, String fileDownloadPath);
|
||||
|
||||
@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);
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,15 @@
|
||||
package com.xkrs.dao;
|
||||
|
||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
||||
import com.xkrs.model.entity.QcInspectionSpec;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public interface QcInspectionSpecDao extends JpaRepository<QcInspectionSpec, Long>, JpaSpecificationExecutor<QcInspectionSpec> {
|
||||
|
||||
List<QcInspectionSpec> findByPartNoAndInspectionItemCode(String partNo,String inspectionItemCode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user