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
bffd0739
Commit
bffd0739
authored
Apr 29, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效异常信息已读处理
parent
9097aefb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
1 deletion
+101
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformErrorMessageServiceImpl.java
.../perform/service/impl/PerformErrorMessageServiceImpl.java
+20
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/web/PerformErrorMessageController.java
...xhx/module/perform/web/PerformErrorMessageController.java
+81
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformErrorMessageServiceImpl.java
View file @
bffd0739
package
com.mortals.xhx.module.perform.service.impl
;
package
com.mortals.xhx.module.perform.service.impl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.module.perform.dao.PerformErrorMessageDao
;
import
com.mortals.xhx.module.perform.dao.PerformErrorMessageDao
;
import
com.mortals.xhx.module.perform.model.PerformErrorMessageEntity
;
import
com.mortals.xhx.module.perform.model.PerformErrorMessageEntity
;
import
com.mortals.xhx.module.perform.service.PerformErrorMessageService
;
import
com.mortals.xhx.module.perform.service.PerformErrorMessageService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
/**
* PerformErrorMessageService
* PerformErrorMessageService
* 绩效异常信息 service实现
* 绩效异常信息 service实现
...
@@ -17,4 +22,18 @@ import org.springframework.stereotype.Service;
...
@@ -17,4 +22,18 @@ import org.springframework.stereotype.Service;
@Slf4j
@Slf4j
public
class
PerformErrorMessageServiceImpl
extends
AbstractCRUDServiceImpl
<
PerformErrorMessageDao
,
PerformErrorMessageEntity
,
Long
>
implements
PerformErrorMessageService
{
public
class
PerformErrorMessageServiceImpl
extends
AbstractCRUDServiceImpl
<
PerformErrorMessageDao
,
PerformErrorMessageEntity
,
Long
>
implements
PerformErrorMessageService
{
public
PerformErrorMessageEntity
get
(
Long
key
,
Context
context
)
throws
AppException
{
PerformErrorMessageEntity
entity
=
this
.
dao
.
get
(
key
);
if
(
context
!=
null
&&
entity
!=
null
){
Long
staffId
=
context
.
getUser
().
getCustomerId
();
if
(
staffId
!=
null
&&
staffId
==
entity
.
getStaffId
()){
PerformErrorMessageEntity
update
=
new
PerformErrorMessageEntity
();
update
.
setId
(
entity
.
getId
());
update
.
setUpdateTime
(
new
Date
());
update
.
setReadStatus
(
1
);
this
.
dao
.
update
(
update
);
}
}
return
entity
;
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/web/PerformErrorMessageController.java
View file @
bffd0739
package
com.mortals.xhx.module.perform.web
;
package
com.mortals.xhx.module.perform.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
...
@@ -7,10 +9,14 @@ import com.mortals.xhx.common.code.AppealStatusEnum;
...
@@ -7,10 +9,14 @@ import com.mortals.xhx.common.code.AppealStatusEnum;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.CheckStatusEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.SubAddTypeEnum
;
import
com.mortals.xhx.common.code.SubAddTypeEnum
;
import
com.mortals.xhx.module.check.model.*
;
import
com.mortals.xhx.module.check.service.*
;
import
com.mortals.xhx.module.perform.model.PerformErrorMessageEntity
;
import
com.mortals.xhx.module.perform.model.PerformErrorMessageEntity
;
import
com.mortals.xhx.module.perform.service.PerformErrorMessageService
;
import
com.mortals.xhx.module.perform.service.PerformErrorMessageService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -28,6 +34,18 @@ public class PerformErrorMessageController extends BaseCRUDJsonBodyMappingContro
...
@@ -28,6 +34,18 @@ public class PerformErrorMessageController extends BaseCRUDJsonBodyMappingContro
@Autowired
@Autowired
private
ParamService
paramService
;
private
ParamService
paramService
;
@Autowired
private
CheckAttendRecordService
checkAttendRecordService
;
@Autowired
private
CheckEffectRecordService
checkEffectRecordService
;
@Autowired
private
CheckGoworkRecordService
checkGoworkRecordService
;
@Autowired
private
CheckReviewRecordService
checkReviewRecordService
;
@Autowired
private
CheckComplainRecordService
checkComplainRecordService
;
@Autowired
private
CheckOtherRecordService
checkOtherRecordService
;
public
PerformErrorMessageController
(){
public
PerformErrorMessageController
(){
super
.
setModuleDesc
(
"绩效异常信息"
);
super
.
setModuleDesc
(
"绩效异常信息"
);
...
@@ -39,8 +57,71 @@ public class PerformErrorMessageController extends BaseCRUDJsonBodyMappingContro
...
@@ -39,8 +57,71 @@ public class PerformErrorMessageController extends BaseCRUDJsonBodyMappingContro
this
.
addDict
(
model
,
"checkStatus"
,
CheckStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"checkStatus"
,
CheckStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"appealStatus"
,
AppealStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"appealStatus"
,
AppealStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"performType"
,
PerformTypeEnum
.
getEnumMap
(
PerformTypeEnum
.
全部
.
getValue
()));
this
.
addDict
(
model
,
"performType"
,
PerformTypeEnum
.
getEnumMap
(
PerformTypeEnum
.
全部
.
getValue
()));
Map
<
String
,
String
>
data
=
new
HashMap
<>();
data
.
put
(
"0"
,
"未读"
);
data
.
put
(
"1"
,
"已读"
);
this
.
addDict
(
model
,
"readStatus"
,
data
);
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
}
}
@RequestMapping
(
value
=
{
"info"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
@UnAuth
@Override
public
String
info
(
Long
id
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
if
(
id
==
null
)
{
return
this
.
createFailJsonResp
(
"请选择待查看"
+
this
.
getModuleDesc
()
+
"信息"
);
}
else
{
JSONObject
ret
=
new
JSONObject
();
String
busiDesc
=
"查看"
+
this
.
getModuleDesc
();
Context
context
=
this
.
getContext
();
try
{
this
.
infoBefore
(
id
,
model
,
context
);
PerformErrorMessageEntity
entity
=
this
.
service
.
get
(
id
,
context
);
this
.
infoAfter
(
id
,
model
,
entity
,
context
);
if
(
entity
==
null
)
{
throw
new
Exception
(
busiDesc
+
",不存在或已被删除"
);
}
ret
.
put
(
"data"
,
entity
);
if
(
entity
.
getPerformType
().
equals
(
PerformTypeEnum
.
考勤绩效
.
getValue
())){
CheckAttendRecordEntity
checkAttendRecordEntity
=
checkAttendRecordService
.
get
(
entity
.
getCheckRecordId
());
ret
.
put
(
"checkRecordData"
,
checkAttendRecordEntity
);
}
if
(
entity
.
getPerformType
().
equals
(
PerformTypeEnum
.
效能绩效
.
getValue
())){
CheckEffectRecordEntity
checkEffectRecordEntity
=
checkEffectRecordService
.
get
(
entity
.
getCheckRecordId
());
ret
.
put
(
"checkRecordData"
,
checkEffectRecordEntity
);
}
if
(
entity
.
getPerformType
().
equals
(
PerformTypeEnum
.
办件绩效
.
getValue
())){
CheckGoworkRecordEntity
checkGoworkRecordEntity
=
checkGoworkRecordService
.
get
(
entity
.
getCheckRecordId
());
ret
.
put
(
"checkRecordData"
,
checkGoworkRecordEntity
);
}
if
(
entity
.
getPerformType
().
equals
(
PerformTypeEnum
.
评价差评绩效
.
getValue
())){
CheckReviewRecordEntity
checkReviewRecordEntity
=
checkReviewRecordService
.
get
(
entity
.
getCheckRecordId
());
ret
.
put
(
"checkRecordData"
,
checkReviewRecordEntity
);
}
if
(
entity
.
getPerformType
().
equals
(
PerformTypeEnum
.
评价投诉绩效
.
getValue
())){
CheckComplainRecordEntity
checkComplainRecordEntity
=
checkComplainRecordService
.
get
(
entity
.
getCheckRecordId
());
ret
.
put
(
"checkRecordData"
,
checkComplainRecordEntity
);
}
if
(
entity
.
getPerformType
().
equals
(
PerformTypeEnum
.
其它绩效
.
getValue
())){
CheckOtherRecordEntity
checkOtherRecordEntity
=
checkOtherRecordService
.
get
(
entity
.
getCheckRecordId
());
ret
.
put
(
"checkRecordData"
,
checkOtherRecordEntity
);
}
if
(!
ObjectUtils
.
isEmpty
(
context
)
&&
!
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
}
catch
(
Exception
var8
)
{
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var8
);
Object
msg
=
model
.
get
(
"message_info"
);
return
this
.
createFailJsonResp
(
msg
==
null
?
"系统异常"
:
msg
.
toString
());
}
this
.
init
(
model
,
context
);
ret
.
put
(
"code"
,
1
);
ret
.
put
(
"msg"
,
model
.
remove
(
"message_info"
));
ret
.
put
(
"dict"
,
model
.
remove
(
"dict"
));
return
ret
.
toJSONString
();
}
}
}
}
\ No newline at end of file
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