Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
ba9db32e
Commit
ba9db32e
authored
Jul 17, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考勤汇总增加显示汇总时间
parent
f16815c9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
2 deletions
+22
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
...er/src/main/java/com/mortals/xhx/common/key/RedisKey.java
+2
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceStatServiceImpl.java
...le/attendance/service/impl/AttendanceStatServiceImpl.java
+4
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceStatController.java
...s/xhx/module/attendance/web/AttendanceStatController.java
+11
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffPerformSummaryController.java
...s/xhx/module/staff/web/StaffPerformSummaryController.java
+5
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
View file @
ba9db32e
...
...
@@ -25,7 +25,8 @@ public class RedisKey {
/** 考勤统计 **/
public
static
final
String
KEY_ATTENDANCE_STAT_CACHE
=
"attendance:stat"
;
/** 考勤统计时间 **/
public
static
final
String
ATTENDANCE_STAT_TIME
=
"attendanceSummaryTime"
;
public
static
final
String
KEY_HOME_STAT_CACHE
=
"attendance:home:stat"
;
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/service/impl/AttendanceStatServiceImpl.java
View file @
ba9db32e
...
...
@@ -44,6 +44,9 @@ import java.math.BigDecimal;
import
java.math.RoundingMode
;
import
java.util.*
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
ATTENDANCE_STAT_TIME
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
STAFF_PERFORM_SUMMARY
;
/**
* AttendanceStatService
* 考勤汇总信息 service实现
...
...
@@ -625,6 +628,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
}
}
log
.
info
(
"完成汇总当前日期请假情况....."
);
cacheService
.
set
(
ATTENDANCE_STAT_TIME
,
DateUtils
.
getCurrStrDateTime
());
log
.
info
(
"日期:"
+
query
.
getSummaryTime
()
+
",考勤汇总执行完成,耗时:"
+
(
System
.
currentTimeMillis
()
-
currentTime
)
+
"毫秒...."
);
}
catch
(
Exception
e
)
{
log
.
error
(
"考勤汇总出错"
,
e
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceStatController.java
View file @
ba9db32e
...
...
@@ -13,6 +13,7 @@ import com.mortals.framework.model.PageInfo;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.utils.ReflectUtils
;
import
com.mortals.framework.utils.poi.ExcelUtil
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
...
...
@@ -57,7 +58,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_ATTENDANCE_STAT_CACHE
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
*
;
/**
* 考勤汇总信息
...
...
@@ -165,6 +166,15 @@ public class AttendanceStatController extends BaseCRUDJsonBodyMappingController<
model
.
put
(
"pageInfo"
,
result
.
getPageInfo
());
this
.
parsePageInfo
(
model
,
result
.
getPageInfo
());
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
String
summaryTime
=
cacheService
.
get
(
ATTENDANCE_STAT_TIME
);
if
(
StringUtils
.
isNotEmpty
(
summaryTime
)){
this
.
addDict
(
model
,
"summaryTime"
,
summaryTime
);
}
else
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
add
(
Calendar
.
DAY_OF_MONTH
,-
1
);
summaryTime
=
DateUtils
.
getDateTime
(
cal
.
getTime
(),
"yyyy-MM-dd"
);
this
.
addDict
(
model
,
"summaryTime"
,
summaryTime
+
" 22:00:00"
);
}
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/web/StaffPerformSummaryController.java
View file @
ba9db32e
...
...
@@ -106,6 +106,11 @@ public class StaffPerformSummaryController extends BaseCRUDJsonBodyMappingContro
String
summaryTime
=
cacheService
.
get
(
STAFF_PERFORM_SUMMARY
);
if
(
StringUtils
.
isNotEmpty
(
summaryTime
)){
this
.
addDict
(
model
,
"summaryTime"
,
summaryTime
);
}
else
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
add
(
Calendar
.
DAY_OF_MONTH
,-
1
);
summaryTime
=
DateUtils
.
getDateTime
(
cal
.
getTime
(),
"yyyy-MM-dd"
);
this
.
addDict
(
model
,
"summaryTime"
,
summaryTime
+
" 22:00:00"
);
}
return
super
.
doListAfter
(
query
,
model
,
context
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment