Bladeren bron

新增获取公司打卡数据

anderx 5 maanden geleden
bovenliggende
commit
6c3cffcb78

+ 4 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ProjectTaskController.java

@@ -541,10 +541,9 @@ public class ProjectTaskController extends BaseController {
      * 获取公司打卡数据
      */
     @GetMapping("/getCompanyClock")
-    public AjaxResult getCompanyClock(Integer deptId){
-        if (deptId==null){
-            return AjaxResult.error("部门不能为空");
-        }
-        return AjaxResult.success(projectStaffRecordService.getCompanyClock(deptId));
+    public TableDataInfo getCompanyClock(Integer deptId){
+        startPage();
+        List<ProjectStaffRecord> companyClock = projectStaffRecordService.getCompanyClock(deptId);
+        return getDataTable(companyClock);
     }
 }

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/project/service/ProjectStaffRecordService.java

@@ -56,5 +56,5 @@ public interface ProjectStaffRecordService {
 
     Object getNewMonthClock(Integer id, String yearMonth, String duration);
 
-    Object getCompanyClock(Integer deptId);
+    List<ProjectStaffRecord> getCompanyClock(Integer deptId);
 }

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

@@ -1182,7 +1182,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
     }
 
     @Override
-    public Object getCompanyClock(Integer deptId) {
+    public List<ProjectStaffRecord>  getCompanyClock(Integer deptId) {
         return projectStaffRecordMapper.getCompanyClock(deptId);
     }