Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

master
WendyYang pirms 1 gada
vecāks
revīzija
12525328d9
3 mainītis faili ar 12 papildinājumiem un 3 dzēšanām
  1. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java
  2. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/RegionAdminDataScopeProviderImpl.java
  3. +7
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java

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

@@ -54,6 +54,9 @@ public class RegionsCacheHelperImpl extends AbstractRegionCacheHelper implements
@Override
public Collection<String> listChildRegionCodeList(String regionCode, int regionLevel) {
RegionDTO currRegion = getByCodeAndLevel(regionCode, regionLevel);
if(Objects.isNull(currRegion)){
return Collections.emptyList();
}
if (currRegion.getParentCode().equals(regionCode)) {
return Collections.singletonList(regionCode);
}


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/RegionAdminDataScopeProviderImpl.java Parādīt failu

@@ -1,6 +1,7 @@
package com.ningdatech.pmapi.datascope.provider.impl;

import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Lists;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.common.helper.RegionCacheHelper;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
@@ -40,6 +41,7 @@ public class RegionAdminDataScopeProviderImpl implements DataScopeProvider {
RegionConst.RL_CITY);
//如果不是市本级的话 就直接放入本区域的县就好了
if(CollUtil.isEmpty(regionCodes)){
regionCodes = Lists.newArrayList();
regionCodes.add(userFullInfo.getRegionCode());
}



+ 7
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java Parādīt failu

@@ -197,9 +197,11 @@ public class ProjectLibManage {
}else{
//否则是重新提交的 新生成一个新版本的项目
project = newProjectWithVersion(projectDto);
project.setInstCode(instanceId);
project.setSponsor(employeeCode);
projectService.updateById(project);
if(Objects.nonNull(project)){
project.setInstCode(instanceId);
project.setSponsor(employeeCode);
projectService.updateById(project);
}
}

//保存项目应用
@@ -213,6 +215,7 @@ public class ProjectLibManage {
List<ProjectApplication> applications = projectDto.getApplicationList().stream().map(application -> {
ProjectApplication projectApplication = new ProjectApplication();
BeanUtils.copyProperties(application, projectApplication);
projectApplication.setId(null);
projectApplication.setProjectId(finalProject.getId());
return projectApplication;
}).collect(Collectors.toList());
@@ -246,6 +249,7 @@ public class ProjectLibManage {
List<ProjectApplication> applications = projectDto.getApplicationList().stream().map(application -> {
ProjectApplication projectApplication = new ProjectApplication();
BeanUtils.copyProperties(application, projectApplication);
projectApplication.setId(null);
projectApplication.setProjectId(finalProject.getId());
return projectApplication;
}).collect(Collectors.toList());


Notiek ielāde…
Atcelt
Saglabāt