Browse Source

修改提示语

yurk 2 years ago
parent
commit
4241fca308

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java

@@ -960,14 +960,14 @@ public class ProjectController {
                                     comment.setString(new HSSFRichTextString(MessageUtils.message("excel.manyPeople")));
                                     cell.setCellComment(comment);
                                     break;
-                                case "项目经理":
+                                /*case "项目经理":
                                 case "project manager":
                                     comment = drawing.createCellComment(anchor);
                                     // 输入批注信息
                                     //comment.setString(new HSSFRichTextString("项目经理需存在于参与人中"));
                                     comment.setString(new HSSFRichTextString(MessageUtils.message("excel.projectManager")));
                                     cell.setCellComment(comment);
-                                    break;
+                                    break;*/
                                 case "开始日期":
                                 case "Start Date":
                                 case "截止日期":

+ 2 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java

@@ -387,10 +387,9 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
                 XSSFCell remarksCell = firstRow.getCell(3);
                 List<String> userNameList=new ArrayList<>();
                 String value = reimburserCell.getStringCellValue();
-                if(userNameList.contains(value)){
-                    continue;
+                if(!value.equals("")){
+                    userNameList.add(value);
                 }
-                userNameList.add(value);
                 System.out.println("参与搜素的人员列表"+userNameList);
                 HttpRespMsg respMsg=new HttpRespMsg();
                 if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){

+ 28 - 10
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -3170,19 +3170,27 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         continue;
                     }
                     XSSFCell participatorCell = row.getCell(5);
+                    XSSFCell inchargerCell = row.getCell(6);
                     if (participatorCell!=null)participatorCell.setCellType(CellType.STRING);
+                    if (inchargerCell != null)inchargerCell.setCellType(CellType.STRING);
                     String part = participatorCell.getStringCellValue().trim();
+                    String inchargerName = inchargerCell.getStringCellValue().trim();
+                    if(part.equals("参与人")){
+                        continue;
+                    }
                     String[] partSplit = part.split("\\,|\\,");
                     for (String s : partSplit) {
-                        if(userNameList.contains(s)){
-                            continue;
+                        if(!userNameList.contains(s)&&!s.equals("")){
+                            userNameList.add(s);
                         }
-                        userNameList.add(s);
+                    }
+                    if(!userNameList.contains(inchargerName)&&!inchargerName.equals("")){
+                        userNameList.add(inchargerName);
                     }
                 }
-                System.out.println("参与搜素的人员列表"+userNameList);
+                System.out.println("参与搜素的人员列表"+userNameList + userNameList.size());
                 HttpRespMsg respMsg=new HttpRespMsg();
-                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&userNameList.size()>0){
                     respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
                     if(respMsg.code.equals("0")){
                         msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
@@ -3557,28 +3565,38 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         continue;
                     }
                     HSSFCell participatorCell=null;
+                    HSSFCell inchargerCell=null;
                     int c=0;
                     if(company.getId()==936){
                         c++;
                     }
                     if(timeType.getMainProjectState()==1){
                         participatorCell = row.getCell(4+c);
+                        inchargerCell = row.getCell(5+c);
                     }else {
                         participatorCell = row.getCell(5+c);
+                        inchargerCell = row.getCell(6+c);
                     }
                     if (participatorCell!=null)participatorCell.setCellType(CellType.STRING);
+                    if (inchargerCell != null)inchargerCell.setCellType(CellType.STRING);
                     String part = participatorCell.getStringCellValue().trim();
+                    String inchargerName = inchargerCell.getStringCellValue().trim();
+                    if(part.equals("参与人")){
+                        continue;
+                    }
                     String[] partSplit = part.split("\\,|\\,");
                     for (String s : partSplit) {
-                        if(userNameList.contains(s)){
-                            continue;
+                        if(!userNameList.contains(s)&&!s.equals("")){
+                            userNameList.add(s);
                         }
-                        userNameList.add(s);
+                    }
+                    if(!userNameList.contains(inchargerName)&&!inchargerName.equals("")){
+                        userNameList.add(inchargerName);
                     }
                 }
-                System.out.println("参与搜素的人员列表"+userNameList);
+                System.out.println("参与搜素的人员列表"+userNameList + userNameList.size());
                 HttpRespMsg respMsg=new HttpRespMsg();
-                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&userNameList.size()>0){
                     respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
                     if(respMsg.code.equals("0")){
                         msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");

+ 5 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -3526,14 +3526,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 }
                 dataCount++;
                 String username = withCheckIn==null?row.getCell(1).getStringCellValue().trim():row.getCell(2).getStringCellValue().trim();
-                if(userNameList.contains(username)){
+                if(username.equals("员工")){
                     continue;
                 }
-                userNameList.add(username);
+                if(!userNameList.contains(username)&&!username.equals("")){
+                    userNameList.add(username);
+                }
             }
             System.out.println("参与搜素的人员列表"+userNameList);
             HttpRespMsg respMsg=new HttpRespMsg();
-            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&userNameList.size()>0){
                 respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
                 if(respMsg.code.equals("0")){
                     msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");