package com.bstek.bdf2.core.model; import com.bstek.bdf2.core.business.IDept; import com.bstek.bdf2.core.business.IUser; import com.bstek.dorado.annotation.PropertyDef; import com.ld.igds.constant.Constant; import javax.persistence.*; import java.io.Serializable; import java.util.Date; import java.util.List; /** * @since 2013-1-22 * @author Jacky.gao */ @Entity @Table(name = "BDF2_DEPT") public class DefaultDept implements IDept,Serializable { private static final long serialVersionUID = -7669420244144806105L; // ----------业务公共字段-------// @Id @Column(name = "ID_", length = 60) private String id; @Column(name = "COMPANY_ID_", length = 60) private String companyId; @Column(name = "PARENT_ID_", length = 60) private String parentId; @Column(name = "CREATE_DATE_") @PropertyDef(label = "建成时间") private Date createDate; @Column(name = "NAME_", length = 60) private String name; @Column(name = "DESC_", length = 1000) private String desc; @Column(name = "TYPE_", length = 10) @PropertyDef(label = "类型", description = "组织,库点") private String type = Constant.DEPT_TYPE_20; @Column(name = "CODE_", length = 60) @PropertyDef(label = "编码", description = "用于上报的组织编码") private String code; @PropertyDef(label = "所在省") @Column(name = "PROVINCE_", length = 30) private String province; @PropertyDef(label = "所在城市") @Column(name = "CITY_", length = 30) private String city; @PropertyDef(label = "所在区县") @Column(name = "COUNTRY_", length = 30) private String country; @Column(name = "LON_") @PropertyDef(label = "经度") private Double lon; @Column(name = "LAT_") @PropertyDef(label = "纬度") private Double lat; @Column(name = "POST_CODE_", length = 10) @PropertyDef(label = "邮编") private String postCode; @Column(name = "BUILDING_NUM_") @PropertyDef(label = "仓房数") private Integer buildingNum; @Column(name = "OIL_NUM_") @PropertyDef(label = "油罐数") private Integer oilNum; @PropertyDef(label = "地址") @Column(name = "ADDRESS_", length = 200) private String address; @PropertyDef(label = "联系人") @Column(name = "CONTACT_", length = 50) private String contact; @PropertyDef(label = "联系电话") @Column(name = "PHONE_", length = 20) private String phone; @Column(name = "FAX_", length = 20) @PropertyDef(label = "传真") private String fax; // ----------单位字段-------// @Column(name = "COMPANY_TYPE_", length = 10) @PropertyDef(label = "单位类型", description = "1-粮食仓储企业;2-粮食购销企业;3-粮食加工企业;4-粮食设备制造企业;9-其他粮食企业") private String companyType; @Column(name = "NATURE_", length = 10) @PropertyDef(label = "企业性质", description = "1-固有企业;2-民营企业;3-事业单位;9-其他内资企业;10-港澳台商投资企业;11-外商投资企业;") private String nature; @Column(name = "LEGAL_PERSON_", length = 30) @PropertyDef(label = "法人") private String legalPerson; @Column(name = "DEPT_NUM_") @PropertyDef(label = "库区数") private Integer deptNum; @Column(name = "REGISTER_CODE_", length = 30) @PropertyDef(label = "工商登记注册号") private String registerCode; @Column(name = "CREDIT_CODE_", length = 20) @PropertyDef(label = "信用编码") private String creditCode; // ----------库区字段-------// @Column(name = "DEPOT_NUM_") @PropertyDef(label = "廒间数") private Integer depotNum; @Column(name = "STORAGE_") @PropertyDef(label = "库点设计储量", description = "单位:吨") private Double storage; @Column(name = "OIL_STORAGE_") @PropertyDef(label = "库点设计罐容", description = "单位:吨") private Double oilStorage; @Column(name = "AREA_") @PropertyDef(label = "库点设计面积", description = "单位:㎡") private Double area; @Column(name = "ACTING_RESERVE_", length = 1) @PropertyDef(label = "是否代储", description = "1-是; 0-否") private String actingReserve = "0"; @Column(name = "PROPERTY_RIGHT_", length = 2) @PropertyDef(label = "库区产权", description = "1-自有; 2-租赁;9-其他") private String propertyRight = "1"; @Column(name = "VAL_", length = 1) @PropertyDef(label = "是否启用") private String val = Constant.YN_Y; @Transient private IDept parent; @Transient private List users; @Transient private List children; public DefaultDept() { } public DefaultDept(String deptId) { this.id = deptId; } @Override public String getId() { return id; } public void setId(String id) { this.id = id; } @Override public String getCompanyId() { return companyId; } public void setCompanyId(String companyId) { this.companyId = companyId; } @Override public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } @Override public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public Double getLon() { return lon; } public void setLon(Double lon) { this.lon = lon; } public Double getLat() { return lat; } public void setLat(Double lat) { this.lat = lat; } public String getPostCode() { return postCode; } public void setPostCode(String postCode) { this.postCode = postCode; } public Integer getBuildingNum() { return buildingNum; } public void setBuildingNum(Integer buildingNum) { this.buildingNum = buildingNum; } public Integer getOilNum() { return oilNum; } public void setOilNum(Integer oilNum) { this.oilNum = oilNum; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getContact() { return contact; } public void setContact(String contact) { this.contact = contact; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getFax() { return fax; } public void setFax(String fax) { this.fax = fax; } public String getCompanyType() { return companyType; } public void setCompanyType(String companyType) { this.companyType = companyType; } public String getNature() { return nature; } public void setNature(String nature) { this.nature = nature; } public String getLegalPerson() { return legalPerson; } public void setLegalPerson(String legalPerson) { this.legalPerson = legalPerson; } public Integer getDeptNum() { return deptNum; } public void setDeptNum(Integer deptNum) { this.deptNum = deptNum; } public String getRegisterCode() { return registerCode; } public void setRegisterCode(String registerCode) { this.registerCode = registerCode; } public String getCreditCode() { return creditCode; } public void setCreditCode(String creditCode) { this.creditCode = creditCode; } public Integer getDepotNum() { return depotNum; } public void setDepotNum(Integer depotNum) { this.depotNum = depotNum; } public Double getStorage() { return storage; } public void setStorage(Double storage) { this.storage = storage; } public Double getOilStorage() { return oilStorage; } public void setOilStorage(Double oilStorage) { this.oilStorage = oilStorage; } public Double getArea() { return area; } public void setArea(Double area) { this.area = area; } public String getActingReserve() { return actingReserve; } public void setActingReserve(String actingReserve) { this.actingReserve = actingReserve; } public String getPropertyRight() { return propertyRight; } public void setPropertyRight(String propertyRight) { this.propertyRight = propertyRight; } public String getVal() { return val; } public void setVal(String val) { this.val = val; } @Override public IDept getParent() { return parent; } public void setParent(IDept parent) { this.parent = parent; } @Override public List getUsers() { return users; } public void setUsers(List users) { this.users = users; } public List getChildren() { return children; } public void setChildren(List children) { this.children = children; } }