Просмотр исходного кода

供应商资源库过滤掉包含名称“测试”的企业

dongbw 8 лет назад
Родитель
Сommit
faa267b59d

+ 5 - 1
src/main/java/com/uas/platform/b2b/service/impl/VendorsServiceImpl.java

@@ -347,6 +347,8 @@ public class VendorsServiceImpl implements VendorService {
 			vendorRecommendUusSql.append(" and ").append(enterpriseMatchCondition);
 //			vendorRecommendUuNumSql.append(" and ").append(enterpriseMatchCondition);
 		}
+		// 去掉测试企业
+        vendorRecommendUusSql.append("and en_name not like '%测试%'");
 		vendorRecommendUusSql.append(" group by en_uu order by count(en_uu) desc) a");
 		// 拼接未匹配到物料的有可售产品的供应商
 		StringBuffer enterpriseProdSaleSql = new StringBuffer();
@@ -361,6 +363,8 @@ public class VendorsServiceImpl implements VendorService {
 		if (null != enterpriseMatchCondition && !"".equals(enterpriseMatchCondition)) {
 			enterpriseProdSaleSql.append(" and ").append(enterpriseMatchCondition);
 		}
+        // 去掉测试企业
+        enterpriseProdSaleSql.append("and en_name not like '%测试%'");
 		enterpriseProdSaleSql.append(" group by en_uu order by count(pr_issale) desc) b");
 		vendorRecommendUusSql.append(" union all ").append(enterpriseProdSaleSql);
 		vendorRecommendUusSql.append(rownumSql);
@@ -368,7 +372,7 @@ public class VendorsServiceImpl implements VendorService {
 		StringBuffer totalSql = new StringBuffer().append(" select count(1) from (select en_uu from sec$enterprises left join " +
 				" v$products on en_uu = pr_enuu where pr_issale = 1 and pr_b2bdisabled <> 1 and en_uu <> ")
 				.append(enUU).append(" group by en_uu)");
-//        System.out.println("SQL:" + vendorRecommendUusSql.toString());
+        System.out.println("SQL:" + vendorRecommendUusSql.toString());
 //        System.out.println("NUM_SQL:" + totalSql.toString());
 		Integer total = commonDao.queryForObject(totalSql.toString(), Integer.class);
 		List<VendorRecommend> vendorRecommends = commonDao.query(vendorRecommendUusSql.toString(), VendorRecommend.class);