feat(项目概览):项目总览-开启中的迭代数和近一周新增数
This commit is contained in:
parent
614651327d
commit
ee9fbf2328
|
|
@ -474,12 +474,16 @@ public class PmsProjectServiceImpl implements IPmsProjectService
|
|||
// 获取 open_data 对象
|
||||
JSONObject openData = dataObj.getJSONObject("open_data");
|
||||
Integer openSprintCount = pmsProjectSprintMapper.selectOpeningSprintCount(pmProjectId);
|
||||
Integer openLastWeekIterationCount = pmsProjectSprintMapper.selectOpeningSprintLastWeekIterationCount(pmProjectId);
|
||||
// 添加新的键值对
|
||||
openData.put("0", openSprintCount); // 新增开启中的迭代
|
||||
openData.put("0_lastWeekIteration", openLastWeekIterationCount); //近一周新增
|
||||
dataObj.put("open_data", openData);
|
||||
}
|
||||
if (dataObj.containsKey("last_week_close_data")) {
|
||||
JSONObject lastWeekCloseData = dataObj.getJSONObject("last_week_close_data");
|
||||
Integer openLastWeekIterationCount = pmsProjectSprintMapper.selectOpeningSprintLastWeekIterationCount(pmProjectId);
|
||||
lastWeekCloseData.put("0", openLastWeekIterationCount); //近一周新增
|
||||
dataObj.put("last_week_close_data", lastWeekCloseData);
|
||||
}
|
||||
return dataObj;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -187,13 +187,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectOpeningSprintCount" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from pms_project_sprint
|
||||
where pms_project_id = #{projectId}
|
||||
where pms_project_id = #{pmProjectId}
|
||||
and status IN ('0', '1')
|
||||
</select>
|
||||
<select id="selectOpeningSprintLastWeekIterationCount" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from pms_project_sprint
|
||||
where pms_project_id = #{projectId}
|
||||
where pms_project_id = #{pmProjectId}
|
||||
and status IN ('0', '1')
|
||||
and start_time >= DATE_SUB(NOW(), INTERVAL 1 WEEK)
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue