Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

master
PoffyZhang pirms 1 gada
vecāks
revīzija
a564b27747
6 mainītis faili ar 65 papildinājumiem un 23 dzēšanām
  1. +0
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionLimitHelperImpl.java
  2. +2
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/DataScopeContext.java
  3. +29
    -11
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertAdminManage.java
  4. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertAdminExpertManageQueryCmd.java
  5. +6
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java
  6. +23
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 0
- 3
pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionLimitHelperImpl.java Parādīt failu

@@ -20,7 +20,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/**
* @author liuxinxin
@@ -76,8 +75,6 @@ public class RegionLimitHelperImpl extends AbstractRegionLimitHelper {
resultBoList.add(regionContainsBO);
}
}
} else {
resultBoList.add(queryRegionContainBo);
}
return resultBoList;
} else {


+ 2
- 3
pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/DataScopeContext.java Parādīt failu

@@ -28,10 +28,9 @@ public class DataScopeContext implements Serializable {
}

public static Optional<DataScopeDTO> getDataScope(String roleCode) {
String key = roleCode;
DataScopeProvider dataScopeProvider = DSP_MAP.get(key);
DataScopeProvider dataScopeProvider = DSP_MAP.get(roleCode);
if (dataScopeProvider == null) {
throw new IllegalArgumentException(String.format(WARN_MSG, key));
throw new IllegalArgumentException(String.format(WARN_MSG, roleCode));
}
return dataScopeProvider.findDataFieldProperty();
}


+ 29
- 11
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertAdminManage.java Parādīt failu

@@ -9,6 +9,7 @@ import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.common.enumeration.BoolDisplayEnum;
import com.ningdatech.pmapi.common.helper.RegionLimitHelper;
import com.ningdatech.pmapi.common.model.CommonPage;
import com.ningdatech.pmapi.common.util.StrUtils;
import com.ningdatech.pmapi.expert.assembler.ExpertAdminExpertManageAssembler;
import com.ningdatech.pmapi.expert.assembler.ExpertInfoCmdAssembler;
import com.ningdatech.pmapi.expert.constant.ExpertAccountStatusEnum;
@@ -49,10 +50,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.*;

/**
* @author liuxinxin
@@ -82,6 +80,9 @@ public class ExpertAdminManage {
public PageVo<ExpertAdminExpertManageListVO> getExpertLibraryList(ExpertAdminExpertManageQuery query) {
Long userId = LoginUserUtil.getUserId();
ExpertAdminExpertManageQueryCmd queryCmd = buildExpertAdminExpertManageQueryCmd(query, userId);
if (queryCmd.isHasNonData()) {
return PageVo.empty();
}
CommonPage<ExpertAdminExpertManageListDTO> pageResult = expertAdminManageService.getExpertLibraryList(queryCmd);

PageVo<ExpertAdminExpertManageListVO> pageVo = new PageVo<>();
@@ -95,10 +96,10 @@ public class ExpertAdminManage {
ExpertAdminExpertManageQueryCmd queryCmd = new ExpertAdminExpertManageQueryCmd();
queryCmd.setPageNumber(query.getPageNumber());
queryCmd.setPageSize(query.getPageSize());
if (StringUtils.isNotBlank(query.getExpertName())) {
if (StrUtils.isNotBlank(query.getExpertName())) {
queryCmd.setExpertName(query.getExpertName());
}
if (StringUtils.isNotBlank(query.getCompany())) {
if (StrUtils.isNotBlank(query.getCompany())) {
queryCmd.setCompany(query.getCompany());
}
List<ExpertDictionaryQuery> expertDictQueryList = new ArrayList<>();
@@ -134,8 +135,8 @@ public class ExpertAdminManage {
expertTagQueryList.add(expertTagQuery);
}
if (StringUtils.isNotBlank(query.getExpertAccountStatus())) {
QueryExpertAccountStatusEnum queryExpertAccountStatusEnum = QueryExpertAccountStatusEnum.of(query.getExpertAccountStatus());
switch (queryExpertAccountStatusEnum) {
QueryExpertAccountStatusEnum queryExpertAccountStatus = QueryExpertAccountStatusEnum.of(query.getExpertAccountStatus());
switch (queryExpertAccountStatus) {
case NORMAL:
queryCmd.setExpertAccountStatusList(CollectionUtil.toList(ExpertAccountStatusEnum.AVAILABLE));
break;
@@ -151,7 +152,8 @@ public class ExpertAdminManage {

List<RegionContainsBO> expertAdminContainsRegionList;
// 如果为超级管理员,可以查看所有的专家,包括没有层级的专家
if (!permissionCheckHelper.isSuperAdmin()) {
boolean isSuperAdmin;
if (!(isSuperAdmin = permissionCheckHelper.isSuperAdmin())) {
expertAdminContainsRegionList = regionLimitHelper.getExpertAdminContainsRegion(userId);
} else {
expertAdminContainsRegionList = Collections.emptyList();
@@ -161,7 +163,15 @@ public class ExpertAdminManage {
if (Objects.nonNull(query.getExpertRegionInfo())) {
RegionContainsBO containsRegionBo = regionLimitHelper.getContainsRegionBo(query.getExpertRegionInfo().getRegionLevel()
, query.getExpertRegionInfo().getRegionCode());
containsRegion = regionLimitHelper.queryContainsRegionAssembler(containsRegionBo, expertAdminContainsRegionList);
if (isSuperAdmin) {
containsRegion = Collections.singletonList(containsRegionBo);
} else {
containsRegion = regionLimitHelper.queryContainsRegionAssembler(containsRegionBo, expertAdminContainsRegionList);
if (containsRegion.isEmpty()) {
queryCmd.setHasNonData(true);
return queryCmd;
}
}
}

List<RegionContainsBO> intentionRegions = null;
@@ -169,7 +179,15 @@ public class ExpertAdminManage {
ExpertRegionInfo intentionRegionInfo = query.getIntentionRegionInfo();
RegionContainsBO containsRegionBo = regionLimitHelper.getContainsRegionBo(intentionRegionInfo.getRegionLevel()
, intentionRegionInfo.getRegionCode());
intentionRegions = regionLimitHelper.queryContainsRegionAssembler(containsRegionBo, expertAdminContainsRegionList);
if (isSuperAdmin) {
intentionRegions = Collections.singletonList(containsRegionBo);
} else {
intentionRegions = regionLimitHelper.queryContainsRegionAssembler(containsRegionBo, expertAdminContainsRegionList);
if (intentionRegions.isEmpty()) {
queryCmd.setHasNonData(true);
return queryCmd;
}
}
}
if (containsRegion == null && intentionRegions == null) {
containsRegion = expertAdminContainsRegionList;


+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertAdminExpertManageQueryCmd.java Parādīt failu

@@ -64,4 +64,9 @@ public class ExpertAdminExpertManageQueryCmd extends CommonPageReq {
*/
private Boolean isDingUser;

