修复综合看板

This commit is contained in:
2026-04-22 18:44:14 +08:00
parent 50527f68e0
commit 602928dc0b
9 changed files with 168 additions and 89 deletions

View File

@@ -284,4 +284,14 @@ public class SysOaProjectVo {
private Long processCardCount;
private Long deliveryOrderCount;
// 总览页面统计
private Long taskFinishCount;
private Long taskTotalCount;
private Long scheduleTotalCount;
private Long scheduleFinishCount;
}

View File

@@ -221,6 +221,7 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
}
qw.eq(bo.getCustomerId() != null, "p.customer_id", bo.getCustomerId());
qw.orderByDesc("p.is_top").orderByDesc("p.create_time");
qw.groupBy("p.project_id");
return qw;
}

View File

@@ -154,6 +154,7 @@ public class SysOaTaskServiceImpl implements ISysOaTaskService {
QueryWrapper<SysOaTask> lqw = Wrappers.query();
lqw.eq("sot.del_flag", 0);
lqw.eq(bo.getProjectId()!=null, "sot.project_id", bo.getProjectId());
lqw.eq(bo.getTaskId()!=null, "sot.task_id", bo.getTaskId());
lqw.eq(bo.getCreateUserId()!=null, "sot.create_user_id", bo.getCreateUserId());
lqw.eq(bo.getWorkerId()!=null, "sot.worker_id", bo.getWorkerId());
lqw.eq(bo.getProjectId()!=null, "sot.project_id", bo.getProjectId());

View File

@@ -310,9 +310,15 @@
TIMESTAMPDIFF(DAY, NOW(), p.postpone_time) AS remainTime,
p.customer_id AS customerId,
c.name AS customerName,
p.is_top AS isTop
p.is_top AS isTop,
COUNT(sot.task_id) AS taskTotalCount ,
SUM(CASE WHEN sot.status = 1 THEN 1 ELSE 0 END) AS taskFinishCount,
COUNT(ops.schedule_id) AS scheduleTotalCount,
SUM(CASE WHEN ops.status = 2 THEN 1 ELSE 0 END) AS scheduleFinishCount
FROM sys_oa_project p
LEFT JOIN oa_customer c ON p.customer_id = c.customer_id
left join sys_oa_task sot on sot.project_id = p.project_id and sot.del_flag = 0
left join oa_project_schedule ops on ops.project_id = p.project_id and ops.del_flag = 0
${ew.getCustomSqlSegment}
</select>