优化查询质检规格

This commit is contained in:
liuchengqian 2022-03-11 13:58:14 +08:00
parent dbe430c3b1
commit 28481a3a4a

View File

@ -26,6 +26,6 @@ public interface QcSpecDao extends JpaRepository<QcSpecEntity, Integer>, JpaSpec
/**
* 查询质检规格
*/
@Query(value = "SELECT id, variety_no AS varietyNo, qc_item_no AS qcItemNo, max, mean, min, unit, method, standard, remark FROM qc_spec WHERE variety_no = ? AND qc_item_no = ? ORDER BY create_time ASC", nativeQuery = true)
@Query(value = "SELECT id, variety_no AS varietyNo, qc_item_no AS qcItemNo, max, mean, min, unit, method, standard, remark FROM qc_spec WHERE variety_no LIKE %?1% AND qc_item_no LIKE %?2% ORDER BY create_time ASC", nativeQuery = true)
List<Map<String, Object>> queryQcSpec(String varietyNo, String qcItemNo);
}