瀏覽代碼

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper into master

seyason 1 年之前
父節點
當前提交
7be725b7e4

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform-import/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -386,7 +386,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 projectIds.add(-1);
             }
             List<Map<String,Object>> particpationList=participationMapper.getAllParticipator(projectIds);
-            List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().in("project_id",projectIds).and(wrapper -> wrapper.eq("state", 0).or().eq("state", 1).or().eq("state", 3)));
+            List<Report> reportList=new ArrayList<>();
+            if(timeType.getProjectManDay()==1){
+                reportList = reportMapper.selectList(new QueryWrapper<Report>().in("project_id",projectIds).and(wrapper -> wrapper.eq("state", 0).or().eq("state", 1).or().eq("state", 3)));
+            }
             for (Project project : projectList) {
                 //todo:计算项目预算工时
                 if(project.getManDay()!=null){

+ 57 - 14
fhKeeper/formulahousekeeper/management-platform-import/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -3871,6 +3871,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     continue;
                 }
                 for (int i=1;i<7+reportCustomList.size(); i++) {
+                    Cell cell = sheet.getRow(0).getCell(i);
+                    if(cell!=null&&(cell.getStringCellValue().contains("日期")||cell.getStringCellValue().contains("时间"))){
+                        continue;
+                    }
                     if (row.getCell(i) != null) {
                         row.getCell(i).setCellType(CellType.STRING);
                     }
@@ -4018,19 +4022,53 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             report.setState(-1);//待部门上级审核员审核
                             report.setDepartmentAuditState(1);//部门已审核,到上层领导审核
                         }
+                        if(row.getCell(5)!=null&&!StringUtils.isEmpty(row.getCell(5).getStringCellValue())){
+                            report.setContent(row.getCell(5).getStringCellValue());
+                        }
                         report.setCreateDate(LocalDate.parse(reportDate, dtf));
                         report.setCost(reportCreator.getCost()==null?new BigDecimal(0) : reportCreator.getCost().multiply(new BigDecimal(time)));
                         for (int i = 0; i < reportCustomList.size(); i++) {
+                            Cell cell=null;
                             switch (i+1){
-                                case 1:report.setPlate1(row.getCell(7).getStringCellValue());
+                                case 1:
+                                    cell =sheet.getRow(0).getCell(7);
+                                    if(cell!=null&&(cell.getStringCellValue().contains("日期")||cell.getStringCellValue().contains("时间"))){
+                                        row.getCell(7).setCellType(CellType.NUMERIC);
+                                        String format = sdf.format(row.getCell(7).getDateCellValue());
+                                        report.setPlate1(format);
+                                    }else report.setPlate1(row.getCell(7).getStringCellValue());
                                 break;
-                                case 2:report.setPlate2(row.getCell(8).getStringCellValue());
+                                case 2:
+                                    cell = sheet.getRow(0).getCell(8);
+                                    if(cell!=null&&(cell.getStringCellValue().contains("日期")||cell.getStringCellValue().contains("时间"))){
+                                        row.getCell(8).setCellType(CellType.NUMERIC);
+                                        String format =sdf.format(row.getCell(8).getDateCellValue());
+                                        report.setPlate2(dtf.format(LocalDate.parse(format, dtf)));
+                                    }else  report.setPlate2(row.getCell(8).getStringCellValue());
                                 break;
-                                case 3:report.setPlate3(row.getCell(9).getStringCellValue());
+                                case 3:
+                                    cell = sheet.getRow(0).getCell(9);
+                                    if(cell!=null&&(cell.getStringCellValue().contains("日期")||cell.getStringCellValue().contains("时间"))){
+                                        row.getCell(9).setCellType(CellType.NUMERIC);
+                                        String format = sdf.format(row.getCell(9).getDateCellValue());
+                                        report.setPlate3(format);
+                                    }else  report.setPlate3(row.getCell(9).getStringCellValue());
                                 break;
-                                case 4:report.setPlate4(row.getCell(10).getStringCellValue());
+                                case 4:
+                                    cell = sheet.getRow(0).getCell(10);
+                                    if(cell!=null&&(cell.getStringCellValue().contains("日期")||cell.getStringCellValue().contains("时间"))){
+                                        row.getCell(10).setCellType(CellType.NUMERIC);
+                                        String format = sdf.format(row.getCell(10).getDateCellValue());
+                                        report.setPlate4(format);
+                                    }else  report.setPlate4(row.getCell(10).getStringCellValue());
                                 break;
-                                case 5:report.setPlate5(row.getCell(11).getStringCellValue());
+                                case 5:
+                                    cell = sheet.getRow(0).getCell(11);
+                                    if(cell!=null&&(cell.getStringCellValue().contains("日期")||cell.getStringCellValue().contains("时间"))){
+                                        row.getCell(11).setCellType(CellType.NUMERIC);
+                                        String format = sdf.format(row.getCell(11).getDateCellValue());
+                                        report.setPlate5(format);
+                                    }else  report.setPlate5(row.getCell(11).getStringCellValue());
                                 break;
                             }
                         }
@@ -6259,7 +6297,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         if(reportCustomList.size()>0){
             reportCustomList.forEach(rl->{
                 heads.add(rl.getCustomName());
-                exampleDataList.add("自定义示例内容");
+                if(rl.getCustomName().length()>2&&(rl.getCustomName().contains("时间")||rl.getCustomName().contains("日期"))){
+                    exampleDataList.add("2023/06/28");
+                }else exampleDataList.add("自定义示例内容");
+
             });
         }
         List<List<String>> allList = new ArrayList<>();
@@ -6397,18 +6438,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                                 case "员工工号":
                                     // 输入批注信息
                                     comment = drawing.createCellComment(anchor);
-                                    // 输入批注信息
-                                    //comment.setString(new HSSFRichTextString("日期格式:yyyy-MM-dd\n" +
-                                    //        "例如: 2021-01-01"));
                                     comment.setString(new XSSFRichTextString("员工存在重名情况下,必填"));
                                     cell.setCellComment(comment);
                                     break;
                                 case "子项目名称":
-                                    // 输入批注信息
                                     comment = drawing.createCellComment(anchor);
                                     // 输入批注信息
-                                    //comment.setString(new HSSFRichTextString("日期格式:yyyy-MM-dd\n" +
-                                    //        "例如: 2021-01-01"));
                                     comment.setString(new XSSFRichTextString("项目下的子项目,没有可以不填"));
                                     cell.setCellComment(comment);
                                     break;
@@ -6416,12 +6451,20 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                                     // 输入批注信息
                                     comment = drawing.createCellComment(anchor);
                                     // 输入批注信息
-                                    //comment.setString(new HSSFRichTextString("日期格式:yyyy-MM-dd\n" +
-                                    //        "例如: 2021-01-01"));
                                     comment.setString(new XSSFRichTextString("填写当天在该项目上投入的工作时长,填写数字;单位为小时"));
                                     cell.setCellComment(comment);
                                     break;
                             }
