总计计算开始时为null
parent
3f0c213685
commit
04eab94cc3
|
@ -9,4 +9,4 @@ public interface ProjectBudgetCostDetailRepository extends JpaRepository<Project
|
||||||
List<ProjectBudgetCostDetail> findAllByProjectIdEquals(int id);
|
List<ProjectBudgetCostDetail> findAllByProjectIdEquals(int id);
|
||||||
|
|
||||||
@Query(value = "select sum(amount) from project_budget_cost_detail where project_id = ?1", nativeQuery = true)
|
@Query(value = "select sum(amount) from project_budget_cost_detail where project_id = ?1", nativeQuery = true)
|
||||||
int findAmountByProject(int projectId);}
|
Integer findAmountByProject(int projectId);}
|
||||||
|
|
|
@ -9,5 +9,5 @@ public interface ProjectBudgetCostProjectManageDetailRepository extends JpaRepos
|
||||||
List<ProjectBudgetCostProjectManageDetail> findAllByProjectIdEquals(int id);
|
List<ProjectBudgetCostProjectManageDetail> findAllByProjectIdEquals(int id);
|
||||||
|
|
||||||
@Query(value = "select sum(amount) from project_budget_cost_project_manage_detail where project_id = ?1", nativeQuery = true)
|
@Query(value = "select sum(amount) from project_budget_cost_project_manage_detail where project_id = ?1", nativeQuery = true)
|
||||||
int findAmountByProject(int id);
|
Integer findAmountByProject(int id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,5 +9,5 @@ public interface ProjectBudgetIncomeDetailRepository extends JpaRepository<Proje
|
||||||
List<ProjectBudgetIncomeDetail> findAllByProjectIdEquals(int id);
|
List<ProjectBudgetIncomeDetail> findAllByProjectIdEquals(int id);
|
||||||
|
|
||||||
@Query(value = "select sum(amount) from project_budget_income_detail where project_id = ?1", nativeQuery = true)
|
@Query(value = "select sum(amount) from project_budget_income_detail where project_id = ?1", nativeQuery = true)
|
||||||
int findAmountByProject(int projectId);
|
Integer findAmountByProject(int projectId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -373,7 +373,7 @@ public class ProjectBudgetService {
|
||||||
/**
|
/**
|
||||||
* 获取项目的收入总数量
|
* 获取项目的收入总数量
|
||||||
*/
|
*/
|
||||||
public int getBudgetIncomeAmount(Project project){
|
public Integer getBudgetIncomeAmount(Project project){
|
||||||
return projectBudgetIncomeDetailRepository.findAmountByProject(project.getId());
|
return projectBudgetIncomeDetailRepository.findAmountByProject(project.getId());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -427,7 +427,7 @@ public class ProjectBudgetService {
|
||||||
/**
|
/**
|
||||||
* 获取项目的成本总数量
|
* 获取项目的成本总数量
|
||||||
*/
|
*/
|
||||||
public int getBudgetCostAmount(Project project){
|
public Integer getBudgetCostAmount(Project project){
|
||||||
return projectBudgetCostDetailRepository.findAmountByProject(project.getId());
|
return projectBudgetCostDetailRepository.findAmountByProject(project.getId());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -486,7 +486,7 @@ public class ProjectBudgetService {
|
||||||
/**
|
/**
|
||||||
* 获取项目的项目管理总数量
|
* 获取项目的项目管理总数量
|
||||||
*/
|
*/
|
||||||
public int getBudgetCostProjectManageAmount(Project project){
|
public Integer getBudgetCostProjectManageAmount(Project project){
|
||||||
return projectBudgetCostProjectManageDetailRepository.findAmountByProject(project.getId());
|
return projectBudgetCostProjectManageDetailRepository.findAmountByProject(project.getId());
|
||||||
}
|
}
|
||||||
private List<ProjectBudgetCostProjectManageDetail> getFixedNotDeletable() {
|
private List<ProjectBudgetCostProjectManageDetail> getFixedNotDeletable() {
|
||||||
|
|
Loading…
Reference in New Issue