refactor(vo): 重构VO对象结构,统一字段命名和接口实现
重构所有VO对象,统一字段命名规范,移除冗余字段,优化接口实现 新增Voable接口用于VO对象转换 调整BaseViewModel和ProjectBasedViewModel接口定义 更新相关服务和控制器以适应VO对象变更
This commit is contained in:
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.BankVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -18,7 +19,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "BANK", schema = "supplier_ms")
|
||||
public class Bank implements BasedEntity, IdentityEntity, Serializable {
|
||||
public class Bank implements BasedEntity, IdentityEntity, Serializable, Voable<BankVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -50,4 +51,13 @@ public class Bank implements BasedEntity, IdentityEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BankVo toVo() {
|
||||
BankVo vo = new BankVo();
|
||||
vo.setId(id);
|
||||
vo.setCode(code);
|
||||
vo.setName(name);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +34,6 @@ public abstract class BaseEnumEntity<T extends Enum<?>> implements IdentityEntit
|
||||
@Column(name = "VALUE")
|
||||
private String value;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -2,11 +2,13 @@ package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CloudTycVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -26,7 +28,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "CLOUD_TYC", schema = "supplier_ms")
|
||||
public class CloudTyc implements IdentityEntity, Serializable {
|
||||
public class CloudTyc implements IdentityEntity, Serializable, Voable<CloudTycVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
@@ -44,7 +46,7 @@ public class CloudTyc implements IdentityEntity, Serializable {
|
||||
private Integer score;
|
||||
|
||||
@Column(name = "CLOUD_LATEST")
|
||||
private Instant cloudLatest;
|
||||
private LocalDateTime cloudLatest;
|
||||
|
||||
/**
|
||||
* 平台编号
|
||||
@@ -56,7 +58,7 @@ public class CloudTyc implements IdentityEntity, Serializable {
|
||||
* 本地更新时间戳,控制更新频率和重复更新
|
||||
*/
|
||||
@Column(name = "LATEST_UPDATE")
|
||||
private Instant latestUpdate;
|
||||
private LocalDateTime latestUpdate;
|
||||
|
||||
/**
|
||||
* 关联的公司
|
||||
@@ -89,4 +91,20 @@ public class CloudTyc implements IdentityEntity, Serializable {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudTycVo toVo() {
|
||||
CloudTycVo vo = new CloudTycVo();
|
||||
vo.setId(id);
|
||||
vo.setScore(score);
|
||||
vo.setCloudLatest(cloudLatest);
|
||||
vo.setCloudId(cloudId);
|
||||
vo.setLatestUpdate(latestUpdate);
|
||||
if (company != null) {
|
||||
vo.setCompanyId(company.getId());
|
||||
}
|
||||
vo.setVersion(version);
|
||||
// active字段默认为false,在CloudTycVo类中已经设置
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CloudYuVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CLOUD_YU", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class CloudYu implements IdentityEntity, Serializable {
|
||||
public class CloudYu implements IdentityEntity, Serializable, Voable<CloudYuVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
@@ -41,7 +42,7 @@ public class CloudYu implements IdentityEntity, Serializable {
|
||||
* 本地更新时间戳,控制更新频率和重复更新
|
||||
*/
|
||||
@Column(name = "LATEST_UPDATE")
|
||||
private Instant latestUpdate;
|
||||
private LocalDateTime latestUpdate;
|
||||
|
||||
/**
|
||||
* 关联的公司
|
||||
@@ -71,7 +72,7 @@ public class CloudYu implements IdentityEntity, Serializable {
|
||||
* 数据更新日期
|
||||
*/
|
||||
@Column(name = "CLOUD_LATEST")
|
||||
private Instant cloudLatest;
|
||||
private LocalDateTime cloudLatest;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
@@ -90,4 +91,20 @@ public class CloudYu implements IdentityEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudYuVo toVo() {
|
||||
CloudYuVo vo = new CloudYuVo();
|
||||
vo.setId(id);
|
||||
vo.setLatestUpdate(latestUpdate);
|
||||
if (company != null) {
|
||||
vo.setCompanyId(company.getId());
|
||||
}
|
||||
vo.setExceptionMessage(exceptionMessage);
|
||||
vo.setVendorUpdateDate(vendorUpdateDate);
|
||||
vo.setCustomerUpdateDate(customerUpdateDate);
|
||||
vo.setCloudLatest(cloudLatest);
|
||||
// active字段默认为false,在CloudYuVo类中已经设置
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Objects;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CompanyVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "COMPANY")
|
||||
@ToString
|
||||
public class Company implements IdentityEntity, NamedEntity, BasedEntity, Serializable {
|
||||
public class Company implements IdentityEntity, NamedEntity, BasedEntity, Serializable, Voable<CompanyVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@@ -197,4 +198,32 @@ public class Company implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompanyVo toVo() {
|
||||
CompanyVo vo = new CompanyVo();
|
||||
vo.setId(id);
|
||||
vo.setName(name);
|
||||
vo.setUniscid(getUniscid());
|
||||
vo.setShortName(getShortName());
|
||||
vo.setPathExist(getPathExist());
|
||||
vo.setPath(getPath());
|
||||
vo.setCreated(getCreated());
|
||||
vo.setEntStatus(getEntStatus());
|
||||
vo.setEntType(getEntType());
|
||||
vo.setDistrict(getDistrict());
|
||||
vo.setIndustry(getIndustry());
|
||||
vo.setTelephone(getTelephone());
|
||||
vo.setRegAddr(getRegAddr());
|
||||
vo.setAddress(getAddress());
|
||||
vo.setSetupDate(getSetupDate());
|
||||
vo.setOperationPeriodBegin(getOperationPeriodBegin());
|
||||
vo.setOperationPeriodEnd(getOperationPeriodEnd());
|
||||
vo.setRegisteredCapital(registeredCapital);
|
||||
vo.setRegisteredCapitalCurrency(registeredCapitalCurrency);
|
||||
vo.setLegalRepresentative(legalRepresentative);
|
||||
vo.setMemo(memo);
|
||||
vo.setRemark(memo);
|
||||
vo.setVersion(version);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Objects;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CompanyContactVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -30,7 +31,7 @@ import lombok.ToString;
|
||||
@Index(name = "CUSTOMER_ID", columnList = "COMPANY_ID")
|
||||
})
|
||||
@ToString
|
||||
public class CompanyContact implements IdentityEntity, NamedEntity, BasedEntity, CompanyBasedEntity, Serializable {
|
||||
public class CompanyContact implements IdentityEntity, NamedEntity, BasedEntity, CompanyBasedEntity, Serializable, Voable<CompanyContactVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -97,4 +98,22 @@ public class CompanyContact implements IdentityEntity, NamedEntity, BasedEntity,
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompanyContactVo toVo() {
|
||||
CompanyContactVo vo = new CompanyContactVo();
|
||||
vo.setId(id);
|
||||
if (company != null) {
|
||||
vo.setCompanyId(company.getId());
|
||||
}
|
||||
vo.setName(name);
|
||||
vo.setPosition(position);
|
||||
vo.setPhone(phone);
|
||||
vo.setEmail(email);
|
||||
vo.setAddress(address);
|
||||
vo.setU8Code(u8Code);
|
||||
vo.setMemo(memo);
|
||||
vo.setCreated(created);
|
||||
// primary和active字段默认为false,在CompanyContactVo类中已经设置
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.model;
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
@@ -69,7 +70,7 @@ public class CompanyCustomer implements IdentityEntity, CompanyBasedEntity, Seri
|
||||
* 记录创建日期
|
||||
*/
|
||||
@Column(name = "CREATED")
|
||||
private Instant created;
|
||||
private LocalDateTime created;
|
||||
|
||||
@Version
|
||||
@ColumnDefault("0")
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CompanyCustomerEntityVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
||||
|
||||
})
|
||||
@ToString
|
||||
public class CompanyCustomerEntity implements IdentityEntity, Serializable {
|
||||
public class CompanyCustomerEntity implements IdentityEntity, Serializable, Voable<CompanyCustomerEntityVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -113,4 +114,30 @@ public class CompanyCustomerEntity implements IdentityEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompanyCustomerEntityVo toVo() {
|
||||
CompanyCustomerEntityVo vo = new CompanyCustomerEntityVo();
|
||||
vo.setId(id);
|
||||
if (customer != null) {
|
||||
vo.setCustomerId(customer.getId());
|
||||
}
|
||||
vo.setName(name);
|
||||
vo.setAbbName(abbName);
|
||||
vo.setCode(code);
|
||||
if (catalog != null) {
|
||||
vo.setCustomerCatalogId(catalog.getId());
|
||||
}
|
||||
if (creator != null) {
|
||||
vo.setCreatorId(creator.getId());
|
||||
}
|
||||
if (modifier != null) {
|
||||
vo.setModifierId(modifier.getId());
|
||||
}
|
||||
vo.setModifyDate(modifyDate);
|
||||
vo.setDevelopDate(developDate);
|
||||
vo.setUpdatedDate(updatedDate);
|
||||
vo.setFetchedTime(fetchedTime);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.CompanyFileType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CompanyFileVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -30,7 +31,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "COMPANY_FILE")
|
||||
@ToString
|
||||
public class CompanyFile implements IdentityEntity, CompanyBasedEntity, Serializable {
|
||||
public class CompanyFile implements IdentityEntity, CompanyBasedEntity, Serializable, Voable<CompanyFileVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@@ -81,4 +82,19 @@ public class CompanyFile implements IdentityEntity, CompanyBasedEntity, Serializ
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompanyFileVo toVo() {
|
||||
CompanyFileVo vo = new CompanyFileVo();
|
||||
vo.setId(id);
|
||||
if (company != null) {
|
||||
vo.setCompanyId(company.getId());
|
||||
}
|
||||
vo.setType(type);
|
||||
vo.setApplyDate(applyDate);
|
||||
vo.setExpiringDate(expiringDate);
|
||||
vo.setFilePath(filePath);
|
||||
vo.setActive(false); // 实体类中没有active字段,设置默认值false
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CompanyVendorVo;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -32,11 +32,9 @@ import lombok.ToString;
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "COMPANY_VENDOR", schema = "supplier_ms", indexes = {
|
||||
|
||||
})
|
||||
@Table(name = "COMPANY_VENDOR", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class CompanyVendor implements IdentityEntity, CompanyBasedEntity, Serializable {
|
||||
public class CompanyVendor implements IdentityEntity, CompanyBasedEntity, Serializable, Voable<CompanyVendorVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -100,7 +98,7 @@ public class CompanyVendor implements IdentityEntity, CompanyBasedEntity, Serial
|
||||
* 记录创建日期
|
||||
*/
|
||||
@Column(name = "CREATED")
|
||||
private Instant created;
|
||||
private LocalDateTime created;
|
||||
|
||||
@Version
|
||||
@ColumnDefault("0")
|
||||
@@ -124,4 +122,28 @@ public class CompanyVendor implements IdentityEntity, CompanyBasedEntity, Serial
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompanyVendorVo toVo() {
|
||||
CompanyVendorVo vo = new CompanyVendorVo();
|
||||
vo.setId(id);
|
||||
vo.setType(type);
|
||||
vo.setProtocolProvider(protocolProvider);
|
||||
if (company != null) {
|
||||
vo.setCompanyId(company.getId());
|
||||
}
|
||||
if (catalog != null) {
|
||||
vo.setCatalogId(catalog.getId());
|
||||
}
|
||||
vo.setDevelopDate(developDate);
|
||||
vo.setPath(path);
|
||||
if (contact != null) {
|
||||
vo.setContactId(contact.getId());
|
||||
}
|
||||
vo.setPurchase(purchase);
|
||||
vo.setDescription(description);
|
||||
vo.setCreated(created);
|
||||
vo.setVersion(version);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CompanyVendorEntityVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -30,7 +31,7 @@ import lombok.ToString;
|
||||
|
||||
})
|
||||
@ToString
|
||||
public class CompanyVendorEntity implements IdentityEntity, Serializable {
|
||||
public class CompanyVendorEntity implements IdentityEntity, Serializable, Voable<CompanyVendorEntityVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -109,4 +110,30 @@ public class CompanyVendorEntity implements IdentityEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompanyVendorEntityVo toVo() {
|
||||
CompanyVendorEntityVo vo = new CompanyVendorEntityVo();
|
||||
vo.setId(id);
|
||||
if (vendor != null) {
|
||||
vo.setVendorId(vendor.getId());
|
||||
}
|
||||
vo.setName(name);
|
||||
vo.setAbbName(abbName);
|
||||
vo.setCode(code);
|
||||
if (catalog != null) {
|
||||
vo.setCatalogId(catalog.getId());
|
||||
}
|
||||
if (creator != null) {
|
||||
vo.setCreatorId(creator.getId());
|
||||
}
|
||||
if (modifier != null) {
|
||||
vo.setModifierId(modifier.getId());
|
||||
}
|
||||
vo.setModifyDate(modifyDate);
|
||||
vo.setDevelopDate(developDate);
|
||||
vo.setUpdatedDate(updatedDate);
|
||||
vo.setFetchedTime(fetchedTime);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import com.ecep.contract.ContractPayWay;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ContractVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -35,7 +36,8 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class Contract implements IdentityEntity, NamedEntity, BasedEntity, CompanyBasedEntity, Serializable {
|
||||
public class Contract
|
||||
implements IdentityEntity, NamedEntity, BasedEntity, CompanyBasedEntity, Serializable, Voable<ContractVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
@@ -304,4 +306,66 @@ public class Contract implements IdentityEntity, NamedEntity, BasedEntity, Compa
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractVo toVo() {
|
||||
ContractVo vo = new ContractVo();
|
||||
vo.setId(id);
|
||||
vo.setGuid(getGuid());
|
||||
vo.setCode(getCode());
|
||||
vo.setName(name);
|
||||
if (getCompany() != null) {
|
||||
vo.setCompanyId(getCompany().getId());
|
||||
}
|
||||
if (group != null) {
|
||||
vo.setGroupId(group.getId());
|
||||
}
|
||||
if (type != null) {
|
||||
vo.setTypeId(type.getId());
|
||||
}
|
||||
if (kind != null) {
|
||||
vo.setKindId(kind.getId());
|
||||
}
|
||||
if (project != null) {
|
||||
vo.setProject(project.getId());
|
||||
}
|
||||
vo.setParentCode(getParentCode());
|
||||
vo.setOrderDate(getOrderDate());
|
||||
vo.setStartDate(getStartDate());
|
||||
vo.setEndDate(getEndDate());
|
||||
if (setupPerson != null) {
|
||||
vo.setSetupPersonId(setupPerson.getId());
|
||||
}
|
||||
vo.setSetupDate(getSetupDate());
|
||||
if (inurePerson != null) {
|
||||
vo.setInurePersonId(inurePerson.getId());
|
||||
}
|
||||
vo.setInureDate(getInureDate());
|
||||
if (varyPerson != null) {
|
||||
vo.setVaryPersonId(varyPerson.getId());
|
||||
}
|
||||
vo.setVaryDate(getVaryDate());
|
||||
if (employee != null) {
|
||||
vo.setEmployeeId(employee.getId());
|
||||
}
|
||||
if (handler != null) {
|
||||
vo.setHandlerId(handler.getId());
|
||||
}
|
||||
vo.setState(getState());
|
||||
vo.setPath(getPath());
|
||||
vo.setDescription(getDescription());
|
||||
vo.setCreated(getCreated());
|
||||
vo.setAmount(getAmount());
|
||||
vo.setStandardPayWay(isStandardPayWay());
|
||||
vo.setStandardPContractText(isStandardPContractText());
|
||||
vo.setTotalQuantity(getTotalQuantity());
|
||||
vo.setTotalAmount(getTotalAmount());
|
||||
vo.setTotalUnTaxAmount(getTotalUnTaxAmount());
|
||||
vo.setExecQuantity(getExecQuantity());
|
||||
vo.setExecAmount(getExecAmount());
|
||||
vo.setExecUnTaxAmount(getExecUnTaxAmount());
|
||||
vo.setPayWay(getPayWay());
|
||||
vo.setVersion(getVersion());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ContractCatalogVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -23,7 +24,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_CATALOG", schema = "supplier_ms")
|
||||
public class ContractCatalog implements IdentityEntity, NamedEntity, Serializable {
|
||||
public class ContractCatalog implements IdentityEntity, NamedEntity, Serializable, Voable<ContractCatalogVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -68,4 +69,16 @@ public class ContractCatalog implements IdentityEntity, NamedEntity, Serializabl
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractCatalogVo toVo() {
|
||||
ContractCatalogVo vo = new ContractCatalogVo();
|
||||
vo.setId(id);
|
||||
vo.setCode(code);
|
||||
vo.setName(name);
|
||||
vo.setPath(path);
|
||||
vo.setParent(parent);
|
||||
vo.setUseYear(useYear);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ 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;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -21,7 +22,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_FILE_TYPE_LOCAL")
|
||||
@ToString
|
||||
public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> implements Serializable {
|
||||
public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> implements Serializable, Voable<ContractFileTypeLocalVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 建议的文件名
|
||||
@@ -29,6 +30,9 @@ public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> impl
|
||||
@Column(name = "SUGGEST_FILE_NAME")
|
||||
private String suggestFileName;
|
||||
|
||||
@Column(name = "DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
if (this == object)
|
||||
@@ -46,4 +50,15 @@ public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> impl
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractFileTypeLocalVo toVo() {
|
||||
ContractFileTypeLocalVo vo = new ContractFileTypeLocalVo();
|
||||
vo.setId(getId());
|
||||
vo.setLanguage(getLang());
|
||||
vo.setType(getType());
|
||||
vo.setDescription(getDescription());
|
||||
vo.setSuggestFileName(suggestFileName);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ContractGroupVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -21,7 +22,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_GROUP", schema = "supplier_ms")
|
||||
public class ContractGroup implements IdentityEntity, NamedEntity, Serializable {
|
||||
public class ContractGroup implements IdentityEntity, NamedEntity, Serializable, Voable<ContractGroupVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -67,4 +68,16 @@ public class ContractGroup implements IdentityEntity, NamedEntity, Serializable
|
||||
super.hashCode();
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractGroupVo toVo() {
|
||||
ContractGroupVo vo = new ContractGroupVo();
|
||||
vo.setId(id);
|
||||
vo.setName(name);
|
||||
vo.setCode(code);
|
||||
vo.setTitle(title);
|
||||
// 注意:ContractGroup实体类中似乎没有parentId、order、description和active字段,但ContractGroupVo中有这些字段
|
||||
// 由于实体类中没有这些字段,所以无法设置它们的值
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ContractItemVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -28,7 +29,8 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_ITEM")
|
||||
@ToString
|
||||
public class ContractItem implements IdentityEntity, ContractBasedEntity, BasedEntity, Serializable {
|
||||
public class ContractItem
|
||||
implements IdentityEntity, ContractBasedEntity, BasedEntity, Serializable, Voable<ContractItemVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -162,4 +164,37 @@ public class ContractItem implements IdentityEntity, ContractBasedEntity, BasedE
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractItemVo toVo() {
|
||||
ContractItemVo vo = new ContractItemVo();
|
||||
vo.setId(id);
|
||||
if (contract != null) {
|
||||
vo.setContractId(contract.getId());
|
||||
}
|
||||
vo.setRefId(refId);
|
||||
vo.setItemCode(itemCode);
|
||||
vo.setTitle(title);
|
||||
vo.setSpecification(specification);
|
||||
vo.setUnit(unit);
|
||||
if (inventory != null) {
|
||||
vo.setInventoryId(inventory.getId());
|
||||
}
|
||||
vo.setExclusiveTaxPrice(exclusiveTaxPrice);
|
||||
vo.setTaxRate(taxRate);
|
||||
vo.setTaxPrice(taxPrice);
|
||||
vo.setQuantity(quantity);
|
||||
vo.setCreateDate(createDate);
|
||||
vo.setUpdateDate(updateDate);
|
||||
vo.setStartDate(startDate);
|
||||
vo.setEndDate(endDate);
|
||||
if (creator != null) {
|
||||
vo.setCreatorId(creator.getId());
|
||||
}
|
||||
if (updater != null) {
|
||||
vo.setUpdaterId(updater.getId());
|
||||
}
|
||||
vo.setRemark(remark);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ContractKindVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -23,7 +24,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_KIND", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class ContractKind implements IdentityEntity, NamedEntity, Serializable {
|
||||
public class ContractKind implements IdentityEntity, NamedEntity, Serializable, Voable<ContractKindVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -67,4 +68,16 @@ public class ContractKind implements IdentityEntity, NamedEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractKindVo toVo() {
|
||||
ContractKindVo vo = new ContractKindVo();
|
||||
vo.setId(id);
|
||||
vo.setName(name);
|
||||
vo.setCode(code);
|
||||
vo.setTitle(title);
|
||||
// 注意:ContractKind实体类中似乎没有active字段,但ContractKindVo中有这些字段
|
||||
// 由于实体类中没有这些字段,所以无法设置它们的值
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ContractPayPlanVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -27,7 +28,7 @@ import lombok.Setter;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_PAY_PLAN", schema = "supplier_ms", indexes = {
|
||||
})
|
||||
public class ContractPayPlan implements IdentityEntity, ContractBasedEntity, Serializable {
|
||||
public class ContractPayPlan implements IdentityEntity, ContractBasedEntity, Serializable, Voable<ContractPayPlanVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -86,4 +87,19 @@ public class ContractPayPlan implements IdentityEntity, ContractBasedEntity, Ser
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractPayPlanVo toVo() {
|
||||
ContractPayPlanVo vo = new ContractPayPlanVo();
|
||||
vo.setId(id);
|
||||
if (contract != null) {
|
||||
vo.setContractId(contract.getId());
|
||||
}
|
||||
vo.setRefId(refId);
|
||||
vo.setPayCurrency(payCurrency);
|
||||
vo.setPayDate(payDate);
|
||||
vo.setUpdateDate(updateDate);
|
||||
vo.setPayTerm(payTerm);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ContractTypeVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -23,7 +24,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_TYPE", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class ContractType implements IdentityEntity, NamedEntity, Serializable {
|
||||
public class ContractType implements IdentityEntity, NamedEntity, Serializable, Voable<ContractTypeVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -74,4 +75,18 @@ public class ContractType implements IdentityEntity, NamedEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractTypeVo toVo() {
|
||||
ContractTypeVo vo = new ContractTypeVo();
|
||||
vo.setId(id);
|
||||
vo.setName(name);
|
||||
vo.setCode(code);
|
||||
vo.setCatalog(catalog);
|
||||
vo.setTitle(title);
|
||||
vo.setDirection(direction);
|
||||
// 注意:ContractType实体类中似乎没有active字段,但ContractTypeVo中有这些字段
|
||||
// 由于实体类中没有这些字段,所以无法设置它们的值
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.DepartmentVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.FetchType;
|
||||
@@ -21,7 +22,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "DEPARTMENT", schema = "supplier_ms")
|
||||
public class Department implements BasedEntity, IdentityEntity, Serializable {
|
||||
public class Department implements BasedEntity, IdentityEntity, Serializable, Voable<DepartmentVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -61,4 +62,17 @@ public class Department implements BasedEntity, IdentityEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DepartmentVo toVo() {
|
||||
DepartmentVo vo = new DepartmentVo();
|
||||
vo.setId(id);
|
||||
vo.setName(name);
|
||||
vo.setCode(code);
|
||||
if (getLeader() != null) {
|
||||
vo.setLeaderId(getLeader().getId());
|
||||
}
|
||||
vo.setActive(isActive);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.EmployeeVo;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "EMPLOYEE", schema = "supplier_ms")
|
||||
public class Employee implements BasedEntity, IdentityEntity, NamedEntity, Serializable {
|
||||
public class Employee implements BasedEntity, IdentityEntity, NamedEntity, Serializable, Voable<EmployeeVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -130,4 +131,31 @@ public class Employee implements BasedEntity, IdentityEntity, NamedEntity, Seria
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmployeeVo toVo() {
|
||||
EmployeeVo vo = new EmployeeVo();
|
||||
vo.setId(id);
|
||||
vo.setAccount(account);
|
||||
vo.setName(name);
|
||||
vo.setAlias(alias);
|
||||
vo.setCode(code);
|
||||
if (getDepartment() != null) {
|
||||
vo.setDepartmentId(getDepartment().getId());
|
||||
}
|
||||
vo.setPhone(phone);
|
||||
vo.setEmail(email);
|
||||
vo.setCreated(created);
|
||||
vo.setEntryDate(entryDate);
|
||||
vo.setLeaveDate(leaveDate);
|
||||
vo.setLocale(locale);
|
||||
vo.setDateFormatter(dateFormatter);
|
||||
vo.setDateTimeFormatter(dateTimeFormatter);
|
||||
vo.setTimeFormatter(timeFormatter);
|
||||
vo.setTimeZone(timeZone);
|
||||
vo.setNumberFormatter(numberFormatter);
|
||||
vo.setCurrencyFormatter(currencyFormatter);
|
||||
vo.setActive(isActive());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.EmployeeAuthBindVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.FetchType;
|
||||
@@ -22,7 +23,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "EMPLOYEE_AUTH_BIND", schema = "supplier_ms")
|
||||
public class EmployeeAuthBind implements BasedEntity, IdentityEntity, Serializable {
|
||||
public class EmployeeAuthBind implements BasedEntity, IdentityEntity, Serializable, Voable<EmployeeAuthBindVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -80,4 +81,18 @@ public class EmployeeAuthBind implements BasedEntity, IdentityEntity, Serializab
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmployeeAuthBindVo toVo() {
|
||||
EmployeeAuthBindVo vo = new EmployeeAuthBindVo();
|
||||
vo.setId(id);
|
||||
vo.setEmployeeId(employee != null ? employee.getId() : null);
|
||||
vo.setIp(ip);
|
||||
vo.setMac(mac);
|
||||
vo.setCreateTime(createTime);
|
||||
vo.setUpdaterId(updater != null ? updater.getId() : null);
|
||||
vo.setUpdateTime(updateTime);
|
||||
vo.setDescription(description);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.EmployeeLoginHistoryVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.FetchType;
|
||||
@@ -21,7 +22,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "EMPLOYEE_LOGIN_HISTORY", schema = "supplier_ms")
|
||||
public class EmployeeLoginHistory implements BasedEntity, IdentityEntity, Serializable {
|
||||
public class EmployeeLoginHistory implements BasedEntity, IdentityEntity, Serializable, Voable<EmployeeLoginHistoryVo> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@@ -67,4 +68,16 @@ public class EmployeeLoginHistory implements BasedEntity, IdentityEntity, Serial
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EmployeeLoginHistoryVo toVo() {
|
||||
EmployeeLoginHistoryVo vo = new EmployeeLoginHistoryVo();
|
||||
vo.setId(id);
|
||||
vo.setEmployeeId(employee != null ? employee.getId() : null);
|
||||
vo.setIp(ip);
|
||||
vo.setMac(mac);
|
||||
vo.setLoginTime(loginTime);
|
||||
vo.setActiveTime(activeTime);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,9 +143,11 @@ public class Inventory implements IdentityEntity, BasedEntity, Serializable {
|
||||
@ToString.Exclude
|
||||
private Employee creator;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "CREATE_DATE")
|
||||
private LocalDate createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.time.Year;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.InventoryHistoryPriceVo;
|
||||
|
||||
import jakarta.persistence.AttributeOverride;
|
||||
import jakarta.persistence.AttributeOverrides;
|
||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
||||
@ToString
|
||||
@Entity
|
||||
@Table(name = "INVENTORY_HISTORY", schema = "supplier_ms")
|
||||
public class InventoryHistoryPrice implements IdentityEntity, Serializable {
|
||||
public class InventoryHistoryPrice implements IdentityEntity, Serializable, Voable<InventoryHistoryPriceVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -121,4 +122,23 @@ public class InventoryHistoryPrice implements IdentityEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventoryHistoryPriceVo toVo() {
|
||||
InventoryHistoryPriceVo vo = new InventoryHistoryPriceVo();
|
||||
vo.setId(getId());
|
||||
if (getInventory() != null) {
|
||||
vo.setInventoryId(getInventory().getId());
|
||||
}
|
||||
vo.setYear(getYear());
|
||||
|
||||
vo.setLatestPurchasePrice((getLatestPurchasePrice()));
|
||||
vo.setLatestSalePrice((getLatestSalePrice()));
|
||||
vo.setMiniPurchasePrice((getMiniPurchasePrice()));
|
||||
vo.setMiniSalePrice((getMiniSalePrice()));
|
||||
vo.setMaxPurchasePrice((getMaxPurchasePrice()));
|
||||
vo.setMaxSalePrice((getMaxSalePrice()));
|
||||
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Objects;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.InvoiceVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -29,7 +30,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "INVOICE", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class Invoice implements IdentityEntity, BasedEntity, Serializable {
|
||||
public class Invoice implements IdentityEntity, BasedEntity, Serializable, Voable<InvoiceVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@@ -88,4 +89,17 @@ public class Invoice implements IdentityEntity, BasedEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InvoiceVo toVo() {
|
||||
InvoiceVo vo = new InvoiceVo();
|
||||
vo.setId(id);
|
||||
if (company != null) {
|
||||
vo.setCompanyId(company.getId());
|
||||
}
|
||||
vo.setCode(code);
|
||||
vo.setInvoiceDate(invoiceDate);
|
||||
vo.setDescription(description);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Objects;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ProjectVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -30,7 +31,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "PROJECT", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serializable {
|
||||
public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serializable, Voable<ProjectVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@@ -247,4 +248,65 @@ public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectVo toVo() {
|
||||
ProjectVo vo = new ProjectVo();
|
||||
vo.setId(id);
|
||||
vo.setName(name);
|
||||
vo.setCode(code);
|
||||
if (getCustomer() != null) {
|
||||
vo.setCustomerId(getCustomer().getId());
|
||||
}
|
||||
if (getProjectType() != null) {
|
||||
vo.setProjectTypeId(getProjectType().getId());
|
||||
}
|
||||
if (getIndustry() != null) {
|
||||
vo.setIndustryId(getIndustry().getId());
|
||||
}
|
||||
if (getSaleType() != null) {
|
||||
vo.setSaleTypeId(getSaleType().getId());
|
||||
}
|
||||
if (getProductType() != null) {
|
||||
vo.setProductTypeId(getProductType().getId());
|
||||
}
|
||||
if (getDeliverySignMethod() != null) {
|
||||
vo.setDeliverySignMethodId(getDeliverySignMethod().getId());
|
||||
}
|
||||
if (getProductUsage() != null) {
|
||||
vo.setProductUsageId(getProductUsage().getId());
|
||||
}
|
||||
vo.setCodeYear(getCodeYear());
|
||||
vo.setCodeSequenceNumber(getCodeSequenceNumber());
|
||||
if (getApplicant() != null) {
|
||||
vo.setApplicantId(getApplicant().getId());
|
||||
}
|
||||
if (getAuthorizer() != null) {
|
||||
vo.setAuthorizerId(getAuthorizer().getId());
|
||||
}
|
||||
if (getBankAccount() != null) {
|
||||
vo.setBankAccountId(getBankAccount().getId());
|
||||
}
|
||||
if (getInvoiceInfo() != null) {
|
||||
vo.setInvoiceInfoId(getInvoiceInfo().getId());
|
||||
}
|
||||
if (getMainContact() != null) {
|
||||
vo.setMainContactId(getMainContact().getId());
|
||||
}
|
||||
if (getSubContact() != null) {
|
||||
vo.setSubContactId(getSubContact().getId());
|
||||
}
|
||||
vo.setAddress(getAddress());
|
||||
vo.setUseBid(isUseBid());
|
||||
vo.setUseOffer(isUseOffer());
|
||||
vo.setAmount(getAmount());
|
||||
vo.setStandardPayWay(isStandardPayWay());
|
||||
vo.setPath(getPath());
|
||||
vo.setCreated(getCreated());
|
||||
vo.setPlannedStartTime(getPlannedStartTime());
|
||||
vo.setPlannedCompletionTime(getPlannedCompletionTime());
|
||||
vo.setDescription(getDescription());
|
||||
vo.setVersion(version);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.ProjectFileType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ProjectFileVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -29,7 +30,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "PROJECT_FILE")
|
||||
@ToString
|
||||
public class ProjectFile implements IdentityEntity, ProjectBasedEntity, java.io.Serializable {
|
||||
public class ProjectFile implements IdentityEntity, ProjectBasedEntity, java.io.Serializable, Voable<ProjectFileVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@@ -66,4 +67,16 @@ public class ProjectFile implements IdentityEntity, ProjectBasedEntity, java.io.
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectFileVo toVo() {
|
||||
ProjectFileVo vo = new ProjectFileVo();
|
||||
vo.setId(getId());
|
||||
if (getProject() != null) {
|
||||
vo.setProjectId(getProject().getId());
|
||||
}
|
||||
vo.setType(getType());
|
||||
vo.setFilePath(getFilePath());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.ContractPayWay;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ProjectFundPlanVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -32,7 +33,8 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "PROJECT_FUND_PLAN")
|
||||
@ToString
|
||||
public class ProjectFundPlan implements IdentityEntity, ProjectBasedEntity, java.io.Serializable {
|
||||
public class ProjectFundPlan
|
||||
implements IdentityEntity, ProjectBasedEntity, java.io.Serializable, Voable<ProjectFundPlanVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -98,4 +100,27 @@ public class ProjectFundPlan implements IdentityEntity, ProjectBasedEntity, java
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectFundPlanVo toVo() {
|
||||
ProjectFundPlanVo vo = new ProjectFundPlanVo();
|
||||
vo.setId(id);
|
||||
if (project != null) {
|
||||
vo.setProjectId(project.getId());
|
||||
vo.setProjectName(project.getName());
|
||||
}
|
||||
vo.setPayDate(payDate);
|
||||
if (payWay != null) {
|
||||
vo.setPayWay(payWay);
|
||||
}
|
||||
vo.setPayRatio(payRatio);
|
||||
vo.setPayCurrency(payCurrency);
|
||||
vo.setPayTerm(payTerm);
|
||||
if (contractPayPlan != null) {
|
||||
vo.setContractPayPlanId(contractPayPlan.getId());
|
||||
// 注意:ContractPayPlan实体类中没有name字段,无法设置contractPayPlanName
|
||||
}
|
||||
vo.setUpdateDate(updateDate);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.PurchaseBillVoucherVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -27,7 +28,8 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "PURCHASE_BILL_VOUCHER", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class PurchaseBillVoucher implements IdentityEntity, BasedEntity, java.io.Serializable {
|
||||
public class PurchaseBillVoucher
|
||||
implements IdentityEntity, BasedEntity, java.io.Serializable, Voable<PurchaseBillVoucherVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -126,4 +128,32 @@ public class PurchaseBillVoucher implements IdentityEntity, BasedEntity, java.io
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseBillVoucherVo toVo() {
|
||||
PurchaseBillVoucherVo vo = new PurchaseBillVoucherVo();
|
||||
vo.setId(id);
|
||||
vo.setRefId(refId);
|
||||
vo.setCode(code);
|
||||
if (company != null) {
|
||||
vo.setCompanyId(company.getId());
|
||||
}
|
||||
if (invoice != null) {
|
||||
vo.setInvoiceId(invoice.getId());
|
||||
}
|
||||
if (employee != null) {
|
||||
vo.setEmployeeId(employee.getId());
|
||||
}
|
||||
if (maker != null) {
|
||||
vo.setMakerId(maker.getId());
|
||||
}
|
||||
vo.setMakerDate(makerDate);
|
||||
vo.setModifyDate(modifyDate);
|
||||
if (verifier != null) {
|
||||
vo.setVerifierId(verifier.getId());
|
||||
}
|
||||
vo.setVerifierDate(verifierDate);
|
||||
vo.setDescription(description);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.model;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.PurchaseBillVoucherItemVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -26,7 +27,8 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "PURCHASE_BILL_VOUCHER_ITEM", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class PurchaseBillVoucherItem implements IdentityEntity, BasedEntity, java.io.Serializable {
|
||||
public class PurchaseBillVoucherItem
|
||||
implements IdentityEntity, BasedEntity, java.io.Serializable, Voable<PurchaseBillVoucherItemVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -109,4 +111,30 @@ public class PurchaseBillVoucherItem implements IdentityEntity, BasedEntity, jav
|
||||
public String toPrettyString() {
|
||||
return "#" + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseBillVoucherItemVo toVo() {
|
||||
PurchaseBillVoucherItemVo vo = new PurchaseBillVoucherItemVo();
|
||||
vo.setId(id);
|
||||
vo.setRefId(refId);
|
||||
if (voucher != null) {
|
||||
vo.setVoucherId(voucher.getId());
|
||||
}
|
||||
if (orderItem != null) {
|
||||
vo.setOrderItemId(orderItem.getId());
|
||||
}
|
||||
if (invoice != null) {
|
||||
vo.setInvoiceId(invoice.getId());
|
||||
}
|
||||
if (inventory != null) {
|
||||
vo.setInventoryId(inventory.getId());
|
||||
}
|
||||
if (contract != null) {
|
||||
vo.setContractId(contract.getId());
|
||||
}
|
||||
vo.setQuantity(quantity);
|
||||
vo.setPrice(price);
|
||||
vo.setDescription(description);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.PurchaseOrderVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "PURCHASE_ORDER", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class PurchaseOrder implements IdentityEntity, BasedEntity, ContractBasedEntity, java.io.Serializable {
|
||||
public class PurchaseOrder implements IdentityEntity, BasedEntity, ContractBasedEntity, java.io.Serializable, Voable<PurchaseOrderVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -116,4 +117,26 @@ public class PurchaseOrder implements IdentityEntity, BasedEntity, ContractBased
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrderVo toVo() {
|
||||
PurchaseOrderVo vo = new PurchaseOrderVo();
|
||||
vo.setId(id);
|
||||
if (contract != null) {
|
||||
vo.setContractId(contract.getId());
|
||||
}
|
||||
vo.setCode(code);
|
||||
// PurchaseOrder中没有name字段,这里可以设置为code
|
||||
vo.setName(code);
|
||||
// PurchaseOrder中没有vendorId字段,只有vendorCode
|
||||
// vo.setVendorId();
|
||||
// PurchaseOrder中没有orderDate字段,这里可以设置为makerDate
|
||||
if (makerDate != null) {
|
||||
vo.setOrderDate(makerDate.toLocalDate());
|
||||
}
|
||||
// PurchaseOrder中没有totalAmount、taxAmount、taxRate和statusId字段,暂时不设置
|
||||
vo.setRemark(description);
|
||||
// active字段默认为false,在PurchaseOrderVo类中已经设置
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.model;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.PurchaseSettlementVoucherItemVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -26,7 +27,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "PURCHASE_SETTLE_VOUCHER_ITEM", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class PurchaseSettlementVoucherItem implements IdentityEntity, BasedEntity, java.io.Serializable {
|
||||
public class PurchaseSettlementVoucherItem implements IdentityEntity, BasedEntity, java.io.Serializable, Voable<PurchaseSettlementVoucherItemVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -113,4 +114,35 @@ public class PurchaseSettlementVoucherItem implements IdentityEntity, BasedEntit
|
||||
public String toPrettyString() {
|
||||
return "#" + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseSettlementVoucherItemVo toVo() {
|
||||
PurchaseSettlementVoucherItemVo vo = new PurchaseSettlementVoucherItemVo();
|
||||
vo.setId(id);
|
||||
vo.setRefId(refId);
|
||||
if (voucher != null) {
|
||||
vo.setVoucherId(voucher.getId());
|
||||
vo.setVoucherCode(voucher.getCode());
|
||||
}
|
||||
if (accountant != null) {
|
||||
vo.setAccountantId(accountant.getId());
|
||||
vo.setAccountantName(accountant.getName());
|
||||
}
|
||||
if (invoice != null) {
|
||||
vo.setInvoiceId(invoice.getId());
|
||||
vo.setInvoiceCode(invoice.getCode());
|
||||
}
|
||||
if (receipt != null) {
|
||||
vo.setReceiptId(receipt.getId());
|
||||
vo.setReceiptCode(receipt.getCode());
|
||||
}
|
||||
if (inventory != null) {
|
||||
vo.setInventoryId(inventory.getId());
|
||||
vo.setInventoryName(inventory.getName());
|
||||
}
|
||||
vo.setQuantity(quantity);
|
||||
vo.setPrice(price);
|
||||
vo.setDescription(description);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.SalesBillVoucherVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "SALES_BILL_VOUCHER", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class SalesBillVoucher implements IdentityEntity, BasedEntity, java.io.Serializable {
|
||||
public class SalesBillVoucher implements IdentityEntity, BasedEntity, java.io.Serializable, Voable<SalesBillVoucherVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -126,4 +127,33 @@ public class SalesBillVoucher implements IdentityEntity, BasedEntity, java.io.Se
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalesBillVoucherVo toVo() {
|
||||
SalesBillVoucherVo vo = new SalesBillVoucherVo();
|
||||
vo.setId(id);
|
||||
vo.setRefId(refId);
|
||||
vo.setCode(code);
|
||||
if (company != null) {
|
||||
vo.setCompanyId(company.getId());
|
||||
}
|
||||
if (order != null) {
|
||||
vo.setOrderId(order.getId());
|
||||
vo.setOrderCode(order.getCode());
|
||||
}
|
||||
if (employee != null) {
|
||||
vo.setEmployeeId(employee.getId());
|
||||
}
|
||||
if (maker != null) {
|
||||
vo.setMakerId(maker.getId());
|
||||
}
|
||||
vo.setMakerDate(makerDate);
|
||||
vo.setModifyDate(modifyDate);
|
||||
if (verifier != null) {
|
||||
vo.setVerifierId(verifier.getId());
|
||||
}
|
||||
vo.setVerifierDate(verifierDate);
|
||||
vo.setDescription(description);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.model;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.SalesBillVoucherItemVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -26,7 +27,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "SALES_BILL_VOUCHER_ITEM", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class SalesBillVoucherItem implements IdentityEntity, BasedEntity, java.io.Serializable {
|
||||
public class SalesBillVoucherItem implements IdentityEntity, BasedEntity, java.io.Serializable, Voable<SalesBillVoucherItemVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -88,4 +89,23 @@ public class SalesBillVoucherItem implements IdentityEntity, BasedEntity, java.i
|
||||
public String toPrettyString() {
|
||||
return "#" + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalesBillVoucherItemVo toVo() {
|
||||
SalesBillVoucherItemVo vo = new SalesBillVoucherItemVo();
|
||||
vo.setId(id);
|
||||
vo.setRefId(refId);
|
||||
if (voucher != null) {
|
||||
vo.setVoucherId(voucher.getId());
|
||||
vo.setVoucherCode(voucher.getCode());
|
||||
}
|
||||
if (inventory != null) {
|
||||
vo.setInventoryId(inventory.getId());
|
||||
vo.setInventoryName(inventory.getName());
|
||||
}
|
||||
vo.setQuantity(quantity);
|
||||
vo.setPrice(price);
|
||||
vo.setDescription(description);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.SalesOrderVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -28,7 +29,8 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_SALES_ORDER", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class SalesOrder implements IdentityEntity, BasedEntity, ContractBasedEntity, Serializable {
|
||||
public class SalesOrder
|
||||
implements IdentityEntity, BasedEntity, ContractBasedEntity, Serializable, Voable<SalesOrderVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -104,4 +106,28 @@ public class SalesOrder implements IdentityEntity, BasedEntity, ContractBasedEnt
|
||||
public String toPrettyString() {
|
||||
return "#" + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalesOrderVo toVo() {
|
||||
SalesOrderVo vo = new SalesOrderVo();
|
||||
vo.setId(id);
|
||||
if (contract != null) {
|
||||
vo.setContractId(contract.getId());
|
||||
}
|
||||
vo.setCode(code);
|
||||
if (employee != null) {
|
||||
vo.setEmployeeId(employee.getId());
|
||||
}
|
||||
if (maker != null) {
|
||||
vo.setMakerId(maker.getId());
|
||||
}
|
||||
vo.setMakerDate(makerDate);
|
||||
if (verifier != null) {
|
||||
vo.setVerifierId(verifier.getId());
|
||||
}
|
||||
vo.setVerifierDate(verifierDate);
|
||||
|
||||
// active字段默认为false,在SalesOrderVo类中已经设置
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.SalesOrderItemVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -28,7 +29,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "CONTRACT_SALES_ORDER_ITEM", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class SalesOrderItem implements IdentityEntity, BasedEntity, Serializable {
|
||||
public class SalesOrderItem implements IdentityEntity, BasedEntity, Serializable, Voable<SalesOrderItemVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -98,4 +99,24 @@ public class SalesOrderItem implements IdentityEntity, BasedEntity, Serializable
|
||||
public String toPrettyString() {
|
||||
return "#" + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalesOrderItemVo toVo() {
|
||||
SalesOrderItemVo vo = new SalesOrderItemVo();
|
||||
vo.setId(id);
|
||||
vo.setCode(code);
|
||||
vo.setName(name);
|
||||
if (order != null) {
|
||||
vo.setSalesOrderId(order.getId());
|
||||
}
|
||||
vo.setItemName(name);
|
||||
vo.setQuantity(quantity);
|
||||
vo.setPrice(price);
|
||||
vo.setTaxRate(taxRate);
|
||||
vo.setExclusiveTaxPrice(exclusiveTaxPrice);
|
||||
vo.setStartDate(startDate);
|
||||
vo.setEndDate(endDate);
|
||||
vo.setDescription(description);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.UnitType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.UnitVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.EnumType;
|
||||
@@ -23,7 +24,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "UNIT", schema = "supplier_ms")
|
||||
public class Unit implements IdentityEntity, NamedEntity, Serializable {
|
||||
public class Unit implements IdentityEntity, NamedEntity, Serializable, Voable<UnitVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -66,4 +67,16 @@ public class Unit implements IdentityEntity, NamedEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitVo toVo() {
|
||||
UnitVo vo = new UnitVo();
|
||||
vo.setId(id);
|
||||
vo.setCode(code);
|
||||
vo.setName(name);
|
||||
vo.setUnitType(unitType);
|
||||
vo.setRatio(ratio);
|
||||
vo.setStandard(standard);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.VendorCatalogVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -24,7 +25,7 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "VENDOR_CATALOG", schema = "supplier_ms")
|
||||
@ToString
|
||||
public class VendorCatalog implements BasedEntity, Serializable {
|
||||
public class VendorCatalog implements BasedEntity, Serializable, Voable<VendorCatalogVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -62,4 +63,14 @@ public class VendorCatalog implements BasedEntity, Serializable {
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VendorCatalogVo toVo() {
|
||||
VendorCatalogVo vo = new VendorCatalogVo();
|
||||
vo.setId(id);
|
||||
vo.setCode(code);
|
||||
vo.setName(name);
|
||||
vo.setType(type);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
10
common/src/main/java/com/ecep/contract/model/Voable.java
Normal file
10
common/src/main/java/com/ecep/contract/model/Voable.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.ecep.contract.model;
|
||||
|
||||
public interface Voable<T> {
|
||||
/**
|
||||
* 转换为Vo
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
T toVo();
|
||||
}
|
||||
29
common/src/main/java/com/ecep/contract/vo/CloudBasedVo.java
Normal file
29
common/src/main/java/com/ecep/contract/vo/CloudBasedVo.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CloudBasedVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 运行时异常
|
||||
*/
|
||||
private String exceptionMessage;
|
||||
/**
|
||||
* 最新更新时间, 本地服务器上运行的时间
|
||||
*/
|
||||
private LocalDateTime latestUpdate;
|
||||
/**
|
||||
* 是否激活
|
||||
*/
|
||||
private boolean active = false;
|
||||
/**
|
||||
* 数据版本号
|
||||
*/
|
||||
private int version;
|
||||
}
|
||||
@@ -2,13 +2,10 @@ package com.ecep.contract.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CloudRkVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
public class CloudRkVo extends CloudBasedVo implements CompanyBasedVo {
|
||||
private String cloudId;
|
||||
private Integer companyId;
|
||||
private boolean autoUpdate = false;
|
||||
@@ -25,6 +22,5 @@ public class CloudRkVo implements IdentityEntity {
|
||||
private LocalDateTime cloudBlackListUpdated;
|
||||
private LocalDateTime cloudEntUpdate;
|
||||
private String description;
|
||||
private LocalDateTime latestUpdate;
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -1,19 +1,13 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CloudTycVo implements IdentityEntity, CompanyBasedVo {
|
||||
private Integer id;
|
||||
public class CloudTycVo extends CloudBasedVo implements CompanyBasedVo {
|
||||
private Integer score;
|
||||
private Instant cloudLatest;
|
||||
private LocalDateTime cloudLatest;
|
||||
private String cloudId;
|
||||
private Instant latestUpdate;
|
||||
private Integer companyId;
|
||||
private int version;
|
||||
private boolean active = false;
|
||||
}
|
||||
@@ -1,20 +1,17 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CloudYuVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Instant latestUpdate;
|
||||
public class CloudYuVo extends CloudBasedVo implements CompanyBasedVo {
|
||||
private Integer companyId;
|
||||
private String exceptionMessage;
|
||||
|
||||
private LocalDate vendorUpdateDate;
|
||||
private LocalDate customerUpdateDate;
|
||||
private Instant cloudLatest;
|
||||
private boolean active = false;
|
||||
private LocalDateTime cloudLatest;
|
||||
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CompanyContactVo implements IdentityEntity, NamedEntity ,CompanyBasedVo{
|
||||
public class CompanyContactVo implements IdentityEntity, NamedEntity, CompanyBasedVo {
|
||||
private Integer id;
|
||||
private Integer companyId;
|
||||
private String name;
|
||||
@@ -20,4 +20,5 @@ public class CompanyContactVo implements IdentityEntity, NamedEntity ,CompanyBas
|
||||
private boolean primary = false;
|
||||
private String description;
|
||||
private boolean active = false;
|
||||
private int version;
|
||||
}
|
||||
@@ -8,17 +8,20 @@ import lombok.Data;
|
||||
@Data
|
||||
public class CompanyCustomerEntityVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer companyCustomerId;
|
||||
private String customerName;
|
||||
/**
|
||||
* 公司客户
|
||||
*/
|
||||
private Integer customerId;
|
||||
|
||||
private String name;
|
||||
private String abbName;
|
||||
private String code;
|
||||
/**
|
||||
* 客户分类
|
||||
*/
|
||||
private Integer customerCatalogId;
|
||||
private String catalogName;
|
||||
private Integer creatorId;
|
||||
private String creatorName;
|
||||
private Integer modifierId;
|
||||
private String modifierName;
|
||||
private LocalDate modifyDate;
|
||||
private LocalDate developDate;
|
||||
private LocalDate updatedDate;
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class CompanyCustomerEvaluationFormFileVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer customerFileId;
|
||||
private Integer customerFile;
|
||||
private String catalog;
|
||||
private String level;
|
||||
private Integer creditLevel = 0;
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class CompanyCustomerFileVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer customerId;
|
||||
private Integer customer;
|
||||
private CompanyCustomerFileType type;
|
||||
private String filePath;
|
||||
private String editFilePath;
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CompanyCustomerVo implements IdentityEntity,CompanyBasedVo {
|
||||
public class CompanyCustomerVo implements IdentityEntity, CompanyBasedVo {
|
||||
private Integer id;
|
||||
private Integer companyId;
|
||||
private LocalDate developDate;
|
||||
private String path;
|
||||
private Integer companyContactId;
|
||||
private String contactName;
|
||||
private String contactPhone;
|
||||
private String contactEmail;
|
||||
/**
|
||||
* 对口联系人
|
||||
*/
|
||||
private Integer contactId;
|
||||
private String description;
|
||||
private Instant created;
|
||||
private LocalDateTime created;
|
||||
private int version;
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import lombok.Data;
|
||||
public class CompanyVendorApprovedFileVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer listId;
|
||||
private String listName;
|
||||
private String fileName;
|
||||
private LocalDate signDate;
|
||||
private String description;
|
||||
|
||||
@@ -12,10 +12,8 @@ import lombok.Data;
|
||||
public class CompanyVendorApprovedItemVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer listId;
|
||||
private String listName;
|
||||
private String vendorName;
|
||||
private Integer vendorId;
|
||||
private String vendorNameInfo;
|
||||
private String vendorName;
|
||||
private VendorType type;
|
||||
private String description;
|
||||
}
|
||||
@@ -14,16 +14,12 @@ import lombok.Data;
|
||||
public class CompanyVendorEntityVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer vendorId;
|
||||
private String vendorName;
|
||||
private String name;
|
||||
private String abbName;
|
||||
private String code;
|
||||
private Integer catalogId;
|
||||
private String catalogName;
|
||||
private Integer creatorId;
|
||||
private String creatorName;
|
||||
private Integer modifierId;
|
||||
private String modifierName;
|
||||
private LocalDate modifyDate;
|
||||
private LocalDate developDate;
|
||||
private LocalDate updatedDate;
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CompanyVendorVo implements IdentityEntity {
|
||||
public class CompanyVendorVo implements IdentityEntity, CompanyBasedVo {
|
||||
private Integer id;
|
||||
private VendorType type;
|
||||
private boolean protocolProvider = false;
|
||||
private Integer companyId;
|
||||
private String companyName;
|
||||
/**
|
||||
* VendorCatalog Id
|
||||
*/
|
||||
private Integer catalogId;
|
||||
private String catalogName;
|
||||
private LocalDate developDate;
|
||||
private String path;
|
||||
private Integer contactId;
|
||||
private String contactName;
|
||||
private String purchase;
|
||||
private String description;
|
||||
private Instant created;
|
||||
private LocalDateTime created;
|
||||
private int version;
|
||||
}
|
||||
@@ -9,7 +9,6 @@ public class ContractFileTypeLocalVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private String language;
|
||||
private ContractFileType type;
|
||||
private String name;
|
||||
private String description;
|
||||
private String suggestFileName;
|
||||
}
|
||||
@@ -17,7 +17,6 @@ public class ContractItemVo implements IdentityEntity, ContractBasedVo {
|
||||
private String specification;
|
||||
private String unit;
|
||||
private Integer inventoryId;
|
||||
private String inventoryName;
|
||||
private Double exclusiveTaxPrice;
|
||||
private Double taxRate;
|
||||
private Double taxPrice;
|
||||
@@ -27,9 +26,6 @@ public class ContractItemVo implements IdentityEntity, ContractBasedVo {
|
||||
private LocalDate startDate;
|
||||
private LocalDate endDate;
|
||||
private Integer creatorId;
|
||||
private String creatorName;
|
||||
private Integer updaterId;
|
||||
private String updaterName;
|
||||
private String remark;
|
||||
private Integer order;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ public class ContractKindVo implements IdentityEntity, NamedEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
private String description;
|
||||
private String title;
|
||||
private boolean active = false;
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.vo;
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -10,10 +11,10 @@ import lombok.Data;
|
||||
public class ContractPayPlanVo implements IdentityEntity, ContractBasedVo {
|
||||
private Integer id;
|
||||
private Integer contractId;
|
||||
private Integer order;
|
||||
private Double amount;
|
||||
private LocalDate planDate;
|
||||
private LocalDate actualDate;
|
||||
private String remark;
|
||||
private Integer refId;
|
||||
private Double payCurrency;
|
||||
private LocalDate payDate;
|
||||
private LocalDateTime updateDate;
|
||||
private String payTerm;
|
||||
private boolean paid = false;
|
||||
}
|
||||
@@ -12,8 +12,5 @@ public class ContractTypeVo implements IdentityEntity, NamedEntity {
|
||||
private String catalog;
|
||||
private String title;
|
||||
private String direction;
|
||||
private Integer parentId;
|
||||
private Integer order;
|
||||
private String description;
|
||||
private boolean active = false;
|
||||
}
|
||||
@@ -8,46 +8,51 @@ import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ContractVo implements IdentityEntity, NamedEntity {
|
||||
public class ContractVo implements IdentityEntity, NamedEntity, CompanyBasedVo, ProjectBasedVo {
|
||||
private Integer id;
|
||||
private String guid;
|
||||
private String code;
|
||||
private String name;
|
||||
/**
|
||||
* 合同对应的合作方公司
|
||||
*/
|
||||
private Integer companyId;
|
||||
private String companyName;
|
||||
private Integer customerId;
|
||||
private String customerName;
|
||||
private Integer vendorId;
|
||||
private String vendorName;
|
||||
private Integer contractTypeId;
|
||||
private String contractTypeName;
|
||||
private Integer contractKindId;
|
||||
private String contractKindName;
|
||||
private Integer contractGroupId;
|
||||
private String contractGroupName;
|
||||
private Integer projectId;
|
||||
private String projectName;
|
||||
/**
|
||||
* 合同所属项目
|
||||
*/
|
||||
private Integer project;
|
||||
|
||||
private Integer typeId;
|
||||
private Integer kindId;
|
||||
private Integer groupId;
|
||||
/**
|
||||
* 合同的父合同编码
|
||||
*/
|
||||
private String parentCode;
|
||||
private LocalDate orderDate;
|
||||
private LocalDate startDate;
|
||||
private LocalDate endDate;
|
||||
|
||||
private Integer setupPersonId;
|
||||
private String setupPersonName;
|
||||
private LocalDate setupDate;
|
||||
|
||||
private Integer inurePersonId;
|
||||
private String inurePersonName;
|
||||
private LocalDate inureDate;
|
||||
|
||||
private Integer varyPersonId;
|
||||
private String varyPersonName;
|
||||
private LocalDate varyDate;
|
||||
|
||||
/**
|
||||
* 合同所属业务员
|
||||
*/
|
||||
private Integer employeeId;
|
||||
private String employeeName;
|
||||
/**
|
||||
* 经办人
|
||||
*/
|
||||
private Integer handlerId;
|
||||
private String handlerName;
|
||||
private String state;
|
||||
private String path;
|
||||
private String description;
|
||||
private LocalDateTime created;
|
||||
private Double amount;
|
||||
private boolean standardPayWay = false;
|
||||
private boolean standardPContractText = false;
|
||||
@@ -59,5 +64,6 @@ public class ContractVo implements IdentityEntity, NamedEntity {
|
||||
private Double execUnTaxAmount;
|
||||
private ContractPayWay payWay;
|
||||
private boolean active = false;
|
||||
private LocalDateTime created;
|
||||
private Integer version;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class CustomerSatisfactionSurveyVo implements IdentityEntity, ProjectBasedVo {
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private Integer project;
|
||||
private String code;
|
||||
private LocalDate date;
|
||||
private int totalScore;
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import com.ecep.contract.model.NamedEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeliverySignMethodVo implements IdentityEntity {
|
||||
public class DeliverySignMethodVo implements IdentityEntity, NamedEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
@@ -8,10 +8,8 @@ public class DepartmentVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
private Integer parentId;
|
||||
private Integer order;
|
||||
/** 部门负责人 */
|
||||
private Integer leaderId;
|
||||
private String leaderName;
|
||||
private String description;
|
||||
private boolean active = false;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class EmployeeAuthBindVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer employeeId;
|
||||
private String ip;
|
||||
private String mac;
|
||||
private LocalDateTime createTime;
|
||||
private Integer updaterId;
|
||||
private LocalDateTime updateTime;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class EmployeeLoginHistoryVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer employeeId;
|
||||
private String ip;
|
||||
private String mac;
|
||||
private LocalDateTime loginTime;
|
||||
private LocalDateTime activeTime;
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import com.ecep.contract.model.NamedEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -13,4 +16,6 @@ public class EmployeeRoleVo implements IdentityEntity, NamedEntity {
|
||||
private boolean manager = false;
|
||||
private boolean active = true;
|
||||
private String description;
|
||||
private List<FunctionVo> functions;
|
||||
|
||||
}
|
||||
@@ -16,7 +16,6 @@ public class EmployeeVo implements IdentityEntity, NamedEntity {
|
||||
private String alias;
|
||||
private String code;
|
||||
private Integer departmentId;
|
||||
private String departmentName;
|
||||
private String position;
|
||||
private String phone;
|
||||
private String email;
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
public class ExtendVendorInfoVo implements IdentityEntity, ContractBasedVo {
|
||||
private Integer id;
|
||||
private Integer contractId;
|
||||
private Integer vendorGroupId;
|
||||
private Integer groupId;
|
||||
/**
|
||||
* 合同序号
|
||||
*/
|
||||
|
||||
@@ -7,11 +7,11 @@ import lombok.Data;
|
||||
public class FunctionVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
private String key;
|
||||
private Integer parentId;
|
||||
private Integer order;
|
||||
private String description;
|
||||
private String url;
|
||||
private String controller;
|
||||
private String icon;
|
||||
private boolean active = false;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Year;
|
||||
|
||||
import com.ecep.contract.model.HistoryPrice;
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InventoryHistoryPriceVo implements IdentityEntity, Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
private Integer inventoryId;
|
||||
private Year year;
|
||||
|
||||
private HistoryPrice latestPurchasePrice = new HistoryPrice();
|
||||
private HistoryPrice latestSalePrice = new HistoryPrice();
|
||||
private HistoryPrice miniPurchasePrice = new HistoryPrice();
|
||||
private HistoryPrice miniSalePrice = new HistoryPrice();
|
||||
private HistoryPrice maxPurchasePrice = new HistoryPrice();
|
||||
private HistoryPrice maxSalePrice = new HistoryPrice();
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import com.ecep.contract.model.Price;
|
||||
import com.ecep.contract.model.VolumeSize;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -10,36 +14,26 @@ public class InventoryVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
/**
|
||||
* 目录, InventoryCatalog
|
||||
*/
|
||||
private Integer catalogId;
|
||||
private String catalogName;
|
||||
private String specification;
|
||||
private boolean specificationLock = false;
|
||||
private boolean nameLock = false;
|
||||
private Double purchaseTax;
|
||||
private Double purchasePrice;
|
||||
private Double purchaseTaxPrice;
|
||||
private Double saleTax;
|
||||
private Double salePrice;
|
||||
private Double saleTaxPrice;
|
||||
private Price purchasePrice;
|
||||
private Price salePrice;
|
||||
private String unit;
|
||||
private Double weight;
|
||||
private Double packagedWeight;
|
||||
private String weightUnit;
|
||||
private String volumeUnit;
|
||||
private String sizeUnit;
|
||||
private Double volume;
|
||||
private Double volumeSizeLength;
|
||||
private Double volumeSizeWidth;
|
||||
private Double volumeSizeHeight;
|
||||
private Double packVolume;
|
||||
private Double packVolumeSizeLength;
|
||||
private Double packVolumeSizeWidth;
|
||||
private Double packVolumeSizeHeight;
|
||||
private VolumeSize volumeSize;
|
||||
private VolumeSize packagedVolumeSize;
|
||||
private Integer creatorId;
|
||||
private String creatorName;
|
||||
private LocalDate createTime;
|
||||
private Integer updaterId;
|
||||
private String updaterName;
|
||||
private LocalDateTime updateDate;
|
||||
private String description;
|
||||
private boolean active = false;
|
||||
|
||||
@@ -5,18 +5,11 @@ import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InvoiceVo implements IdentityEntity {
|
||||
public class InvoiceVo implements IdentityEntity, CompanyBasedVo {
|
||||
private Integer id;
|
||||
private Integer contractId;
|
||||
private Integer contractItemId;
|
||||
private String invoiceNumber;
|
||||
private Integer companyId;
|
||||
private String code;
|
||||
private LocalDate invoiceDate;
|
||||
private LocalDate issueDate;
|
||||
private Double amount;
|
||||
private Double taxAmount;
|
||||
private Double taxRate;
|
||||
private Double totalAmount;
|
||||
private Integer invoiceStatusId;
|
||||
private String remark;
|
||||
private String description;
|
||||
private Boolean active = false;
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import com.ecep.contract.model.NamedEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ProductTypeVo implements IdentityEntity {
|
||||
public class ProductTypeVo implements IdentityEntity, NamedEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import com.ecep.contract.model.NamedEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ProductUsageVo implements IdentityEntity {
|
||||
public class ProductUsageVo implements IdentityEntity, NamedEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
public interface ProjectBasedVo {
|
||||
Integer getProjectId();
|
||||
Integer getProject();
|
||||
|
||||
void setProjectId(Integer projectId);
|
||||
void setProject(Integer projectId);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class ProjectBidVo implements IdentityEntity, ProjectBasedVo {
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private Integer project;
|
||||
private int level;
|
||||
private double amount;
|
||||
private Integer evaluationFileId;
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Data;
|
||||
public class ProjectCostVo implements IdentityEntity, ProjectBasedVo {
|
||||
private Integer id;
|
||||
private Integer contractId;
|
||||
private Integer projectId;
|
||||
private Integer project;
|
||||
private int version;
|
||||
private boolean standardPayWay = false;
|
||||
private String noStandardPayWayText;
|
||||
|
||||
14
common/src/main/java/com/ecep/contract/vo/ProjectFileVo.java
Normal file
14
common/src/main/java/com/ecep/contract/vo/ProjectFileVo.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.ProjectFileType;
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ProjectFileVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private ProjectFileType type;
|
||||
private String filePath;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.ecep.contract.ContractPayWay;
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ProjectFundPlanVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private String projectName;
|
||||
private LocalDate payDate;
|
||||
private ContractPayWay payWay;
|
||||
private float payRatio;
|
||||
private double payCurrency;
|
||||
private String payTerm;
|
||||
private Integer contractPayPlanId;
|
||||
private String contractPayPlanName;
|
||||
private LocalDateTime updateDate;
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ProjectQuotationVo implements IdentityEntity, ProjectBasedVo {
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private Integer project;
|
||||
private int level;
|
||||
private boolean standardPayWay = false;
|
||||
private String noStandardPayWayText;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.ContractFileType;
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ProjectSaleTypeRequireFileTypeVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer saleTypeId;
|
||||
private String saleTypeName;
|
||||
private ContractFileType fileType;
|
||||
private String frequency;
|
||||
}
|
||||
@@ -11,25 +11,16 @@ public class ProjectVo implements IdentityEntity, NamedEntity {
|
||||
private String name;
|
||||
private String code;
|
||||
private Integer customerId;
|
||||
private String customerName;
|
||||
private Integer projectTypeId;
|
||||
private String projectTypeName;
|
||||
private Integer industryId;
|
||||
private String industryName;
|
||||
private Integer saleTypeId;
|
||||
private String saleTypeName;
|
||||
private Integer productTypeId;
|
||||
private String productTypeName;
|
||||
private Integer deliverySignMethodId;
|
||||
private String deliverySignMethodName;
|
||||
private Integer productUsageId;
|
||||
private String productUsageName;
|
||||
private Integer codeYear;
|
||||
private Integer codeSequenceNumber;
|
||||
private Integer applicantId;
|
||||
private String applicantName;
|
||||
private Integer authorizerId;
|
||||
private String authorizerName;
|
||||
private Integer bankAccountId;
|
||||
private Integer invoiceInfoId;
|
||||
private Integer mainContactId;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PurchaseBillVoucherItemVo implements IdentityEntity, ContractBasedVo {
|
||||
private Integer id;
|
||||
private int refId;
|
||||
private Integer voucherId;
|
||||
private Integer orderItemId;
|
||||
private Integer invoiceId;
|
||||
private Integer inventoryId;
|
||||
private Integer contractId;
|
||||
private double quantity;
|
||||
private double price;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class PurchaseBillVoucherVo implements IdentityEntity, CompanyBasedVo {
|
||||
private Integer id;
|
||||
private int refId;
|
||||
private String code;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer companyId;
|
||||
private Integer invoiceId;
|
||||
/**
|
||||
* 业务员
|
||||
*/
|
||||
private Integer employeeId;
|
||||
private Integer makerId;
|
||||
private LocalDateTime makerDate;
|
||||
private LocalDateTime modifyDate;
|
||||
private Integer verifierId;
|
||||
private LocalDateTime verifierDate;
|
||||
private String description;
|
||||
}
|
||||
@@ -1,22 +1,28 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PurchaseOrderItemVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
|
||||
private Integer order;
|
||||
private Integer inventoryId;
|
||||
|
||||
private Integer purchaseOrderId;
|
||||
private Integer contractItemId;
|
||||
private Integer inventoryId;
|
||||
private String itemName;
|
||||
private Integer unitId;
|
||||
private Integer refId;
|
||||
private Double quantity;
|
||||
private Double unitPrice;
|
||||
private Double totalPrice;
|
||||
private Double price;
|
||||
private Double taxRate;
|
||||
private Double taxAmount;
|
||||
private Double totalAmount;
|
||||
private Integer order;
|
||||
private Double exclusiveTaxPrice;
|
||||
|
||||
private String remark;
|
||||
private LocalDate arriveDate;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PurchaseSettlementVoucherItemVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private int refId;
|
||||
private Integer voucherId;
|
||||
private String voucherCode;
|
||||
private Integer accountantId;
|
||||
private String accountantName;
|
||||
private Integer invoiceId;
|
||||
private String invoiceCode;
|
||||
private Integer receiptId;
|
||||
private String receiptCode;
|
||||
private Integer inventoryId;
|
||||
private String inventoryName;
|
||||
private double quantity;
|
||||
private double price;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class PurchaseSettlementVoucherVo implements IdentityEntity, CompanyBasedVo {
|
||||
private Integer id;
|
||||
private int refId;
|
||||
private String code;
|
||||
private LocalDate date;
|
||||
private Integer companyId;
|
||||
private Integer employeeId;
|
||||
private String employeeName;
|
||||
private Integer makerId;
|
||||
private String makerName;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SalesBillVoucherItemVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private int refId;
|
||||
private Integer voucherId;
|
||||
private String voucherCode;
|
||||
private Integer inventoryId;
|
||||
private String inventoryName;
|
||||
private double quantity;
|
||||
private double price;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class SalesBillVoucherVo implements IdentityEntity, CompanyBasedVo {
|
||||
private Integer id;
|
||||
private int refId;
|
||||
private String code;
|
||||
private Integer companyId;
|
||||
private Integer orderId;
|
||||
private String orderCode;
|
||||
private Integer employeeId;
|
||||
private Integer makerId;
|
||||
private LocalDateTime makerDate;
|
||||
private LocalDateTime modifyDate;
|
||||
private Integer verifierId;
|
||||
private LocalDateTime verifierDate;
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SalesOrderInvoiceVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
}
|
||||
@@ -3,20 +3,27 @@ package com.ecep.contract.vo;
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class SalesOrderItemVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private Integer salesOrderId;
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
private Integer contractItemId;
|
||||
private Integer inventoryId;
|
||||
private String itemName;
|
||||
private Integer unitId;
|
||||
private Double quantity;
|
||||
private Double unitPrice;
|
||||
private Double totalPrice;
|
||||
private Double taxRate;
|
||||
private Double taxAmount;
|
||||
private Double totalAmount;
|
||||
private Integer order;
|
||||
private String remark;
|
||||
|
||||
private double quantity;
|
||||
private double price;
|
||||
private double taxRate;
|
||||
private double exclusiveTaxPrice;
|
||||
|
||||
private LocalDate startDate;
|
||||
private LocalDate endDate;
|
||||
|
||||
private String description;
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -9,13 +11,11 @@ public class SalesOrderVo implements IdentityEntity, ContractBasedVo {
|
||||
private Integer id;
|
||||
private Integer contractId;
|
||||
private String code;
|
||||
private String name;
|
||||
private Integer customerId;
|
||||
private LocalDate orderDate;
|
||||
private Double totalAmount;
|
||||
private Double taxAmount;
|
||||
private Double taxRate;
|
||||
private Integer statusId;
|
||||
private String remark;
|
||||
private Integer employeeId;
|
||||
private Integer makerId;
|
||||
private LocalDate makerDate;
|
||||
private Integer verifierId;
|
||||
private LocalDate verifierDate;
|
||||
private String description;
|
||||
private Boolean active = false;
|
||||
}
|
||||
@@ -10,9 +10,12 @@ public class UnitVo implements IdentityEntity, NamedEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
/**
|
||||
* 单位类型
|
||||
*/
|
||||
private UnitType unitType;
|
||||
private double ratio;
|
||||
private boolean standard;
|
||||
private String description;
|
||||
private Boolean active;
|
||||
private boolean active;
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -8,8 +10,7 @@ public class VendorCatalogVo implements IdentityEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String code;
|
||||
private Integer parentId;
|
||||
private Integer order;
|
||||
private VendorType type;
|
||||
private String description;
|
||||
private Boolean active;
|
||||
}
|
||||
Reference in New Issue
Block a user