|
@@ -4487,9 +4487,22 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
XSSFCell participatorCell = row.getCell(6+(projectWithDept?1:0));
|
|
XSSFCell participatorCell = row.getCell(6+(projectWithDept?1:0));
|
|
XSSFCell inchargerCell = row.getCell(7+(projectWithDept?1:0));
|
|
XSSFCell inchargerCell = row.getCell(7+(projectWithDept?1:0));
|
|
|
|
+ XSSFCell reportAuditorsCell=null;
|
|
|
|
+ XSSFCell reportCcCell=null;
|
|
|
|
+ int i=0;
|
|
|
|
+ if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4||timeType.getReportAuditType()==6){
|
|
|
|
+ i++;
|
|
|
|
+ reportAuditorsCell = row.getCell(7+(projectWithDept?1:0)+i);
|
|
|
|
+ }
|
|
|
|
+ if(timeType.getReportAuditType()==7){
|
|
|
|
+ i++;
|
|
|
|
+ reportCcCell=row.getCell(7+(projectWithDept?1:0)+i);
|
|
|
|
+ }
|
|
|
|
|
|
String part = "";
|
|
String part = "";
|
|
String inchargerName = "";
|
|
String inchargerName = "";
|
|
|
|
+ String reportAuditors = "";
|
|
|
|
+ String reportCc = "";
|
|
if (participatorCell!=null) {
|
|
if (participatorCell!=null) {
|
|
participatorCell.setCellType(CellType.STRING);
|
|
participatorCell.setCellType(CellType.STRING);
|
|
part = participatorCell.getStringCellValue().trim();
|
|
part = participatorCell.getStringCellValue().trim();
|
|
@@ -4498,16 +4511,36 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
inchargerCell.setCellType(CellType.STRING);
|
|
inchargerCell.setCellType(CellType.STRING);
|
|
inchargerName = inchargerCell.getStringCellValue().trim();
|
|
inchargerName = inchargerCell.getStringCellValue().trim();
|
|
}
|
|
}
|
|
|
|
+ if (reportAuditorsCell!=null) {
|
|
|
|
+ reportAuditorsCell.setCellType(CellType.STRING);
|
|
|
|
+ reportAuditors = reportAuditorsCell.getStringCellValue().trim();
|
|
|
|
+ }
|
|
|
|
+ if (reportCcCell!=null) {
|
|
|
|
+ participatorCell.setCellType(CellType.STRING);
|
|
|
|
+ reportCc = participatorCell.getStringCellValue().trim();
|
|
|
|
+ }
|
|
//兼容繁体
|
|
//兼容繁体
|
|
if(part.equals("参与人") || part.equals("參與人")){
|
|
if(part.equals("参与人") || part.equals("參與人")){
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
String[] partSplit = part.split("\\,|\\,");
|
|
String[] partSplit = part.split("\\,|\\,");
|
|
|
|
+ String[] reportAuditorsSplit = reportAuditors.split("\\,|\\,");
|
|
|
|
+ String[] reportCcSplit = reportCc.split("\\,|\\,");
|
|
for (String s : partSplit) {
|
|
for (String s : partSplit) {
|
|
if(!userNameList.contains(s)&&!s.equals("")){
|
|
if(!userNameList.contains(s)&&!s.equals("")){
|
|
userNameList.add(s);
|
|
userNameList.add(s);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ for (String s : reportAuditorsSplit) {
|
|
|
|
+ if(!userNameList.contains(s)&&!s.equals("")){
|
|
|
|
+ userNameList.add(s);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (String s : reportCcSplit) {
|
|
|
|
+ if(!userNameList.contains(s)&&!s.equals("")){
|
|
|
|
+ userNameList.add(s);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if(!userNameList.contains(inchargerName)&&!inchargerName.equals("")){
|
|
if(!userNameList.contains(inchargerName)&&!inchargerName.equals("")){
|
|
userNameList.add(inchargerName);
|
|
userNameList.add(inchargerName);
|
|
}
|
|
}
|
|
@@ -4953,9 +4986,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
Participation p = new Participation();
|
|
Participation p = new Participation();
|
|
if (first.isPresent()) {
|
|
if (first.isPresent()) {
|
|
- p.setUserId(first.get().getId());
|
|
|
|
- p.setProjectId(project.getId());
|
|
|
|
- participationList.add(p);
|
|
|
|
|
|
+ if (!participationList.stream().anyMatch(partOne->partOne.getUserId().equals(first.get().getId()))) {
|
|
|
|
+ p.setUserId(first.get().getId());
|
|
|
|
+ p.setProjectId(project.getId());
|
|
|
|
+ participationList.add(p);
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
switch (exception){
|
|
switch (exception){
|
|
case 0:throw new Exception("["+split[0]+"]在系统中不存在");
|
|
case 0:throw new Exception("["+split[0]+"]在系统中不存在");
|
|
@@ -5001,9 +5036,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
Participation p = new Participation();
|
|
Participation p = new Participation();
|
|
if (first.isPresent()) {
|
|
if (first.isPresent()) {
|
|
- p.setUserId(first.get().getId());
|
|
|
|
- p.setProjectId(project.getId());
|
|
|
|
- participationList.add(p);
|
|
|
|
|
|
+ if (!participationList.stream().anyMatch(partOne->partOne.getUserId().equals(first.get().getId()))) {
|
|
|
|
+ p.setUserId(first.get().getId());
|
|
|
|
+ p.setProjectId(project.getId());
|
|
|
|
+ participationList.add(p);
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
switch (exception){
|
|
switch (exception){
|
|
case 0:throw new Exception("["+split[0]+"]在系统中不存在");
|
|
case 0:throw new Exception("["+split[0]+"]在系统中不存在");
|
|
@@ -5236,30 +5273,65 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
HSSFCell participatorCell=null;
|
|
HSSFCell participatorCell=null;
|
|
HSSFCell inchargerCell=null;
|
|
HSSFCell inchargerCell=null;
|
|
|
|
+ HSSFCell reportAuditorsCell=null;
|
|
|
|
+ HSSFCell reportCcCell=null;
|
|
int c=0;
|
|
int c=0;
|
|
|
|
+ int i=0;
|
|
if(company.getId()==936){
|
|
if(company.getId()==936){
|
|
c++;
|
|
c++;
|
|
}
|
|
}
|
|
if(timeType.getMainProjectState()==1){
|
|
if(timeType.getMainProjectState()==1){
|
|
participatorCell = row.getCell(5+c);
|
|
participatorCell = row.getCell(5+c);
|
|
inchargerCell = row.getCell(6+c);
|
|
inchargerCell = row.getCell(6+c);
|
|
|
|
+ if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4||timeType.getReportAuditType()==6){
|
|
|
|
+ i++;
|
|
|
|
+ reportAuditorsCell=row.getCell(6+i);
|
|
|
|
+ }
|
|
|
|
+ if(timeType.getReportAuditType()==6){
|
|
|
|
+ i++;
|
|
|
|
+ reportCcCell=row.getCell(6+i);
|
|
|
|
+ }
|
|
}else {
|
|
}else {
|
|
participatorCell = row.getCell(6+c);
|
|
participatorCell = row.getCell(6+c);
|
|
inchargerCell = row.getCell(7+c);
|
|
inchargerCell = row.getCell(7+c);
|
|
|
|
+ if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4||timeType.getReportAuditType()==6){
|
|
|
|
+ i++;
|
|
|
|
+ reportAuditorsCell=row.getCell(7+i);
|
|
|
|
+ }
|
|
|
|
+ if(timeType.getReportAuditType()==6){
|
|
|
|
+ i++;
|
|
|
|
+ reportCcCell=row.getCell(7+i);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (participatorCell!=null)participatorCell.setCellType(CellType.STRING);
|
|
if (participatorCell!=null)participatorCell.setCellType(CellType.STRING);
|
|
if (inchargerCell != null)inchargerCell.setCellType(CellType.STRING);
|
|
if (inchargerCell != null)inchargerCell.setCellType(CellType.STRING);
|
|
|
|
+ if (reportAuditorsCell != null)reportAuditorsCell.setCellType(CellType.STRING);
|
|
|
|
+ if (reportCcCell != null)reportCcCell.setCellType(CellType.STRING);
|
|
String part = participatorCell.getStringCellValue().trim();
|
|
String part = participatorCell.getStringCellValue().trim();
|
|
String inchargerName = inchargerCell.getStringCellValue().trim();
|
|
String inchargerName = inchargerCell.getStringCellValue().trim();
|
|
|
|
+ String reportAuditors = reportAuditorsCell.getStringCellValue().trim();
|
|
|
|
+ String reportCc = reportCcCell.getStringCellValue().trim();
|
|
if(part.equals("参与人") || part.equals("參與人")){
|
|
if(part.equals("参与人") || part.equals("參與人")){
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
String[] partSplit = part.split("\\,|\\,");
|
|
String[] partSplit = part.split("\\,|\\,");
|
|
|
|
+ String[] reportAuditorsSplit = reportAuditors.split("\\,|\\,");
|
|
|
|
+ String[] reportCcSplit = reportCc.split("\\,|\\,");
|
|
for (String s : partSplit) {
|
|
for (String s : partSplit) {
|
|
if(!userNameList.contains(s)&&!s.equals("")){
|
|
if(!userNameList.contains(s)&&!s.equals("")){
|
|
userNameList.add(s);
|
|
userNameList.add(s);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ for (String s : reportAuditorsSplit) {
|
|
|
|
+ if(!userNameList.contains(s)&&!s.equals("")){
|
|
|
|
+ userNameList.add(s);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (String s : reportCcSplit) {
|
|
|
|
+ if(!userNameList.contains(s)&&!s.equals("")){
|
|
|
|
+ userNameList.add(s);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if(!userNameList.contains(inchargerName)&&!inchargerName.equals("")){
|
|
if(!userNameList.contains(inchargerName)&&!inchargerName.equals("")){
|
|
userNameList.add(inchargerName);
|
|
userNameList.add(inchargerName);
|
|
}
|
|
}
|
|
@@ -6308,9 +6380,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
Participation p = new Participation();
|
|
Participation p = new Participation();
|
|
if (first.isPresent()) {
|
|
if (first.isPresent()) {
|
|
- p.setUserId(first.get().getId());
|
|
|
|
- p.setProjectId(project.getId());
|
|
|
|
- participationList.add(p);
|
|
|
|
|
|
+ if (!participationList.stream().anyMatch(partOne->partOne.getUserId().equals(first.get().getId()))) {
|
|
|
|
+ p.setUserId(first.get().getId());
|
|
|
|
+ p.setProjectId(project.getId());
|
|
|
|
+ participationList.add(p);
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
switch (exception){
|
|
switch (exception){
|
|
case 0:throw new Exception("["+split[0]+"]在系统中不存在");
|
|
case 0:throw new Exception("["+split[0]+"]在系统中不存在");
|
|
@@ -6356,9 +6430,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
Participation p = new Participation();
|
|
Participation p = new Participation();
|
|
if (first.isPresent()) {
|
|
if (first.isPresent()) {
|
|
- p.setUserId(first.get().getId());
|
|
|
|
- p.setProjectId(project.getId());
|
|
|
|
- participationList.add(p);
|
|
|
|
|
|
+ if (!participationList.stream().anyMatch(partOne->partOne.getUserId().equals(first.get().getId()))) {
|
|
|
|
+ p.setUserId(first.get().getId());
|
|
|
|
+ p.setProjectId(project.getId());
|
|
|
|
+ participationList.add(p);
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
switch (exception){
|
|
switch (exception){
|
|
case 0:throw new Exception("["+split[0]+"]在系统中不存在");
|
|
case 0:throw new Exception("["+split[0]+"]在系统中不存在");
|