|
|
@@ -44,6 +44,7 @@ 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.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.IProjectService; |
|
|
@@ -1004,11 +1005,12 @@ public class MeetingManage { |
|
|
|
case PROJECT_REVIEW: |
|
|
|
case EXPERT_REVIEW: |
|
|
|
query.isNotNull(Project::getConstructionPlanSealFile); |
|
|
|
buildOptionProjectQuery(query, meetingType, ProjectStatus.WITHOUT_PROJECT_REVIEW); |
|
|
|
buildOptionProjectQuery(query, meetingType, ProjectStatus.WITHOUT_EXPERT_REVIEW, ProjectStatus.EXPERT_REVIEW_FAILED); |
|
|
|
break; |
|
|
|
default: |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
ProjectManageUtil.projectBaseQuery(query); |
|
|
|
Page<Project> page = projectService.page(req.page(), query); |
|
|
|
PageVo<MeetingReviewProjectVO> result = PageVo.of(null, page.getTotal()); |
|
|
|
if (result.getTotal() > 0) { |
|
|
@@ -1047,14 +1049,15 @@ public class MeetingManage { |
|
|
|
return ProjectReviewResultBuilder.convert(projectReview); |
|
|
|
} |
|
|
|
|
|
|
|
private void buildOptionProjectQuery(LambdaQueryWrapper<Project> query, String meetingType, ProjectStatus status) { |
|
|
|
if (status != null) { |
|
|
|
query.eq(Project::getStatus, status.getCode()); |
|
|
|
private void buildOptionProjectQuery(LambdaQueryWrapper<Project> query, String meetingType, ProjectStatus... statusList) { |
|
|
|
if (statusList != null && statusList.length > 0) { |
|
|
|
List<Integer> statusCodeList = CollUtils.fieldList(Arrays.asList(statusList), ProjectStatus::getCode); |
|
|
|
query.in(Project::getStatus, statusCodeList); |
|
|
|
} |
|
|
|
String sql = String.format("select 1 from meeting m inner join meeting_inner_project mip on" + |
|
|
|
" m.is_inner_project = 1 and m.id = mip.meeting_id and nd_project.id = mip.project_id" + |
|
|
|
" and m.type = %s and m.status != 3", meetingType); |
|
|
|
String sql2 = String.format("1 = (select case when review_result in (2,3) then 1 else 0 end from " + |
|
|
|
String sql2 = String.format("1 = (select case when review_result in (0) then 1 else 0 end from " + |
|
|
|
" (select ner.review_result from meeting m inner join meeting_inner_project mip on" + |
|
|
|
" m.is_inner_project = 1 and m.id = mip.meeting_id and nd_project.id = mip.project_id" + |
|
|
|
" and m.type = %s and m.status != 3 left join nd_expert_review ner on ner.meeting_id = m.id " + |
|
|
@@ -1099,6 +1102,7 @@ public class MeetingManage { |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void uploadProjectReviewResult(ProjectReviewResultUploadReq req) { |
|
|
|
String key = "meeting_project_result_upload:" + req.getMeetingProjectId(); |
|
|
|
if (!distributedLock.lock(key, RETRY_TIMES)) { |
|
|
|