|
|
@@ -33,6 +33,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
* @param size 每页大小
|
|
|
* @param keyword 关键词
|
|
|
* @return 供应商资源page
|
|
|
+ * @version 2018年5月15日 11:53:06 增加限制,要求营业执照号长度大于12才显示
|
|
|
*/
|
|
|
@Override
|
|
|
public Page<VendorIntroduction> getVendorIntroduction(int page, int size, String keyword) {
|
|
|
@@ -124,7 +125,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
// 获取企业sql
|
|
|
enterpriseSql.append("select en.en_uu enUU, en.en_name enName, en.en_shortname enShortname, en.en_address enAddress, en.en_tel enTel, " +
|
|
|
"en.en_email enEmail, en.en_corporation enCorporation, en.en_businesscode enBusinesscode, en.en_industry enIndustry, en.en_Businessscope enBusinessScope " +
|
|
|
- ",st.st_enuu,st.st_status from sec$enterprises en left join store$info st on st.st_enuu = en.en_uu where en_name not like '%测试%' and en_name not like '%test%' and en_uu <> ")
|
|
|
+ ",st.st_enuu,st.st_status from sec$enterprises en left join store$info st on st.st_enuu = en.en_uu where en_name not like '%测试%' and en_name not like '%test%' and length(en_businesscode) > 12 and en_uu <> ")
|
|
|
.append(enUU);
|
|
|
if (!StringUtils.isEmpty(keyword)) {
|
|
|
enterpriseSql.append(" and (en_name like '%").append(keyword).append("%' or en_address like '%").append(keyword).append("%' or en_industry like '%").append(keyword)
|
|
|
@@ -160,7 +161,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
enCountSql.append("select count(1) from (").append(keywordSql);
|
|
|
} else {
|
|
|
enCountSql.append("select count(1) from (select en_uu,count(1) from sec$enterprises where en_name not like '%测试%' " +
|
|
|
- " and en_name not like '%test%'and en_uu <> ").append(enUU);
|
|
|
+ " and en_name not like '%test%' and length(en_businesscode) > 12 and en_uu <> ").append(enUU);
|
|
|
}
|
|
|
enCountSql.append(" group by en_uu )a");
|
|
|
System.out.println("en_count:" + enCountSql.toString());
|
|
|
@@ -175,7 +176,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
*/
|
|
|
private String getKeywordSql(Long enUU, String keyword) {
|
|
|
return "select en_uu,count(1) as counts from sec$enterprises where en_name not like '%测试%' " +
|
|
|
- "and lower(en_name) not like '%test%' and (en_name like '%"
|
|
|
+ "and lower(en_name) not like '%test%' and length(en_businesscode) > 12 and (en_name like '%"
|
|
|
+ keyword + "%' or en_address like '%" + keyword + "%' or en_industry like '%" + keyword
|
|
|
+ "%') and en_uu <> " + enUU;
|
|
|
}
|