Browse Source

modify:

1. 项目评审详情修改;
tags/24110101
WendyYang 1 month ago
parent
commit
8380d9c2bb
3 changed files with 14 additions and 6 deletions
  1. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java
  2. +10
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java
  3. +2
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java View File

@@ -199,9 +199,9 @@ public class MeetingController {
}

@ApiOperation("获取最新的项目评审详情")
@GetMapping("/projectReviewDetail/{projectId}/{meetingType}")
@GetMapping({"/projectReviewDetail/{projectId}/{meetingType}", "/projectReviewDetail/{projectId}"})
public ProjectReviewResultDTO projectReviewDetail(@PathVariable Long projectId,
@PathVariable MeetingReviewTypeEnum meetingType) {
@PathVariable(required = false) MeetingReviewTypeEnum meetingType) {
return meetingManage.projectReviewDetail(projectId, meetingType);
}



+ 10
- 3
hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java View File

@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.helper.RegionCacheHelper;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.ExistsSqlConst;
import com.hz.pm.api.common.model.constant.MhUnitConst;
import com.hz.pm.api.common.statemachine.util.ProjectStateMachineUtil;
import com.hz.pm.api.common.util.BizUtils;
@@ -46,9 +47,11 @@ import com.hz.pm.api.meta.helper.TagCache;
import com.hz.pm.api.open.model.vo.ExpertInfoVO;
import com.hz.pm.api.open.model.vo.MeetingExpertToMhDTO;
import com.hz.pm.api.organization.service.IDingOrganizationService;
import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil;
import com.hz.pm.api.projectlib.helper.ProjectManageUtil;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus;
import com.hz.pm.api.projectlib.service.IProjectInstService;
import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.scheduler.listener.event.MhTodoSendEvent;
import com.hz.pm.api.sys.model.dto.RegionDTO;
@@ -119,6 +122,7 @@ public class MeetingManage {
private final MhUnitCache mhUnitCache;
private final ProjectStateMachineUtil projectStateMachineUtil;
private final IMsgCallRecordService msgCallRecordService;
private final IProjectInstService projectInstService;

private static final String INVITED_RULE_CREATE = "INVITED_RULE_CREATE:";

@@ -1074,11 +1078,14 @@ public class MeetingManage {
}

public ProjectReviewResultDTO projectReviewDetail(Long projectId, MeetingReviewTypeEnum type) {
Wrapper<MeetingInnerProject> query = Wrappers.lambdaQuery(MeetingInnerProject.class)
LambdaQueryWrapper<MeetingInnerProject> query = Wrappers.lambdaQuery(MeetingInnerProject.class)
.orderByDesc(MeetingInnerProject::getUpdateOn)
.exists("select 1 from meeting m where m.id = meeting_inner_project.meeting_id " +
"and project_id = {0} and type = {1}", projectId, type)
.eq(MeetingInnerProject::getProjectCode, ProjectIdCodeCacheUtil.get(projectId))
.last(BizConst.LIMIT_1);
if (type != null) {
query.exists(ExistsSqlConst.MEETING_INNER_PROJECT_EXISTS_MEETING +
"and type = {0}", type.getCode());
}
MeetingInnerProject projectReview = meetingInnerProjectService.getOne(query);
if (projectReview == null) {
return null;


+ 2
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java View File

@@ -25,6 +25,7 @@ import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.hz.pm.api.projectdeclared.model.entity.ProjectReview;
import com.hz.pm.api.projectdeclared.model.vo.ReviewProgressStatisticsVO;
import com.hz.pm.api.projectdeclared.service.IProjectReviewService;
import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil;
import com.hz.pm.api.projectlib.helper.ProjectManageUtil;
import com.hz.pm.api.projectlib.helper.ProjectSaveHelper;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
@@ -126,7 +127,7 @@ public class ProjectReviewManage {
public ProjectReviewResultDTO projectReviewDetail(Long projectId) {
ProjectReview projReview = projectReviewService.getOne(Wrappers
.lambdaQuery(ProjectReview.class)
.eq(ProjectReview::getProjectId, projectId)
.eq(ProjectReview::getProjectCode, ProjectIdCodeCacheUtil.get(projectId))
.orderByDesc(ProjectReview::getId)
.last(BizConst.LIMIT_1));
return BeanUtil.copyProperties(projReview, ProjectReviewResultDTO.class);


Loading…
Cancel
Save