refactor(vo): 重构VO类及相关模型,添加Voable接口实现

feat(constant): 添加WebSocket错误码常量
docs(model): 为模型类添加注释
fix(service): 修复ProductUsageService缓存键问题
refactor(converter): 重构字符串转换器,移除EntityStringConverter依赖
feat(tab): 添加ComboBoxUtils工具类,优化下拉框初始化
style: 移除无用导入和字段
This commit is contained in:
2025-09-22 23:11:21 +08:00
parent 8aac509e51
commit 866e08224a
84 changed files with 1061 additions and 285 deletions

View File

@@ -7,6 +7,7 @@ import java.util.Objects;
import org.hibernate.annotations.ColumnDefault;
import com.ecep.contract.util.HibernateProxyUtils;
import com.ecep.contract.vo.ProjectCostVo;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
@@ -26,7 +27,7 @@ import lombok.ToString;
@Entity
@Table(name = "PROJECT_COST")
@ToString
public class ProjectCost implements IdentityEntity, ProjectBasedEntity, Serializable {
public class ProjectCost implements IdentityEntity, ProjectBasedEntity, Serializable, Voable<ProjectCostVo> {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -220,4 +221,42 @@ public class ProjectCost implements IdentityEntity, ProjectBasedEntity, Serializ
public final int hashCode() {
return HibernateProxyUtils.hashCode(this);
}
@Override
public ProjectCostVo toVo() {
ProjectCostVo vo = new ProjectCostVo();
vo.setId(id);
vo.setContractId(contract != null ? contract.getId() : null);
vo.setProject(project != null ? project.getId() : null);
vo.setVersion(version);
vo.setStandardPayWay(standardPayWay);
vo.setNoStandardPayWayText(noStandardPayWayText);
vo.setStandardContractText(standardContractText);
vo.setNoStandardContractText(noStandardContractText);
vo.setStampTax(stampTax);
vo.setStampTaxFee(stampTaxFee);
vo.setOnSiteServiceFee(onSiteServiceFee);
vo.setAssemblyServiceFee(assemblyServiceFee);
vo.setTechnicalServiceFee(technicalServiceFee);
vo.setBidServiceFee(bidServiceFee);
vo.setFreightCost(freightCost);
vo.setGuaranteeLetterFee(guaranteeLetterFee);
vo.setTaxAndSurcharges(taxAndSurcharges);
vo.setTaxAndSurchargesFee(taxAndSurchargesFee);
vo.setInQuantities(inQuantities);
vo.setInTaxAmount(inTaxAmount);
vo.setInExclusiveTaxAmount(inExclusiveTaxAmount);
vo.setOutQuantities(outQuantities);
vo.setOutTaxAmount(outTaxAmount);
vo.setOutExclusiveTaxAmount(outExclusiveTaxAmount);
vo.setGrossProfitMargin(grossProfitMargin);
vo.setApplicantId(applicant != null ? applicant.getId() : null);
vo.setApplyTime(applyTime);
vo.setAuthorizerId(authorizer != null ? authorizer.getId() : null);
vo.setAuthorizationTime(authorizationTime);
vo.setAuthorizationFile(authorizationFile);
vo.setDescription(description);
vo.setImportLock(importLock);
return vo;
}
}