diff --git a/src/main/java/cn/palmte/work/model/ProjectBudget.java b/src/main/java/cn/palmte/work/model/ProjectBudget.java new file mode 100644 index 0000000..aab494d --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectBudget.java @@ -0,0 +1,1005 @@ +package cn.palmte.work.model; + +import cn.palmte.work.bean.ApproveStatusEnum; +import org.hibernate.annotations.GenericGenerator; + +import javax.persistence.*; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 项目预算中的概算信息 + * @author Yuanping Zhang + */ +@Entity +@Table(name = "project_budget") +public class ProjectBudget { + public static final int STATUS_ESTIMATE = 1; + public static final int STATUS_BUDGET = 5; + public static final int STATUS_SETTLE = 10; + public static final int STATUS_FINAL = 15; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @GenericGenerator(name = "persistenceGenerator", strategy = "increment") + private int id; + /** + * 关联项目id + */ + @Column(name = "project_id") + private int projectId; + /** + * 项目编号 + */ + private String projectNo; + /** + * 项目名称 + */ + private String name; + /** + * 项目类型:1工程集成类、2设备集成类、3战略合作类 + */ + private int type; + @Column(name = "type_desc") + private String typeDesc; + /** + * 项目状态:1项目创建(概算),5预算,10结算,15决算 + */ + private int status; + @Column(name = "status_desc") + private String statusDesc; + /** + * 概算、预算、结算、决算:审核状态:0草稿,1待审核,2审核通过,3审核不通过 + */ + @Column(name = "approve_status_estimate") + private int approveStatusEstimate = -1; + @Column(name = "approve_status_budget") + private int approveStatusBudget = -1; + @Column(name = "approve_status_settle") + private int approveStatusSettle = -1; + @Column(name = "approve_status_final") + private int approveStatusFinal = -1; + + /** + * 审核人id + */ + @Column(name = "approve_id") + private int approveId = 0; + @Column(name = "approve_name") + private String approveName; + /** + * 项目创建者id + */ + @Column(name = "creator_id") + private int creatorId; + @Column(name = "creator_name") + private String creatorName; + /** + * 项目部门id + */ + @Column(name = "dept_id") + private int deptId; + @Column(name = "dept_name") + private String deptName; + /** + * 项目开始时间,精确到月 + */ + @Column(name = "start_date") + @Temporal(TemporalType.TIMESTAMP) + private Date startDate; + /** + * 项目结束时间,精确到月 + */ + @Column(name = "end_date") + @Temporal(TemporalType.TIMESTAMP) + private Date endDate; + /** + * 垫资模式:1A类-不垫资(战略合作),2B类-不垫资(背靠背),3C类-垫资(账期覆盖),4D类-垫资(账期不覆盖) + */ + @Column(name = "underwritten_mode") + private int underwrittenMode; + /** + * 合作对象 + */ + @Column(name = "collaborator") + private String collaborator; + /** + * 合作对象url + */ + @Column(name = "collaborator_url") + private String collaboratorUrl; + /** + * 客户名称 + */ + @Column(name = "customer") + private String customer; + /** + * 最终用户名称 + */ + @Column(name = "terminal_customer") + private String terminalCustomer; + /** + * 垫资利息(元为单位) + */ + @Column(name = "advance_interest_amount") + private BigDecimal advanceInterestAmount; + /** + * 垫资峰值 + */ + @Column(name = "advance_peak_amount") + private BigDecimal advancePeakAmount; + /** + * 合同金额 + */ + @Column(name = "contract_amount") + private BigDecimal contractAmount; + /** + * 行业场景应用 + */ + @Column(name = "industry_scene") + private Integer industryScene; + /** + * 行业场景应用 + */ + @Column(name = "industry_scenario") + private String industryScenario; + /** + *华智产品金额 + */ + @Column(name = "huazhi_product_amount") + private BigDecimal huazhiProductAmount; + /** + *其他产品金额 + */ + @Column(name = "ziguang_other_amount") + private BigDecimal ziguangOtherAmount; + /** + * 主合同收款条款 + */ + @Column(name = "main_contract_collection_terms") + private String mainContractCollectionTerms; + /** + * 价值及风险 + */ + @Column(name = "value_risk") + private String valueRisk; + /** + * 其他中的小类名称 + */ + @Column(name = "other_name") + private String otherName; + /** + * 项目创建时的配置的阀值 + */ + @Column(name = "project_contribution_profit_rate_threshold") + private BigDecimal projectContributionProfitRateThreshold; + /** + * 项目创建配置的年利率 + */ + @Column(name = "underwritten_tax_rate") + private BigDecimal underwrittenTaxRate; + /** + * 创建时间 + */ + @Column(name = "create_time") + @Temporal(TemporalType.TIMESTAMP) + private Date createTime; + /** + * 最后更新时间 + */ + @Column(name = "last_update_time") + @Temporal(TemporalType.TIMESTAMP) + private Date lastUpdateTime; + + @Column(name = "plan_start_str") + private String planStartStr; + + @Column(name = "plan_end_str") + private String planEndStr; + + @Column(name = "underwritten_mode_str") + private String underwrittenModeStr; + + @Column(name = "cooperate_type") + private Integer cooperateType; + + @Column(name = "cooperate_type_str") + private String cooperateTypeStr; + + @Column(name = "certainty") + private Integer certainty; + + @Column(name = "certainty_str") + private String certaintyStr; + + @Column(name = "gross_profit") + private BigDecimal grossProfit; + + @Column(name = "gross_profit_margin") + private BigDecimal grossProfitMargin; + + @Column(name = "huizhi_product_amount") + private BigDecimal huizhiProductAmount; + + @Column(name = "huasan_product_amount") + private BigDecimal huasanProductAmount; + + @Column(name = "principal") + private String principal; + + @Column(name = "contract_time") + private Date contractTime; + + @Column(name = "bids_time") + private Date bidsTime; + + @Column(name = "is_second") + private Integer isSecond; + + @Column(name = "is_second_str") + private String isSecondStr; + + @Column(name = "sign_type") + private Integer signType; + + @Column(name = "sign_type_str") + private String signTypeStr; + + @Column(name = "resolve_plan") + private Integer resolvePlan; + + @Column(name = "resolve_plan_str") + private String resolvePlanStr; + + @Column(name = "main_contract_resolve_plan") + private String mainContractResolvePlan; + + @Column(name = "calculation_collection") + private String calculationCollection; + + @Transient + private String contractRound; + + @Transient + private String huazhiRound; + + @Transient + private String ziguangRound; + + @Transient + private String huizhiRound; + + @Transient + private String huasanRound; + + @Transient + private String grossProfitRound; + + @Transient + private String grossProfitMarginRound; + + @Transient + private String advanceInterestAmountRound; + + @Transient + private String advancePeakAmountRound; + + @Transient + private String contractRound2; + + @Transient + private String huazhiRound2; + + @Transient + private String ziguangRound2; + + @Transient + private String huizhiRound2; + + @Transient + private String huasanRound2; + + @Transient + private String grossProfitRound2; + + @Transient + private String grossProfitMarginRound2; + + @Transient + private String advanceInterestAmountRound2; + + @Transient + private String advancePeakAmountRound2; + + @Transient + private int isBudget; + + @Transient + private String remark; + + /** + * 审批任务节点 + */ + @Transient + private String actTaskName; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getProjectId() { + return projectId; + } + + public void setProjectId(int projectId) { + this.projectId = projectId; + } + + public String getProjectNo() { + return projectNo; + } + + public void setProjectNo(String projectNo) { + this.projectNo = projectNo; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public String getTypeDesc() { + return typeDesc; + } + + public void setTypeDesc(String typeDesc) { + this.typeDesc = typeDesc; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public String getStatusDesc() { + return statusDesc; + } + + public void setStatusDesc(String statusDesc) { + this.statusDesc = statusDesc; + } + + + public int getApproveStatus() { + if(status == STATUS_ESTIMATE){ + return approveStatusEstimate; + } + if(status == STATUS_BUDGET){ + return approveStatusBudget; + } + if(status == STATUS_SETTLE){ + return approveStatusSettle; + } + if(status == STATUS_FINAL){ + return approveStatusFinal; + } + return -1; + } + + public String getApproveStatusDesc() { + int approveStatus = getApproveStatus(); + if(-1 == approveStatus){ + return "未知"; + } + return ApproveStatusEnum.parseApproveStatus(approveStatus).getApproveStatusDesc(); + } + + public int getApproveStatusEstimate() { + return approveStatusEstimate; + } + + public void setApproveStatusEstimate(int approveStatusEstimate) { + this.approveStatusEstimate = approveStatusEstimate; + } + + public int getApproveStatusBudget() { + return approveStatusBudget; + } + + public void setApproveStatusBudget(int approveStatusBudget) { + this.approveStatusBudget = approveStatusBudget; + } + + public int getApproveStatusSettle() { + return approveStatusSettle; + } + + public void setApproveStatusSettle(int approveStatusSettle) { + this.approveStatusSettle = approveStatusSettle; + } + + public int getApproveStatusFinal() { + return approveStatusFinal; + } + + public void setApproveStatusFinal(int approveStatusFinal) { + this.approveStatusFinal = approveStatusFinal; + } + + public int getApproveId() { + return approveId; + } + + public void setApproveId(int approveId) { + this.approveId = approveId; + } + + public String getApproveName() { + return approveName; + } + + public void setApproveName(String approveName) { + this.approveName = approveName; + } + + public int getCreatorId() { + return creatorId; + } + + public void setCreatorId(int creatorId) { + this.creatorId = creatorId; + } + + public String getCreatorName() { + return creatorName; + } + + public void setCreatorName(String creatorName) { + this.creatorName = creatorName; + } + + public int getDeptId() { + return deptId; + } + + public void setDeptId(int deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public Date getStartDate() { + return startDate; + } + + public void setStartDate(Date startDate) { + this.startDate = startDate; + } + + public Date getEndDate() { + return endDate; + } + + public void setEndDate(Date endDate) { + this.endDate = endDate; + } + + public int getUnderwrittenMode() { + return underwrittenMode; + } + + public void setUnderwrittenMode(int underwrittenMode) { + this.underwrittenMode = underwrittenMode; + } + + public String getCollaborator() { + return collaborator; + } + + public void setCollaborator(String collaborator) { + this.collaborator = collaborator; + } + + public String getCollaboratorUrl() { + return collaboratorUrl; + } + + public void setCollaboratorUrl(String collaboratorUrl) { + this.collaboratorUrl = collaboratorUrl; + } + + public String getCustomer() { + return customer; + } + + public void setCustomer(String customer) { + this.customer = customer; + } + + public String getTerminalCustomer() { + return terminalCustomer; + } + + public void setTerminalCustomer(String terminalCustomer) { + this.terminalCustomer = terminalCustomer; + } + + public BigDecimal getAdvanceInterestAmount() { + return advanceInterestAmount; + } + + public void setAdvanceInterestAmount(BigDecimal advanceInterestAmount) { + this.advanceInterestAmount = advanceInterestAmount; + } + + public BigDecimal getAdvancePeakAmount() { + return advancePeakAmount; + } + + public void setAdvancePeakAmount(BigDecimal advancePeakAmount) { + this.advancePeakAmount = advancePeakAmount; + } + + public BigDecimal getContractAmount() { + return contractAmount; + } + + public void setContractAmount(BigDecimal contractAmount) { + this.contractAmount = contractAmount; + } + + public Integer getIndustryScene() { + return industryScene; + } + + public void setIndustryScene(Integer industryScene) { + this.industryScene = industryScene; + } + + public String getIndustryScenario() { + return industryScenario; + } + + public void setIndustryScenario(String industryScenario) { + this.industryScenario = industryScenario; + } + + public BigDecimal getHuazhiProductAmount() { + return huazhiProductAmount; + } + + public void setHuazhiProductAmount(BigDecimal huazhiProductAmount) { + this.huazhiProductAmount = huazhiProductAmount; + } + + public BigDecimal getZiguangOtherAmount() { + return ziguangOtherAmount; + } + + public void setZiguangOtherAmount(BigDecimal ziguangOtherAmount) { + this.ziguangOtherAmount = ziguangOtherAmount; + } + + public String getMainContractCollectionTerms() { + return mainContractCollectionTerms; + } + + public void setMainContractCollectionTerms(String mainContractCollectionTerms) { + this.mainContractCollectionTerms = mainContractCollectionTerms; + } + + public String getValueRisk() { + return valueRisk; + } + + public void setValueRisk(String valueRisk) { + this.valueRisk = valueRisk; + } + + public String getOtherName() { + return otherName; + } + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + + public BigDecimal getProjectContributionProfitRateThreshold() { + return projectContributionProfitRateThreshold; + } + + public void setProjectContributionProfitRateThreshold(BigDecimal projectContributionProfitRateThreshold) { + this.projectContributionProfitRateThreshold = projectContributionProfitRateThreshold; + } + + public BigDecimal getUnderwrittenTaxRate() { + return underwrittenTaxRate; + } + + public void setUnderwrittenTaxRate(BigDecimal underwrittenTaxRate) { + this.underwrittenTaxRate = underwrittenTaxRate; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Date lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getPlanStartStr() { + return planStartStr; + } + + public void setPlanStartStr(String planStartStr) { + this.planStartStr = planStartStr; + } + + public String getPlanEndStr() { + return planEndStr; + } + + public void setPlanEndStr(String planEndStr) { + this.planEndStr = planEndStr; + } + + public String getUnderwrittenModeStr() { + return underwrittenModeStr; + } + + public void setUnderwrittenModeStr(String underwrittenModeStr) { + this.underwrittenModeStr = underwrittenModeStr; + } + + public Integer getCooperateType() { + return cooperateType; + } + + public void setCooperateType(Integer cooperateType) { + this.cooperateType = cooperateType; + } + + public String getCooperateTypeStr() { + return cooperateTypeStr; + } + + public void setCooperateTypeStr(String cooperateTypeStr) { + this.cooperateTypeStr = cooperateTypeStr; + } + + public Integer getCertainty() { + return certainty; + } + + public void setCertainty(Integer certainty) { + this.certainty = certainty; + } + + public String getCertaintyStr() { + return certaintyStr; + } + + public void setCertaintyStr(String certaintyStr) { + this.certaintyStr = certaintyStr; + } + + public BigDecimal getGrossProfit() { + return grossProfit; + } + + public void setGrossProfit(BigDecimal grossProfit) { + this.grossProfit = grossProfit; + } + + public BigDecimal getGrossProfitMargin() { + return grossProfitMargin; + } + + public void setGrossProfitMargin(BigDecimal grossProfitMargin) { + this.grossProfitMargin = grossProfitMargin; + } + + public BigDecimal getHuizhiProductAmount() { + return huizhiProductAmount; + } + + public void setHuizhiProductAmount(BigDecimal huizhiProductAmount) { + this.huizhiProductAmount = huizhiProductAmount; + } + + public BigDecimal getHuasanProductAmount() { + return huasanProductAmount; + } + + public void setHuasanProductAmount(BigDecimal huasanProductAmount) { + this.huasanProductAmount = huasanProductAmount; + } + + public String getPrincipal() { + return principal; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public Date getContractTime() { + return contractTime; + } + + public void setContractTime(Date contractTime) { + this.contractTime = contractTime; + } + + public Date getBidsTime() { + return bidsTime; + } + + public void setBidsTime(Date bidsTime) { + this.bidsTime = bidsTime; + } + + public Integer getIsSecond() { + return isSecond; + } + + public void setIsSecond(Integer isSecond) { + this.isSecond = isSecond; + } + + public String getIsSecondStr() { + return isSecondStr; + } + + public void setIsSecondStr(String isSecondStr) { + this.isSecondStr = isSecondStr; + } + + public Integer getSignType() { + return signType; + } + + public void setSignType(Integer signType) { + this.signType = signType; + } + + public String getSignTypeStr() { + return signTypeStr; + } + + public void setSignTypeStr(String signTypeStr) { + this.signTypeStr = signTypeStr; + } + + public Integer getResolvePlan() { + return resolvePlan; + } + + public void setResolvePlan(Integer resolvePlan) { + this.resolvePlan = resolvePlan; + } + + public String getResolvePlanStr() { + return resolvePlanStr; + } + + public void setResolvePlanStr(String resolvePlanStr) { + this.resolvePlanStr = resolvePlanStr; + } + + public String getMainContractResolvePlan() { + return mainContractResolvePlan; + } + + public void setMainContractResolvePlan(String mainContractResolvePlan) { + this.mainContractResolvePlan = mainContractResolvePlan; + } + + public String getCalculationCollection() { + return calculationCollection; + } + + public void setCalculationCollection(String calculationCollection) { + this.calculationCollection = calculationCollection; + } + + public String getContractRound() { + return contractRound; + } + + public void setContractRound(String contractRound) { + this.contractRound = contractRound; + } + + public String getHuazhiRound() { + return huazhiRound; + } + + public void setHuazhiRound(String huazhiRound) { + this.huazhiRound = huazhiRound; + } + + public String getZiguangRound() { + return ziguangRound; + } + + public void setZiguangRound(String ziguangRound) { + this.ziguangRound = ziguangRound; + } + + public String getHuizhiRound() { + return huizhiRound; + } + + public void setHuizhiRound(String huizhiRound) { + this.huizhiRound = huizhiRound; + } + + public String getHuasanRound() { + return huasanRound; + } + + public void setHuasanRound(String huasanRound) { + this.huasanRound = huasanRound; + } + + public String getGrossProfitRound() { + return grossProfitRound; + } + + public void setGrossProfitRound(String grossProfitRound) { + this.grossProfitRound = grossProfitRound; + } + + public String getGrossProfitMarginRound() { + return grossProfitMarginRound; + } + + public void setGrossProfitMarginRound(String grossProfitMarginRound) { + this.grossProfitMarginRound = grossProfitMarginRound; + } + + public String getAdvanceInterestAmountRound() { + return advanceInterestAmountRound; + } + + public void setAdvanceInterestAmountRound(String advanceInterestAmountRound) { + this.advanceInterestAmountRound = advanceInterestAmountRound; + } + + public String getAdvancePeakAmountRound() { + return advancePeakAmountRound; + } + + public void setAdvancePeakAmountRound(String advancePeakAmountRound) { + this.advancePeakAmountRound = advancePeakAmountRound; + } + + public String getContractRound2() { + return contractRound2; + } + + public void setContractRound2(String contractRound2) { + this.contractRound2 = contractRound2; + } + + public String getHuazhiRound2() { + return huazhiRound2; + } + + public void setHuazhiRound2(String huazhiRound2) { + this.huazhiRound2 = huazhiRound2; + } + + public String getZiguangRound2() { + return ziguangRound2; + } + + public void setZiguangRound2(String ziguangRound2) { + this.ziguangRound2 = ziguangRound2; + } + + public String getHuizhiRound2() { + return huizhiRound2; + } + + public void setHuizhiRound2(String huizhiRound2) { + this.huizhiRound2 = huizhiRound2; + } + + public String getHuasanRound2() { + return huasanRound2; + } + + public void setHuasanRound2(String huasanRound2) { + this.huasanRound2 = huasanRound2; + } + + public String getGrossProfitRound2() { + return grossProfitRound2; + } + + public void setGrossProfitRound2(String grossProfitRound2) { + this.grossProfitRound2 = grossProfitRound2; + } + + public String getGrossProfitMarginRound2() { + return grossProfitMarginRound2; + } + + public void setGrossProfitMarginRound2(String grossProfitMarginRound2) { + this.grossProfitMarginRound2 = grossProfitMarginRound2; + } + + public String getAdvanceInterestAmountRound2() { + return advanceInterestAmountRound2; + } + + public void setAdvanceInterestAmountRound2(String advanceInterestAmountRound2) { + this.advanceInterestAmountRound2 = advanceInterestAmountRound2; + } + + public String getAdvancePeakAmountRound2() { + return advancePeakAmountRound2; + } + + public void setAdvancePeakAmountRound2(String advancePeakAmountRound2) { + this.advancePeakAmountRound2 = advancePeakAmountRound2; + } + + public int getIsBudget() { + return isBudget; + } + + public void setIsBudget(int isBudget) { + this.isBudget = isBudget; + } + + public String getActTaskName() { + return actTaskName; + } + + public void setActTaskName(String actTaskName) { + this.actTaskName = actTaskName; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/main/java/cn/palmte/work/model/ProjectBudgetRepository.java b/src/main/java/cn/palmte/work/model/ProjectBudgetRepository.java new file mode 100644 index 0000000..cef7a8e --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectBudgetRepository.java @@ -0,0 +1,6 @@ +package cn.palmte.work.model; + +import org.springframework.data.jpa.repository.JpaRepository; + +public interface ProjectBudgetRepository extends JpaRepository { +}