+                            if((rowList.get(i).contains("时间")||rowList.get(i).contains("日期"))&&rowList.get(i).length()>2){
+                                // 输入批注信息
+                                comment = drawing.createCellComment(anchor);
+                                // 输入批注信息
+                                //comment.setString(new HSSFRichTextString("日期格式:yyyy-MM-dd\n" +
+                                //        "例如: 2021-01-01"));
+                                comment.setString(new XSSFRichTextString("日期格式:yyyy/MM/dd\n" +
+                                        "例如: 2021/01/01"));
+                                cell.setCellComment(comment);
+                            }
                         }else {
                             cell.setCellStyle(cellStyle);
                         }

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

@@ -728,9 +728,12 @@ public class ProjectController {
         heads.add(MessageUtils.message("entry.Participants"));
         //heads.add("项目经理");
         heads.add(MessageUtils.message("entry.projectManager"));
-        if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4){
+        if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4||timeType.getReportAuditType()==6){
             heads.add("日报审核人");
         }
+        if(timeType.getReportAuditType()==6){
+            heads.add("日报抄送人");
+        }
         //heads.add("级别");
         heads.add(MessageUtils.message("entry.level"));
         exampleDataList.add("张三");
@@ -738,6 +741,9 @@ public class ProjectController {
         if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4){
             exampleDataList.add("张三");
         }
+        if(timeType.getReportAuditType()==6){
+            exampleDataList.add("张三");
+        }
         exampleDataList.add("");
         if(timeType.getProjectWithDept()==1){
             //heads.add("所属部门");
@@ -798,6 +804,8 @@ public class ProjectController {
                 exampleDataList.add("");
             }
         }
+        heads.add("项目描述");
+        exampleDataList.add("项目描述");
         List<List<String>> allList = new ArrayList<>();
         allList.add(heads);
         allList.add(exampleDataList);

+ 262 - 91
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -3806,15 +3806,21 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     XSSFCell participatorCell = row.getCell(5);
                     XSSFCell inchargerCell = row.getCell(6);
                     XSSFCell reportAuditorsCell=null;
+                    XSSFCell reportCcCell=null;
                     int i=0;
-                    if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4){
+                    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);
+                    }
                     XSSFCell levelCell = row.getCell(7+i);
                     XSSFCell startDateCell = row.getCell(8+i);
                     XSSFCell endDateCell = row.getCell(9+i);
                     XSSFCell amountCell = row.getCell(10+i);
+                    XSSFCell descCell = row.getCell(11+i);
 
 
                     if (codeCell != null)codeCell.setCellType(CellType.STRING);
