Commit 02073fc3 authored by neo's avatar neo

[dev] fix get project status list sql

parent 6952e4a9
......@@ -136,7 +136,7 @@ public class ProjectServiceImpl implements ProjectService {
List<ProjectDisplayDto> data = projectMapper.getProjectList(orgId, serviceId, projectYear);
//获取每个项目的项目状态
data.forEach(p -> {
List<ProjectStatusManage> manageStatus = projectMapper.getProjectSatusListByDbName(p.getId());
List<ProjectStatusManage> manageStatus = projectMapper.getStatusesByProjectId(p.getId());
Map<Integer, Integer> dic = new HashMap<>();
manageStatus.forEach(m -> {
dic.put(m.getPeriodId(), m.getStatus());
......
......@@ -165,13 +165,13 @@ public interface ProjectMapper extends MyMapper {
@Param("projectYear") Integer projectYear);
@Select("SELECT " +
" p.PERIOD_ID, p.Status " +
" p.PERIOD_ID AS periodId, p.STATUS AS status " +
"FROM " +
" PROJECT_STATUS_MANAGE p " +
"WHERE " +
" p.DB_NAME = #{projectID} " +
"ORDER BY PERIOD_ID , Status")
List<ProjectStatusManage> getProjectSatusListByDbName(String projectID);
" p.PROJECT_ID = #{projectId} " +
"ORDER BY PERIOD_ID , STATUS")
List<ProjectStatusManage> getStatusesByProjectId(String projectId);
@Select("<script>" +
"SELECT " +
......
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