|
@@ -347,6 +347,8 @@ public class VendorsServiceImpl implements VendorService {
|
|
|
vendorRecommendUusSql.append(" and ").append(enterpriseMatchCondition);
|
|
vendorRecommendUusSql.append(" and ").append(enterpriseMatchCondition);
|
|
|
// vendorRecommendUuNumSql.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");
|
|
vendorRecommendUusSql.append(" group by en_uu order by count(en_uu) desc) a");
|
|
|
// 拼接未匹配到物料的有可售产品的供应商
|
|
// 拼接未匹配到物料的有可售产品的供应商
|
|
|
StringBuffer enterpriseProdSaleSql = new StringBuffer();
|
|
StringBuffer enterpriseProdSaleSql = new StringBuffer();
|
|
@@ -361,6 +363,8 @@ public class VendorsServiceImpl implements VendorService {
|
|
|
if (null != enterpriseMatchCondition && !"".equals(enterpriseMatchCondition)) {
|
|
if (null != enterpriseMatchCondition && !"".equals(enterpriseMatchCondition)) {
|
|
|
enterpriseProdSaleSql.append(" and ").append(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");
|
|
enterpriseProdSaleSql.append(" group by en_uu order by count(pr_issale) desc) b");
|
|
|
vendorRecommendUusSql.append(" union all ").append(enterpriseProdSaleSql);
|
|
vendorRecommendUusSql.append(" union all ").append(enterpriseProdSaleSql);
|
|
|
vendorRecommendUusSql.append(rownumSql);
|
|
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 " +
|
|
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 <> ")
|
|
" 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)");
|
|
.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());
|
|
// System.out.println("NUM_SQL:" + totalSql.toString());
|
|
|
Integer total = commonDao.queryForObject(totalSql.toString(), Integer.class);
|
|
Integer total = commonDao.queryForObject(totalSql.toString(), Integer.class);
|
|
|
List<VendorRecommend> vendorRecommends = commonDao.query(vendorRecommendUusSql.toString(), VendorRecommend.class);
|
|
List<VendorRecommend> vendorRecommends = commonDao.query(vendorRecommendUusSql.toString(), VendorRecommend.class);
|