@@ -3825,10 +3831,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     if (participatorCell != null)participatorCell.setCellType(CellType.STRING);
                     if (inchargerCell != null)inchargerCell.setCellType(CellType.STRING);
                     if (reportAuditorsCell != null)reportAuditorsCell.setCellType(CellType.STRING);
+                    if (reportCcCell != null)reportCcCell.setCellType(CellType.STRING);
                     if (levelCell != null)levelCell.setCellType(CellType.STRING);
                     if (startDateCell != null)startDateCell.setCellType(CellType.NUMERIC);
                     if (endDateCell != null)endDateCell.setCellType(CellType.NUMERIC);
                     if (amountCell != null)amountCell.setCellType(CellType.STRING);
+                    if (descCell != null)descCell.setCellType(CellType.STRING);
                     if (nameCell == null) {//项目名称为空的直接跳过
                         throw new Exception("项目名称不能为空");
                     }
@@ -3938,6 +3946,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     if (amountCell !=null && !StringUtils.isEmpty(amountCell.getStringCellValue())) {
                         project.setContractAmount(Double.parseDouble(amountCell.getStringCellValue()));
                     }
+                    if(descCell!=null&&!StringUtils.isEmpty(descCell.getStringCellValue())){
+                        project.setProjectDesc(amountCell.getStringCellValue());
+                    }
                     if (isPublicCell != null && !StringUtils.isEmpty(isPublicCell.getStringCellValue())) {
                         project.setIsPublic(MessageUtils.message("excel.yes").equals(isPublicCell.getStringCellValue())?1:0);
                     }
@@ -3953,6 +3964,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                 projectAuditor.setAuditorName(project.getInchargerName());
                                 projectAuditor.setProjectId(project.getId());
                                 projectAuditorMapper.insert(projectAuditor);
+                                if(timeType.getReportAuditType()==6){
+                                    ProjectCcuser projectCcuser=new ProjectCcuser();
+                                    projectCcuser.setUserId(project.getInchargerId());
+                                    projectCcuser.setUserName(project.getInchargerName());
+                                    projectCcuser.setProjectId(project.getId());
+                                    projectCcuserService.save(projectCcuser);
+                                }
                             }
                         }
                     }
@@ -4020,10 +4038,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     //导入项目参与人,遵守只增不减的原则, 避免误删
                     List<Participation> oldPartList = new ArrayList<>();
                     List<ProjectAuditor> oldAuditorList = new ArrayList<>();
+                    List<ProjectCcuser> oldCcList = new ArrayList<>();
                     if (exists) {
                         //更新的项目,检查已经存在的项目参与人
                         oldPartList = participationMapper.selectList(new QueryWrapper<Participation>().eq("project_id", project.getId()));
                         oldAuditorList = projectAuditorMapper.selectList(new QueryWrapper<ProjectAuditor>().eq("project_id", project.getId()));
+                        oldCcList = projectCcuserService.list(new QueryWrapper<ProjectCcuser>().eq("project_id", project.getId()));
                     }
                     List<Participation> participationList = new ArrayList<>();
                     if(inchargerCell!=null){
@@ -4198,6 +4218,70 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             projectAuditorService.saveBatch(addAuditorList);
                         }
                     }
