Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 year ago
parent
commit
e6ff663ba2
20 changed files with 103 additions and 28 deletions
  1. +4
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertReviewController.java
  2. +4
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java
  3. +1
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml
  4. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/entity/ExpertReview.java
  5. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertReviewDetailReq.java
  6. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingInnerProject.java
  7. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java
  8. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java
  9. +23
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ProjectIdCodeDTO.java
  10. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ReviewProjectDTO.java
  11. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingReviewProjectVO.java
  12. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java
  13. +11
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  14. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml
  15. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IExpertInviteAvoidRuleService.java
  16. +9
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingInnerProjectService.java
  17. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/ExpertInviteAvoidRuleServiceImpl.java
  18. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingInnerProjectServiceImpl.java
  19. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertRandomInviteTask.java
  20. +19
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java

+ 4
- 4
pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertReviewController.java View File

@@ -73,13 +73,13 @@ public class ExpertReviewController {
return expertReviewManage.listReviews(projectId, meetingId, false);
}

@GetMapping("/detail/{projectId}")
@GetMapping("/detail/{projectCode}")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectId", value = "项目ID"),
@ApiImplicitParam(name = "projectCode", value = "项目编号"),
})
@ApiOperation("查看项目的所有评审意见")
public ProjectReviewDetailVO projectExpertReviewDetail(@PathVariable Long projectId) {
return expertReviewManage.projectExpertReviewDetail(projectId);
public ProjectReviewDetailVO projectExpertReviewDetail(@PathVariable String projectCode) {
return expertReviewManage.projectExpertReviewDetail(projectCode);
}

}

+ 4
- 3
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java View File

@@ -107,6 +107,7 @@ public class ExpertReviewManage {
review.setReviewResult(req.getReviewResult());
review.setContent(JSONUtil.toJsonStr(req.getReviewTemplateOptions()));
review.setProjectId(req.getProjectId());
review.setProjectCode(req.getProjectCode());
review.setTemplateId(req.getTemplateId());
review.setMeetingId(req.getMeetingId());
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();
List<Long> meetingIds = meetingInnerProjectService.listMeetingIdByProjectId(projectId);
List<Long> meetingIds = meetingInnerProjectService.listMeetingIdByProjectCode(projectCode);
if (meetingIds.isEmpty()) {
return detail;
}
@@ -166,7 +167,7 @@ public class ExpertReviewManage {
}))).values();
LambdaQueryWrapper<ExpertReview> erQuery = Wrappers.lambdaQuery(ExpertReview.class)
.in(ExpertReview::getMeetingId, tmpMeetingIds)
.eq(ExpertReview::getProjectId, projectId)
.eq(ExpertReview::getProjectCode, projectCode)
.orderByDesc(ExpertReview::getCreateOn);
List<ExpertReview> expertReviews = expertReviewService.list(erQuery);
if (expertReviews.isEmpty()) {


+ 1
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml View File

@@ -42,8 +42,7 @@
)
</if>
</where>
-- ORDER BY create_on DESC

ORDER BY update_on DESC
</sql>

<sql id="Expert_Tag_Relation">


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/entity/ExpertReview.java View File

