浏览代码

新增新版考勤导入

anderx 1 年之前
父节点
当前提交
f9022d95e4

+ 6 - 8
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -1022,20 +1022,18 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
     public List<UserClockDataBo> clockDataToList(List<Map<Integer,String >> list) {
         List<UserClockDataBo> listData = new ArrayList<>();
         String title;
-        String title2;
         //第一行标题
         title = list.get(0).get(0);
-        System.out.println(title);
         String[] split = title.split(" ");
         String date =split[split.length - 1];
         //标题
-        List<String> title3 = new ArrayList<>(list.get(2).values());
-        System.out.println(title3);
+        List<String> title2 = new ArrayList<>(list.get(2).values());
+        System.out.println(title2);
         //最大标签
-        int size = title3.size();
+        int size = title2.size();
         for (int i = 3; i < list.size() ; i++) {
-            Map map = list.get(i);
-            List list2 = new ArrayList<>(map.values());
+            Map<Integer, String> map = list.get(i);
+            List<String> list2 = new ArrayList<>(map.values());
             UserClockDataBo userClockDataBo = new UserClockDataBo();
             userClockDataBo.setJobNumber((String) map.get(0));
             userClockDataBo.setUsername((String) map.get(1));
@@ -1047,7 +1045,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
                 UserClockDataDetailsBo userClockDataDetailsBo = new UserClockDataDetailsBo();
                 String str = o.toString();
                 userClockDataDetailsBo.setDuration(new BigDecimal(str));
-                String s = title3.get(index);
+                String s = title2.get(index);
                 userClockDataDetailsBo.setDateStr(s);
                 LocalDate localDate = LocalDate.parse(date);
                 if (s.equals("六")||s.equals("日")){