+                    List<ProjectCcuser> projectCcuserList = new ArrayList<>();
+                    if (reportCcCell != null) {
+                        String part = reportCcCell.getStringCellValue().trim();
+                        if (!StringUtils.isEmpty(part)) {
+                            String[] partSplit = part.split("\\,|\\,");
+                            for (String str : partSplit) {
+                                if(str.equals(inchargerCell.getStringCellValue())){
+                                    continue;
+                                }
+                                ProjectCcuser projectCcuser = new ProjectCcuser();
+                                String s1;
+                                if(str.startsWith("/")){
+                                    s1=str.substring(1,str.length());
+                                }else s1=str;
+                                String s2;
+                                if(s1.endsWith("/")){
+                                    s2=s1.substring(0,s1.length()-1);
+                                }else s2=s1;
+                                String[] split = str.split("/");
+                                Optional<User> first;
+                                Integer exception=null;
+                                if(split.length==1){
+                                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                        Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(split[0])).findFirst();
+                                        first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))||(optional.isPresent()&&u.getCorpwxUserid()!=null&&u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
+                                    }else {
+                                        first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                    }
+                                    exception=0;
+                                }else {
+                                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                        Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(split[1])).findFirst();
+                                        first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))||(optional.isPresent()&&u.getCorpwxUserid()!=null&&u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
+                                        exception=1;
+                                    }else {
+                                        first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
+                                    }
+                                }
+                                if (first.isPresent()) {
+                                    User partMemb = first.get();
+//                                    System.out.println("参与人:"+partMemb.getName());
+                                    if (!projectCcuserList.stream().anyMatch(partOne->partOne.getUserId().equals(partMemb.getId()))) {
+                                        projectCcuser.setUserId(partMemb.getId());
+                                        projectCcuser.setUserName(partMemb.getName());
+                                        projectCcuser.setProjectId(project.getId());
+                                        projectCcuserList.add(projectCcuser);
+                                    }
+                                } else {
+                                    switch (exception){
+                                        case 0:throw new Exception("["+split[0]+"]在系统中不存在");
+                                        case 1:throw new Exception("["+split[0]+"]在系统中不存在");
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    if (projectCcuserList.size() > 0) {
+                        //批量保存
+                        List<ProjectCcuser> finalOldCcList = oldCcList;
+                        List<ProjectCcuser> addCcList = projectCcuserList.stream().filter(newP-> !finalOldCcList.stream().anyMatch(oldP->oldP.getUserId().equals(newP.getUserId()))).collect(Collectors.toList());
+                        if (addCcList.size() > 0) {
+                            projectCcuserService.saveBatch(addCcList);
+                        }
+                    }
                 }
                 //msg.data = "成功导入"+importCount+"条数据。";
                 msg.data = MessageUtils.message("data.importSucRow",importCount);
@@ -4338,12 +4422,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     HSSFCell participatorCell=null;
                     HSSFCell inchargerCell=null;
                     HSSFCell reportAuditorsCell=null;
+                    HSSFCell reportCcCell=null;
                     HSSFCell levelCell=null;
                     HSSFCell deptCell=null;
                     HSSFCell customerCell=null;
                     HSSFCell startDateCell=null;
                     HSSFCell endDateCell=null;
                     HSSFCell amountCell=null;
+                    HSSFCell descCell=null;
                     HSSFCell categoryCell=null;
                     HSSFCell warrantyStartDateCell=null;
                     HSSFCell warrantyEndDateCell=null;
@@ -4372,133 +4458,140 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     HSSFCell plate18=null;
 
                     int i=0;
-                    int k=0;
-                    int c=0;
-                    int d=0;
-                    int e=0;
                     if(timeType.getMainProjectState()==1){
                         mainNameCell = row.getCell(0);
                         codeCell = row.getCell(1);
                         if(company.getId()==936){
                             contractCell=row.getCell(2);
-                            c++;
+                            i++;
                         }
-                        isPublicCell = row.getCell(2+c);
-                        nameCell = row.getCell(3+c);
-                        participatorCell = row.getCell(4+c);
-                        inchargerCell = row.getCell(5+c);
-                        if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4){
-                            e++;
-                            reportAuditorsCell=row.getCell(5+c+e);
+                        isPublicCell = row.getCell(2+i);
+                        nameCell = row.getCell(3+i);
+                        participatorCell = row.getCell(4+i);
+                        inchargerCell = row.getCell(5+i);
+                        if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4||timeType.getReportAuditType()==6){
+                            i++;
+                            reportAuditorsCell=row.getCell(5+i);
                         }
-                        levelCell = row.getCell(6+c+e);
+                        if(timeType.getReportAuditType()==6){
+                            i++;
+                            reportCcCell=row.getCell(5+i);
+                        }
+                        levelCell = row.getCell(6+i);
                         if(timeType.getProjectWithDept()==1){
-                            deptCell=row.getCell(7+c+e);
-                            d++;
+                            deptCell=row.getCell(7+i);
+                            i++;
                         }
                         if(company.getPackageCustomer()==1){
-                            customerCell=row.getCell(7+c+d+e);
+                            customerCell=row.getCell(7+i);
                             i++;
                         }
                         if(company.getPackageProvider()==1){
                             for (int j = 0; j < providerCategoryList.size(); j++) {
                                 if(company.getPackageProvider()==1){
-                                    k++;
+                                    i++;
                                 }
                             }
                         }
-                        startDateCell = row.getCell(7+i+k+c+d+e);
-                        endDateCell = row.getCell(8+i+k+c+d+e);
-                        amountCell = row.getCell(9+i+k+c+d+e);
+                        startDateCell = row.getCell(7+i);
+                        endDateCell = row.getCell(8+i);
+                        amountCell = row.getCell(9+i);
                         if(company.getId()==936){
-                            warrantyStartDateCell=row.getCell(10+i+k+c+d+e);
-                            warrantyEndDateCell=row.getCell(11+i+k+c+d+e);
-                            projectCategorySubCell=row.getCell(12+i+k+c+d+e);
-                            regionCell=row.getCell(13+i+k+c+d+e);
-                            buCell=row.getCell(14+i+k+c+d+e);
-                            stateCell=row.getCell(15+i+k+c+d+e);
-                            stageCell=row.getCell(16+i+k+c+d+e);
-                            plate1=row.getCell(17+i+k+c+d+e);
-                            plate2=row.getCell(18+i+k+c+d+e);
-                            plate3=row.getCell(19+i+k+c+d+e);
-                            plate4=row.getCell(20+i+k+c+d+e);
-                            plate5=row.getCell(21+i+k+c+d+e);
-                            plate6=row.getCell(22+i+k+c+d+e);
-                            plate7=row.getCell(23+i+k+c+d+e);
-                            plate8=row.getCell(24+i+k+c+d+e);
-                            plate9=row.getCell(25+i+k+c+d+e);
-                            plate10=row.getCell(26+i+k+c+d+e);
-                            plate11=row.getCell(27+i+k+c+d+e);
-                            plate12=row.getCell(28+i+k+c+d+e);
-                            plate13=row.getCell(29+i+k+c+d+e);
-                            plate14=row.getCell(30+i+k+c+d+e);
-                            plate15=row.getCell(31+i+k+c+d+e);
-                            plate16=row.getCell(32+i+k+c+d+e);
-                            plate17=row.getCell(33+i+k+c+d+e);
-                            plate18=row.getCell(34+i+k+c+d+e);
-                        }
+                            warrantyStartDateCell=row.getCell(10+i);
+                            warrantyEndDateCell=row.getCell(11+i);
+                            projectCategorySubCell=row.getCell(12+i);
+                            regionCell=row.getCell(13+i);
+                            buCell=row.getCell(14+i);
+                            stateCell=row.getCell(15+i);
+                            stageCell=row.getCell(16+i);
+                            plate1=row.getCell(17+i);
+                            plate2=row.getCell(18+i);
+                            plate3=row.getCell(19+i);
+                            plate4=row.getCell(20+i);
+                            plate5=row.getCell(21+i);
+                            plate6=row.getCell(22+i);
+                            plate7=row.getCell(23+i);
+                            plate8=row.getCell(24+i);
+                            plate9=row.getCell(25+i);
+                            plate10=row.getCell(26+i);
+                            plate11=row.getCell(27+i);
+                            plate12=row.getCell(28+i);
+                            plate13=row.getCell(29+i);
+                            plate14=row.getCell(30+i);
+                            plate15=row.getCell(31+i);
+                            plate16=row.getCell(32+i);
+                            plate17=row.getCell(33+i);
+                            plate18=row.getCell(34+i);
+                            descCell=row.getCell(35+i);
+                        }else descCell=row.getCell(10+i);
                     }else {
                         codeCell = row.getCell(0);
                         if(company.getId()==936){
                             contractCell=row.getCell(1);
-                            c++;
+                            i++;
                         }
-                        categoryCell = row.getCell(1+c);
-                        isPublicCell = row.getCell(2+c);
-                        nameCell = row.getCell(3+c);
-                        subNameCell = row.getCell(4+c);
-                        participatorCell = row.getCell(5+c);
-                        inchargerCell = row.getCell(6+c);
-                        if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4){
-                            e++;
-                            reportAuditorsCell=row.getCell(6+c+e);
+                        categoryCell = row.getCell(1+i);
+                        isPublicCell = row.getCell(2+i);
+                        nameCell = row.getCell(3+i);
+                        subNameCell = row.getCell(4+i);
+                        participatorCell = row.getCell(5+i);
+                        inchargerCell = row.getCell(6+i);
+                        if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4||timeType.getReportAuditType()==6){
+                            i++;
+                            reportAuditorsCell=row.getCell(6+i);
                         }
