|
@@ -16,20 +16,20 @@ public class CompanyOrgTypeNew extends UDF {
|
|
|
private static final List<String> FOREIGN = Arrays.asList("中外", "外资", "外国", "外商");
|
|
|
private static final List<String> CHINA = Arrays.asList("国有", "国资");
|
|
|
|
|
|
- public List<String> evaluate(String company_org_type, String company_name, String credit_code) {
|
|
|
+ public String evaluate(String company_org_type, String company_name, String credit_code) {
|
|
|
if (isEmpty(company_name)) return null;
|
|
|
//分公司判断
|
|
|
- if (contains(company_org_type, "分公司") || endsWith(company_name, "分公司")) {
|
|
|
+ if (contains(company_org_type, "分") || endsWith(company_name, "分公司")) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
//工商注册类型判断
|
|
|
Set<String> result = new HashSet<>();
|
|
|
- if (contains(company_org_type, "股份") && !contains(company_org_type, "合作") && contains(company_name, "公司")) {
|
|
|
+ if (contains(company_org_type, "股份") && !contains(company_org_type, "合作") && contains(company_name, "公司")&&contains(company_name,"股份")) {
|
|
|
result.add("股份有限公司");
|
|
|
} else if (contains(company_org_type, "有限责任") || contains(company_name, "有限责任公司") || contains(company_name, "有限公司")) {
|
|
|
result.add("有限责任公司");
|
|
|
- } else if (contains(company_org_type, "股份合作")) {
|
|
|
+ } else if (contains(company_org_type, "股份合作")||contains(company_org_type,"股份制")) {
|
|
|
result.add("股份合作企业");
|
|
|
} else if (contains(company_org_type, "个体") || contains(company_org_type, "个人经营")) {
|
|
|
result.add("个体工商户");
|
|
@@ -61,10 +61,10 @@ public class CompanyOrgTypeNew extends UDF {
|
|
|
if (result.isEmpty()) {
|
|
|
return null;
|
|
|
}
|
|
|
- return new ArrayList<>(result);
|
|
|
+ return JSON.toJSONString(result);
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
- System.out.println(new CompanyOrgTypeNew().evaluate("有限公司", "雅诗兰黛(上海)商贸有限公司", "91110105MA01Q19Q2L"));
|
|
|
+ System.out.println(new CompanyOrgTypeNew().evaluate("分公司", "雅诗兰黛(上海)商贸有限公司北京分公司", "91110105MA01Q19Q2L"));
|
|
|
}
|
|
|
}
|