Explorar o código

ERP搜索平台企业接口增加

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@2934 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
shenj %!s(int64=10) %!d(string=hai) anos
pai
achega
f08a676e90

+ 97 - 0
src/main/java/com/uas/platform/b2b/model/EnterpriseDetail.java

@@ -0,0 +1,97 @@
+package com.uas.platform.b2b.model;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.springframework.util.CollectionUtils;
+
+
+/**
+ * 企业信息明细对外查询接口的模型
+ * 
+ * @author shenj
+ * 
+ */
+public class EnterpriseDetail {
+	private String name; //企业名称
+	private String shortName; //企业简称
+	private Long uu; //UU号
+	private String address; //企业地址
+	private String url;  //企业主页
+	private String management; //经营模式
+	private String products;  //主营产品
+	private String infos;
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getShortName() {
+		return shortName;
+	}
+	public void setShortName(String shortName) {
+		this.shortName = shortName;
+	}
+	public Long getUu() {
+		return uu;
+	}
+	public void setUu(Long uu) {
+		this.uu = uu;
+	}
+	public String getAddress() {
+		return address;
+	}
+	public void setAddress(String address) {
+		this.address = address;
+	}
+	public String getUrl() {
+		return url;
+	}
+	public void setUrl(String url) {
+		this.url = url;
+	}
+	public String getManagement() {
+		return management;
+	}
+	public void setManagement(String management) {
+		this.management = management;
+	}
+	public String getProducts() {
+		return products;
+	}
+	public void setProducts(String products) {
+		this.products = products;
+	}
+	public String getInfos() {
+		return infos;
+	}
+	public void setInfos(String infos) {
+		this.infos = infos;
+	}  
+	public EnterpriseDetail() {
+
+	}
+	public EnterpriseDetail(Enterprise enterprise) {
+		this.name = enterprise.getEnName();
+		this.shortName = enterprise.getEnShortname();
+		this.uu = enterprise.getUu();
+		this.address = enterprise.getEnAddress();
+		this.url=enterprise.getEnUrl();
+		this.management=enterprise.getEnManagement();
+		this.products=enterprise.getEnProducts();
+		this.infos=enterprise.getEnInfo();
+		
+	}
+
+	public static List<EnterpriseDetail> getMembers(Collection<Enterprise> enterprises) {
+		if (!CollectionUtils.isEmpty(enterprises)) {
+			List<EnterpriseDetail> members = new ArrayList<EnterpriseDetail>();
+			for (Enterprise enterprise : enterprises)
+				members.add(new EnterpriseDetail(enterprise));
+			return members;
+		}
+		return null;
+	}
+}