-                        levelCell = row.getCell(7+c+e);
+                        if(timeType.getReportAuditType()==6){
+                            i++;
+                            reportCcCell=row.getCell(6+i);
+                        }
+                        levelCell = row.getCell(7+i);
                         if(timeType.getProjectWithDept()==1){
-                            deptCell=row.getCell(8+c+e);
-                            d++;
+                            deptCell=row.getCell(8+i);
+                            i++;
                         }
                         if(company.getPackageCustomer()==1){
-                            customerCell=row.getCell(8+c+d+e);
+                            customerCell=row.getCell(8+i);
                             i++;
                         }
                         if(company.getPackageProvider()==1){
                             for (int j = 0; j < providerCategoryList.size(); j++) {
                                 if(company.getPackageProvider()==1){
-                                    k++;
+                                    i++;
                                 }
                             }
                         }
-                        startDateCell = row.getCell(8+i+k+c+d+e);
-                        endDateCell = row.getCell(9+i+k+c+d+e);
-                        amountCell = row.getCell(10+i+k+c+d+e);
+                        startDateCell = row.getCell(8+i);
+                        endDateCell = row.getCell(9+i);
+                        amountCell = row.getCell(10+i);
                         if(company.getId()==936){
-                            warrantyStartDateCell=row.getCell(11+i+k+c+d+e);
-                            warrantyEndDateCell=row.getCell(12+i+k+c+d+e);
-                            projectCategorySubCell=row.getCell(13+i+k+c+d+e);
-                            regionCell=row.getCell(14+i+k+c+d+e);
-                            buCell=row.getCell(15+i+k+c+d+e);
-                            stateCell=row.getCell(16+i+k+c+d+e);
-                            stageCell=row.getCell(17+i+k+c+d+e);
-                            plate1=row.getCell(18+i+k+c+d+e);
-                            plate2=row.getCell(19+i+k+c+d+e);
-                            plate3=row.getCell(20+i+k+c+d+e);
-                            plate4=row.getCell(21+i+k+c+d+e);
-                            plate5=row.getCell(22+i+k+c+d+e);
-                            plate6=row.getCell(23+i+k+c+d+e);
-                            plate7=row.getCell(24+i+k+c+d+e);
-                            plate8=row.getCell(25+i+k+c+d+e);
-                            plate9=row.getCell(26+i+k+c+d+e);
-                            plate10=row.getCell(27+i+k+c+d+e);
-                            plate11=row.getCell(28+i+k+c+d+e);
-                            plate12=row.getCell(29+i+k+c+d+e);
-                            plate13=row.getCell(30+i+k+c+d+e);
-                            plate14=row.getCell(31+i+k+c+d+e);
-                            plate15=row.getCell(32+i+k+c+d+e);
-                            plate16=row.getCell(33+i+k+c+d+e);
-                            plate17=row.getCell(34+i+k+c+d+e);
-                            plate18=row.getCell(35+i+k+c+d+e);
-                        }
+                            warrantyStartDateCell=row.getCell(11+i);
+                            warrantyEndDateCell=row.getCell(12+i);
+                            projectCategorySubCell=row.getCell(13+i);
+                            regionCell=row.getCell(14+i);
+                            buCell=row.getCell(15+i);
+                            stateCell=row.getCell(16+i);
+                            stageCell=row.getCell(17+i);
+                            plate1=row.getCell(18+i);
+                            plate2=row.getCell(19+i);
+                            plate3=row.getCell(20+i);
+                            plate4=row.getCell(21+i);
+                            plate5=row.getCell(22+i);
+                            plate6=row.getCell(23+i);
+                            plate7=row.getCell(24+i);
+                            plate8=row.getCell(25+i);
+                            plate9=row.getCell(26+i);
+                            plate10=row.getCell(27+i);
+                            plate11=row.getCell(28+i);
+                            plate12=row.getCell(29+i);
+                            plate13=row.getCell(30+i);
+                            plate14=row.getCell(31+i);
+                            plate15=row.getCell(32+i);
+                            plate16=row.getCell(33+i);
+                            plate17=row.getCell(34+i);
+                            plate18=row.getCell(35+i);
+                            descCell=row.getCell(36+i);
+                        }else descCell=row.getCell(11+i);
+
                     }
                     if (codeCell != null)codeCell.setCellType(CellType.STRING);
                     if (nameCell != null)nameCell.setCellType(CellType.STRING);
