refactor(service): 实现VoableService接口以统一VO与实体映射逻辑
refactor(model): 重构实体类与VO类的字段映射关系 style: 调整代码格式与注释 fix: 修复部分字段映射错误
This commit is contained in:
@@ -7,7 +7,6 @@ import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.ProjectQuotationVo;
|
||||
import com.ecep.contract.model.Voable;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -32,7 +31,8 @@ import lombok.ToString;
|
||||
@Entity
|
||||
@Table(name = "PROJECT_QUOTATION")
|
||||
@ToString
|
||||
public class ProjectQuotation implements IdentityEntity, ProjectBasedEntity, java.io.Serializable, Voable<ProjectQuotationVo> {
|
||||
public class ProjectQuotation
|
||||
implements IdentityEntity, ProjectBasedEntity, java.io.Serializable, Voable<ProjectQuotationVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@@ -47,7 +47,6 @@ public class ProjectQuotation implements IdentityEntity, ProjectBasedEntity, jav
|
||||
@ToString.Exclude
|
||||
private Project project;
|
||||
|
||||
|
||||
/**
|
||||
* 客户资信等级
|
||||
*/
|
||||
@@ -116,7 +115,7 @@ public class ProjectQuotation implements IdentityEntity, ProjectBasedEntity, jav
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (this == object) {
|
||||
if (this == object) {
|
||||
return true;
|
||||
}
|
||||
if (object == null) {
|
||||
@@ -154,10 +153,10 @@ public class ProjectQuotation implements IdentityEntity, ProjectBasedEntity, jav
|
||||
}
|
||||
vo.setAuthorizationTime(authorizationTime);
|
||||
vo.setAuthorizationFile(authorizationFile);
|
||||
vo.setDescription(description);
|
||||
if (evaluationFile != null) {
|
||||
vo.setEvaluationFileId(evaluationFile.getId());
|
||||
}
|
||||
vo.setDescription(description);
|
||||
// active字段默认为false,在ProjectQuotationVo类中已经设置
|
||||
return vo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user