Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 year ago
parent
commit
d1ae6868c5
9 changed files with 51 additions and 25 deletions
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertAdminExpertManageAssembler.java
  2. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java
  3. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertAdminExpertManageListDTO.java
  4. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/vo/ExpertAdminExpertManageListVO.java
  5. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java
  6. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  7. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml
  8. +15
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  9. +17
    -17
      pmapi/src/main/java/com/ningdatech/pmapi/user/entity/enumeration/RoleEnum.java

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertAdminExpertManageAssembler.java View File

@@ -96,6 +96,7 @@ public class ExpertAdminExpertManageAssembler {
expertSource = assembleTagName(expertSource);
expertAdminExpertManageListVO.setExpertSource(expertSource);
}
expertAdminExpertManageListVO.setCreateTime(r.getCreateTime());
return expertAdminExpertManageListVO;
}).collect(Collectors.toList());



+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java View File

@@ -456,6 +456,8 @@ public class ExpertUserInfoAssembler {
DictionaryAssembler.toDictionaryFieldInfoList(fieldExpertDictionaryMap.get(DictExpertInfoTypeEnum.EDU.getKey())));
expertAdminExpertManageListDTO.setRecommendedWay(
DictionaryAssembler.toDictionaryFieldInfoList(fieldExpertDictionaryMap.get(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey())));

expertAdminExpertManageListDTO.setCreateTime(expertUserFullInfo.getCreateOn());
return expertAdminExpertManageListDTO;

}


+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertAdminExpertManageListDTO.java View File

@@ -130,4 +130,9 @@ public class ExpertAdminExpertManageListDTO {
* 专家来源
*/
private List<TagFieldInfo> expertSource;

/**
* 创建时间
*/
private LocalDateTime createTime;
}

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

@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
@@ -53,4 +54,7 @@ public class ExpertAdminExpertManageListVO {

@ApiModelProperty(value = "专家来源")
private List<TagFieldInfo> expertSource;

@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
}

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

