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
bfbab3e5
Commit
bfbab3e5
authored
Apr 29, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效异常信息更新bug修改
parent
aa36a77e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
8 deletions
+112
-8
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/PerformApiController.java
...va/com/mortals/xhx/busiz/h5/web/PerformApiController.java
+75
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/model/vo/PerformErrorMessageVo.java
...ls/xhx/module/perform/model/vo/PerformErrorMessageVo.java
+3
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformAttendAppealServiceImpl.java
.../perform/service/impl/PerformAttendAppealServiceImpl.java
+33
-5
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/web/PerformAttendAppealController.java
...xhx/module/perform/web/PerformAttendAppealController.java
+1
-1
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/PerformApiController.java
View file @
bfbab3e5
...
...
@@ -13,6 +13,8 @@ import com.mortals.framework.model.Context;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.busiz.h5.req.PerformReq
;
import
com.mortals.xhx.busiz.h5.rsp.PerformDetailInfo
;
import
com.mortals.xhx.busiz.h5.rsp.PerformInfo
;
...
...
@@ -25,18 +27,26 @@ import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo;
import
com.mortals.xhx.module.check.service.*
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealEntity
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealQuery
;
import
com.mortals.xhx.module.perform.model.PerformErrorMessageEntity
;
import
com.mortals.xhx.module.perform.model.PerformRulesEntity
;
import
com.mortals.xhx.module.perform.service.PerformAttendAppealService
;
import
com.mortals.xhx.module.perform.service.PerformErrorMessageService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformStatQuery
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.service.StaffPerformStatService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -76,6 +86,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
private
StaffPerformStatService
staffPerformStatService
;
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Autowired
private
PerformErrorMessageService
performErrorMessageService
;
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"checkStatus"
,
CheckStatusEnum
.
getEnumMap
());
...
...
@@ -499,10 +513,69 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
return
rest
;
}
/**
* 个人绩效汇总分数信息
* @param query
* @return
*/
@PostMapping
({
"summary"
})
public
String
getSummary
(
@RequestBody
PerformErrorMessageEntity
query
){
JSONObject
ret
=
new
JSONObject
();
String
busiDesc
=
"查看个人绩效汇总"
;
Context
context
=
this
.
getContext
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
if
(
query
.
getStaffId
()==
null
){
return
this
.
createFailJsonResp
(
"绩效人员信息不能为空"
);
}
else
{
StaffPerformSummaryEntity
summaryQuery
=
new
StaffPerformSummaryEntity
();
summaryQuery
.
setStaffId
(
query
.
getStaffId
());
if
(
StringUtils
.
isNotEmpty
(
query
.
getErrorTimeStart
())){
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date
=
sdf
.
parse
(
query
.
getYearmonth
());
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
summaryQuery
.
setYear
(
calendar
.
get
(
Calendar
.
YEAR
));
summaryQuery
.
setMonth
(
calendar
.
get
(
Calendar
.
MONTH
)+
1
);
}
catch
(
Exception
e
){
public
static
void
main
(
String
[]
args
)
{
}
}
else
{
query
.
setErrorTimeStart
(
DateUtils
.
getCurrDateTime
(
"yyyy-MM"
)+
"-01"
);
Calendar
calendar
=
Calendar
.
getInstance
();
summaryQuery
.
setYear
(
calendar
.
get
(
Calendar
.
YEAR
));
summaryQuery
.
setMonth
(
calendar
.
get
(
Calendar
.
MONTH
)+
1
);
}
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
staffPerformSummaryService
.
selectOne
(
summaryQuery
);
if
(
staffPerformSummaryEntity
!=
null
)
{
model
.
put
(
"totalScore"
,
staffPerformSummaryEntity
.
getTotalScore
());
}
int
errorCount
=
performErrorMessageService
.
count
(
query
,
null
);
model
.
put
(
"errorCount"
,
errorCount
);
List
<
Integer
>
appeal
=
Arrays
.
asList
(
1
,
2
,
3
);
query
.
setAppealStatusList
(
appeal
);
int
appealCount
=
performErrorMessageService
.
count
(
query
,
null
);
model
.
put
(
"appealCount"
,
appealCount
);
ret
.
put
(
"code"
,
1
);
ret
.
put
(
"msg"
,
model
.
remove
(
"message_info"
));
ret
.
put
(
"dict"
,
model
.
remove
(
"dict"
));
return
ret
.
toJSONString
();
}
}
public
static
void
main
(
String
[]
args
)
{
try
{
String
dateString
=
"2024-04"
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM"
);
Date
date
=
sdf
.
parse
(
dateString
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
System
.
out
.
println
(
calendar
.
get
(
Calendar
.
YEAR
));
System
.
out
.
println
(
calendar
.
get
(
Calendar
.
MONTH
)+
1
);
System
.
out
.
println
(
DateUtils
.
getCurrDateTime
(
"yyyy-MM"
));
}
catch
(
Exception
e
){
System
.
out
.
println
(
e
);
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/model/vo/PerformErrorMessageVo.java
View file @
bfbab3e5
...
...
@@ -29,4 +29,7 @@ public class PerformErrorMessageVo extends BaseEntityLong {
/** 申诉状态(0.未申诉,1.申诉中,2.申诉拒绝,3.申诉通过)列表 */
private
List
<
Integer
>
appealStatusList
;
/** 绩效责任人id列表 */
private
List
<
Long
>
staffIdList
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformAttendAppealServiceImpl.java
View file @
bfbab3e5
...
...
@@ -21,10 +21,7 @@ import com.mortals.xhx.module.perform.dao.PerformAttendAppealDao;
import
com.mortals.xhx.module.perform.model.*
;
import
com.mortals.xhx.module.perform.model.vo.AppealInfo
;
import
com.mortals.xhx.module.perform.model.vo.AppealSummaryQuery
;
import
com.mortals.xhx.module.perform.service.PerformAttendAppealFilesService
;
import
com.mortals.xhx.module.perform.service.PerformAttendAppealService
;
import
com.mortals.xhx.module.perform.service.PerformRulesCategoryService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
com.mortals.xhx.module.perform.service.*
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -72,6 +69,8 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
private
PerformRulesCategoryService
categoryService
;
@Autowired
private
PerformRulesService
rulesService
;
@Autowired
private
PerformErrorMessageService
performErrorMessageService
;
private
void
sendCheckDingTalk
(
PerformAttendAppealEntity
entity
)
{
...
...
@@ -217,7 +216,23 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
}
}
}
//更新绩效异常信息核查状态
try
{
PerformErrorMessageEntity
errorMessageEntity
=
performErrorMessageService
.
selectOne
(
new
PerformErrorMessageQuery
().
checkRecordId
(
appealEntity
.
getId
()).
performType
(
appealEntity
.
getPerformType
()));
if
(
errorMessageEntity
!=
null
){
PerformErrorMessageEntity
updateEntity
=
new
PerformErrorMessageEntity
();
updateEntity
.
setId
(
errorMessageEntity
.
getId
());
if
(
appealEntity
.
getAppealResult
()
==
AppealResultEnum
.
通过
.
getValue
())
{
updateEntity
.
setAppealStatus
(
AppealStatusEnum
.
申诉通过
.
getValue
());
}
else
{
updateEntity
.
setAppealStatus
(
AppealStatusEnum
.
申诉拒绝
.
getValue
());
}
updateEntity
.
setUpdateTime
(
new
Date
());
performErrorMessageService
.
update
(
updateEntity
);
}
}
catch
(
Exception
e
){
log
.
error
(
"更新绩效异常信息核查状态出错"
,
e
);
}
return
Rest
.
ok
();
}
...
...
@@ -291,6 +306,19 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
}).
count
();
performAttendAppealFilesService
.
save
(
entity
.
getPerformAttendAppealFilesList
());
}
//更新绩效异常信息核查状态
try
{
PerformErrorMessageEntity
errorMessageEntity
=
performErrorMessageService
.
selectOne
(
new
PerformErrorMessageQuery
().
checkRecordId
(
entity
.
getId
()).
performType
(
entity
.
getPerformType
()));
if
(
errorMessageEntity
!=
null
){
PerformErrorMessageEntity
updateEntity
=
new
PerformErrorMessageEntity
();
updateEntity
.
setId
(
errorMessageEntity
.
getId
());
updateEntity
.
setAppealStatus
(
AppealStatusEnum
.
申诉中
.
getValue
());
updateEntity
.
setUpdateTime
(
new
Date
());
performErrorMessageService
.
update
(
updateEntity
);
}
}
catch
(
Exception
e
){
log
.
error
(
"更新绩效异常信息核查状态出错"
,
e
);
}
super
.
saveAfter
(
entity
,
context
);
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/web/PerformAttendAppealController.java
View file @
bfbab3e5
...
...
@@ -87,7 +87,7 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro
this
.
addDict
(
model
,
"ruleId"
,
rulesService
.
find
(
new
PerformRulesQuery
()).
stream
().
collect
(
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getName
(),
(
o
,
n
)
->
n
)));
this
.
addDict
(
model
,
"checkResult"
,
CheckResultEnum
.
getEnumMap
());
//this.addDict(model, "checkResult", CheckResultAddEnum.getEnumMap());
this
.
addDict
(
model
,
"checkStatus"
,
CheckStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"subMethod"
,
SubMethodEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"subAddType"
,
SubAddTypeEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"processStatus"
,
ProcessStatusEnum
.
getEnumMap
());
...
...
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