|
|
@@ -432,11 +432,10 @@ public class VendorsServiceImpl implements VendorService {
|
|
|
if (null != vendorRecommend.getHitNums() && vendorRecommend.getHitNums() > 0) {
|
|
|
StringBuffer productInfosSql = new StringBuffer();
|
|
|
// StringBuffer productNumSql = new StringBuffer();
|
|
|
- productInfosSql.append("select wm_concat(pr_title || '(' || pr_brand || ')') productInfo from v$products pr where pr.pr_enuu = ").append(vendUU)
|
|
|
- .append(" and pr.pr_issale =1 and exists (select 1 from v$products p1 " +
|
|
|
- " where p1.pr_cmpcode = pr.pr_cmpcode and p1.pr_ispurchase = 1 and nvl(pr_issale, 0) <> 1 " +
|
|
|
- " and p1.pr_b2bdisabled <> 1 and p1.pr_enuu = ")
|
|
|
- .append(enUU).append(") and rownum <= 5 order by pr_standard,pr_id desc");
|
|
|
+ productInfosSql.append("select wm_concat(pr_title || '(' || pr_brand || ')') productInfo from (select pr_title,pr_brand from v$products pr where pr.pr_enuu = ")
|
|
|
+ .append(vendUU).append(" and pr.pr_issale =1 and exists (select 1 from v$products p1 where p1.pr_cmpcode = pr.pr_cmpcode and p1.pr_ispurchase = 1 " +
|
|
|
+ "and nvl(pr_issale, 0) <> 1 and p1.pr_b2bdisabled <> 1 and p1.pr_enuu = ").append(enUU).append(") order by pr_standard desc,pr_id desc) where rownum <= 5");
|
|
|
+ System.out.println("wm_concat:" + productInfosSql.toString());
|
|
|
// productNumSql.append("select count(1) from v$products pr where pr.pr_enuu = ").append(vendUU)
|
|
|
// .append(" and pr.pr_issale =1 and exists (select 1 from v$products p1 " +
|
|
|
// " where p1.pr_cmpcode = pr.pr_cmpcode and p1.pr_ispurchase = 1 and nvl(pr_issale, 0) <> 1 " +
|
|
|
@@ -447,7 +446,7 @@ public class VendorsServiceImpl implements VendorService {
|
|
|
// 获取前五条匹配物料
|
|
|
String productInfo = commonDao.queryForObject(productInfosSql.toString(), String.class);
|
|
|
// Integer hitNums = commonDao.queryForObject(productNumSql.toString(), Integer.class);
|
|
|
- vendorRecommend.setProductInfo(productInfo);
|
|
|
+ vendorRecommend.setProductInfo(productInfo.replace("()", ""));
|
|
|
// vendorRecommend.setHitNums(hitNums);
|
|
|
}
|
|
|
List<Vendor> vendors = vendorDao.findByMyEnUUAndVendUU(enUU, vendUU);
|
|
|
@@ -530,7 +529,6 @@ public class VendorsServiceImpl implements VendorService {
|
|
|
.append(")").append(rownumSql);
|
|
|
// System.out.println(idSql.toString());
|
|
|
// System.out.println(productsMatchSql.toString());
|
|
|
-// System.out.println(countSql.toString());
|
|
|
List<Long> matchedIds = commonDao.queryForList(productsMatchSql.toString(), Long.class);
|
|
|
Integer count = commonDao.queryForObject(countSql, Integer.class);
|
|
|
List<Long> ids = commonDao.queryForList(idSql.toString(), Long.class);
|