Browse Source

项目导入问题修改

Min 1 năm trước cách đây
mục cha
commit
b8f8449901

+ 5 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserWithBeisenController.java

@@ -573,6 +573,11 @@ public class UserWithBeisenController {
                     return false;
                 }).collect(Collectors.toList());
                 if(lastVacationList.size()>0){
+                    for (int i = 0; i < lastVacationList.size(); i++) {
+                        JSONObject vacation = lastVacationList.get(i);
+                        String vacationStartDateTime = vacation.getString("VacationStartDateTime");
+                        String VacationStopDateTime = vacation.getString("VacationStopDateTime");
+                    }
                     double vacationDuration = lastVacationList.stream().mapToDouble(i -> i.getDouble("VacationDuration")).sum();
                     BigDecimal decimal = new BigDecimal(vacationDuration);
                     decimal=decimal.divide(new BigDecimal(60),1,RoundingMode.HALF_DOWN);

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

@@ -5311,6 +5311,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     }
                     if(timeType.getMainProjectState()==1){
                         participatorCell = row.getCell(5+c);
+                        System.out.println(c);
                         inchargerCell = row.getCell(6+c);
                         if(timeType.getReportAuditType()==0||timeType.getReportAuditType()==4||timeType.getReportAuditType()==6){
                             i++;
@@ -5336,10 +5337,27 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     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 inchargerName = inchargerCell.getStringCellValue().trim();
-                    String reportAuditors = reportAuditorsCell.getStringCellValue().trim();
-                    String reportCc = reportCcCell.getStringCellValue().trim();
+                    String part = "";
+                    String inchargerName = "";
+                    String reportAuditors = "";
+                    String reportCc = "";
+                    if (participatorCell!=null) {
+                        participatorCell.setCellType(CellType.STRING);
+                        part = participatorCell.getStringCellValue().trim();
+                    }
+                    if (inchargerCell != null) {
+                        inchargerCell.setCellType(CellType.STRING);
+                        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("參與人")){
                         continue;
                     }