项目新增概算信息
parent
db2007c4c7
commit
afc2e5cd49
|
@ -9,12 +9,10 @@ public class EstimateBean {
|
||||||
private BigDecimal incomeDeviceTaxInclude;
|
private BigDecimal incomeDeviceTaxInclude;
|
||||||
private BigDecimal incomeEngineerTaxInclude;
|
private BigDecimal incomeEngineerTaxInclude;
|
||||||
private BigDecimal incomeServiceTaxInclude;
|
private BigDecimal incomeServiceTaxInclude;
|
||||||
private BigDecimal incomeTotalTaxInclude;
|
|
||||||
|
|
||||||
private BigDecimal incomeDeviceTaxExclude;
|
private BigDecimal incomeDeviceTaxExclude;
|
||||||
private BigDecimal incomeEngineerTaxExclude;
|
private BigDecimal incomeEngineerTaxExclude;
|
||||||
private BigDecimal incomeServiceTaxExclude;
|
private BigDecimal incomeServiceTaxExclude;
|
||||||
private BigDecimal incomeTotalTaxExclude;
|
|
||||||
|
|
||||||
private BigDecimal costPurchaseDeviceTaxInclude;
|
private BigDecimal costPurchaseDeviceTaxInclude;
|
||||||
private BigDecimal costPurchaseBuildTaxInclude;
|
private BigDecimal costPurchaseBuildTaxInclude;
|
||||||
|
@ -22,7 +20,6 @@ public class EstimateBean {
|
||||||
private BigDecimal costProjectManageTaxInclude;
|
private BigDecimal costProjectManageTaxInclude;
|
||||||
private BigDecimal costPurchaseOtherTaxInclude;
|
private BigDecimal costPurchaseOtherTaxInclude;
|
||||||
private BigDecimal costOtherOtherTaxInclude;
|
private BigDecimal costOtherOtherTaxInclude;
|
||||||
private BigDecimal costTotalTaxInclude;
|
|
||||||
|
|
||||||
private BigDecimal costPurchaseDeviceTaxExclude;
|
private BigDecimal costPurchaseDeviceTaxExclude;
|
||||||
private BigDecimal costPurchaseBuildTaxExclude;
|
private BigDecimal costPurchaseBuildTaxExclude;
|
||||||
|
@ -30,16 +27,10 @@ public class EstimateBean {
|
||||||
private BigDecimal costPurchaseOtherTaxExclude;
|
private BigDecimal costPurchaseOtherTaxExclude;
|
||||||
private BigDecimal costProjectManageTaxExclude;
|
private BigDecimal costProjectManageTaxExclude;
|
||||||
private BigDecimal costOtherOtherTaxExclude;
|
private BigDecimal costOtherOtherTaxExclude;
|
||||||
private BigDecimal costTotalTaxExclude;
|
|
||||||
|
|
||||||
private BigDecimal costExpropriationTaxExclude;
|
private BigDecimal costExpropriationTaxExclude;
|
||||||
private BigDecimal costCompanyManageTaxExclude;
|
private BigDecimal costCompanyManageTaxExclude;
|
||||||
|
|
||||||
private BigDecimal projectGrossProfit;
|
|
||||||
private BigDecimal projectGrossProfitRate;
|
|
||||||
private BigDecimal projectContributionProfit;
|
|
||||||
private BigDecimal projectContributionProfitRate;
|
|
||||||
|
|
||||||
public BigDecimal getIncomeDeviceTaxInclude() {
|
public BigDecimal getIncomeDeviceTaxInclude() {
|
||||||
return incomeDeviceTaxInclude;
|
return incomeDeviceTaxInclude;
|
||||||
}
|
}
|
||||||
|
@ -65,11 +56,8 @@ public class EstimateBean {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getIncomeTotalTaxInclude() {
|
public BigDecimal getIncomeTotalTaxInclude() {
|
||||||
return incomeTotalTaxInclude;
|
return incomeDeviceTaxInclude.add(incomeEngineerTaxInclude)
|
||||||
}
|
.add(incomeServiceTaxInclude);
|
||||||
|
|
||||||
public void setIncomeTotalTaxInclude(BigDecimal incomeTotalTaxInclude) {
|
|
||||||
this.incomeTotalTaxInclude = incomeTotalTaxInclude;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getIncomeDeviceTaxExclude() {
|
public BigDecimal getIncomeDeviceTaxExclude() {
|
||||||
|
@ -97,11 +85,8 @@ public class EstimateBean {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getIncomeTotalTaxExclude() {
|
public BigDecimal getIncomeTotalTaxExclude() {
|
||||||
return incomeTotalTaxExclude;
|
return incomeDeviceTaxExclude.add(incomeEngineerTaxExclude)
|
||||||
}
|
.add(incomeServiceTaxExclude);
|
||||||
|
|
||||||
public void setIncomeTotalTaxExclude(BigDecimal incomeTotalTaxExclude) {
|
|
||||||
this.incomeTotalTaxExclude = incomeTotalTaxExclude;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getCostPurchaseDeviceTaxInclude() {
|
public BigDecimal getCostPurchaseDeviceTaxInclude() {
|
||||||
|
@ -153,11 +138,12 @@ public class EstimateBean {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getCostTotalTaxInclude() {
|
public BigDecimal getCostTotalTaxInclude() {
|
||||||
return costTotalTaxInclude;
|
return costPurchaseDeviceTaxInclude
|
||||||
}
|
.add(costPurchaseBuildTaxInclude)
|
||||||
|
.add(costPurchaseServiceTaxInclude)
|
||||||
public void setCostTotalTaxInclude(BigDecimal costTotalTaxInclude) {
|
.add(costPurchaseOtherTaxInclude)
|
||||||
this.costTotalTaxInclude = costTotalTaxInclude;
|
.add(costProjectManageTaxInclude)
|
||||||
|
.add(costOtherOtherTaxInclude);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getCostPurchaseDeviceTaxExclude() {
|
public BigDecimal getCostPurchaseDeviceTaxExclude() {
|
||||||
|
@ -209,12 +195,13 @@ public class EstimateBean {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getCostTotalTaxExclude() {
|
public BigDecimal getCostTotalTaxExclude() {
|
||||||
return costTotalTaxExclude;
|
return costPurchaseDeviceTaxExclude.add(costPurchaseBuildTaxExclude)
|
||||||
|
.add(costPurchaseServiceTaxExclude)
|
||||||
|
.add(costPurchaseOtherTaxExclude)
|
||||||
|
.add(costProjectManageTaxExclude)
|
||||||
|
.add(costOtherOtherTaxExclude);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCostTotalTaxExclude(BigDecimal costTotalTaxExclude) {
|
|
||||||
this.costTotalTaxExclude = costTotalTaxExclude;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getCostExpropriationTaxExclude() {
|
public BigDecimal getCostExpropriationTaxExclude() {
|
||||||
return costExpropriationTaxExclude;
|
return costExpropriationTaxExclude;
|
||||||
|
@ -233,34 +220,19 @@ public class EstimateBean {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getProjectGrossProfit() {
|
public BigDecimal getProjectGrossProfit() {
|
||||||
return projectGrossProfit;
|
return getIncomeTotalTaxExclude().subtract(getCostTotalTaxExclude()).subtract(getCostExpropriationTaxExclude());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setProjectGrossProfit(BigDecimal projectGrossProfit) {
|
|
||||||
this.projectGrossProfit = projectGrossProfit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getProjectGrossProfitRate() {
|
public BigDecimal getProjectGrossProfitRate() {
|
||||||
return projectGrossProfitRate;
|
return getProjectGrossProfit().multiply(new BigDecimal(100)).divide(getIncomeTotalTaxExclude(),2,BigDecimal.ROUND_HALF_UP);
|
||||||
}
|
|
||||||
|
|
||||||
public void setProjectGrossProfitRate(BigDecimal projectGrossProfitRate) {
|
|
||||||
this.projectGrossProfitRate = projectGrossProfitRate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getProjectContributionProfit() {
|
public BigDecimal getProjectContributionProfit() {
|
||||||
return projectContributionProfit;
|
return getProjectGrossProfit().subtract(getCostCompanyManageTaxExclude());
|
||||||
}
|
|
||||||
|
|
||||||
public void setProjectContributionProfit(BigDecimal projectContributionProfit) {
|
|
||||||
this.projectContributionProfit = projectContributionProfit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getProjectContributionProfitRate() {
|
public BigDecimal getProjectContributionProfitRate() {
|
||||||
return projectContributionProfitRate;
|
return getProjectContributionProfit().multiply(new BigDecimal(100)).divide(getIncomeTotalTaxExclude(), 2,BigDecimal.ROUND_HALF_UP);
|
||||||
}
|
|
||||||
|
|
||||||
public void setProjectContributionProfitRate(BigDecimal projectContributionProfitRate) {
|
|
||||||
this.projectContributionProfitRate = projectContributionProfitRate;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
package cn.palmte.work.model;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目概算成本表
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "project_estimate_cost")
|
||||||
|
public class ProjectEstimateCost {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "project_id")
|
||||||
|
private int projectId;
|
||||||
|
|
||||||
|
private int fee;
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
@Column(name = "cost_tax_include")
|
||||||
|
private BigDecimal costTaxInclude;
|
||||||
|
@Column(name = "cost_tax_exclude")
|
||||||
|
private BigDecimal costTaxExclude;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getProjectId() {
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectId(int projectId) {
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFee() {
|
||||||
|
return fee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFee(int fee) {
|
||||||
|
this.fee = fee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getCostTaxInclude() {
|
||||||
|
return costTaxInclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCostTaxInclude(BigDecimal costTaxInclude) {
|
||||||
|
this.costTaxInclude = costTaxInclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getCostTaxExclude() {
|
||||||
|
return costTaxExclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCostTaxExclude(BigDecimal costTaxExclude) {
|
||||||
|
this.costTaxExclude = costTaxExclude;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package cn.palmte.work.model;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目概算管理表
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "project_estimate_cost_manage")
|
||||||
|
public class ProjectEstimateCostManage {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "project_id")
|
||||||
|
private int projectId;
|
||||||
|
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
@Column(name = "income_tax_exclude")
|
||||||
|
private BigDecimal incomeTaxExclude;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getProjectId() {
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectId(int projectId) {
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIncomeTaxExclude() {
|
||||||
|
return incomeTaxExclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIncomeTaxExclude(BigDecimal incomeTaxExclude) {
|
||||||
|
this.incomeTaxExclude = incomeTaxExclude;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package cn.palmte.work.model;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface ProjectEstimateCostManageRepository extends JpaRepository<ProjectEstimateCostManage,Integer> {
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package cn.palmte.work.model;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface ProjectEstimateCostRepository extends JpaRepository<ProjectEstimateCost,Integer> {
|
||||||
|
}
|
|
@ -0,0 +1,71 @@
|
||||||
|
package cn.palmte.work.model;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目概算收入表
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "project_estimate_income")
|
||||||
|
public class ProjectEstimateIncome {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "project_id")
|
||||||
|
private int projectId;
|
||||||
|
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
@Column(name = "income_tax_include")
|
||||||
|
private BigDecimal incomeTaxInclude;
|
||||||
|
@Column(name = "income_tax_exclude")
|
||||||
|
private BigDecimal incomeTaxExclude;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getProjectId() {
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectId(int projectId) {
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIncomeTaxInclude() {
|
||||||
|
return incomeTaxInclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIncomeTaxInclude(BigDecimal incomeTaxInclude) {
|
||||||
|
this.incomeTaxInclude = incomeTaxInclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIncomeTaxExclude() {
|
||||||
|
return incomeTaxExclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIncomeTaxExclude(BigDecimal incomeTaxExclude) {
|
||||||
|
this.incomeTaxExclude = incomeTaxExclude;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package cn.palmte.work.model;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface ProjectEstimateIncomeRepository extends JpaRepository<ProjectEstimateIncome,Integer> {
|
||||||
|
}
|
|
@ -0,0 +1,71 @@
|
||||||
|
package cn.palmte.work.model;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目概算利润率
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "project_estimate_profit")
|
||||||
|
public class ProjectEstimateProfit {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "project_id")
|
||||||
|
private int projectId;
|
||||||
|
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
@Column(name = "income_tax_exclude")
|
||||||
|
private BigDecimal incomeTaxExclude;
|
||||||
|
@Column(name = "profit_rate")
|
||||||
|
private BigDecimal profitRate;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getProjectId() {
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectId(int projectId) {
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIncomeTaxExclude() {
|
||||||
|
return incomeTaxExclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIncomeTaxExclude(BigDecimal incomeTaxExclude) {
|
||||||
|
this.incomeTaxExclude = incomeTaxExclude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getProfitRate() {
|
||||||
|
return profitRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProfitRate(BigDecimal profitRate) {
|
||||||
|
this.profitRate = profitRate;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package cn.palmte.work.model;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface ProjectEstimateProfitRepository extends JpaRepository<ProjectEstimateProfit,Integer> {
|
||||||
|
}
|
|
@ -4,9 +4,7 @@ import cn.palmte.work.bean.ApproveStatusEnum;
|
||||||
import cn.palmte.work.bean.EstimateBean;
|
import cn.palmte.work.bean.EstimateBean;
|
||||||
import cn.palmte.work.bean.StatusEnum;
|
import cn.palmte.work.bean.StatusEnum;
|
||||||
import cn.palmte.work.bean.TypeEnum;
|
import cn.palmte.work.bean.TypeEnum;
|
||||||
import cn.palmte.work.model.Admin;
|
import cn.palmte.work.model.*;
|
||||||
import cn.palmte.work.model.Project;
|
|
||||||
import cn.palmte.work.model.ProjectRepository;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import top.jfunc.common.db.QueryHelper;
|
import top.jfunc.common.db.QueryHelper;
|
||||||
|
@ -26,6 +24,12 @@ public class ProjectService {
|
||||||
private Pagination pagination;
|
private Pagination pagination;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectRepository projectRepository;
|
private ProjectRepository projectRepository;
|
||||||
|
@Autowired
|
||||||
|
private ProjectEstimateIncomeRepository projectEstimateIncomeRepository;
|
||||||
|
@Autowired
|
||||||
|
private ProjectEstimateCostRepository projectEstimateCostRepository;
|
||||||
|
@Autowired
|
||||||
|
private ProjectEstimateCostManageRepository projectEstimateCostManageRepository;
|
||||||
|
|
||||||
|
|
||||||
private QueryHelper getQueryHelper(Map<String, String> searchInfo, int pageNumber, int pageSize) {
|
private QueryHelper getQueryHelper(Map<String, String> searchInfo, int pageNumber, int pageSize) {
|
||||||
|
@ -101,7 +105,99 @@ public class ProjectService {
|
||||||
project = projectRepository.saveAndFlush(project);
|
project = projectRepository.saveAndFlush(project);
|
||||||
|
|
||||||
|
|
||||||
|
//收入记录
|
||||||
|
income(project, estimateBean);
|
||||||
|
//成本记录
|
||||||
|
cost(project, estimateBean);
|
||||||
|
//管理记录
|
||||||
|
costManage(project, estimateBean);
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void cost(Project project, EstimateBean estimateBean) {
|
||||||
|
ProjectEstimateCost projectEstimateCostDevice = new ProjectEstimateCost();
|
||||||
|
projectEstimateCostDevice.setProjectId(project.getId());
|
||||||
|
projectEstimateCostDevice.setFee(1);
|
||||||
|
projectEstimateCostDevice.setType(1);
|
||||||
|
projectEstimateCostDevice.setCostTaxInclude(estimateBean.getCostPurchaseDeviceTaxInclude());
|
||||||
|
projectEstimateCostDevice.setCostTaxExclude(estimateBean.getCostPurchaseDeviceTaxExclude());
|
||||||
|
projectEstimateCostRepository.saveAndFlush(projectEstimateCostDevice);
|
||||||
|
|
||||||
|
|
||||||
|
ProjectEstimateCost projectEstimateCostBuild = new ProjectEstimateCost();
|
||||||
|
projectEstimateCostBuild.setProjectId(project.getId());
|
||||||
|
projectEstimateCostBuild.setFee(1);
|
||||||
|
projectEstimateCostBuild.setType(2);
|
||||||
|
projectEstimateCostBuild.setCostTaxInclude(estimateBean.getCostPurchaseBuildTaxInclude());
|
||||||
|
projectEstimateCostBuild.setCostTaxExclude(estimateBean.getCostPurchaseBuildTaxExclude());
|
||||||
|
projectEstimateCostRepository.saveAndFlush(projectEstimateCostBuild);
|
||||||
|
|
||||||
|
ProjectEstimateCost projectEstimateCostService = new ProjectEstimateCost();
|
||||||
|
projectEstimateCostService.setProjectId(project.getId());
|
||||||
|
projectEstimateCostService.setFee(1);
|
||||||
|
projectEstimateCostService.setType(3);
|
||||||
|
projectEstimateCostService.setCostTaxInclude(estimateBean.getCostPurchaseServiceTaxInclude());
|
||||||
|
projectEstimateCostService.setCostTaxExclude(estimateBean.getCostPurchaseServiceTaxExclude());
|
||||||
|
projectEstimateCostRepository.saveAndFlush(projectEstimateCostService);
|
||||||
|
|
||||||
|
ProjectEstimateCost projectEstimateCostOther = new ProjectEstimateCost();
|
||||||
|
projectEstimateCostOther.setProjectId(project.getId());
|
||||||
|
projectEstimateCostOther.setFee(1);
|
||||||
|
projectEstimateCostOther.setType(4);
|
||||||
|
projectEstimateCostOther.setCostTaxInclude(estimateBean.getCostPurchaseOtherTaxInclude());
|
||||||
|
projectEstimateCostOther.setCostTaxExclude(estimateBean.getCostPurchaseOtherTaxExclude());
|
||||||
|
projectEstimateCostRepository.saveAndFlush(projectEstimateCostOther);
|
||||||
|
|
||||||
|
ProjectEstimateCost projectEstimateCostProject = new ProjectEstimateCost();
|
||||||
|
projectEstimateCostProject.setProjectId(project.getId());
|
||||||
|
projectEstimateCostProject.setFee(2);
|
||||||
|
projectEstimateCostProject.setType(5);
|
||||||
|
projectEstimateCostProject.setCostTaxInclude(estimateBean.getCostProjectManageTaxInclude());
|
||||||
|
projectEstimateCostProject.setCostTaxExclude(estimateBean.getCostProjectManageTaxExclude());
|
||||||
|
projectEstimateCostRepository.saveAndFlush(projectEstimateCostProject);
|
||||||
|
|
||||||
|
ProjectEstimateCost projectEstimateCostOtherOther = new ProjectEstimateCost();
|
||||||
|
projectEstimateCostOtherOther.setProjectId(project.getId());
|
||||||
|
projectEstimateCostOtherOther.setFee(3);
|
||||||
|
projectEstimateCostOtherOther.setType(6);
|
||||||
|
projectEstimateCostOtherOther.setCostTaxInclude(estimateBean.getCostOtherOtherTaxInclude());
|
||||||
|
projectEstimateCostOtherOther.setCostTaxExclude(estimateBean.getCostOtherOtherTaxExclude());
|
||||||
|
projectEstimateCostRepository.saveAndFlush(projectEstimateCostOtherOther);
|
||||||
|
|
||||||
|
}
|
||||||
|
private void costManage(Project project, EstimateBean estimateBean) {
|
||||||
|
ProjectEstimateCostManage projectEstimateCostZijin = new ProjectEstimateCostManage();
|
||||||
|
projectEstimateCostZijin.setProjectId(project.getId());
|
||||||
|
projectEstimateCostZijin.setType(1);
|
||||||
|
projectEstimateCostZijin.setIncomeTaxExclude(estimateBean.getCostCompanyManageTaxExclude());
|
||||||
|
projectEstimateCostManageRepository.saveAndFlush(projectEstimateCostZijin);
|
||||||
|
|
||||||
|
ProjectEstimateCostManage projectEstimateCostManage = new ProjectEstimateCostManage();
|
||||||
|
projectEstimateCostManage.setProjectId(project.getId());
|
||||||
|
projectEstimateCostManage.setType(2);
|
||||||
|
projectEstimateCostManage.setIncomeTaxExclude(estimateBean.getCostCompanyManageTaxExclude());
|
||||||
|
projectEstimateCostManageRepository.saveAndFlush(projectEstimateCostManage);
|
||||||
|
}
|
||||||
|
private void income(Project project, EstimateBean estimateBean) {
|
||||||
|
ProjectEstimateIncome projectEstimateIncomeDevice = new ProjectEstimateIncome();
|
||||||
|
projectEstimateIncomeDevice.setProjectId(project.getId());
|
||||||
|
projectEstimateIncomeDevice.setType(1);
|
||||||
|
projectEstimateIncomeDevice.setIncomeTaxInclude(estimateBean.getIncomeDeviceTaxInclude());
|
||||||
|
projectEstimateIncomeDevice.setIncomeTaxExclude(estimateBean.getIncomeDeviceTaxExclude());
|
||||||
|
projectEstimateIncomeRepository.saveAndFlush(projectEstimateIncomeDevice);
|
||||||
|
|
||||||
|
ProjectEstimateIncome projectEstimateIncomeEngineer = new ProjectEstimateIncome();
|
||||||
|
projectEstimateIncomeEngineer.setProjectId(project.getId());
|
||||||
|
projectEstimateIncomeEngineer.setType(2);
|
||||||
|
projectEstimateIncomeEngineer.setIncomeTaxInclude(estimateBean.getIncomeEngineerTaxInclude());
|
||||||
|
projectEstimateIncomeEngineer.setIncomeTaxExclude(estimateBean.getIncomeEngineerTaxExclude());
|
||||||
|
projectEstimateIncomeRepository.saveAndFlush(projectEstimateIncomeEngineer);
|
||||||
|
|
||||||
|
ProjectEstimateIncome projectEstimateIncomeService = new ProjectEstimateIncome();
|
||||||
|
projectEstimateIncomeService.setProjectId(project.getId());
|
||||||
|
projectEstimateIncomeService.setType(3);
|
||||||
|
projectEstimateIncomeService.setIncomeTaxInclude(estimateBean.getIncomeServiceTaxInclude());
|
||||||
|
projectEstimateIncomeService.setIncomeTaxExclude(estimateBean.getIncomeServiceTaxExclude());
|
||||||
|
projectEstimateIncomeRepository.saveAndFlush(projectEstimateIncomeService);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue