@@ -47,6 +47,14 @@ public interface ProductDao extends JpaSpecificationExecutor<Product>, JpaReposi
@Query("update Product p set p.enabled = :enabled where p.enUU = :enUU and p.code = :code")
int updateEnabled(@Param("enUU") Long enUU, @Param("code") String code, @Param("enabled") Short enabled);
+ /**
+ * 根据物料所属enUU、原产型号品牌查询物料
+ * @param enUU
+ * @param cmpCode
+ * @param brand
+ * @return
+ */
+ List<Product> findByEnUUAndCmpCodeAndBrand(Long enUU, String cmpCode, String brand);
/**
* 通过企业UU,物料名称、规格、品牌(非标准)
*
@@ -146,6 +146,11 @@ public class ProductServiceImpl implements ProductService {
return productDao.findByEnUUAndSourceAppAndDownloadStatus(enUU, app, status);
}
+ @Override
+ public List<Product> findByEnUUAndCmpCodeAndBrand(Long enUU, String cmpCode, String brand) {
+ return productDao.findByEnUUAndCmpCodeAndBrand(enUU,cmpCode,brand);
+ }
+
* 物料下载成功,更新下载状态