@@ -4509,12 +4602,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     if (participatorCell != null)participatorCell.setCellType(CellType.STRING);
                     if (inchargerCell != null)inchargerCell.setCellType(CellType.STRING);
                     if (reportAuditorsCell != null)reportAuditorsCell.setCellType(CellType.STRING);
+                    if (reportCcCell != null)reportCcCell.setCellType(CellType.STRING);
                     if (levelCell != null)levelCell.setCellType(CellType.STRING);
                     if (deptCell != null)deptCell.setCellType(CellType.STRING);
                     if (customerCell != null)customerCell.setCellType(CellType.STRING);
                     /*if (startDateCell != null)startDateCell.setCellType(CellType.NUMERIC);
                     if (endDateCell != null)endDateCell.setCellType(CellType.NUMERIC);*/
                     if (amountCell != null)amountCell.setCellType(CellType.STRING);
+                    if (descCell != null)descCell.setCellType(CellType.STRING);
                     if (contractCell != null)contractCell.setCellType(CellType.STRING);
                     /*if (warrantyStartDateCell != null)amountCell.setCellType(CellType.STRING);
                     if (warrantyEndDateCell != null)amountCell.setCellType(CellType.STRING);*/
@@ -4766,6 +4861,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     if (amountCell !=null  && !StringUtils.isEmpty(amountCell.getStringCellValue())) {
                         project.setContractAmount(Double.parseDouble(amountCell.getStringCellValue()));
                     }
+                    if(descCell!=null&&!StringUtils.isEmpty(descCell.getStringCellValue())){
+                        project.setProjectDesc(descCell.getStringCellValue());
+                    }
                     if (isPublicCell != null && !StringUtils.isEmpty(isPublicCell.getStringCellValue())) {
                         project.setIsPublic(MessageUtils.message("excel.yes").equals(isPublicCell.getStringCellValue())?1:0);
                     }
@@ -4840,6 +4938,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                 projectAuditor.setAuditorName(project.getInchargerName());
                                 projectAuditor.setProjectId(project.getId());
                                 projectAuditorMapper.insert(projectAuditor);