@@ -16,6 +16,9 @@ import java.math.BigDecimal;
@Data
public class MeetingReviewProjectDTO {

@ApiModelProperty("项目ID")
private Long projectId;

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



+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -418,6 +418,7 @@ public class MeetingManage {
Map<Long, ExpertReview> reviewMap = expertReviewService.listFinalReviewMap(meetingId);
List<MeetingReviewProjectDTO> convert = CollUtils.convert(projects, w -> {
MeetingReviewProjectDTO mrp = new MeetingReviewProjectDTO();
mrp.setProjectId(w.getId());
mrp.setBuildOrg(w.getBuildOrgName());
mrp.setProjectName(w.getProjectName());
mrp.setProjectType(w.getProjectType().toString());


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

@@ -74,11 +74,11 @@

<sql id="reviewedByHeadman">
<if test="p.reviewed">
exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by =
exists(select 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 and is_final = true)
</if>
<if test="!p.reviewed">
not exists(select 1 from nd_expert_review ner where ner.project_id = np.id and ner.create_by =
not exists(select 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 and is_final = true)
</if>
</sql>
@@ -97,7 +97,7 @@
<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,
np.biz_domain, np.declare_amount declared_amount, mip.meeting_id, m.type meetingType, m.start_time reviewTime,
m.connecter, m.contact, me.is_headman, (select count(1) from nd_expert_review ner where 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
from nd_project np inner join meeting_inner_project mip on mip.project_id = np.id
inner join meeting m on m.id = mip.meeting_id


+ 15
- 5
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -14,10 +14,13 @@ import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage;
import com.ningdatech.pmapi.todocenter.handle.WithDrawHandle;
import com.wflow.workflow.enums.ProcessHandlerEnum;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.assertj.core.util.Lists;
import org.flowable.engine.HistoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.task.Comment;
import org.flowable.variable.api.history.HistoricVariableInstance;
import org.springframework.beans.BeanUtils;
import org.springframework.mock.web.MockMultipartFile;
@@ -81,9 +84,7 @@ import com.ningdatech.pmapi.todocenter.service.StatisticsService;
import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils;
import com.ningdatech.pmapi.todocenter.utils.PdfUtils;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.service.IUserInfoService;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.wflow.contants.ProcessConstant;
import com.wflow.exception.BusinessException;
import com.wflow.workflow.bean.dto.ReqProcessHandlerDTO;
import com.wflow.workflow.bean.dto.TodoCenterListReqDTO;
@@ -123,14 +124,12 @@ public class TodoCenterManage {
private final IProjectApplicationService projectApplicationService;
private final UserInfoHelper userInfoHelper;
private final BuildUserUtils buildUserUtils;
private final IProjectStagingService projectStagingService;
private final TaskService taskService;
private final IProjectInstService projectInstService;
private final PdfUtils pdfUtils;
private final FileService fileService;
private final ICompanySignatureService companySignatureService;
private final StatisticsService statisticsService;
private final INotifyService notifyService;
private final DeclaredProjectManage declaredProjectManage;

private final HandlerManage handlerManage;

@@ -897,6 +896,17 @@ public class TodoCenterManage {
if(approve.getValue() instanceof ProcessHandlerEnum){
if(ProcessHandlerEnum.BACK.equals(ProcessHandlerEnum.getEnumByName(String.valueOf(approve.getValue())))){
runtimeService.removeVariable(approve.getProcessInstanceId(),approve.getVariableName());

Comment comment;
Optional<Comment> first = taskService.getProcessInstanceComments(approve.getProcessInstanceId())
.stream()
.filter(c -> c.getTaskId().equals(approve.getVariableName().replace("approve_", StringUtils.EMPTY)))
.findFirst();
if (first.isPresent()){
comment = first.get();
taskService.deleteComment(comment.getId());
}

break;
}
}


+ 17
- 17
pmapi/src/main/java/com/ningdatech/pmapi/user/entity/enumeration/RoleEnum.java View File

@@ -20,21 +20,21 @@ public enum RoleEnum {
/**
* 系统角色枚举
*/
NORMAL_MEMBER("普通用户",6),
NORMAL_MEMBER("普通用户", 6),

EXPERT("专家",5),
EXPERT("专家", 5),

COMPANY_MANAGER("单位管理员",4),
COMPANY_MANAGER("单位管理员", 4),

EXPERT_ADMIN("专家管理员",2),
EXPERT_ADMIN("专家管理员", 2),

REGION_MANAGER("区域管理员",3),
REGION_MANAGER("区域管理员", 3),

SUPER_ADMIN("超级管理员",1),
SUPER_ADMIN("超级管理员", 1),

VISITOR("访客",7),
VISITOR("访客", 7),

DASHBOARD("工作台",8);
DASHBOARD("工作台", 8);

private final String desc;

@@ -43,7 +43,7 @@ public enum RoleEnum {
*/
private final Integer level;

RoleEnum(String desc,Integer level) {
RoleEnum(String desc, Integer level) {
this.desc = desc;
this.level = level;
}
@@ -52,24 +52,24 @@ public enum RoleEnum {
return this.name().equals(name);
}

public static RoleEnum mathByName(String name){
if(StringUtils.isBlank(name)){
public static RoleEnum mathByName(String name) {
if (StringUtils.isBlank(name)) {
return null;
}
for(RoleEnum roleEnum : RoleEnum.values()){
if(roleEnum.name().equals(name)){
for (RoleEnum roleEnum : RoleEnum.values()) {
if (roleEnum.name().equals(name)) {
return roleEnum;
}
}
return null;
}

public static RoleEnum checkHigherRole(List<String> roleCodes){
public static RoleEnum checkHigherRole(List<String> roleCodes) {
RoleEnum res = null;
for(String roleCode : roleCodes){
for (String roleCode : roleCodes) {
RoleEnum roleEnum = mathByName(roleCode);
if(Objects.isNull(res) ||
(Objects.nonNull(roleEnum) && roleEnum.getLevel() < res.getLevel())){
if (Objects.isNull(res) ||
(Objects.nonNull(roleEnum) && roleEnum.getLevel() < res.getLevel())) {
res = roleEnum;
}
}


Loading…
Cancel
Save