@@ -73,13 +73,13 @@ public class ExpertReviewController { | |||||
return expertReviewManage.listReviews(projectId, meetingId, false); | return expertReviewManage.listReviews(projectId, meetingId, false); | ||||
} | } | ||||
@GetMapping("/detail/{projectId}") | |||||
@GetMapping("/detail/{projectCode}") | |||||
@ApiImplicitParams({ | @ApiImplicitParams({ | ||||
@ApiImplicitParam(name = "projectId", value = "项目ID"), | |||||
@ApiImplicitParam(name = "projectCode", value = "项目编号"), | |||||
}) | }) | ||||
@ApiOperation("查看项目的所有评审意见") | @ApiOperation("查看项目的所有评审意见") | ||||
public ProjectReviewDetailVO projectExpertReviewDetail(@PathVariable Long projectId) { | |||||
return expertReviewManage.projectExpertReviewDetail(projectId); | |||||
public ProjectReviewDetailVO projectExpertReviewDetail(@PathVariable String projectCode) { | |||||
return expertReviewManage.projectExpertReviewDetail(projectCode); | |||||
} | } | ||||
} | } |
@@ -107,6 +107,7 @@ public class ExpertReviewManage { | |||||
review.setReviewResult(req.getReviewResult()); | review.setReviewResult(req.getReviewResult()); | ||||
review.setContent(JSONUtil.toJsonStr(req.getReviewTemplateOptions())); | review.setContent(JSONUtil.toJsonStr(req.getReviewTemplateOptions())); | ||||
review.setProjectId(req.getProjectId()); | review.setProjectId(req.getProjectId()); | ||||
review.setProjectCode(req.getProjectCode()); | |||||
review.setTemplateId(req.getTemplateId()); | review.setTemplateId(req.getTemplateId()); | ||||
review.setMeetingId(req.getMeetingId()); | review.setMeetingId(req.getMeetingId()); | ||||
review.setOtherAdvice(req.getOtherAdvice()); | review.setOtherAdvice(req.getOtherAdvice()); | ||||
@@ -151,9 +152,9 @@ public class ExpertReviewManage { | |||||
}); | }); | ||||
} | } | ||||
public ProjectReviewDetailVO projectExpertReviewDetail(Long projectId) { | |||||
public ProjectReviewDetailVO projectExpertReviewDetail(String projectCode) { | |||||
ProjectReviewDetailVO detail = new ProjectReviewDetailVO(); | ProjectReviewDetailVO detail = new ProjectReviewDetailVO(); | ||||
List<Long> meetingIds = meetingInnerProjectService.listMeetingIdByProjectId(projectId); | |||||
List<Long> meetingIds = meetingInnerProjectService.listMeetingIdByProjectCode(projectCode); | |||||
if (meetingIds.isEmpty()) { | if (meetingIds.isEmpty()) { | ||||
return detail; | return detail; | ||||
} | } | ||||
@@ -166,7 +167,7 @@ public class ExpertReviewManage { | |||||
}))).values(); | }))).values(); | ||||
LambdaQueryWrapper<ExpertReview> erQuery = Wrappers.lambdaQuery(ExpertReview.class) | LambdaQueryWrapper<ExpertReview> erQuery = Wrappers.lambdaQuery(ExpertReview.class) | ||||
.in(ExpertReview::getMeetingId, tmpMeetingIds) | .in(ExpertReview::getMeetingId, tmpMeetingIds) | ||||
.eq(ExpertReview::getProjectId, projectId) | |||||
.eq(ExpertReview::getProjectCode, projectCode) | |||||
.orderByDesc(ExpertReview::getCreateOn); | .orderByDesc(ExpertReview::getCreateOn); | ||||
List<ExpertReview> expertReviews = expertReviewService.list(erQuery); | List<ExpertReview> expertReviews = expertReviewService.list(erQuery); | ||||
if (expertReviews.isEmpty()) { | if (expertReviews.isEmpty()) { | ||||
@@ -42,8 +42,7 @@ | |||||
) | ) | ||||
</if> | </if> | ||||
</where> | </where> | ||||
-- ORDER BY create_on DESC | |||||
ORDER BY update_on DESC | |||||
</sql> | </sql> | ||||
<sql id="Expert_Tag_Relation"> | <sql id="Expert_Tag_Relation"> | ||||
@@ -30,6 +30,8 @@ public class ExpertReview implements Serializable { | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private Long projectId; | private Long projectId; | ||||
private String projectCode; | |||||
@ApiModelProperty("会议ID") | @ApiModelProperty("会议ID") | ||||
private Long meetingId; | private Long meetingId; | ||||
@@ -28,6 +28,10 @@ public class ExpertReviewDetailReq { | |||||
@NotNull(message = "项目ID不能为空") | @NotNull(message = "项目ID不能为空") | ||||
private Long projectId; | private Long projectId; | ||||
@ApiModelProperty("项目编号") | |||||
@NotNull(message = "项目编号不能为空") | |||||
private String projectCode; | |||||
@ApiModelProperty("会议ID") | @ApiModelProperty("会议ID") | ||||
@NotNull(message = "会议ID不能为空") | @NotNull(message = "会议ID不能为空") | ||||
private Long meetingId; | private Long meetingId; | ||||
@@ -34,4 +34,7 @@ public class MeetingInnerProject implements Serializable { | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private Long projectId; | private Long projectId; | ||||
@ApiModelProperty("项目编号") | |||||
private String projectCode; | |||||
} | } |
@@ -66,7 +66,7 @@ public class MeetingBasicDTO { | |||||
private String contact; | private String contact; | ||||
@ApiModelProperty("内部项目ID") | @ApiModelProperty("内部项目ID") | ||||
private List<Long> projectIdList; | |||||
private List<ProjectIdCodeDTO> innerProjects; | |||||
@ApiModelProperty("外部项目") | @ApiModelProperty("外部项目") | ||||
private List<MeetingReviewProjectDTO> projects; | private List<MeetingReviewProjectDTO> projects; | ||||
@@ -19,6 +19,9 @@ public class MeetingReviewProjectDTO { | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private Long projectId; | private Long projectId; | ||||
@ApiModelProperty("项目编码") | |||||
private String projectCode; | |||||
@ApiModelProperty("项目名称") | @ApiModelProperty("项目名称") | ||||
private String projectName; | private String projectName; | ||||
@@ -0,0 +1,23 @@ | |||||
package com.ningdatech.pmapi.meeting.entity.dto; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
/** | |||||
* <p> | |||||
* ProjectIdCodeDTO | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2023/4/28 | |||||
**/ | |||||
@Data | |||||
public class ProjectIdCodeDTO { | |||||
@ApiModelProperty("项目ID") | |||||
private Long projectId; | |||||
@ApiModelProperty("项目编码") | |||||
private String projectCode; | |||||
} |
@@ -28,6 +28,9 @@ public class ReviewProjectDTO { | |||||
@ApiModelProperty("项目名称") | @ApiModelProperty("项目名称") | ||||
private String projectName; | private String projectName; | ||||
@ApiModelProperty("项目编号") | |||||
private String projectCode; | |||||
@ApiModelProperty("项目类型") | @ApiModelProperty("项目类型") | ||||
private Integer projectType; | private Integer projectType; | ||||
@@ -28,6 +28,9 @@ public class MeetingReviewProjectVO { | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private Long id; | private Long id; | ||||
@ApiModelProperty("项目编号") | |||||
private String projectCode; | |||||
@ApiModelProperty("项目名称") | @ApiModelProperty("项目名称") | ||||
private String projectName; | private String projectName; | ||||
@@ -63,7 +63,7 @@ public class MeetingManageHelper { | |||||
public void checkReviewProject(MeetingBasicDTO meetingBasic) { | public void checkReviewProject(MeetingBasicDTO meetingBasic) { | ||||
if (meetingBasic.getIsInnerProject()) { | if (meetingBasic.getIsInnerProject()) { | ||||
Assert.notEmpty(meetingBasic.getProjectIdList(), "评审项目不能为空"); | |||||
Assert.notEmpty(meetingBasic.getInnerProjects(), "评审项目不能为空"); | |||||
} else { | } else { | ||||
Assert.notEmpty(meetingBasic.getProjects(), "评审项目不能为空"); | Assert.notEmpty(meetingBasic.getProjects(), "评审项目不能为空"); | ||||
} | } | ||||
@@ -137,12 +137,14 @@ public class MeetingManage { | |||||
meeting.setInviteType(inviteRule.getInviteType()); | meeting.setInviteType(inviteRule.getInviteType()); | ||||
meetingService.save(meeting); | meetingService.save(meeting); | ||||
if (meetingBasic.getIsInnerProject()) { | if (meetingBasic.getIsInnerProject()) { | ||||
List<MeetingInnerProject> projects = meetingBasic.getProjectIdList().stream().map(w -> { | |||||
MeetingInnerProject project = new MeetingInnerProject(); | |||||
project.setMeetingId(meeting.getId()); | |||||
project.setProjectId(w); | |||||
return project; | |||||
}).collect(Collectors.toList()); | |||||
List<MeetingInnerProject> projects = meetingBasic.getInnerProjects() | |||||
.stream().map(w -> { | |||||
MeetingInnerProject project = new MeetingInnerProject(); | |||||
project.setMeetingId(meeting.getId()); | |||||
project.setProjectId(w.getProjectId()); | |||||
project.setProjectCode(w.getProjectCode()); | |||||
return project; | |||||
}).collect(Collectors.toList()); | |||||
meetingInnerProjectService.saveBatch(projects); | meetingInnerProjectService.saveBatch(projects); | ||||
} else { | } else { | ||||
List<MeetingOuterProject> projects = meetingBasic.getProjects().stream().map(w -> { | List<MeetingOuterProject> projects = meetingBasic.getProjects().stream().map(w -> { | ||||
@@ -450,6 +452,7 @@ public class MeetingManage { | |||||
mrp.setProjectType(w.getProjectType().toString()); | mrp.setProjectType(w.getProjectType().toString()); | ||||
mrp.setProjectYear(w.getProjectYear()); | mrp.setProjectYear(w.getProjectYear()); | ||||
mrp.setDeclareAmount(w.getDeclareAmount()); | mrp.setDeclareAmount(w.getDeclareAmount()); | ||||
mrp.setProjectCode(w.getProjectCode()); | |||||
ExpertReview review = reviewMap.get(w.getId()); | ExpertReview review = reviewMap.get(w.getId()); | ||||
if (review != null) { | if (review != null) { | ||||
mrp.setReviewResult(ReviewResultEnum.getByCode(review.getReviewResult()).getValue()); | mrp.setReviewResult(ReviewResultEnum.getByCode(review.getReviewResult()).getValue()); | ||||
@@ -584,7 +587,7 @@ public class MeetingManage { | |||||
} | } | ||||
result.getRandomRules().add(randomRule); | result.getRandomRules().add(randomRule); | ||||
}); | }); | ||||
AvoidRuleDTO avoidInfo = inviteAvoidRuleService.getAvoidInfoDto(meetingId); | |||||
AvoidRuleDTO avoidInfo = inviteAvoidRuleService.getAvoidInfo(meetingId); | |||||
AvoidInfoVO vo = new AvoidInfoVO(); | AvoidInfoVO vo = new AvoidInfoVO(); | ||||
vo.setWeekInviteCount(avoidInfo.getWeekInviteCount()); | vo.setWeekInviteCount(avoidInfo.getWeekInviteCount()); | ||||
vo.setAvoidOrgIds(avoidInfo.getAvoidOrgIdList()); | vo.setAvoidOrgIds(avoidInfo.getAvoidOrgIdList()); | ||||
@@ -897,6 +900,7 @@ public class MeetingManage { | |||||
return MeetingReviewProjectVO | return MeetingReviewProjectVO | ||||
.builder() | .builder() | ||||
.id(project.getId()) | .id(project.getId()) | ||||
.projectCode(project.getProjectCode()) | |||||
.projectName(project.getProjectName()) | .projectName(project.getProjectName()) | ||||
.declaredAmount(project.getDeclareAmount()) | .declaredAmount(project.getDeclareAmount()) | ||||
.projectType(project.getProjectType()) | .projectType(project.getProjectType()) | ||||
@@ -104,7 +104,7 @@ | |||||
</sql> | </sql> | ||||
<select id="pageReviewProjectList" resultType="com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO"> | <select id="pageReviewProjectList" resultType="com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO"> | ||||
select mip.project_id, np.project_name, np.project_type, np.project_year, np.build_org_name, m.type review_type, | |||||
select mip.project_id,np.project_code, np.project_name, np.project_type, np.project_year, np.build_org_name, m.type review_type, | |||||
np.biz_domain, np.declare_amount declared_amount, mip.meeting_id, m.type meetingType, m.start_time reviewTime,m.end_time endReviewTime, | np.biz_domain, np.declare_amount declared_amount, mip.meeting_id, m.type meetingType, m.start_time reviewTime,m.end_time endReviewTime, | ||||
m.connecter, m.contact, me.is_headman, (select count(1) from nd_expert_review ner where ner.meeting_id = m.id and ner.project_id = np.id | m.connecter, m.contact, me.is_headman, (select count(1) from nd_expert_review ner where ner.meeting_id = m.id and ner.project_id = np.id | ||||
and ner.create_by = me.expert_id) reviewed | and ner.create_by = me.expert_id) reviewed | ||||
@@ -20,9 +20,9 @@ public interface IExpertInviteAvoidRuleService extends IService<ExpertInviteAvoi | |||||
* 获取回避信息 | * 获取回避信息 | ||||
* | * | ||||
* @param meetingId 会议ID | * @param meetingId 会议ID | ||||
* @return com.ningdatech.emapi.meeting.entity.dto.AvoidInfoDto | |||||
* @return {@link AvoidRuleDTO} | |||||
* @author WendyYang | * @author WendyYang | ||||
**/ | **/ | ||||
AvoidRuleDTO getAvoidInfoDto(Long meetingId); | |||||
AvoidRuleDTO getAvoidInfo(Long meetingId); | |||||
} | } |
@@ -33,4 +33,13 @@ public interface IMeetingInnerProjectService extends IService<MeetingInnerProjec | |||||
**/ | **/ | ||||
List<Long> listMeetingIdByProjectId(Long projectId); | List<Long> listMeetingIdByProjectId(Long projectId); | ||||
/** | |||||
* 查询项目关联的所有会议 | |||||
* | |||||
* @param projectCode 项目编号 | |||||
* @return 项目关联的会议ID | |||||
* @author WendyYang | |||||
**/ | |||||
List<Long> listMeetingIdByProjectCode(String projectCode); | |||||
} | } |
@@ -30,7 +30,7 @@ public class ExpertInviteAvoidRuleServiceImpl extends ServiceImpl<ExpertInviteAv | |||||
} | } | ||||
@Override | @Override | ||||
public AvoidRuleDTO getAvoidInfoDto(Long meetingId) { | |||||
public AvoidRuleDTO getAvoidInfo(Long meetingId) { | |||||
ExpertInviteAvoidRule avoidRule = getByMeetingId(meetingId); | ExpertInviteAvoidRule avoidRule = getByMeetingId(meetingId); | ||||
if (avoidRule == null) { | if (avoidRule == null) { | ||||
return null; | return null; | ||||
@@ -36,4 +36,11 @@ public class MeetingInnerProjectServiceImpl extends ServiceImpl<MeetingInnerProj | |||||
return CollUtils.fieldList(list(query), MeetingInnerProject::getMeetingId); | return CollUtils.fieldList(list(query), MeetingInnerProject::getMeetingId); | ||||
} | } | ||||
@Override | |||||
public List<Long> listMeetingIdByProjectCode(String projectCode) { | |||||
LambdaQueryWrapper<MeetingInnerProject> query = Wrappers | |||||
.lambdaQuery(MeetingInnerProject.class) | |||||
.eq(MeetingInnerProject::getProjectCode, projectCode); | |||||
return CollUtils.fieldList(list(query), MeetingInnerProject::getMeetingId); | |||||
} | |||||
} | } |
@@ -233,7 +233,7 @@ public class ExpertRandomInviteTask { | |||||
// 随机邀请规则 | // 随机邀请规则 | ||||
Map<Long, RandomInviteRuleDTO> ruleMap = inviteRuleService.randomRuleByMeetingId(meetingId); | Map<Long, RandomInviteRuleDTO> ruleMap = inviteRuleService.randomRuleByMeetingId(meetingId); | ||||
// 回避规则 | // 回避规则 | ||||
AvoidRuleDTO avoidRule = inviteAvoidRuleService.getAvoidInfoDto(meetingId); | |||||
AvoidRuleDTO avoidRule = inviteAvoidRuleService.getAvoidInfo(meetingId); | |||||
// 还需要抽取的规则数量 | // 还需要抽取的规则数量 | ||||
AtomicInteger notIgnoreCnt = new AtomicInteger(ruleMap.size()); | AtomicInteger notIgnoreCnt = new AtomicInteger(ruleMap.size()); | ||||
AtomicInteger notSupportCnt = new AtomicInteger(0); | AtomicInteger notSupportCnt = new AtomicInteger(0); | ||||
@@ -145,14 +145,28 @@ public class UserInfoManage { | |||||
// 查重符合筛选条件的组织列表 | // 查重符合筛选条件的组织列表 | ||||
if (StringUtils.isNotBlank(orgName)) { | if (StringUtils.isNotBlank(orgName)) { | ||||
List<DingOrganization> dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) | List<DingOrganization> dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) | ||||
.like(DingOrganization::getOrganizationName, orgName)); | |||||
List<String> compliantOrgNameList = dingOrganizationList.stream() | |||||
.like(DingOrganization::getOrganizationName, orgName) | |||||
.notIn(DingOrganization::getTypeCode, "GOV_INTERNAL_INSTITUTION") | |||||
); | |||||
List<String> compliantOrgNameCodeList = dingOrganizationList.stream() | |||||
.map(DingOrganization::getOrganizationCode) | .map(DingOrganization::getOrganizationCode) | ||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
if (CollUtil.isEmpty(compliantOrgNameList)) { | |||||
if (CollUtil.isEmpty(compliantOrgNameCodeList)) { | |||||
return new ArrayList<>(); | |||||
} | |||||
// 取交集 | |||||
List<String> tempCompliantOrgCodeList = new ArrayList<>(); | |||||
for (String compliantOrgNameCode : compliantOrgNameCodeList) { | |||||
if (compliantOrgCodeList.contains(compliantOrgNameCode)) { | |||||
tempCompliantOrgCodeList.add(compliantOrgNameCode); | |||||
} | |||||
} | |||||
compliantOrgCodeList = tempCompliantOrgCodeList; | |||||
if (CollUtil.isEmpty(compliantOrgCodeList)) { | |||||
return new ArrayList<>(); | return new ArrayList<>(); | ||||
} | } | ||||
compliantOrgCodeList.addAll(compliantOrgNameList); | |||||
} | } | ||||
if (StringUtils.isNotBlank(orgCode)) { | if (StringUtils.isNotBlank(orgCode)) { | ||||
@@ -417,7 +431,7 @@ public class UserInfoManage { | |||||
resUserDetailVO.setOrgName(userFullInfo.getOrganizationName()); | resUserDetailVO.setOrgName(userFullInfo.getOrganizationName()); | ||||
resUserDetailVO.setRegionCode(userFullInfo.getRegionCode()); | resUserDetailVO.setRegionCode(userFullInfo.getRegionCode()); | ||||
resUserDetailVO.setRegionName(regionCacheHelper.getRegionName(userFullInfo.getRegionCode() | resUserDetailVO.setRegionName(regionCacheHelper.getRegionName(userFullInfo.getRegionCode() | ||||
,RegionConst.RL_COUNTY)); | |||||
, RegionConst.RL_COUNTY)); | |||||
resUserDetailVO.setEmpPosUnitCode(userFullInfo.getEmpPosUnitCode()); | resUserDetailVO.setEmpPosUnitCode(userFullInfo.getEmpPosUnitCode()); | ||||
resUserDetailVO.setEmpPosUnitName(userFullInfo.getEmpPosUnitName()); | resUserDetailVO.setEmpPosUnitName(userFullInfo.getEmpPosUnitName()); | ||||
} | } | ||||