/**
* 无数据可供查询
*/
private transient boolean hasNonData = false;

}

+ 6
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java Parādīt failu

@@ -354,12 +354,17 @@ public class HandlerManage {
.eq(ProjectInst::getInstCode, instanceId));
Integer instType = projectInst.getInstType();
LambdaUpdateWrapper<Project> updateWrapper = Wrappers.lambdaUpdate();
// 如果是预审审批退回,需要重新盖章,原来盖过章的文件要清空
// 如果是预审审批或建设方案退回,需要重新盖章,原来盖过章的文件要清空
if (InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType)){
updateWrapper.set(Project::getPretrialFileId,null)
.set(Project::getPretrialFileName,null)
.eq(Project::getId,declaredProject.getId());
projectService.update(updateWrapper);
} else if (InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode().equals(instType)) {
updateWrapper.set(Project::getConstructFileId,null)
.set(Project::getConstructFileName,null)
.eq(Project::getId,declaredProject.getId());
projectService.update(updateWrapper);
}
// 给项目创建人、流程发起人发送浙政钉工作通知:【项目名称】的【流程名称】被退回,请及时处理。
//发送消息


+ 23
- 5
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Parādīt failu

@@ -1076,11 +1076,29 @@ public class TodoCenterManage {
//再修改应用信息
Boolean isApp = Objects.nonNull(projectDto.getIncludeApplication()) && 1 == projectDto.getIncludeApplication()
? Boolean.TRUE : Boolean.FALSE;
//批量删除
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectId,project.getId()));
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectCode,project.getProjectCode()));
Long projectDtoId = projectDto.getId();
Project projectInfo = projectService.getById(projectDtoId);
String instCode = projectInfo.getInstCode();
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class).eq(ProjectInst::getInstCode, instCode));
Integer instType = projectInst.getInstType();
if (InstTypeEnum.UNIT_INNER_AUDIT.getCode().equals(instType) ||
InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType) ||
InstTypeEnum.DEPT_UNITED_REVIEW.getCode().equals(instType)) {
//批量删除
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectId, project.getId()));
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectCode, project.getProjectCode()));
}else {
//采取批量删除 批量添加的方式 批量删除建设方案申报后的应用信息
List<Long> projectIdList = projectService.list(Wrappers.lambdaQuery(Project.class)
.eq(Project::getProjectCode, projectInfo.getProjectCode())
.eq(Project::getIsConstruct, Boolean.TRUE)).stream()
.map(Project::getId).collect(Collectors.toList());
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectCode,projectInfo.getProjectCode())
.in(ProjectApplication::getProjectId,projectIdList));
}
if(isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())){
//批量添加
List<ProjectApplication> applications = projectDto.getApplicationList().stream().map(application -> {


Notiek ielāde…
Atcelt
Saglabāt