refactor(model): 重构模型类包结构并优化序列化处理
重构模型类包结构,将模型类按功能模块划分到不同的子包中。优化序列化处理,为VO类添加serialVersionUID并实现Serializable接口。移除部分冗余的serialVersionUID字段,简化模型类代码。同时修复UITools中空值处理的问题,并更新pom版本至0.0.100-SNAPSHOT。 - 将模型类按功能模块划分到ds子包中 - 为VO类添加序列化支持 - 移除冗余的serialVersionUID字段 - 修复UITools空值处理问题 - 更新项目版本号
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -15,20 +14,29 @@ import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 银行实体类
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "BANK", schema = "supplier_ms")
|
||||
public class Bank implements BasedEntity, IdentityEntity, Serializable, Voable<BankVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class Bank implements BasedEntity, IdentityEntity, Voable<BankVo> {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 银行编码
|
||||
*/
|
||||
@Column(name = "CODE")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 银行名称
|
||||
*/
|
||||
@Column(name = "NAME")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.MappedSuperclass;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import org.hibernate.proxy.HibernateProxy;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@RequiredArgsConstructor
|
||||
@MappedSuperclass
|
||||
@ToString
|
||||
public abstract class BaseEnumEntity<T extends Enum<?>> implements IdentityEntity {
|
||||
@@ -34,5 +30,19 @@ public abstract class BaseEnumEntity<T extends Enum<?>> implements IdentityEntit
|
||||
@Column(name = "VALUE")
|
||||
private String value;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null) return false;
|
||||
Class<?> oEffectiveClass = o instanceof HibernateProxy ? ((HibernateProxy) o).getHibernateLazyInitializer().getPersistentClass() : o.getClass();
|
||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
||||
BaseEnumEntity<?> that = (BaseEnumEntity<?>) o;
|
||||
return getId() != null && Objects.equals(getId(), that.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.CompanyFileType;
|
||||
@@ -18,26 +17,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "COMPANY_FILE_TYPE_LOCAL")
|
||||
@ToString
|
||||
public class CompanyFileTypeLocal extends BaseEnumEntity<CompanyFileType> implements Serializable, Voable<CompanyFileTypeLocalVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
if (this == object)
|
||||
return true;
|
||||
if (object == null)
|
||||
return false;
|
||||
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||
return false;
|
||||
}
|
||||
CompanyFileTypeLocal that = (CompanyFileTypeLocal) object;
|
||||
return getId() != null && Objects.equals(getId(), that.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
public class CompanyFileTypeLocal extends BaseEnumEntity<CompanyFileType> implements Voable<CompanyFileTypeLocalVo> {
|
||||
|
||||
@Override
|
||||
public CompanyFileTypeLocalVo toVo() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -24,8 +23,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_CATALOG", schema = "supplier_ms")
|
||||
public class ContractCatalog implements IdentityEntity, NamedEntity, Serializable, Voable<ContractCatalogVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class ContractCatalog implements IdentityEntity, NamedEntity, Voable<ContractCatalogVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.ContractFileType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ContractFileTypeLocalVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
@@ -22,8 +18,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_FILE_TYPE_LOCAL")
|
||||
@ToString(callSuper = true)
|
||||
public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> implements Serializable, Voable<ContractFileTypeLocalVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> implements Voable<ContractFileTypeLocalVo> {
|
||||
/**
|
||||
* 建议的文件名
|
||||
*/
|
||||
@@ -33,24 +28,6 @@ public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> impl
|
||||
@Column(name = "DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
if (this == object)
|
||||
return true;
|
||||
if (object == null)
|
||||
return false;
|
||||
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||
return false;
|
||||
}
|
||||
ContractFileTypeLocal that = (ContractFileTypeLocal) object;
|
||||
return getId() != null && Objects.equals(getId(), that.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractFileTypeLocalVo toVo() {
|
||||
ContractFileTypeLocalVo vo = new ContractFileTypeLocalVo();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -22,8 +21,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_GROUP", schema = "supplier_ms")
|
||||
public class ContractGroup implements IdentityEntity, NamedEntity, Serializable, Voable<ContractGroupVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class ContractGroup implements IdentityEntity, NamedEntity, Voable<ContractGroupVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -24,8 +23,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_KIND", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class ContractKind implements IdentityEntity, NamedEntity, Serializable, Voable<ContractKindVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class ContractKind implements IdentityEntity, NamedEntity, Voable<ContractKindVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -24,8 +23,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_TYPE", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class ContractType implements IdentityEntity, NamedEntity, Serializable, Voable<ContractTypeVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class ContractType implements IdentityEntity, NamedEntity, Voable<ContractTypeVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -24,8 +23,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CUSTOMER_CATALOG", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class CustomerCatalog implements BasedEntity, IdentityEntity, Serializable, Voable<CustomerCatalogVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class CustomerCatalog implements BasedEntity, IdentityEntity, Voable<CustomerCatalogVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.CustomerFileType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CustomerFileTypeLocalVo;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -19,30 +15,9 @@ import lombok.ToString;
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "CUSTOMER_FILE_TYPE_LOCAL")
|
||||
@Table(name = "COMPANY_CUSTOMER_FILE_TYPE_LOCAL")
|
||||
@ToString(callSuper = true)
|
||||
public class CustomerFileTypeLocal extends BaseEnumEntity<CustomerFileType> implements Serializable, Voable<CustomerFileTypeLocalVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
if (this == object) {
|
||||
return true;
|
||||
}
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||
return false;
|
||||
}
|
||||
CustomerFileTypeLocal that = (CustomerFileTypeLocal) object;
|
||||
return getId() != null && Objects.equals(getId(), that.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
public class CustomerFileTypeLocal extends BaseEnumEntity<CustomerFileType> implements Voable<CustomerFileTypeLocalVo> {
|
||||
|
||||
@Override
|
||||
public CustomerFileTypeLocalVo toVo() {
|
||||
|
||||
@@ -26,8 +26,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "PRODUCT_DELIVERY_SIGN_METHOD", schema = "supplier_ms")
|
||||
public class DeliverySignMethod implements BasedEntity, IdentityEntity , Serializable, Voable<DeliverySignMethodVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class DeliverySignMethod implements BasedEntity, IdentityEntity, Voable<DeliverySignMethodVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -22,8 +21,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "DEPARTMENT", schema = "supplier_ms")
|
||||
public class Department implements BasedEntity, IdentityEntity, Serializable, Voable<DepartmentVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class Department implements BasedEntity, IdentityEntity, Voable<DepartmentVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -31,8 +30,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "EMPLOYEE", schema = "supplier_ms")
|
||||
public class Employee implements BasedEntity, IdentityEntity, NamedEntity, Serializable, Voable<EmployeeVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class Employee implements BasedEntity, IdentityEntity, NamedEntity, Voable<EmployeeVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -23,8 +22,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "EMPLOYEE_AUTH_BIND", schema = "supplier_ms")
|
||||
public class EmployeeAuthBind implements BasedEntity, IdentityEntity, Serializable, Voable<EmployeeAuthBindVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class EmployeeAuthBind implements BasedEntity, IdentityEntity, Voable<EmployeeAuthBindVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -22,9 +21,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "EMPLOYEE_LOGIN_HISTORY", schema = "supplier_ms")
|
||||
public class EmployeeLoginHistory implements BasedEntity, IdentityEntity, Serializable, Voable<EmployeeLoginHistoryVo> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class EmployeeLoginHistory implements BasedEntity, IdentityEntity, Voable<EmployeeLoginHistoryVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -27,9 +26,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "EMPLOYEE_ROLE", schema = "supplier_ms")
|
||||
public class EmployeeRole implements IdentityEntity, NamedEntity, Serializable, Voable<EmployeeRoleVo> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class EmployeeRole implements IdentityEntity, NamedEntity, Voable<EmployeeRoleVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -18,9 +17,9 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "FUNC", schema = "supplier_ms")
|
||||
public class Function implements IdentityEntity, NamedEntity, Serializable, Voable<FunctionVo> {
|
||||
public class Function implements IdentityEntity, NamedEntity, Voable<FunctionVo> {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -3,13 +3,11 @@ package com.ecep.contract.model;
|
||||
import jakarta.persistence.Embeddable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.MonthDay;
|
||||
|
||||
@Embeddable
|
||||
@Data
|
||||
public class HistoryPrice implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class HistoryPrice {
|
||||
/**
|
||||
* 税率,1% =1,100% =100
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -22,8 +21,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "HOLIDAY_TABLE")
|
||||
@ToString
|
||||
public class HolidayTable implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class HolidayTable {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@JdbcTypeCode(SqlTypes.DATE)
|
||||
|
||||
@@ -2,7 +2,15 @@ package com.ecep.contract.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 实体对象接口
|
||||
*/
|
||||
public interface IdentityEntity {
|
||||
/**
|
||||
* 获取ID
|
||||
*
|
||||
* @return ID
|
||||
*/
|
||||
Integer getId();
|
||||
|
||||
void setId(Integer id);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
@@ -9,6 +8,7 @@ import com.ecep.contract.model.Voable;
|
||||
import com.ecep.contract.vo.InventoryVo;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
|
||||
import com.ecep.contract.vo.VolumeSizeVo;
|
||||
import jakarta.persistence.AttributeOverride;
|
||||
import jakarta.persistence.AttributeOverrides;
|
||||
import jakarta.persistence.Column;
|
||||
@@ -32,8 +32,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "INVENTORY", schema = "supplier_ms")
|
||||
public class Inventory implements IdentityEntity, BasedEntity, Serializable, Voable<InventoryVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class Inventory implements IdentityEntity, BasedEntity, Voable<InventoryVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -237,14 +236,14 @@ public class Inventory implements IdentityEntity, BasedEntity, Serializable, Voa
|
||||
vo.setSalePrice(salePrice);
|
||||
|
||||
// 体积尺寸属性映射
|
||||
VolumeSize volumeSize = new VolumeSize();
|
||||
VolumeSizeVo volumeSize = new VolumeSizeVo();
|
||||
volumeSize.setVolume(this.getVolumeSize().getVolume());
|
||||
volumeSize.setLength(this.getVolumeSize().getLength());
|
||||
volumeSize.setWidth(this.getVolumeSize().getWidth());
|
||||
volumeSize.setHeight(this.getVolumeSize().getHeight());
|
||||
vo.setVolumeSize(volumeSize);
|
||||
|
||||
VolumeSize packagedVolumeSize = new VolumeSize();
|
||||
|
||||
VolumeSizeVo packagedVolumeSize = new VolumeSizeVo();
|
||||
packagedVolumeSize.setVolume(this.getPackagedVolumeSize().getVolume());
|
||||
packagedVolumeSize.setLength(this.getPackagedVolumeSize().getLength());
|
||||
packagedVolumeSize.setWidth(this.getPackagedVolumeSize().getWidth());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -22,8 +21,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "INVENTORY_CATALOG", schema = "supplier_ms")
|
||||
public class InventoryCatalog implements IdentityEntity, BasedEntity, Serializable, Voable<InventoryCatalogVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class InventoryCatalog implements IdentityEntity, BasedEntity, Voable<InventoryCatalogVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Year;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -28,8 +27,7 @@ import lombok.ToString;
|
||||
@ToString
|
||||
@Entity
|
||||
@Table(name = "INVENTORY_HISTORY", schema = "supplier_ms")
|
||||
public class InventoryHistoryPrice implements IdentityEntity, Serializable, Voable<InventoryHistoryPriceVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class InventoryHistoryPrice implements IdentityEntity, Voable<InventoryHistoryPriceVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
@@ -22,8 +21,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "PERMISSION", schema = "supplier_ms")
|
||||
public class Permission implements IdentityEntity, NamedEntity, Serializable, Voable<PermissionVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class Permission implements IdentityEntity, NamedEntity, Voable<PermissionVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import jakarta.persistence.Embeddable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Embeddable
|
||||
@Data
|
||||
public class Price implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 税率,1% =1,100% =100
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.ProjectFileType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ProjectFileTypeLocalVo;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -18,28 +15,7 @@ import lombok.ToString;
|
||||
@Table(name = "PROJECT_FILE_TYPE_LOCAL")
|
||||
@ToString
|
||||
public class ProjectFileTypeLocal extends BaseEnumEntity<ProjectFileType>
|
||||
implements java.io.Serializable, Voable<ProjectFileTypeLocalVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
if (this == object) {
|
||||
return true;
|
||||
}
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||
return false;
|
||||
}
|
||||
ProjectFileTypeLocal that = (ProjectFileTypeLocal) object;
|
||||
return getId() != null && Objects.equals(getId(), that.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
implements Voable<ProjectFileTypeLocalVo> {
|
||||
|
||||
@Override
|
||||
public ProjectFileTypeLocalVo toVo() {
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ProjectSaleTypeVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 销售类型
|
||||
*/
|
||||
@@ -23,8 +16,7 @@ import lombok.Setter;
|
||||
@Entity
|
||||
@Table(name = "PROJECT_SALE_TYPE")
|
||||
public class ProjectSaleType
|
||||
implements IdentityEntity, NamedEntity, BasedEntity, Serializable, Voable<ProjectSaleTypeVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
implements IdentityEntity, NamedEntity, BasedEntity, Voable<ProjectSaleTypeVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -28,8 +28,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "PROJECT_SALE_TYPE_REQ_FILE_TYPE")
|
||||
public class ProjectSaleTypeRequireFileType implements IdentityEntity, BasedEntity, java.io.Serializable , Voable<ProjectSaleTypeRequireFileTypeVo>{
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class ProjectSaleTypeRequireFileType implements IdentityEntity, BasedEntity, Voable<ProjectSaleTypeRequireFileTypeVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -80,9 +79,9 @@ public class ProjectSaleTypeRequireFileType implements IdentityEntity, BasedEnti
|
||||
public ProjectSaleTypeRequireFileTypeVo toVo() {
|
||||
ProjectSaleTypeRequireFileTypeVo vo = new ProjectSaleTypeRequireFileTypeVo();
|
||||
vo.setId(id);
|
||||
vo.setSaleTypeId(saleType.getId());
|
||||
vo.setSaleTypeId(saleType == null ? null : saleType.getId());
|
||||
vo.setFileType(fileType);
|
||||
vo.setFrequency(frequency.name());
|
||||
vo.setFrequency(frequency == null ? null : frequency.name());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ import lombok.Setter;
|
||||
@Entity
|
||||
@Table(name = "PROJECT_TYPE")
|
||||
public class ProjectType
|
||||
implements IdentityEntity, NamedEntity, BasedEntity, java.io.Serializable, Voable<ProjectTypeVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
implements IdentityEntity, NamedEntity, BasedEntity, Voable<ProjectTypeVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -19,8 +18,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "SYS_CONF", schema = "supplier_ms")
|
||||
public class SysConf implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class SysConf {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
private String id;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.UnitType;
|
||||
@@ -24,8 +23,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "UNIT", schema = "supplier_ms")
|
||||
public class Unit implements IdentityEntity, NamedEntity, Serializable, Voable<UnitVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class Unit implements IdentityEntity, NamedEntity, Voable<UnitVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -18,17 +17,18 @@ import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 合格供应商名录
|
||||
* 合格供方名录
|
||||
* 每年一条记录
|
||||
* 下有 item 和 file
|
||||
* @see VendorApprovedItem
|
||||
* @see VendorApprovedFile
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "COMPANY_VENDOR_APPROVED")
|
||||
@ToString
|
||||
public class VendorApproved implements IdentityEntity, Serializable, Voable<VendorApprovedVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class VendorApproved implements IdentityEntity, Voable<VendorApprovedVo> {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -28,8 +27,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "COMPANY_VENDOR_APPROVED_FILE")
|
||||
@ToString
|
||||
public class VendorApprovedFile implements IdentityEntity, Serializable, Voable<VendorApprovedFileVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class VendorApprovedFile implements IdentityEntity, Voable<VendorApprovedFileVo> {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.VendorType;
|
||||
@@ -25,8 +24,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "VENDOR_CATALOG", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class VendorCatalog implements BasedEntity, IdentityEntity, Serializable, Voable<VendorCatalogVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class VendorCatalog implements BasedEntity, IdentityEntity, Voable<VendorCatalogVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.VendorFileType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.VendorFileTypeLocalVo;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -21,26 +17,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "COMPANY_VENDOR_FILE_TYPE_LOCAL")
|
||||
@ToString
|
||||
public class VendorFileTypeLocal extends BaseEnumEntity<VendorFileType> implements Serializable, Voable<VendorFileTypeLocalVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
if (this == object)
|
||||
return true;
|
||||
if (object == null)
|
||||
return false;
|
||||
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||
return false;
|
||||
}
|
||||
VendorFileTypeLocal that = (VendorFileTypeLocal) object;
|
||||
return getId() != null && Objects.equals(getId(), that.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
public class VendorFileTypeLocal extends BaseEnumEntity<VendorFileType> implements Voable<VendorFileTypeLocalVo> {
|
||||
|
||||
@Override
|
||||
public VendorFileTypeLocalVo toVo() {
|
||||
|
||||
@@ -8,7 +8,6 @@ import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -19,8 +18,7 @@ import java.util.Objects;
|
||||
@Entity
|
||||
@Table(name = "VENDOR_GROUP", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class VendorGroup implements IdentityEntity, NamedEntity, BasedEntity, Serializable, Voable<VendorGroupVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class VendorGroup implements IdentityEntity, NamedEntity, BasedEntity, Voable<VendorGroupVo> {
|
||||
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.ContractFileType;
|
||||
@@ -30,8 +29,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "VENDOR_GROUP_REQ_FILE_TYPE")
|
||||
public class VendorGroupRequireFileType implements IdentityEntity, BasedEntity, Serializable, Voable<VendorGroupRequireFileTypeVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class VendorGroupRequireFileType implements IdentityEntity, BasedEntity, Voable<VendorGroupRequireFileTypeVo> {
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.VendorTypeLocalVo;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -21,28 +17,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "VENDOR_TYPE_LOCAL")
|
||||
@ToString(callSuper = true)
|
||||
public class VendorTypeLocal extends BaseEnumEntity<VendorType> implements Serializable, Voable<VendorTypeLocalVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
if (this == object) {
|
||||
return true;
|
||||
}
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||
return false;
|
||||
}
|
||||
VendorTypeLocal that = (VendorTypeLocal) object;
|
||||
return getId() != null && Objects.equals(getId(), that.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
public class VendorTypeLocal extends BaseEnumEntity<VendorType> implements Voable<VendorTypeLocalVo> {
|
||||
|
||||
@Override
|
||||
public VendorTypeLocalVo toVo() {
|
||||
|
||||
@@ -11,7 +11,6 @@ import java.io.Serializable;
|
||||
@Embeddable
|
||||
@Data
|
||||
public class VolumeSize implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 体积
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user