|
@@ -2578,18 +2578,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
throw new Exception("项目负责人["+inchargerName+"]不存在");
|
|
|
}
|
|
|
}
|
|
|
- if(participatorCell==null){
|
|
|
- String value = inchargerCell.getStringCellValue();
|
|
|
- Participation p = new Participation();
|
|
|
- Optional<User> first = userList.stream().filter(u -> u.getName().equals(value)).findFirst();
|
|
|
- if (first.isPresent()) {
|
|
|
- p.setUserId(first.get().getId());
|
|
|
- p.setProjectId(project.getId());
|
|
|
- participationMapper.insert(p);
|
|
|
- } else {
|
|
|
- throw new Exception("参与人["+value+"]不存在");
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2636,6 +2624,20 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
}
|
|
|
//参与人
|
|
|
+ if(inchargerCell!=null){
|
|
|
+ if(participatorCell==null||StringUtils.isEmpty(participatorCell.getStringCellValue())){
|
|
|
+ String value = inchargerCell.getStringCellValue();
|
|
|
+ Participation p = new Participation();
|
|
|
+ Optional<User> first = userList.stream().filter(u -> u.getName().equals(value)).findFirst();
|
|
|
+ if (first.isPresent()) {
|
|
|
+ p.setUserId(first.get().getId());
|
|
|
+ p.setProjectId(project.getId());
|
|
|
+ participationMapper.insert(p);
|
|
|
+ } else {
|
|
|
+ throw new Exception("参与人["+value+"]不存在");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (participatorCell != null) {
|
|
|
String part = participatorCell.getStringCellValue().trim();
|
|
|
//将项目负责人也添加到参与人当中来
|
|
@@ -3087,6 +3089,20 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
}
|
|
|
importCount++;
|
|
|
//参与人
|
|
|
+ if(inchargerCell!=null){
|
|
|
+ if(participatorCell==null||StringUtils.isEmpty(participatorCell.getStringCellValue())){
|
|
|
+ String value = inchargerCell.getStringCellValue();
|
|
|
+ Participation p = new Participation();
|
|
|
+ Optional<User> first = userList.stream().filter(u -> u.getName().equals(value)).findFirst();
|
|
|
+ if (first.isPresent()) {
|
|
|
+ p.setUserId(first.get().getId());
|
|
|
+ p.setProjectId(project.getId());
|
|
|
+ participationMapper.insert(p);
|
|
|
+ } else {
|
|
|
+ throw new Exception("参与人["+value+"]不存在");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (participatorCell != null) {
|
|
|
String part = participatorCell.getStringCellValue().trim();
|
|
|
//将项目负责人也添加到参与人当中来
|