+                                if(timeType.getReportAuditType()==6){
+                                    ProjectCcuser projectCcuser=new ProjectCcuser();
+                                    projectCcuser.setUserId(project.getInchargerId());
+                                    projectCcuser.setUserName(project.getInchargerName());
+                                    projectCcuser.setProjectId(project.getId());
+                                    projectCcuserService.save(projectCcuser);
+                                }
                             }
                         }
                     }
@@ -5182,10 +5287,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     //导入项目参与人,遵守只增不减的原则, 避免误删
                     List<Participation> oldPartList = new ArrayList<>();
                     List<ProjectAuditor> oldAuditorList = new ArrayList<>();
+                    List<ProjectCcuser> oldCcList = new ArrayList<>();
                     if (exists) {
                         //更新的项目,检查已经存在的项目参与人
                         oldPartList = participationMapper.selectList(new QueryWrapper<Participation>().eq("project_id", project.getId()));
                         oldAuditorList = projectAuditorMapper.selectList(new QueryWrapper<ProjectAuditor>().eq("project_id", project.getId()));
+                        oldCcList = projectCcuserService.list(new QueryWrapper<ProjectCcuser>().eq("project_id", project.getId()));
                         System.out.println("获取到已有项目参与人:"+oldPartList.size());
                     }
                     List<Participation> participationList = new ArrayList<>();
@@ -5354,6 +5461,70 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             projectAuditorService.saveBatch(addAuditorList);
                         }
                     }