@@ -30,6 +30,8 @@ public class ExpertReview implements Serializable {
@ApiModelProperty("项目ID")
private Long projectId;

private String projectCode;

@ApiModelProperty("会议ID")
private Long meetingId;



+ 4
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertReviewDetailReq.java View File

@@ -28,6 +28,10 @@ public class ExpertReviewDetailReq {
@NotNull(message = "项目ID不能为空")
private Long projectId;

@ApiModelProperty("项目编号")
@NotNull(message = "项目编号不能为空")
private String projectCode;

@ApiModelProperty("会议ID")
@NotNull(message = "会议ID不能为空")
private Long meetingId;


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingInnerProject.java View File

@@ -34,4 +34,7 @@ public class MeetingInnerProject implements Serializable {
@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("项目编号")
private String projectCode;

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java View File

@@ -66,7 +66,7 @@ public class MeetingBasicDTO {
private String contact;

@ApiModelProperty("内部项目ID")
private List<Long> projectIdList;
private List<ProjectIdCodeDTO> innerProjects;

@ApiModelProperty("外部项目")
private List<MeetingReviewProjectDTO> projects;


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java View File

@@ -19,6 +19,9 @@ public class MeetingReviewProjectDTO {
@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("项目编码")
private String projectCode;

@ApiModelProperty("项目名称")
private String projectName;



+ 23
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ProjectIdCodeDTO.java View File

@@ -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;

}

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ReviewProjectDTO.java View File

@@ -28,6 +28,9 @@ public class ReviewProjectDTO {
@ApiModelProperty("项目名称")
private String projectName;

@ApiModelProperty("项目编号")
private String projectCode;

@ApiModelProperty("项目类型")
private Integer projectType;



+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingReviewProjectVO.java View File

@@ -28,6 +28,9 @@ public class MeetingReviewProjectVO {
@ApiModelProperty("项目ID")
private Long id;

@ApiModelProperty("项目编号")
private String projectCode;

@ApiModelProperty("项目名称")
private String projectName;



+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java View File

@@ -63,7 +63,7 @@ public class MeetingManageHelper {

public void checkReviewProject(MeetingBasicDTO meetingBasic) {
if (meetingBasic.getIsInnerProject()) {
Assert.notEmpty(meetingBasic.getProjectIdList(), "评审项目不能为空");
Assert.notEmpty(meetingBasic.getInnerProjects(), "评审项目不能为空");
} else {
Assert.notEmpty(meetingBasic.getProjects(), "评审项目不能为空");
}


+ 11
- 7
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -137,12 +137,14 @@ public class MeetingManage {
meeting.setInviteType(inviteRule.getInviteType());
meetingService.save(meeting);
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);
} else {
List<MeetingOuterProject> projects = meetingBasic.getProjects().stream().map(w -> {
@@ -450,6 +452,7 @@ public class MeetingManage {
mrp.setProjectType(w.getProjectType().toString());
mrp.setProjectYear(w.getProjectYear());
mrp.setDeclareAmount(w.getDeclareAmount());
mrp.setProjectCode(w.getProjectCode());
ExpertReview review = reviewMap.get(w.getId());
if (review != null) {
mrp.setReviewResult(ReviewResultEnum.getByCode(review.getReviewResult()).getValue());
@@ -584,7 +587,7 @@ public class MeetingManage {
}
result.getRandomRules().add(randomRule);
});
AvoidRuleDTO avoidInfo = inviteAvoidRuleService.getAvoidInfoDto(meetingId);
AvoidRuleDTO avoidInfo = inviteAvoidRuleService.getAvoidInfo(meetingId);
AvoidInfoVO vo = new AvoidInfoVO();
vo.setWeekInviteCount(avoidInfo.getWeekInviteCount());
vo.setAvoidOrgIds(avoidInfo.getAvoidOrgIdList());
@@ -897,6 +900,7 @@ public class MeetingManage {
return MeetingReviewProjectVO
.builder()
.id(project.getId())
.projectCode(project.getProjectCode())
.projectName(project.getProjectName())
.declaredAmount(project.getDeclareAmount())
.projectType(project.getProjectType())


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml View File

@@ -104,7 +104,7 @@
</sql>

<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,
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


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IExpertInviteAvoidRuleService.java View File

@@ -20,9 +20,9 @@ public interface IExpertInviteAvoidRuleService extends IService<ExpertInviteAvoi
* 获取回避信息
*
* @param meetingId 会议ID
* @return com.ningdatech.emapi.meeting.entity.dto.AvoidInfoDto
* @return {@link AvoidRuleDTO}
* @author WendyYang
**/
AvoidRuleDTO getAvoidInfoDto(Long meetingId);
AvoidRuleDTO getAvoidInfo(Long meetingId);

}

+ 9
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/IMeetingInnerProjectService.java View File

@@ -33,4 +33,13 @@ public interface IMeetingInnerProjectService extends IService<MeetingInnerProjec
**/
List<Long> listMeetingIdByProjectId(Long projectId);

/**
* 查询项目关联的所有会议
*
* @param projectCode 项目编号
* @return 项目关联的会议ID
* @author WendyYang
**/
List<Long> listMeetingIdByProjectCode(String projectCode);

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/ExpertInviteAvoidRuleServiceImpl.java View File

@@ -30,7 +30,7 @@ public class ExpertInviteAvoidRuleServiceImpl extends ServiceImpl<ExpertInviteAv
}

@Override
public AvoidRuleDTO getAvoidInfoDto(Long meetingId) {
public AvoidRuleDTO getAvoidInfo(Long meetingId) {
ExpertInviteAvoidRule avoidRule = getByMeetingId(meetingId);
if (avoidRule == null) {
return null;


+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/service/impl/MeetingInnerProjectServiceImpl.java View File

@@ -36,4 +36,11 @@ public class MeetingInnerProjectServiceImpl extends ServiceImpl<MeetingInnerProj
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);
}
}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertRandomInviteTask.java View File

@@ -233,7 +233,7 @@ public class ExpertRandomInviteTask {
// 随机邀请规则
Map<Long, RandomInviteRuleDTO> ruleMap = inviteRuleService.randomRuleByMeetingId(meetingId);
// 回避规则
AvoidRuleDTO avoidRule = inviteAvoidRuleService.getAvoidInfoDto(meetingId);
AvoidRuleDTO avoidRule = inviteAvoidRuleService.getAvoidInfo(meetingId);
// 还需要抽取的规则数量
AtomicInteger notIgnoreCnt = new AtomicInteger(ruleMap.size());
AtomicInteger notSupportCnt = new AtomicInteger(0);


+ 19
- 5
pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java View File

@@ -145,14 +145,28 @@ public class UserInfoManage {
// 查重符合筛选条件的组织列表
if (StringUtils.isNotBlank(orgName)) {
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)
.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<>();
}
compliantOrgCodeList.addAll(compliantOrgNameList);
}

if (StringUtils.isNotBlank(orgCode)) {
@@ -417,7 +431,7 @@ public class UserInfoManage {
resUserDetailVO.setOrgName(userFullInfo.getOrganizationName());
resUserDetailVO.setRegionCode(userFullInfo.getRegionCode());
resUserDetailVO.setRegionName(regionCacheHelper.getRegionName(userFullInfo.getRegionCode()
,RegionConst.RL_COUNTY));
, RegionConst.RL_COUNTY));
resUserDetailVO.setEmpPosUnitCode(userFullInfo.getEmpPosUnitCode());
resUserDetailVO.setEmpPosUnitName(userFullInfo.getEmpPosUnitName());
}


Loading…
Cancel
Save