Przeglądaj źródła

删除未用到的类

sunyj 9 lat temu
rodzic
commit
46670dc3f1

+ 0 - 33
search-console/src/main/java/com/uas/search/console/controller/BrandController.java

@@ -1,33 +0,0 @@
-package com.uas.search.console.controller;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.uas.search.console.dao.BrandInfoDao;
-import com.uas.search.console.model.BrandInfo;
-
-/**
- * 品牌数据请求
- * 
- * @author suntg
- * @since 2016年8月3日上午11:08:36
- */
-@Controller
-@RequestMapping("/brands")
-public class BrandController {
-
-	@Autowired
-	private BrandInfoDao brandInfoDao;
-
-	@RequestMapping(method = RequestMethod.GET)
-	@ResponseBody
-	public List<BrandInfo> getAllBrandInfos() {
-		return brandInfoDao.findAll();
-	}
-
-}

+ 6 - 0
search-console/src/main/java/com/uas/search/console/controller/SearchController.java

@@ -1,10 +1,12 @@
 package com.uas.search.console.controller;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -107,6 +109,10 @@ public class SearchController {
 		pageParams.setFilters(filters);
 		@SuppressWarnings("unchecked")
 		List<Long> ids = (List<Long>) searchService.getComponentIds(keyword, pageParams).get("components");
+		if (CollectionUtils.isEmpty(ids)) {
+			return new ArrayList<ComponentSimpleInfo>();
+		}
+		
 		Long[] idsLong = new Long[ids.size()];
 		int i = 0;
 		for (Long id : ids) {

+ 0 - 18
search-console/src/main/java/com/uas/search/console/dao/BrandInfoDao.java

@@ -1,18 +0,0 @@
-package com.uas.search.console.dao;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.stereotype.Repository;
-
-import com.uas.search.console.model.BrandInfo;
-
-/**
- * 品牌简要信息Dao
- * 
- * @author suntg
- * @since 2016年8月3日上午11:07:33
- */
-@Repository
-public interface BrandInfoDao extends JpaSpecificationExecutor<BrandInfo>, JpaRepository<BrandInfo, Long> {
-
-}

+ 0 - 16
search-console/src/main/java/com/uas/search/console/dao/ComponentInfoDao.java

@@ -1,16 +0,0 @@
-package com.uas.search.console.dao;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-
-import com.uas.search.console.model.ComponentInfo;
-
-/**
- * 产品简要信息Dao
- * 
- * @author suntg
- * @since 2016年8月3日上午11:29:18
- */
-public interface ComponentInfoDao extends JpaSpecificationExecutor<ComponentInfo>, JpaRepository<ComponentInfo, Long> {
-
-}

+ 0 - 16
search-console/src/main/java/com/uas/search/console/dao/KindInfoDao.java

@@ -1,16 +0,0 @@
-package com.uas.search.console.dao;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-
-import com.uas.search.console.model.KindInfo;
-
-/**
- * 产品类目简要信息Dao
- * 
- * @author suntg
- * @since 2016年8月3日上午11:30:16
- */
-public interface KindInfoDao extends JpaSpecificationExecutor<KindInfo>, JpaRepository<KindInfo, Long> {
-
-}

+ 0 - 237
search-console/src/main/java/com/uas/search/console/model/Brand.java

@@ -1,237 +0,0 @@
-package com.uas.search.console.model;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-/**
- * 品牌
- * 
- * @author suntg
- * @since 2016年3月11日上午9:30:00
- */
-@Entity
-@Table(name = "product$brand")
-public class Brand implements Serializable {
-
-	/**
-	 * 序列号
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * id
-	 */
-	@Id
-	@Column(name = "br_id")
-	private Long id;
-
-	/**
-	 * uuid
-	 */
-	@Column(name = "br_uuid", unique = true)
-	private String uuid;
-
-	/**
-	 * 品牌中文名称
-	 */
-	@Column(name = "br_name_cn")
-	private String nameCn;
-
-	/**
-	 * 品牌英文名称
-	 */
-	@Column(name = "br_name_en")
-	private String nameEn;
-
-	/**
-	 * logo路径
-	 */
-	@Column(name = "br_logourl")
-	private String logoUrl;
-
-	/**
-	 * 品牌所属厂商
-	 */
-	@Column(name = "br_vendor")
-	private String vendor;
-
-	/**
-	 * 品牌简介
-	 */
-	@Column(name = "br_brief", length = 4000)
-	private String brief;
-
-	/**
-	 * 产品系列
-	 */
-	@Column(name = "br_series", length = 4000)
-	private String series;
-
-	/**
-	 * 主要成就
-	 */
-	@Column(name = "br_achievement", length = 4000)
-	private String achievement;
-
-	/**
-	 * 所属地区
-	 */
-	@Column(name = "br_area")
-	private String area;
-
-	/**
-	 * 应用领域
-	 */
-	@Column(name = "br_application")
-	private String application;
-
-	/**
-	 * 创建时间
-	 */
-	@Column(name = "br_createtime")
-	private Date createTime;
-
-	/**
-	 * 最后修改时间
-	 */
-	@Column(name = "br_modifytime")
-	private Date modifyTime;
-
-	/**
-	 * 版本号
-	 */
-	@Column(name = "br_version")
-	private Short version;
-
-	/**
-	 * 权重,可用于排序
-	 */
-	@Column(name = "br_weight")
-	private Double weight;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getUuid() {
-		return uuid;
-	}
-
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
-
-	public String getNameCn() {
-		return nameCn;
-	}
-
-	public void setNameCn(String nameCn) {
-		this.nameCn = nameCn;
-	}
-
-	public String getNameEn() {
-		return nameEn;
-	}
-
-	public void setNameEn(String nameEn) {
-		this.nameEn = nameEn;
-	}
-
-	public String getLogoUrl() {
-		return logoUrl;
-	}
-
-	public void setLogoUrl(String logoUrl) {
-		this.logoUrl = logoUrl;
-	}
-
-	public String getVendor() {
-		return vendor;
-	}
-
-	public void setVendor(String vendor) {
-		this.vendor = vendor;
-	}
-
-	public String getBrief() {
-		return brief;
-	}
-
-	public void setBrief(String brief) {
-		this.brief = brief;
-	}
-
-	public String getSeries() {
-		return series;
-	}
-
-	public void setSeries(String series) {
-		this.series = series;
-	}
-
-	public String getAchievement() {
-		return achievement;
-	}
-
-	public void setAchievement(String achievement) {
-		this.achievement = achievement;
-	}
-
-	public String getArea() {
-		return area;
-	}
-
-	public void setArea(String area) {
-		this.area = area;
-	}
-
-	public String getApplication() {
-		return application;
-	}
-
-	public void setApplication(String application) {
-		this.application = application;
-	}
-
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	public Date getModifyTime() {
-		return modifyTime;
-	}
-
-	public void setModifyTime(Date modifyTime) {
-		this.modifyTime = modifyTime;
-	}
-
-	public Double getWeight() {
-		return weight;
-	}
-
-	public void setWeight(Double weight) {
-		this.weight = weight;
-	}
-
-	public Short getVersion() {
-		return version;
-	}
-
-	public void setVersion(Short version) {
-		this.version = version;
-	}
-
-}

+ 0 - 126
search-console/src/main/java/com/uas/search/console/model/BrandInfo.java

@@ -1,126 +0,0 @@
-package com.uas.search.console.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-/**
- * 简要品牌信息
- * 
- * @author suntg
- * @since 2016年3月11日上午10:02:20
- */
-@Entity
-@Table(name = "product$brand")
-public class BrandInfo {
-
-	/**
-	 * id
-	 */
-	@Id
-	@Column(name = "br_id")
-	private Long id;
-
-	/**
-	 * uuid
-	 */
-	@Column(name = "br_uuid", unique = true)
-	private String uuid;
-
-	/**
-	 * 品牌中文名称
-	 */
-	@Column(name = "br_name_cn")
-	private String nameCn;
-
-	/**
-	 * 品牌英文名称
-	 */
-	@Column(name = "br_name_en")
-	private String nameEn;
-
-	/**
-	 * logo路径
-	 */
-	@Column(name = "br_logourl")
-	private String logoUrl;
-
-	/**
-	 * 权重,可用于排序
-	 */
-	@Column(name = "br_weight")
-	private Double weight;
-
-	@Column(name = "br_vendor")
-	private String venodr;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getUuid() {
-		return uuid;
-	}
-
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
-
-	public String getNameCn() {
-		return nameCn;
-	}
-
-	public void setNameCn(String nameCn) {
-		this.nameCn = nameCn;
-	}
-
-	public String getNameEn() {
-		return nameEn;
-	}
-
-	public void setNameEn(String nameEn) {
-		this.nameEn = nameEn;
-	}
-
-	public String getLogoUrl() {
-		return logoUrl;
-	}
-
-	public void setLogoUrl(String logoUrl) {
-		this.logoUrl = logoUrl;
-	}
-
-	public Double getWeight() {
-		return weight;
-	}
-
-	public void setWeight(Double weight) {
-		this.weight = weight;
-	}
-
-	public String getVenodr() {
-		return venodr;
-	}
-
-	public void setVenodr(String venodr) {
-		this.venodr = venodr;
-	}
-
-	public BrandInfo() {
-
-	}
-
-	public BrandInfo(Brand brand) {
-		this.id = brand.getId();
-		this.uuid = brand.getUuid();
-		this.nameCn = brand.getNameCn();
-		this.nameEn = brand.getNameEn();
-		this.logoUrl = brand.getLogoUrl();
-		this.weight = brand.getWeight();
-	}
-}

+ 0 - 480
search-console/src/main/java/com/uas/search/console/model/Component.java

@@ -1,480 +0,0 @@
-package com.uas.search.console.model;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-
-/**
- * 标准器件
- * 
- * @author suntg
- * @since 2016年3月11日上午10:24:29
- */
-@Entity
-@Table(name = "product$component")
-public class Component implements Serializable {
-
-	/**
-	 * 序列号
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * id
-	 */
-	@Id
-	@Column(name = "cmp_id")
-	private Long id;
-
-	/**
-	 * 器件的uuid
-	 */
-	@Column(name = "cmp_uuid", unique = true)
-	private String uuid;
-
-	/**
-	 * 原厂型号
-	 */
-	@Column(name = "cmp_code")
-	private String code;
-
-	/**
-	 * 类目id
-	 */
-	@Column(name = "cmp_kiid")
-	private Long kindid;
-
-	/**
-	 * 器件的类目
-	 */
-	@OneToOne(cascade = { CascadeType.REFRESH })
-	@JoinColumn(name = "cmp_kiid", insertable = false, updatable = false)
-	private KindInfo kind;
-
-	/**
-	 * 品牌id
-	 */
-	@Column(name = "cmp_brid")
-	private Long brandid;
-
-	/**
-	 * 器件的品牌
-	 */
-	@OneToOne(cascade = { CascadeType.REFRESH })
-	@JoinColumn(name = "cmp_brid", insertable = false, updatable = false)
-	private BrandInfo brand;
-
-	/**
-	 * 器件封装规格 这个封装规格和下面的封装规格值应该是一样的。在componentInfo中有packaging 赋值给spec,
-	 * 现在已packaging 为准(spec 有值的只有一个器件), by yujia
-	 */
-
-	@Column(name = "cmp_packaging")
-	private String packaging;
-
-	/**
-	 * 器件的标准单位
-	 */
-	@Column(name = "cmp_unit")
-	private String unit;
-
-	/**
-	 * 单重(g)
-	 */
-	@Column(name = "cmp_weight")
-	private Float weight;
-
-	/**
-	 * 器件描述
-	 */
-	@Column(name = "cmp_description", length = 4000)
-	private String description;
-
-	/**
-	 * 所属公司
-	 */
-	@Column(name = "cmp_company")
-	private String company;
-
-	/**
-	 * 所属公司url
-	 */
-	@Column(name = "cmp_companyUrl")
-	private String companyUrl;
-
-	/**
-	 * 附件id
-	 * 
-	 * @TODO 建立对应的附件表
-	 */
-	@Column(name = "cmp_attach")
-	private String attach;
-
-	/**
-	 * 图片path
-	 */
-	@Column(name = "cmp_img")
-	private String img;
-
-	/**
-	 * 版本
-	 */
-	@Column(name = "cmp_version")
-	private Short version;
-
-	/**
-	 * 器件创建时间
-	 */
-	@Column(name = "cmp_createtime")
-	private Date createTime;
-
-	/**
-	 * 器件最后修改时间
-	 */
-	@Column(name = "cmp_modifytime")
-	private Date modifyTime;
-
-	/**
-	 * 带的属性及属性的值
-	 */
-	@OneToMany(cascade = { CascadeType.PERSIST, CascadeType.REMOVE }, fetch = FetchType.LAZY)
-	@JoinColumn(name = "pv_componentid")
-	@OrderBy("detno")
-	private Set<PropertyValue> properties;
-
-	/**
-	 * 以下为器件的库存交易属性,由器件对应的上架商品发生变化时,更新反应到器件
-	 */
-
-	/**
-	 * 器件的库存
-	 */
-	@Column(name = "cmp_reserve")
-	private Double reserve;
-
-	/**
-	 * 器件的库存类型
-	 */
-	@Column(name = "cmp_reservetype")
-	private Short reserveType;
-
-	/**
-	 * 器件的最低单价
-	 */
-	@Column(name = "cmp_minprice")
-	private Double minPrice;
-
-	/**
-	 * 器件的最小起订量
-	 */
-	@Column(name = "cmp_minbuyqty")
-	private Double minBuyQty;
-
-	/**
-	 * 器件最小送货周期
-	 */
-	@Column(name = "cmp_mindelivery")
-	private Short minDelivery;
-
-	/**
-	 * 器件最大送货周期
-	 */
-	@Column(name = "cmp_maxdelivery")
-	private Short maxDelivery;
-
-	/**
-	 * 交易订单数 - 来自订单表中统计订单数
-	 */
-	@Column(name = "cmp_ordernumber")
-	private Double orderNumber;
-
-	/**
-	 * 交易数量 - 来自订单表中统计交易数量
-	 */
-	@Column(name = "cmp_orderqty")
-	private Double orderQty;
-
-	/**
-	 * 样品数量汇总
-	 */
-	@Column(name = "cmp_sampleqty")
-	private Double sampleQty;
-
-	/**
-	 * 申请样品数量
-	 */
-	@Column(name = "cmp_applysampleqty")
-	private Double applySampleQty;
-
-	/**
-	 * 原装正品数量
-	 */
-	@Column(name = "cmp_originalqty")
-	private Double originalQty;
-
-	/**
-	 * 工厂库存数量
-	 */
-	@Column(name = "cmp_excessqty")
-	private Double excessQty;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getUuid() {
-		return uuid;
-	}
-
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
-
-	public String getCode() {
-		return code;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public KindInfo getKind() {
-		return kind;
-	}
-
-	public void setKind(KindInfo kind) {
-		this.kind = kind;
-	}
-
-	public BrandInfo getBrand() {
-		return brand;
-	}
-
-	public void setBrand(BrandInfo brand) {
-		this.brand = brand;
-	}
-
-	public String getPackaging() {
-		return packaging;
-	}
-
-	public void setPackaging(String packaging) {
-		this.packaging = packaging;
-	}
-
-	public String getUnit() {
-		return unit;
-	}
-
-	public void setUnit(String unit) {
-		this.unit = unit;
-	}
-
-	public Float getWeight() {
-		return weight;
-	}
-
-	public void setWeight(Float weight) {
-		this.weight = weight;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public String getAttach() {
-		return attach;
-	}
-
-	public void setAttach(String attach) {
-		this.attach = attach;
-	}
-
-	public Short getVersion() {
-		return version;
-	}
-
-	public void setVersion(Short version) {
-		this.version = version;
-	}
-
-	public String getImg() {
-		return img;
-	}
-
-	public void setImg(String img) {
-		this.img = img;
-	}
-
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	public Date getModifyTime() {
-		return modifyTime;
-	}
-
-	public void setModifyTime(Date modifyTime) {
-		this.modifyTime = modifyTime;
-	}
-
-	public Double getReserve() {
-		return reserve;
-	}
-
-	public void setReserve(Double reserve) {
-		this.reserve = reserve;
-	}
-
-	public Short getReserveType() {
-		return reserveType;
-	}
-
-	public void setReserveType(Short reserveType) {
-		this.reserveType = reserveType;
-	}
-
-	public Double getMinPrice() {
-		return minPrice;
-	}
-
-	public void setMinPrice(Double minPrice) {
-		this.minPrice = minPrice;
-	}
-
-	public Double getMinBuyQty() {
-		return minBuyQty;
-	}
-
-	public void setMinBuyQty(Double minBuyQty) {
-		this.minBuyQty = minBuyQty;
-	}
-
-	public Short getMinDelivery() {
-		return minDelivery;
-	}
-
-	public void setMinDelivery(Short minDelivery) {
-		this.minDelivery = minDelivery;
-	}
-
-	public Short getMaxDelivery() {
-		return maxDelivery;
-	}
-
-	public void setMaxDelivery(Short maxDelivery) {
-		this.maxDelivery = maxDelivery;
-	}
-
-	public Set<PropertyValue> getProperties() {
-		return properties;
-	}
-
-	public void setProperties(Set<PropertyValue> properties) {
-		this.properties = properties;
-	}
-
-	public String getCompany() {
-		return company;
-	}
-
-	public void setCompany(String company) {
-		this.company = company;
-	}
-
-	public String getCompanyUrl() {
-		return companyUrl;
-	}
-
-	public void setCompanyUrl(String companyUrl) {
-		this.companyUrl = companyUrl;
-	}
-
-	public Long getKindid() {
-		return kindid;
-	}
-
-	public void setKindid(Long kindid) {
-		this.kindid = kindid;
-	}
-
-	public Long getBrandid() {
-		return brandid;
-	}
-
-	public void setBrandid(Long brandid) {
-		this.brandid = brandid;
-	}
-
-	public Double getOrderNumber() {
-		return orderNumber;
-	}
-
-	public void setOrderNumber(Double orderNumber) {
-		this.orderNumber = orderNumber;
-	}
-
-	public Double getOrderQty() {
-		return orderQty;
-	}
-
-	public void setOrderQty(Double orderQty) {
-		this.orderQty = orderQty;
-	}
-
-	public Double getSampleQty() {
-		return sampleQty;
-	}
-
-	public void setSampleQty(Double sampleQty) {
-		this.sampleQty = sampleQty;
-	}
-
-	public Double getApplySampleQty() {
-		return applySampleQty;
-	}
-
-	public void setApplySampleQty(Double applySampleQty) {
-		this.applySampleQty = applySampleQty;
-	}
-
-	public Double getOriginalQty() {
-		return originalQty;
-	}
-
-	public void setOriginalQty(Double originalQty) {
-		this.originalQty = originalQty;
-	}
-
-	public Double getExcessQty() {
-		return excessQty;
-	}
-
-	public void setExcessQty(Double excessQty) {
-		this.excessQty = excessQty;
-	}
-
-}

+ 0 - 358
search-console/src/main/java/com/uas/search/console/model/ComponentInfo.java

@@ -1,358 +0,0 @@
-package com.uas.search.console.model;
-
-import java.io.Serializable;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-
-/**
- * 标准器件
- * 
- * @author suntg
- * @since 2016年3月11日上午10:24:29
- */
-@Entity
-@Table(name = "product$component")
-public class ComponentInfo implements Serializable {
-
-	/**
-	 * 序列号
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * id
-	 */
-	@Id
-	@Column(name = "cmp_id")
-	private Long id;
-
-	/**
-	 * 器件的uuid
-	 */
-	@Column(name = "cmp_uuid", unique = true)
-	private String uuid;
-
-	/**
-	 * 原厂型号
-	 */
-	@Column(name = "cmp_code")
-	private String code;
-
-	/**
-	 * 类目id
-	 */
-	@Column(name = "cmp_kiid")
-	private Long kindid;
-
-	/**
-	 * 器件的类目
-	 */
-	@OneToOne(cascade = { CascadeType.REFRESH })
-	@JoinColumn(name = "cmp_kiid", insertable = false, updatable = false)
-	private KindInfo kind;
-
-	/**
-	 * 品牌id
-	 */
-	@Column(name = "cmp_brid")
-	private Long brandid;
-
-	/**
-	 * 器件的品牌
-	 */
-	@OneToOne(cascade = { CascadeType.REFRESH })
-	@JoinColumn(name = "cmp_brid", insertable = false, updatable = false)
-	private BrandInfo brand;
-
-	/*
-	 * 器件规格
-	 */
-	@Column(name = "cmp_packaging")
-	private String packaging;
-
-	/**
-	 * 器件的标准单位
-	 */
-	@Column(name = "cmp_unit")
-	private String unit;
-
-	/**
-	 * 单重(g)
-	 */
-	@Column(name = "cmp_weight")
-	private Float weight;
-
-	/**
-	 * 附件id
-	 */
-	@Column(name = "cmp_attach")
-	private String attach;
-
-	/**
-	 * 图片path
-	 */
-	@Column(name = "cmp_img")
-	private String img;
-
-	/**
-	 * 以下为器件的库存交易属性,由器件对应的上架商品发生变化时,更新反应到器件
-	 */
-
-	/**
-	 * 器件的库存
-	 */
-	@Column(name = "cmp_reserve")
-	private Double reserve;
-
-	/**
-	 * 器件的库存类型
-	 */
-	@Column(name = "cmp_reservetype")
-	private Short reserveType;
-
-	/**
-	 * 器件的最低单价
-	 */
-	@Column(name = "cmp_minprice")
-	private Double minPrice;
-
-	/**
-	 * 器件的最小起订量
-	 */
-	@Column(name = "cmp_minbuyqty")
-	private Double minBuyQty;
-
-	/**
-	 * 器件最小送货周期
-	 */
-	@Column(name = "cmp_mindelivery")
-	private Short minDelivery;
-
-	/**
-	 * 器件最大送货周期
-	 */
-	@Column(name = "cmp_maxdelivery")
-	private Short maxDelivery;
-
-	/**
-	 * 交易订单数 - 来自订单表中统计订单数
-	 */
-	@Column(name = "cmp_ordernumber")
-	private Double orderNumber;
-
-	/**
-	 * 交易数量 - 来自订单表中统计交易数量
-	 */
-	@Column(name = "cmp_orderqty")
-	private Double orderQty;
-
-	/**
-	 * 样品数量汇总
-	 */
-	@Column(name = "cmp_sampleqty")
-	private Double sampleQty;
-
-	/**
-	 * 原装正品数量
-	 */
-	@Column(name = "cmp_originalqty")
-	private Double originalQty;
-
-	/**
-	 * 工厂库存数量
-	 */
-	@Column(name = "cmp_excessqty")
-	private Double excessQty;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getUuid() {
-		return uuid;
-	}
-
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
-
-	public String getCode() {
-		return code;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public KindInfo getKind() {
-		return kind;
-	}
-
-	public void setKind(KindInfo kind) {
-		this.kind = kind;
-	}
-
-	public BrandInfo getBrand() {
-		return brand;
-	}
-
-	public void setBrand(BrandInfo brand) {
-		this.brand = brand;
-	}
-
-	public String getUnit() {
-		return unit;
-	}
-
-	public void setUnit(String unit) {
-		this.unit = unit;
-	}
-
-	public Float getWeight() {
-		return weight;
-	}
-
-	public void setWeight(Float weight) {
-		this.weight = weight;
-	}
-
-	public String getAttach() {
-		return attach;
-	}
-
-	public void setAttach(String attach) {
-		this.attach = attach;
-	}
-
-	public String getImg() {
-		return img;
-	}
-
-	public void setImg(String img) {
-		this.img = img;
-	}
-
-	public Double getReserve() {
-		return reserve;
-	}
-
-	public void setReserve(Double reserve) {
-		this.reserve = reserve;
-	}
-
-	public Short getReserveType() {
-		return reserveType;
-	}
-
-	public void setReserveType(Short reserveType) {
-		this.reserveType = reserveType;
-	}
-
-	public Double getMinPrice() {
-		return minPrice;
-	}
-
-	public void setMinPrice(Double minPrice) {
-		this.minPrice = minPrice;
-	}
-
-	public Double getMinBuyQty() {
-		return minBuyQty;
-	}
-
-	public void setMinBuyQty(Double minBuyQty) {
-		this.minBuyQty = minBuyQty;
-	}
-
-	public Short getMinDelivery() {
-		return minDelivery;
-	}
-
-	public void setMinDelivery(Short minDelivery) {
-		this.minDelivery = minDelivery;
-	}
-
-	public Short getMaxDelivery() {
-		return maxDelivery;
-	}
-
-	public void setMaxDelivery(Short maxDelivery) {
-		this.maxDelivery = maxDelivery;
-	}
-
-	public Long getKindid() {
-		return kindid;
-	}
-
-	public void setKindid(Long kindid) {
-		this.kindid = kindid;
-	}
-
-	public Long getBrandid() {
-		return brandid;
-	}
-
-	public void setBrandid(Long brandid) {
-		this.brandid = brandid;
-	}
-
-	public String getPackaging() {
-		return packaging;
-	}
-
-	public void setPackaging(String packaging) {
-		this.packaging = packaging;
-	}
-
-	// 构造函数
-	public Double getOrderNumber() {
-		return orderNumber;
-	}
-
-	public void setOrderNumber(Double orderNumber) {
-		this.orderNumber = orderNumber;
-	}
-
-	public Double getOrderQty() {
-		return orderQty;
-	}
-
-	public void setOrderQty(Double orderQty) {
-		this.orderQty = orderQty;
-	}
-
-	public Double getSampleQty() {
-		return sampleQty;
-	}
-
-	public void setSampleQty(Double sampleQty) {
-		this.sampleQty = sampleQty;
-	}
-
-	public Double getOriginalQty() {
-		return originalQty;
-	}
-
-	public void setOriginalQty(Double originalQty) {
-		this.originalQty = originalQty;
-	}
-
-	public Double getExcessQty() {
-		return excessQty;
-	}
-
-	public void setExcessQty(Double excessQty) {
-		this.excessQty = excessQty;
-	}
-
-}

+ 0 - 235
search-console/src/main/java/com/uas/search/console/model/Kind.java

@@ -1,235 +0,0 @@
-package com.uas.search.console.model;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import com.alibaba.fastjson.annotation.JSONField;
-
-/**
- * 产品类目
- * 
- * @author suntg
- * @since 2016年3月10日下午3:08:40
- */
-@Entity
-@Table(name = "product$kind")
-public class Kind implements Serializable {
-
-	/**
-	 * 序列号
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * ID号
-	 */
-	@Id
-	@Column(name = "ki_id")
-	private Long id;
-
-	/**
-	 * 父级类目的id号
-	 */
-	@Column(name = "ki_parentid")
-	private Long parentid;
-
-	/**
-	 * 是否为叶子类目 1是 0否
-	 */
-	@Column(name = "ki_isleaf")
-	private Short isLeaf;
-
-	/**
-	 * 在父级类目中的排序序号
-	 */
-	@Column(name = "ki_detno")
-	private Short detno;
-
-	/**
-	 * 类目的名称
-	 */
-	@Column(name = "ki_name")
-	private String nameCn;
-
-	/**
-	 * 类目的英文名称
-	 */
-	@Column(name = "ki_name_en")
-	private String nameEn;
-
-	/**
-	 * 类目包含的器件总数,包括其所有子类目下的
-	 */
-	@Column(name = "ki_count")
-	private Long count;
-
-	/**
-	 * 类目的层级,从1开始,1、2、3、4
-	 */
-	@Column(name = "ki_level")
-	private Short level;
-
-	/**
-	 * 器件编号前缀
-	 */
-	@Column(name = "ki_cmpprefix")
-	private String componentPrefix;
-
-	/**
-	 * 当前器件编号后缀游标
-	 */
-	@Column(name = "ki_cmpsuffix")
-	private Long componentsuffix;
-
-	/**
-	 * 包含的属性
-	 */
-	@OneToMany(mappedBy = "kind", cascade = { CascadeType.PERSIST, CascadeType.REMOVE }, fetch = FetchType.LAZY)
-	@OrderBy("detno")
-	private Set<KindProperty> properties;
-
-	/**
-	 * 所含子类目
-	 */
-	@Transient
-	private List<Kind> children;
-
-	/**
-	 * 其兄弟类目
-	 */
-	@Transient
-	private List<Kind> bothers;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public Long getParentid() {
-		return parentid;
-	}
-
-	public void setParentid(Long parentid) {
-		this.parentid = parentid;
-	}
-
-	public Short getIsLeaf() {
-		return isLeaf;
-	}
-
-	public void setIsLeaf(Short isLeaf) {
-		this.isLeaf = isLeaf;
-	}
-
-	public boolean isLeaf() {
-		return this.isLeaf == null ? false : getIsLeaf() == 1;
-	}
-
-	public Short getDetno() {
-		return detno;
-	}
-
-	public void setDetno(Short detno) {
-		this.detno = detno;
-	}
-
-	public String getNameCn() {
-		return nameCn;
-	}
-
-	public void setNameCn(String nameCn) {
-		this.nameCn = nameCn;
-	}
-
-	public String getNameEn() {
-		return nameEn;
-	}
-
-	public void setNameEn(String nameEn) {
-		this.nameEn = nameEn;
-	}
-
-	public Long getCount() {
-		return count;
-	}
-
-	public void setCount(Long count) {
-		this.count = count;
-	}
-
-	public void addCount() {
-		this.count = this.count + 1;
-	}
-
-	public void addCount(Long count) {
-		this.count = this.count + count;
-	}
-
-	public void decreaseCount() {
-		this.count = this.count - 1;
-	}
-
-	public List<Kind> getChildren() {
-		return children;
-	}
-
-	public void setChildren(List<Kind> children) {
-		this.children = children;
-	}
-
-	public List<Kind> getBothers() {
-		return bothers;
-	}
-
-	public void setBothers(List<Kind> bothers) {
-		this.bothers = bothers;
-	}
-
-	@JSONField(serialize = false)
-	public Set<KindProperty> getProperties() {
-		return properties;
-	}
-
-	public void setProperties(Set<KindProperty> properties) {
-		this.properties = properties;
-	}
-
-	public Short getLevel() {
-		return level;
-	}
-
-	public void setLevel(Short level) {
-		this.level = level;
-	}
-
-	public String getComponentPrefix() {
-		return componentPrefix;
-	}
-
-	public void setComponentPrefix(String componentPrefix) {
-		this.componentPrefix = componentPrefix;
-	}
-
-	public Long getComponentsuffix() {
-		return componentsuffix;
-	}
-
-	public void setComponentsuffix(Long componentsuffix) {
-		this.componentsuffix = componentsuffix;
-	}
-
-}

+ 0 - 106
search-console/src/main/java/com/uas/search/console/model/KindInfo.java

@@ -1,106 +0,0 @@
-package com.uas.search.console.model;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-/**
- * 简要类目信息
- * 
- * @author suntg
- * @since 2016年3月10日下午5:15:28
- */
-@Entity
-@Table(name = "product$kind")
-public class KindInfo implements Serializable {
-
-	/**
-	 * 序列号
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * id
-	 */
-	@Id
-	@Column(name = "ki_id")
-	private Long id;
-
-	/**
-	 * 类目名称
-	 */
-	@Column(name = "ki_name")
-	private String nameCn;
-
-	/**
-	 * 英文名
-	 */
-	@Column(name = "ki_name_en")
-	private String nameEn;
-
-	/**
-	 * 父节点id
-	 */
-	@Column(name = "ki_parentid")
-	private Long parentid;
-
-	/**
-	 * 类目的层级,从1开始,1、2、3、4
-	 */
-	@Column(name = "ki_level")
-	private Short level;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getNameCn() {
-		return nameCn;
-	}
-
-	public void setNameCn(String nameCn) {
-		this.nameCn = nameCn;
-	}
-
-	public String getNameEn() {
-		return nameEn;
-	}
-
-	public void setNameEn(String nameEn) {
-		this.nameEn = nameEn;
-	}
-
-	public Long getParentid() {
-		return parentid;
-	}
-
-	public void setParentid(Long parentid) {
-		this.parentid = parentid;
-	}
-
-	public Short getLevel() {
-		return level;
-	}
-
-	public void setLevel(Short level) {
-		this.level = level;
-	}
-
-	public KindInfo() {
-
-	}
-
-	public KindInfo(Kind kind) {
-		this.id = kind.getId();
-		this.nameCn = kind.getNameCn();
-		this.nameEn = kind.getNameEn();
-		this.parentid = kind.getParentid();
-	}
-}

+ 0 - 138
search-console/src/main/java/com/uas/search/console/model/KindProperty.java

@@ -1,138 +0,0 @@
-package com.uas.search.console.model;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-
-import com.alibaba.fastjson.annotation.JSONField;
-
-/**
- * 类目对应的属性
- * 
- * @author suntg
- * @since 2016年3月11日下午3:10:34
- */
-@Entity
-@Table(name = "product$kindproperty")
-public class KindProperty implements Serializable {
-
-	/**
-	 * 序列号
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * id
-	 */
-	@Id
-	@Column(name = "kp_id")
-	private Long id;
-
-	/**
-	 * 类目id
-	 */
-	@Column(name = "kp_kindid")
-	private Long kindId;
-
-	/**
-	 * 类目
-	 */
-	@ManyToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.LAZY)
-	@JoinColumn(name = "kp_kindid", insertable = false, updatable = false)
-	private Kind kind;
-
-	/**
-	 * 序号
-	 */
-	@Column(name = "kp_detno")
-	private Short detno;
-
-	/**
-	 * 属性id
-	 */
-	@Column(name = "kp_propertyid")
-	private Long propertyId;
-
-	/**
-	 * 属性
-	 */
-	@OneToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.LAZY)
-	@JoinColumn(name = "kp_propertyid", insertable = false, updatable = false)
-	private Property property;
-
-	/**
-	 * 存在的各种值
-	 */
-	@OneToMany(mappedBy = "kindProperty", cascade = { CascadeType.PERSIST, CascadeType.REMOVE }, fetch = FetchType.LAZY)
-	@OrderBy("detno")
-	private Set<KindPropertyValues> values;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	@JSONField(serialize = false)
-	public Kind getKind() {
-		return kind;
-	}
-
-	public void setKind(Kind kind) {
-		this.kind = kind;
-	}
-
-	public Property getProperty() {
-		return property;
-	}
-
-	public void setProperty(Property property) {
-		this.property = property;
-	}
-
-	public Set<KindPropertyValues> getValues() {
-		return values;
-	}
-
-	public void setValues(Set<KindPropertyValues> values) {
-		this.values = values;
-	}
-
-	public Short getDetno() {
-		return detno;
-	}
-
-	public void setDetno(Short detno) {
-		this.detno = detno;
-	}
-
-	public Long getKindId() {
-		return kindId;
-	}
-
-	public void setKindId(Long kindId) {
-		this.kindId = kindId;
-	}
-
-	public Long getPropertyId() {
-		return propertyId;
-	}
-
-	public void setPropertyId(Long propertyId) {
-		this.propertyId = propertyId;
-	}
-
-}

+ 0 - 104
search-console/src/main/java/com/uas/search/console/model/KindPropertyValues.java

@@ -1,104 +0,0 @@
-package com.uas.search.console.model;
-
-import java.io.Serializable;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-import com.alibaba.fastjson.annotation.JSONField;
-
-/**
- * 类目属性存在的各种可能的值
- * 
- * @author suntg
- * @since 2016年3月11日下午2:47:21
- */
-@Entity
-@Table(name = "product$kindpropertyvalue")
-public class KindPropertyValues implements Serializable {
-
-	/**
-	 * 序列号
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * id
-	 */
-	@Id
-	@Column(name = "kpv_id")
-	private Long id;
-
-	/**
-	 * 类目属性关联主键
-	 */
-	@Column(name = "kpv_kindpropertyid")
-	private Long kindPropertyId;
-
-	/**
-	 * 类目属性
-	 */
-	@ManyToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.LAZY)
-	@JoinColumn(name = "kpv_kindpropertyid", insertable = false, updatable = false)
-	private KindProperty kindProperty;
-
-	/**
-	 * 在类目中的排序
-	 */
-	@Column(name = "kpv_number")
-	private Short detno;
-
-	/**
-	 * 存在的值
-	 */
-	@Column(name = "kpv_value")
-	private String value;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	@JSONField(serialize = false)
-	public KindProperty getKindProperty() {
-		return kindProperty;
-	}
-
-	public void setKindProperty(KindProperty kindProperty) {
-		this.kindProperty = kindProperty;
-	}
-
-	public String getValue() {
-		return value;
-	}
-
-	public void setValue(String value) {
-		this.value = value;
-	}
-
-	public Short getDetno() {
-		return detno;
-	}
-
-	public void setDetno(Short detno) {
-		this.detno = detno;
-	}
-
-	public Long getKindPropertyId() {
-		return kindPropertyId;
-	}
-
-	public void setKindPropertyId(Long kindPropertyId) {
-		this.kindPropertyId = kindPropertyId;
-	}
-
-}

+ 0 - 10
search-console/src/main/java/com/uas/search/console/util/Test.java

@@ -1,10 +0,0 @@
-package com.uas.search.console.util;
-
-import com.uas.search.console.core.util.ContextUtils;
-
-public class Test {
-
-	public static void main(String[] args) {
-		System.out.println(ContextUtils.getApplicationContext());
-	}
-}