Browse Source

导入用户打卡数据开发第二版,导入数据库再做处理

anderx 1 year ago
parent
commit
ccbe1ff358

+ 9 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -306,4 +306,13 @@ public class SysUserController extends BaseController
 
         return AjaxResult.success(userService.selectUserClock());
     }
+
+    /**
+     * 考勤与打卡核对表
+     */
+    @GetMapping("/UserClockDetails")
+    public AjaxResult UserClockDetails(Long id) {
+
+        return AjaxResult.success(userService.UserClockDetails(id));
+    }
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java

@@ -219,4 +219,6 @@ public interface ISysUserService
     void pushUserClock(List<Map<Integer, String>> maps);
 
     Object selectUserClock();
+
+    Object UserClockDetails(Long id);
 }

+ 11 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

@@ -13,6 +13,7 @@ import javax.validation.Validator;
 
 import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.enums.UserRolesType;
+import com.ruoyi.common.utils.bean.BeanUtils;
 import com.ruoyi.project.domain.ProjectStaff;
 import com.ruoyi.project.domain.ProjectStaffRecord;
 import com.ruoyi.project.domain.ProjectTask;
@@ -829,6 +830,8 @@ public class SysUserServiceImpl implements ISysUserService
         return  userRecordMapper.selectUserClock(userId);
     }
 
+
+
     private String  getTime(String s) {
         return s.replace("外勤","").trim();
     }
@@ -872,4 +875,12 @@ public class SysUserServiceImpl implements ISysUserService
     }
 
 
+    @Override
+    public Object UserClockDetails(Long id) {
+        UserRecord userRecord = userRecordMapper.selectByPrimaryKey(id);
+        UserRecordOut out=new UserRecordOut();
+        BeanUtils.copyProperties(userRecord, out);
+        return null;
+    }
+
 }