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
47150c3d
Commit
47150c3d
authored
Mar 05, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加绩效汇总任务用于处理保存绩效核查数据的后续处理
parent
06e21d82
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
172 additions
and
10 deletions
+172
-10
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
...er/src/main/java/com/mortals/xhx/common/key/RedisKey.java
+3
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/StaffCheckSummaryService.java
...x/daemon/applicationservice/StaffCheckSummaryService.java
+93
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/model/vo/StaffCheckSummaryQuery.java
...als/xhx/module/check/model/vo/StaffCheckSummaryQuery.java
+4
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckWindowWorkmanPerformService.java
...odule/check/service/CheckWindowWorkmanPerformService.java
+12
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
...dule/check/service/impl/CheckAttendRecordServiceImpl.java
+14
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
...dule/check/service/impl/CheckEffectRecordServiceImpl.java
+12
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
...dule/check/service/impl/CheckGoworkRecordServiceImpl.java
+12
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
...dule/check/service/impl/CheckReviewRecordServiceImpl.java
+12
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckWindowWorkmanPerformServiceImpl.java
...ck/service/impl/CheckWindowWorkmanPerformServiceImpl.java
+10
-2
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
View file @
47150c3d
...
...
@@ -29,4 +29,7 @@ public class RedisKey {
public
static
final
String
KEY_HOME_STAT_CACHE
=
"attendance:home:stat"
;
/** 绩效核查汇总 **/
public
static
final
String
KEY_CHECK_SUMMARY_CACHE
=
"staff:check:summary"
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/StaffCheckSummaryService.java
0 → 100644
View file @
47150c3d
package
com.mortals.xhx.daemon.applicationservice
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.springcloud.service.IApplicationStartedService
;
import
com.mortals.xhx.common.code.CheckTypeEnum
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.service.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_CHECK_SUMMARY_CACHE
;
/***
* 绩效汇总任务执行
*/
@Component
@Slf4j
public
class
StaffCheckSummaryService
implements
IApplicationStartedService
{
protected
Boolean
stopped
=
false
;
@Autowired
private
ICacheService
cacheService
;
@Autowired
private
CheckAttendRecordService
checkAttendRecordService
;
@Autowired
private
CheckEffectRecordService
checkEffectRecordService
;
@Autowired
private
CheckGoworkRecordService
checkGoworkRecordService
;
@Autowired
private
CheckReviewRecordService
checkReviewRecordService
;
@Autowired
private
CheckWindowWorkmanPerformService
checkWindowWorkmanPerformService
;
@Override
public
void
start
()
{
Thread
sendThread
=
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
int
waitTime
=
10
;
while
(!
stopped
)
{
try
{
StaffCheckSummaryQuery
query
=
cacheService
.
rpop
(
KEY_CHECK_SUMMARY_CACHE
,
StaffCheckSummaryQuery
.
class
);
if
(!
ObjectUtils
.
isEmpty
(
query
)){
if
(
query
.
getCheckType
()
==
CheckTypeEnum
.
考勤绩效
.
getValue
()){
checkAttendRecordService
.
summaryCheck
(
query
);
}
if
(
query
.
getCheckType
()
==
CheckTypeEnum
.
效能绩效
.
getValue
()){
checkEffectRecordService
.
summaryCheck
(
query
);
}
if
(
query
.
getCheckType
()
==
CheckTypeEnum
.
办件绩效
.
getValue
()){
checkGoworkRecordService
.
summaryCheck
(
query
);
}
if
(
query
.
getCheckType
()
==
CheckTypeEnum
.
评价绩效
.
getValue
()){
checkReviewRecordService
.
summaryCheck
(
query
);
}
if
(
query
.
getCheckType
()
==
CheckTypeEnum
.
其它绩效
.
getValue
()){
checkWindowWorkmanPerformService
.
summaryCheck
(
query
);
}
}
try
{
Thread
.
sleep
(
waitTime
);
}
catch
(
InterruptedException
e2
)
{
}
}
catch
(
Exception
e
)
{
log
.
error
(
"异常"
,
e
);
try
{
Thread
.
sleep
(
waitTime
);
}
catch
(
InterruptedException
e2
)
{
}
}
}
}
});
sendThread
.
start
();
}
@Override
public
void
stop
()
{
log
.
info
(
"停止服务.."
);
this
.
stopped
=
true
;
}
@Override
public
int
getOrder
()
{
return
30
;
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/model/vo/StaffCheckSummaryQuery.java
View file @
47150c3d
...
...
@@ -19,5 +19,9 @@ public class StaffCheckSummaryQuery {
private
Integer
year
;
/** 月 */
private
Integer
month
;
private
Long
recordId
;
/** 核查类型 */
private
Integer
checkType
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/CheckWindowWorkmanPerformService.java
View file @
47150c3d
...
...
@@ -5,6 +5,11 @@ import com.mortals.framework.model.Context;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.check.dao.CheckWindowWorkmanPerformDao
;
import
com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
java.util.List
;
/**
* CheckWindowWorkmanPerformService
*
...
...
@@ -24,4 +29,11 @@ public interface CheckWindowWorkmanPerformService extends ICRUDService<CheckWind
* @throws AppException
*/
void
examine
(
CheckWindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
;
/**
* 汇总已审核的核查记录
* @param query
* @return
*/
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
View file @
47150c3d
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DateUtils
;
...
...
@@ -52,6 +53,8 @@ import java.util.Date;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_ATTENDANCE_STAT_CACHE
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_CHECK_SUMMARY_CACHE
;
/**
* CheckAttendRecordService
...
...
@@ -87,6 +90,9 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
@Autowired
private
ParamService
paramService
;
@Autowired
private
ICacheService
cacheService
;
@Override
protected
void
saveBefore
(
CheckAttendRecordEntity
entity
,
Context
context
)
throws
AppException
{
updateStaffRuleNames
(
entity
);
...
...
@@ -123,7 +129,9 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
summaryCheck
(
query
);
query
.
setCheckType
(
CheckTypeEnum
.
考勤绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
catch
(
Exception
e
)
{
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
...
...
@@ -193,7 +201,11 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
query
.
setCheckType
(
CheckTypeEnum
.
考勤绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
catch
(
Exception
e
)
{
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
View file @
47150c3d
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DateUtils
;
...
...
@@ -52,6 +53,7 @@ import java.util.Date;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_CHECK_SUMMARY_CACHE
;
/**
* CheckEffectRecordService
...
...
@@ -85,6 +87,8 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
private
PerformRulesService
rulesService
;
@Autowired
private
ParamService
paramService
;
@Autowired
private
ICacheService
cacheService
;
@Override
protected
void
saveBefore
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
...
@@ -118,7 +122,9 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
summaryCheck
(
query
);
query
.
setCheckType
(
CheckTypeEnum
.
效能绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
catch
(
Exception
e
){
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
...
...
@@ -187,7 +193,11 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
query
.
setCheckType
(
CheckTypeEnum
.
效能绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
catch
(
Exception
e
){
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
View file @
47150c3d
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DateUtils
;
...
...
@@ -52,6 +53,7 @@ import java.util.Date;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_CHECK_SUMMARY_CACHE
;
/**
* CheckGoworkRecordService
...
...
@@ -85,6 +87,8 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
private
PerformRulesService
rulesService
;
@Autowired
private
ParamService
paramService
;
@Autowired
private
ICacheService
cacheService
;
@Override
protected
void
saveBefore
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
...
...
@@ -117,7 +121,9 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
summaryCheck
(
query
);
query
.
setCheckType
(
CheckTypeEnum
.
办件绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
catch
(
Exception
e
){
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
...
...
@@ -184,7 +190,11 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
query
.
setCheckType
(
CheckTypeEnum
.
办件绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
catch
(
Exception
e
){
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
View file @
47150c3d
...
...
@@ -3,6 +3,7 @@ package com.mortals.xhx.module.check.service.impl;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
...
...
@@ -54,6 +55,7 @@ import java.util.Date;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_CHECK_SUMMARY_CACHE
;
/**
* CheckReviewRecordService
...
...
@@ -82,6 +84,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
private
DeptService
deptService
;
@Autowired
private
PerformReviewRecordService
recordService
;
@Autowired
private
ICacheService
cacheService
;
@Autowired
...
...
@@ -120,7 +124,9 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
summaryCheck
(
query
);
query
.
setCheckType
(
CheckTypeEnum
.
评价绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
catch
(
Exception
e
)
{
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
...
...
@@ -189,7 +195,11 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
query
.
setCheckType
(
CheckTypeEnum
.
评价绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
catch
(
Exception
e
)
{
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckWindowWorkmanPerformServiceImpl.java
View file @
47150c3d
package
com.mortals.xhx.module.check.service.impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.CheckTypeEnum
;
import
com.mortals.xhx.common.pdu.WeightPdu
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckWindowPerformEntity
;
...
...
@@ -37,6 +39,7 @@ import java.util.Date;
import
java.util.List
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ParamKey
.
SYS_PARAM_WEIGHT
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
RedisKey
.
KEY_CHECK_SUMMARY_CACHE
;
/**
* CheckWindowWorkmanPerformService
...
...
@@ -53,6 +56,8 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Autowired
private
ParamService
paramService
;
@Autowired
private
ICacheService
cacheService
;
@Override
public
void
examine
(
CheckWindowWorkmanPerformEntity
entity
,
Context
context
)
throws
AppException
{
...
...
@@ -77,10 +82,13 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
query
.
setRecordId
(
temp
.
getRecordId
());
query
.
setYear
(
temp
.
getYear
());
query
.
setMonth
(
temp
.
getMonth
());
summaryCheck
(
query
);
query
.
setCheckType
(
CheckTypeEnum
.
其它绩效
.
getValue
());
cacheService
.
lpush
(
KEY_CHECK_SUMMARY_CACHE
,
query
);
//summaryCheck(query);
}
private
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
{
@Override
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
{
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
))
{
String
value
=
paramService
.
getValueByKey
(
SYS_PARAM_WEIGHT
);
...
...
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