总计计算开始时为null

master
OathK1per 2022-04-19 10:02:57 +08:00
parent 3f0c213685
commit 04eab94cc3
4 changed files with 6 additions and 6 deletions

View File

@ -9,4 +9,4 @@ public interface ProjectBudgetCostDetailRepository extends JpaRepository<Project
List<ProjectBudgetCostDetail> findAllByProjectIdEquals(int id);
@Query(value = "select sum(amount) from project_budget_cost_detail where project_id = ?1", nativeQuery = true)
int findAmountByProject(int projectId);}
Integer findAmountByProject(int projectId);}

View File

@ -9,5 +9,5 @@ public interface ProjectBudgetCostProjectManageDetailRepository extends JpaRepos
List<ProjectBudgetCostProjectManageDetail> findAllByProjectIdEquals(int id);
@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);
}

View File

@ -9,5 +9,5 @@ public interface ProjectBudgetIncomeDetailRepository extends JpaRepository<Proje
List<ProjectBudgetIncomeDetail> findAllByProjectIdEquals(int id);
@Query(value = "select sum(amount) from project_budget_income_detail where project_id = ?1", nativeQuery = true)
int findAmountByProject(int projectId);
Integer findAmountByProject(int projectId);
}

View File

@ -373,7 +373,7 @@ public class ProjectBudgetService {
/**
*
*/
public int getBudgetIncomeAmount(Project project){
public Integer getBudgetIncomeAmount(Project project){
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());
}
/**
@ -486,7 +486,7 @@ public class ProjectBudgetService {
/**
*
*/
public int getBudgetCostProjectManageAmount(Project project){
public Integer getBudgetCostProjectManageAmount(Project project){
return projectBudgetCostProjectManageDetailRepository.findAmountByProject(project.getId());
}
private List<ProjectBudgetCostProjectManageDetail> getFixedNotDeletable() {