Commit 16c24fc2 authored by nie'hong's avatar nie'hong

完善工时统计

parent 6e20d889
...@@ -625,8 +625,6 @@ public class StatisticsServiceImpl implements StatisticsService { ...@@ -625,8 +625,6 @@ public class StatisticsServiceImpl implements StatisticsService {
if (CollectionUtil.isEmpty(projectStatisticsByMonths)) { if (CollectionUtil.isEmpty(projectStatisticsByMonths)) {
return null; return null;
} }
// 部门主键不为空时,日期格式只有某月。为空时,日期格式为某年统计的第一个月为某年某月,其余为某月
this.conversionDateFormat(projectStatisticsByMonths, deptId);
List<ProjectStatisticsByMonth> projectStatisticsByMonths1 = workProjectTimeCostMapper.selectListStatistics(year, deptId, projectId); List<ProjectStatisticsByMonth> projectStatisticsByMonths1 = workProjectTimeCostMapper.selectListStatistics(year, deptId, projectId);
// 将查询结果封装在一起,部门主键为空,项目总计在前,否则在后 // 将查询结果封装在一起,部门主键为空,项目总计在前,否则在后
List<ProjectStatisticsByMonth> projectStatistics = new ArrayList<>(); List<ProjectStatisticsByMonth> projectStatistics = new ArrayList<>();
...@@ -638,6 +636,9 @@ public class StatisticsServiceImpl implements StatisticsService { ...@@ -638,6 +636,9 @@ public class StatisticsServiceImpl implements StatisticsService {
projectStatistics.addAll(projectStatisticsByMonths); projectStatistics.addAll(projectStatisticsByMonths);
} }
// 部门主键不为空时,日期格式只有某月。为空时,日期格式为某年统计的第一个月为某年某月,其余为某月
this.conversionDateFormat(projectStatistics, deptId);
// 计算项目工时和成本合计 // 计算项目工时和成本合计
for (ProjectStatisticsByMonth projectStatisticsByMonth : projectStatisticsByMonths1) { for (ProjectStatisticsByMonth projectStatisticsByMonth : projectStatisticsByMonths1) {
// 一条统计的 // 一条统计的
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment