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
15527866
Commit
15527866
authored
Jul 27, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改核查状态
parent
470c80a3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
122 additions
and
56 deletions
+122
-56
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
...dule/check/service/impl/CheckAttendRecordServiceImpl.java
+27
-14
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckComplainRecordServiceImpl.java
...le/check/service/impl/CheckComplainRecordServiceImpl.java
+16
-5
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
...dule/check/service/impl/CheckEffectRecordServiceImpl.java
+17
-9
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
...dule/check/service/impl/CheckGoworkRecordServiceImpl.java
+16
-5
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
...odule/check/service/impl/CheckOtherRecordServiceImpl.java
+30
-18
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
...dule/check/service/impl/CheckReviewRecordServiceImpl.java
+16
-5
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
View file @
15527866
...
...
@@ -26,8 +26,10 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformAttendRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformReviewRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformAttendRecordService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
...
...
@@ -71,6 +73,8 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformAttendRecordService
attendRecordService
;
@Autowired
private
PerformRulesService
rulesService
;
...
...
@@ -104,7 +108,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
if
(
SubMethodEnum
.
系统自动
.
getValue
()
==
entity
.
getSubMethod
())
{
/* AttendPostServiceThread attendPostServiceThread = new AttendPostServiceThread(entity);
ThreadPool.getInstance().execute(attendPostServiceThread);*/
// sendCheckDingTalk(entity);
// sendCheckDingTalk(entity);
}
try
{
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
...
...
@@ -133,7 +137,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
checkDingMsg
.
setScore
(
entity
.
getScore
().
toString
());
checkDingMsg
.
setSubAddType
(
entity
.
getSubAddType
());
//#/appealinfo?id=1&performType=effect&subAddType=2&appealStatus=1
checkDingMsg
.
setPath
(
String
.
format
(
"#/appealinfo?id=%s&&performType=%s&subAddType=%s"
,
entity
.
getId
(),
PerformTypeEnum
.
考勤绩效
.
getValue
(),
entity
.
getSubAddType
()));
checkDingMsg
.
setPath
(
String
.
format
(
"#/appealinfo?id=%s&&performType=%s&subAddType=%s"
,
entity
.
getId
(),
PerformTypeEnum
.
考勤绩效
.
getValue
(),
entity
.
getSubAddType
()));
messageService
.
sendDingTalkWorkMsg
(
checkDingMsg
);
}
else
{
log
.
error
(
"根据手机号码获取人员错误,msg:{}"
,
personRest
.
getMsg
());
...
...
@@ -154,7 +158,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
entity
.
setCheckPerson
(
user
.
getRealName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSubAddType
())&&!
ObjectUtils
.
isEmpty
(
entity
.
getCheckResult
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSubAddType
())
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getCheckResult
()))
{
AuditUtil
.
audit
(
entity
);
}
...
...
@@ -165,9 +169,18 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
try
{
CheckAttendRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getRecordId
()))
{
PerformAttendRecordEntity
performAttendRecordEntity
=
attendRecordService
.
get
(
entity
.
getRecordId
());
if
(!
ObjectUtils
.
isEmpty
(
performAttendRecordEntity
))
{
performAttendRecordEntity
.
setProcessStatus
(
ProcessStatusEnum
.
已处理
.
getValue
());
performAttendRecordEntity
.
setUpdateTime
(
new
Date
());
performAttendRecordEntity
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
attendRecordService
.
update
(
performAttendRecordEntity
);
}
}
/* AttendPostServiceThread attendPostServiceThread = new AttendPostServiceThread(entity);
ThreadPool.getInstance().execute(attendPostServiceThread);*/
sendCheckDingTalk
(
entity
);
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
...
...
@@ -263,8 +276,8 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
StaffPerformStatEntity
entity
:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
...
...
@@ -281,7 +294,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
statEntity
.
setAttendScoreSub
(
entity
.
getAttendScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
...
...
@@ -308,8 +321,8 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
DeptPerformStatEntity
entity
:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
...
...
@@ -326,7 +339,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
statEntity
.
setAttendScoreSub
(
entity
.
getAttendScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
...
...
@@ -340,7 +353,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
)
{
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
...
...
@@ -363,14 +376,14 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
private
void
computeDept
(
DeptPerformStatEntity
statEntity
)
{
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
)
{
if
(
deptEntity
!=
null
)
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckComplainRecordServiceImpl.java
View file @
15527866
...
...
@@ -9,10 +9,7 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckComplainRecordDao
;
...
...
@@ -29,7 +26,10 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformAttendRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformComplainRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformComplainRecordService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
...
...
@@ -73,6 +73,8 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformComplainRecordService
recordService
;
@Autowired
...
...
@@ -160,10 +162,19 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
sendCheckDingTalk
(
entity
);
try
{
CheckComplainRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
temp
.
getRecordId
())){
PerformComplainRecordEntity
recordEntity
=
recordService
.
get
(
temp
.
getRecordId
());
if
(!
ObjectUtils
.
isEmpty
(
recordEntity
)){
recordEntity
.
setProcessStatus
(
ProcessStatusEnum
.
已处理
.
getValue
());
recordEntity
.
setUpdateTime
(
new
Date
());
recordEntity
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
recordService
.
update
(
recordEntity
);
}
}
sendCheckDingTalk
(
entity
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
View file @
15527866
...
...
@@ -9,10 +9,7 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckEffectRecordDao
;
...
...
@@ -29,7 +26,10 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformComplainRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformEffectRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformEffectRecordService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
...
...
@@ -73,6 +73,8 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformEffectRecordService
recordService
;
@Autowired
private
PerformRulesService
rulesService
;
...
...
@@ -104,10 +106,6 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
@Override
protected
void
saveAfter
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
//发送钉钉通知信息
if
(
SubMethodEnum
.
系统自动
.
getValue
()
==
entity
.
getSubMethod
())
{
sendCheckDingTalk
(
entity
);
}
try
{
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
entity
.
getStaffId
());
...
...
@@ -164,10 +162,20 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
sendCheckDingTalk
(
entity
);
try
{
CheckEffectRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
temp
.
getRecordId
())){
PerformEffectRecordEntity
recordEntity
=
recordService
.
get
(
temp
.
getRecordId
());
if
(!
ObjectUtils
.
isEmpty
(
recordEntity
)){
recordEntity
.
setProcessStatus
(
ProcessStatusEnum
.
已处理
.
getValue
());
recordEntity
.
setUpdateTime
(
new
Date
());
recordEntity
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
recordService
.
update
(
recordEntity
);
}
}
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
View file @
15527866
...
...
@@ -9,10 +9,7 @@ import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckGoworkRecordDao
;
...
...
@@ -29,7 +26,10 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformEffectRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformGoworkRecordService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
...
...
@@ -73,6 +73,8 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformGoworkRecordService
recordService
;
@Autowired
private
PerformRulesService
rulesService
;
...
...
@@ -158,10 +160,19 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
//发送钉钉通知信息
sendCheckDingTalk
(
entity
);
try
{
CheckGoworkRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
temp
.
getRecordId
())){
PerformGoworkRecordEntity
recordEntity
=
recordService
.
get
(
temp
.
getRecordId
());
if
(!
ObjectUtils
.
isEmpty
(
recordEntity
)){
recordEntity
.
setProcessStatus
(
ProcessStatusEnum
.
已处理
.
getValue
());
recordEntity
.
setUpdateTime
(
new
Date
());
recordEntity
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
recordService
.
update
(
recordEntity
);
}
}
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
View file @
15527866
...
...
@@ -6,16 +6,14 @@ import com.mortals.framework.service.IUser;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckReviewRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.service.CheckAttendRecordService
;
import
com.mortals.xhx.module.dept.model.DeptEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatEntity
;
import
com.mortals.xhx.module.dept.model.DeptPerformStatQuery
;
...
...
@@ -23,7 +21,10 @@ import com.mortals.xhx.module.dept.service.DeptPerformStatService;
import
com.mortals.xhx.module.dept.service.DeptService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformOtherRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformOtherRecordService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
...
...
@@ -74,6 +75,8 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformOtherRecordService
recordService
;
@Autowired
private
PerformRulesService
rulesService
;
...
...
@@ -131,9 +134,9 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
checkDingMsg
.
setPerformTypeStr
(
PerformTypeEnum
.
评价差评绩效
.
getDesc
());
checkDingMsg
.
setScore
(
entity
.
getScore
().
toString
());
checkDingMsg
.
setSubAddType
(
entity
.
getSubAddType
());
checkDingMsg
.
setPath
(
String
.
format
(
"#/appealinfo?id=%s&&performType=%s&subAddType=%s"
,
entity
.
getId
(),
PerformTypeEnum
.
其它绩效
.
getValue
(),
entity
.
getSubAddType
()));
checkDingMsg
.
setPath
(
String
.
format
(
"#/appealinfo?id=%s&&performType=%s&subAddType=%s"
,
entity
.
getId
(),
PerformTypeEnum
.
其它绩效
.
getValue
(),
entity
.
getSubAddType
()));
// checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=other", entity.getId()));
// checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=other", entity.getId()));
Rest
<
String
>
msgRest
=
messageService
.
sendDingTalkWorkMsg
(
checkDingMsg
);
}
else
{
log
.
error
(
"根据手机号码获取人员错误,msg:{}"
,
personRest
.
getMsg
());
...
...
@@ -154,7 +157,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
entity
.
setUpdateUserId
(
user
.
getId
());
entity
.
setCheckPerson
(
user
.
getRealName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSubAddType
())&&!
ObjectUtils
.
isEmpty
(
entity
.
getCheckResult
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getSubAddType
())
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getCheckResult
()))
{
AuditUtil
.
audit
(
entity
);
}
entity
.
setCheckTime
(
new
Date
());
...
...
@@ -162,10 +165,19 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
//发送钉钉通知信息
sendCheckDingTalk
(
entity
);
try
{
CheckOtherRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
temp
.
getRecordId
()))
{
PerformOtherRecordEntity
recordEntity
=
recordService
.
get
(
temp
.
getRecordId
());
if
(!
ObjectUtils
.
isEmpty
(
recordEntity
))
{
recordEntity
.
setProcessStatus
(
ProcessStatusEnum
.
已处理
.
getValue
());
recordEntity
.
setUpdateTime
(
new
Date
());
recordEntity
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
recordService
.
update
(
recordEntity
);
}
}
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
...
...
@@ -265,8 +277,8 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
StaffPerformStatEntity
>
performStatList
=
dao
.
getStaffPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
StaffPerformStatEntity
entity:
performStatList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
StaffPerformStatEntity
entity
:
performStatList
)
{
StaffPerformStatQuery
tempQuery
=
new
StaffPerformStatQuery
();
tempQuery
.
setStaffId
(
entity
.
getStaffId
());
tempQuery
.
setYear
(
entity
.
getYear
());
...
...
@@ -283,7 +295,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
statEntity
.
setOtherScoreSub
(
entity
.
getOtherScoreSub
());
computeStaff
(
statEntity
);
staffPerformStatService
.
update
(
statEntity
);
}
else
{
}
else
{
StaffPerformStatEntity
statEntity
=
new
StaffPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
...
...
@@ -310,8 +322,8 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
query
.
setCheckTimeEnd
(
endTime
);
}
List
<
DeptPerformStatEntity
>
performStatList
=
dao
.
getDeptPerformStat
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
DeptPerformStatEntity
entity:
performStatList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
performStatList
))
{
for
(
DeptPerformStatEntity
entity
:
performStatList
)
{
DeptPerformStatQuery
tempQuery
=
new
DeptPerformStatQuery
();
tempQuery
.
setDeptId
(
entity
.
getDeptId
());
tempQuery
.
setYear
(
entity
.
getYear
());
...
...
@@ -328,7 +340,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
statEntity
.
setOtherScoreSub
(
entity
.
getOtherScoreSub
());
computeDept
(
statEntity
);
deptPerformStatService
.
update
(
statEntity
);
}
else
{
}
else
{
DeptPerformStatEntity
statEntity
=
new
DeptPerformStatEntity
();
statEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
statEntity
,
BeanUtil
.
getNullPropertyNames
(
entity
));
...
...
@@ -342,7 +354,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
}
}
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
){
private
void
computeStaff
(
StaffPerformStatEntity
statEntity
)
{
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
...
...
@@ -365,14 +377,14 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
statEntity
.
setTotalScore
(
totalScore
);
}
private
void
computeDept
(
DeptPerformStatEntity
statEntity
){
private
void
computeDept
(
DeptPerformStatEntity
statEntity
)
{
DeptEntity
deptEntity
=
deptService
.
get
(
statEntity
.
getDeptId
());
BigDecimal
totalAddScore
=
new
BigDecimal
(
0
);
BigDecimal
totalSubScore
=
new
BigDecimal
(
0
);
BigDecimal
totalScore
=
new
BigDecimal
(
100
);
if
(
deptEntity
!=
null
)
{
if
(
deptEntity
!=
null
)
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
deptEntity
.
getPersonNum
()));
}
else
{
}
else
{
totalScore
=
totalScore
.
multiply
(
new
BigDecimal
(
10
));
}
totalAddScore
=
totalAddScore
.
add
(
statEntity
.
getAttendScoreAdd
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
View file @
15527866
...
...
@@ -6,10 +6,7 @@ import com.mortals.framework.service.IUser;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.utils.AuditUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
...
...
@@ -25,7 +22,10 @@ import com.mortals.xhx.module.dingding.personal.model.req.workmsg.Link;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.Msg
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.model.PerformGoworkRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformReviewRecordEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformReviewRecordService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.*
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
...
...
@@ -75,6 +75,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
private
DeptPerformStatService
deptPerformStatService
;
@Autowired
private
DeptService
deptService
;
@Autowired
private
PerformReviewRecordService
recordService
;
@Autowired
...
...
@@ -163,10 +165,19 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
//发送钉钉通知信息
sendCheckDingTalk
(
entity
);
try
{
CheckReviewRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
temp
.
getRecordId
())){
PerformReviewRecordEntity
recordEntity
=
recordService
.
get
(
temp
.
getRecordId
());
if
(!
ObjectUtils
.
isEmpty
(
recordEntity
)){
recordEntity
.
setProcessStatus
(
ProcessStatusEnum
.
已处理
.
getValue
());
recordEntity
.
setUpdateTime
(
new
Date
());
recordEntity
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
recordService
.
update
(
recordEntity
);
}
}
sendCheckDingTalk
(
temp
);
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
...
...
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