|
@ -4,18 +4,17 @@ package com.ai.bss.security.protection.controller;
|
4
|
4
|
import com.ai.abc.api.model.CommonRequest;
|
5
|
5
|
import com.ai.abc.api.model.CommonResponse;
|
6
|
6
|
import com.ai.bss.components.common.model.PageBean;
|
|
7
|
import com.ai.bss.security.protection.model.AttendanceReport;
|
7
|
8
|
import com.ai.bss.security.protection.service.interfaces.AttendanceReportService;
|
8
|
9
|
import com.ai.bss.security.protection.util.EbcConstant;
|
9
|
|
import com.github.pagehelper.PageInfo;
|
10
|
10
|
import org.slf4j.Logger;
|
11
|
11
|
import org.slf4j.LoggerFactory;
|
12
|
12
|
import org.springframework.beans.factory.annotation.Autowired;
|
13
|
13
|
import org.springframework.stereotype.Controller;
|
14
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
14
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
15
|
15
|
import org.springframework.web.bind.annotation.RequestMapping;
|
16
|
16
|
import org.springframework.web.bind.annotation.ResponseBody;
|
17
|
17
|
|
18
|
|
import java.util.Date;
|
19
|
18
|
import java.util.HashMap;
|
20
|
19
|
import java.util.List;
|
21
|
20
|
import java.util.Map;
|
|
@ -33,7 +32,7 @@ public class AttendanceReportController {
|
33
|
32
|
|
34
|
33
|
/**
|
35
|
34
|
* 分页查询考勤报表日报
|
36
|
|
* @param request 组合条件
|
|
35
|
* @param attendanceReport
|
37
|
36
|
* workDay : 日报日期 (yyyy-MM-dd格式),必选
|
38
|
37
|
* orgId:所属组织ID
|
39
|
38
|
* id:个人编码(员工编码)
|
|
@ -43,13 +42,19 @@ public class AttendanceReportController {
|
43
|
42
|
|
44
|
43
|
@ResponseBody
|
45
|
44
|
@RequestMapping("/queryDailyAttendanceReport")
|
46
|
|
public CommonResponse<PageBean<Map<String,Object>>> queryDailyAttendanceReport(@RequestBody CommonRequest<Map<String, Object>> request) throws Exception {
|
|
45
|
public CommonResponse<PageBean<Map<String,Object>>> queryDailyAttendanceReport(@ModelAttribute AttendanceReport attendanceReport) throws Exception {
|
47
|
46
|
// 当前页数
|
48
|
|
int pageNumber = request.getPageNumber() < 1 ? 1 : request.getPageNumber();
|
|
47
|
int pageNumber = attendanceReport.getPageNumber() < 1 ? 1 : attendanceReport.getPageNumber();
|
49
|
48
|
// 每页条数
|
50
|
|
int pageSize = request.getPageSize() < 1 ? EbcConstant.DEFAULT_PAGE_SIZE : request.getPageSize();
|
|
49
|
int pageSize = attendanceReport.getPageSize() < 1 ? EbcConstant.DEFAULT_PAGE_SIZE : attendanceReport.getPageSize();
|
|
50
|
|
|
51
|
Map<String, Object> params = new HashMap<>();
|
|
52
|
params.put("workDay",attendanceReport.getWorkDay());
|
|
53
|
params.put("orgId",attendanceReport.getOrgId());
|
|
54
|
params.put("id",attendanceReport.getId());
|
|
55
|
params.put("nameAsLike",attendanceReport.getNameAsLike());
|
|
56
|
params.put("mainJobPositionId",attendanceReport.getMainJobPositionId());
|
51
|
57
|
|
52
|
|
Map<String, Object> params = request.getData() == null ? new HashMap<String, Object>() : request.getData();
|
53
|
58
|
CommonResponse<PageBean<Map<String,Object>>> commonResponse = attendanceReportService.queryDailyAttendanceReport(params, pageNumber, pageSize);
|
54
|
59
|
|
55
|
60
|
|
|
@ -68,13 +73,18 @@ public class AttendanceReportController {
|
68
|
73
|
|
69
|
74
|
@ResponseBody
|
70
|
75
|
@RequestMapping("/queryMonthlyAttendanceReport")
|
71
|
|
public CommonResponse<PageBean<Map<String,Object>>> queryMonthlyAttendanceReport(@RequestBody CommonRequest<Map<String, Object>> request) throws Exception {
|
|
76
|
public CommonResponse<PageBean<Map<String,Object>>> queryMonthlyAttendanceReport(@ModelAttribute AttendanceReport attendanceReport) throws Exception {
|
72
|
77
|
// 当前页数
|
73
|
|
int pageNumber = request.getPageNumber() < 1 ? 1 : request.getPageNumber();
|
|
78
|
int pageNumber = attendanceReport.getPageNumber() < 1 ? 1 : attendanceReport.getPageNumber();
|
74
|
79
|
// 每页条数
|
75
|
|
int pageSize = request.getPageSize() < 1 ? EbcConstant.DEFAULT_PAGE_SIZE : request.getPageSize();
|
76
|
|
|
77
|
|
Map<String, Object> params = request.getData() == null ? new HashMap<String, Object>() : request.getData();
|
|
80
|
int pageSize = attendanceReport.getPageSize() < 1 ? EbcConstant.DEFAULT_PAGE_SIZE : attendanceReport.getPageSize();
|
|
81
|
|
|
82
|
Map<String, Object> params = new HashMap<>();
|
|
83
|
params.put("month",attendanceReport.getMonth());
|
|
84
|
params.put("orgId",attendanceReport.getOrgId());
|
|
85
|
params.put("id",attendanceReport.getId());
|
|
86
|
params.put("nameAsLike",attendanceReport.getNameAsLike());
|
|
87
|
params.put("mainJobPositionId",attendanceReport.getMainJobPositionId());
|
78
|
88
|
CommonResponse<PageBean<Map<String,Object>>> commonResponse= attendanceReportService.queryMonthlyAttendanceReport(params, pageNumber, pageSize);
|
79
|
89
|
|
80
|
90
|
return commonResponse;
|
|
@ -87,13 +97,18 @@ public class AttendanceReportController {
|
87
|
97
|
*/
|
88
|
98
|
@ResponseBody
|
89
|
99
|
@RequestMapping("/queryPageAbnormalAttendance")
|
90
|
|
public CommonResponse<PageBean<Map<String,Object>>> queryPageAbnormalAttendance(@RequestBody CommonRequest<Map<String, Object>> request) throws Exception {
|
|
100
|
public CommonResponse<PageBean<Map<String,Object>>> queryPageAbnormalAttendance(@ModelAttribute AttendanceReport attendanceReport) throws Exception {
|
91
|
101
|
// 当前页数
|
92
|
|
int pageNumber = request.getPageNumber() < 1 ? 1 : request.getPageNumber();
|
|
102
|
int pageNumber = attendanceReport.getPageNumber() < 1 ? 1 : attendanceReport.getPageNumber();
|
93
|
103
|
// 每页条数
|
94
|
|
int pageSize = request.getPageSize() < 1 ? EbcConstant.DEFAULT_PAGE_SIZE : request.getPageSize();
|
95
|
|
|
96
|
|
Map<String, Object> params = request.getData() == null ? new HashMap<String, Object>() : request.getData();
|
|
104
|
int pageSize = attendanceReport.getPageSize() < 1 ? EbcConstant.DEFAULT_PAGE_SIZE : attendanceReport.getPageSize();
|
|
105
|
|
|
106
|
Map<String, Object> params = new HashMap<>();
|
|
107
|
params.put("month",attendanceReport.getMonth());
|
|
108
|
params.put("orgId",attendanceReport.getOrgId());
|
|
109
|
params.put("id",attendanceReport.getId());
|
|
110
|
params.put("nameAsLike",attendanceReport.getNameAsLike());
|
|
111
|
params.put("mainJobPositionId",attendanceReport.getMainJobPositionId());
|
97
|
112
|
CommonResponse<PageBean<Map<String,Object>>> commonResponse= attendanceReportService.queryPageAbnormalAttendance(params, pageNumber, pageSize);
|
98
|
113
|
|
99
|
114
|
return commonResponse;
|
|
@ -110,8 +125,11 @@ public class AttendanceReportController {
|
110
|
125
|
|
111
|
126
|
@ResponseBody
|
112
|
127
|
@RequestMapping("/queryAttendanceDetailReport")
|
113
|
|
public CommonResponse<List<Map<String, Object>>> queryAttendanceDetailReport(@RequestBody CommonRequest<Map<String, Object>> request) throws Exception {
|
114
|
|
Map<String, Object> params = request.getData() == null ? new HashMap<String, Object>() : request.getData();
|
|
128
|
public CommonResponse<List<Map<String, Object>>> queryAttendanceDetailReport(@ModelAttribute AttendanceReport attendanceReport) throws Exception {
|
|
129
|
Map<String, Object> params = new HashMap<>();
|
|
130
|
params.put("beginDay",attendanceReport.getMonth());
|
|
131
|
params.put("endDay",attendanceReport.getOrgId());
|
|
132
|
params.put("id",attendanceReport.getId());
|
115
|
133
|
CommonResponse<List<Map<String, Object>>> commonResponse = attendanceReportService.queryAttendanceDetailReport(params);
|
116
|
134
|
return commonResponse;
|
117
|
135
|
|