From 0978d610fc2be555654b20a63f6ffdacb0b638d8 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 26 Apr 2023 14:16:54 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=86=85=E9=83=A8?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4=20=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=B2=A1=E6=9C=89=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 7418a5b..72319a4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -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); + } } //保存项目应用 From bf53e2ebedf6527dbb8f8dc395570f7f7126b183 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 26 Apr 2023 15:26:35 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=8C=BA=E5=9F=9Fdebug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java index 2c0fc01..5500fce 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionsCacheHelperImpl.java @@ -54,6 +54,9 @@ public class RegionsCacheHelperImpl extends AbstractRegionCacheHelper implements @Override public Collection 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); } From 3a5c4b7c349da5e1c5128e03e891ca9f7c43fb63 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 26 Apr 2023 15:34:30 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8C=BA=E5=9F=9Fdebug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/datascope/provider/impl/RegionAdminDataScopeProviderImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/RegionAdminDataScopeProviderImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/RegionAdminDataScopeProviderImpl.java index 19b8b2b..5350444 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/RegionAdminDataScopeProviderImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/RegionAdminDataScopeProviderImpl.java @@ -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()); } From 1edb495569d4f8e4cc633708433ae05518523dde Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 26 Apr 2023 15:45:07 +0800 Subject: [PATCH 4/5] APP debug --- .../java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 72319a4..4a440a4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -215,6 +215,7 @@ public class ProjectLibManage { List 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()); From 6953990ff8c2dbeb0d87230680c0f6b3440c43b1 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 26 Apr 2023 17:03:52 +0800 Subject: [PATCH 5/5] APP debug --- .../java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 4a440a4..5277eff 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -249,6 +249,7 @@ public class ProjectLibManage { List 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());