+                    List<ProjectCcuser> projectCcuserList = new ArrayList<>();
+                    if (reportCcCell != null) {
+                        String part = reportCcCell.getStringCellValue().trim();
+                        if (!StringUtils.isEmpty(part)) {
+                            String[] partSplit = part.split("\\,|\\,");
+                            for (String str : partSplit) {
+                                if(str.equals(inchargerCell.getStringCellValue())){
+                                    continue;
+                                }
+                                String s1;
+                                if(str.startsWith("/")){
+                                    s1=str.substring(1,str.length());
+                                }else s1=str;
+                                String s2;
+                                if(s1.endsWith("/")){
+                                    s2=s1.substring(0,s1.length()-1);
+                                }else s2=s1;
+                                String[] split = s2.split("/");
+                                Optional<User> first;
+                                Integer exception=null;
+                                if(split.length==1){
+                                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                        Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(split[0])).findFirst();
+                                        first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))||(optional.isPresent()&&u.getCorpwxUserid()!=null&&u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
+                                    }else {
+                                        first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                    }
+                                    exception=0;
+                                }else {
+                                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                        Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(split[1])).findFirst();
+                                        first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))||(optional.isPresent()&&u.getCorpwxUserid()!=null&&u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))).findFirst();
+                                        exception=1;
+                                    }else {
+                                        first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
+                                    }
+                                }
+                                ProjectCcuser p = new ProjectCcuser();
+                                if (first.isPresent()) {
+                                    User partMemb = first.get();
+//                                    System.out.println("参与人:"+partMemb.getName());
+                                    if (!projectCcuserList.stream().anyMatch(partOne->partOne.getUserId().equals(partMemb.getId()))) {
+                                        p.setUserId(partMemb.getId());
+                                        p.setUserName(partMemb.getName());
+                                        p.setProjectId(project.getId());
+                                        projectCcuserList.add(p);
+                                    }
+                                } else {
+                                    switch (exception){
+                                        case 0:throw new Exception("["+split[0]+"]在系统中不存在");
+                                        case 1:throw new Exception("["+split[0]+"]在系统中不存在");
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    if (projectCcuserList.size() > 0) {
+                        //批量保存
+                        List<ProjectCcuser> finalOldCCList = oldCcList;
+                        List<ProjectCcuser> addCcList = projectCcuserList.stream().filter(newP-> !finalOldCCList.stream().anyMatch(oldP->oldP.getUserId().equals(newP.getUserId()))).collect(Collectors.toList());
+                        if (addCcList.size() > 0) {
+                            projectCcuserService.saveBatch(addCcList);
+                        }
+                    }
                 }
                 //msg.data = "成功导入"+importCount+"条数据。";
                 msg.data = MessageUtils.message("data.importSucRow",importCount);

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -4289,6 +4289,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             }else {
                 //titles.add("子项目名称");
                 titles.add(MessageUtils.message("excel.sonProName"));
+                titles.add("子项目编号");
             }
             //项目管理专业版以上,包括任务
             if (company.getPackageProject() == 1) {
@@ -4539,6 +4540,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     item.add((String) map.get("projectMainName"));
                 }else {
                     item.add((String) map.get("subProjectName"));
+                    item.add((String) map.get("subProjectCode"));
                 }
                 if (company.getPackageProject() == 1) {
                     item.add((String) map.get("taskName"));

+ 12 - 12
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -185,7 +185,7 @@
     <select id="getPMOReportByDate" resultType="java.util.Map">
         SELECT c.name, b.project_name AS project, a.working_time AS duration, a.content, a.create_time AS time, a.create_date as createDate,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
-        a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        a.end_time as endTime, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
         ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, a.overtime_hours as overtimeHours, a.custom_text as customText
@@ -214,7 +214,7 @@
         SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project, b.project_code as projectCode, b.category_name as categoryName,a.working_time AS duration,
         a.content, a.create_time AS time, a.create_date as createDate,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
-        a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as
+        a.end_time as endTime, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as
         isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as
@@ -278,7 +278,7 @@
         SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project, b.project_code as projectCode, b.category_name as categoryName,a.working_time AS duration,
         a.content, a.create_time AS time, a.create_date as createDate,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
-        a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as
+        a.end_time as endTime, d.name as subProjectName, d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as
         isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as
@@ -343,7 +343,7 @@
     <select id="getDeptMembReportByDate" resultType="java.util.Map">
         SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project, b.project_code as projectCode,b.category_name as categoryName, a.working_time AS duration, a.content, a.create_time AS time,a.create_date as createDate,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
-        a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        a.end_time as endTime, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState,a.stage, a.pic_str as picStr, multi_worktime as multiWorktime,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
         ,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
@@ -402,7 +402,7 @@
     <select id="getReportByDate" resultType="java.util.Map">
         SELECT a.id, a.project_id as projectId,b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, b.incharger_id as inchargerId,b.project_code as projectCode,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        a.creator_id as creatorId, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
         department.department_name as auditDeptName, a.is_dept_audit as isDeptAudit, a.project_audit_state as projectAuditState,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
@@ -428,7 +428,7 @@
     <select id="getReportByTask" resultType="java.util.Map">
         SELECT a.id,date_format(a.create_date, '%Y-%m-%d') as createDate,  my.id as userId, my.name as userName, a.project_id as projectId,b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, b.incharger_id as inchargerId,b.project_code as projectCode,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        a.creator_id as creatorId, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
         department.department_name as auditDeptName, a.is_dept_audit as isDeptAudit, a.project_audit_state as projectAuditState,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
@@ -451,7 +451,7 @@
         SELECT a.id, a.project_id as projectId, b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType,
         a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, b.incharger_id as inchargerId,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        a.creator_id as creatorId, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
         department.department_name as auditDeptName, a.is_dept_audit as isDeptAudit, a.project_audit_state as projectAuditState,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
@@ -481,7 +481,7 @@
         SELECT a.id, a.project_id as projectId, b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType,
         a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, b.incharger_id as inchargerId,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        a.creator_id as creatorId, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
         department.department_name as auditDeptName, a.is_dept_audit as isDeptAudit, a.project_audit_state as projectAuditState,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
@@ -512,7 +512,7 @@
         SELECT a.id, user.id as userId,user.corpwx_userid as corpwxUserid, user.name, DATE_FORMAT(a.create_date, '%Y-%m-%d') as date, a.project_id as projectId, b.project_code AS projectCode, b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType,
         a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, b.incharger_id as inchargerId,dept.department_name as departmentName,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        a.creator_id as creatorId, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
         department.department_name as auditDeptName, a.is_dept_audit as isDeptAudit, a.project_audit_state as projectAuditState,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
@@ -564,7 +564,7 @@
         SELECT a.id, a.project_id as projectId, b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType,
         a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, b.incharger_id as inchargerId,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName,
+        a.creator_id as creatorId, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName,
         a.is_overtime as isOvertime,a.progress as progress, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
         task_group.name as groupName,a.group_id as groupId, a.custom_data as customData, a.overtime_hours as overtimeHours, a.custom_text as customText
@@ -590,7 +590,7 @@
     <!-- 批量获取员工某天的报告 -->
     <select id="getUserReportByDate" resultType="java.util.Map">
         SELECT a.id, b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType, a.creator_id as creatorId, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
-        a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName,
+        a.end_time as endTime, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName,
         b.incharger_id as inchargerId,b.project_code as projectCode,
         a.is_overtime as isOvertime,a.progress as progress,audit_dept_managerid as auditDeptManagerid,audit_deptid as auditDeptid,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
@@ -715,7 +715,7 @@
         SELECT a.id, user.id as userId, user.name, DATE_FORMAT(a.create_date, '%Y-%m-%d') as date, a.project_id as projectId, b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType,
         a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, b.incharger_id as inchargerId,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
+        a.creator_id as creatorId, d.name as subProjectName,d.code as subProjectCode,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName, a.custom_data as customData
         FROM report AS a

二進制
fhKeeper/formulahousekeeper/management-platform/src/main/resources/upload/项目导入模板.xlsx