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
1ee96ac7
Commit
1ee96ac7
authored
Jul 15, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ce98e282
3a6b6476
Changes
38
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
1552 additions
and
101 deletions
+1552
-101
attendance-performance-manager/pom.xml
attendance-performance-manager/pom.xml
+4
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/message/MessageService.java
...a/com/mortals/xhx/base/system/message/MessageService.java
+13
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/message/impl/MessageServiceImpl.java
...tals/xhx/base/system/message/impl/MessageServiceImpl.java
+82
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/TestController.java
...r/src/main/java/com/mortals/xhx/busiz/TestController.java
+47
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/ApiWebPerformController.java
...com/mortals/xhx/busiz/h5/web/ApiWebPerformController.java
+17
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
...dule/check/service/impl/CheckAttendRecordServiceImpl.java
+75
-27
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckComplainRecordServiceImpl.java
...le/check/service/impl/CheckComplainRecordServiceImpl.java
+50
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
...dule/check/service/impl/CheckEffectRecordServiceImpl.java
+50
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
...dule/check/service/impl/CheckGoworkRecordServiceImpl.java
+49
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
...odule/check/service/impl/CheckOtherRecordServiceImpl.java
+83
-27
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
...dule/check/service/impl/CheckReviewRecordServiceImpl.java
+32
-30
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/CheckDingMsg.java
...in/java/com/mortals/xhx/module/dingding/CheckDingMsg.java
+26
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/FaceInfo.java
.../mortals/xhx/module/hik/face/model/req/face/FaceInfo.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/FaceListReq.java
...rtals/xhx/module/hik/face/model/req/face/FaceListReq.java
+17
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/FacePic.java
...m/mortals/xhx/module/hik/face/model/req/face/FacePic.java
+11
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/FaceReq.java
...m/mortals/xhx/module/hik/face/model/req/face/FaceReq.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/ResRecognReq.java
...tals/xhx/module/hik/face/model/req/face/ResRecognReq.java
+15
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/group/FaceGroupReq.java
...als/xhx/module/hik/face/model/req/group/FaceGroupReq.java
+14
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/img/ImgReq.java
...com/mortals/xhx/module/hik/face/model/req/img/ImgReq.java
+13
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/plan/PlanRecognListReq.java
...xhx/module/hik/face/model/req/plan/PlanRecognListReq.java
+13
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/plan/PlanRecognReq.java
...als/xhx/module/hik/face/model/req/plan/PlanRecognReq.java
+18
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/plan/TimeBlockListItem.java
...xhx/module/hik/face/model/req/plan/TimeBlockListItem.java
+11
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/plan/TimeRangeItem.java
...als/xhx/module/hik/face/model/req/plan/TimeRangeItem.java
+9
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/resource/ResourceReq.java
...s/xhx/module/hik/face/model/req/resource/ResourceReq.java
+12
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/face/FaceDataInfo.java
...tals/xhx/module/hik/face/model/rsp/face/FaceDataInfo.java
+13
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/face/ResRecognDataInfo.java
...xhx/module/hik/face/model/rsp/face/ResRecognDataInfo.java
+10
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/group/FaceGroupDataInfo.java
...hx/module/hik/face/model/rsp/group/FaceGroupDataInfo.java
+10
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/plan/PlanRecognInfo.java
...ls/xhx/module/hik/face/model/rsp/plan/PlanRecognInfo.java
+22
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/resource/ResourceDataInfo.java
.../module/hik/face/model/rsp/resource/ResourceDataInfo.java
+10
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/service/IHikFaceService.java
.../mortals/xhx/module/hik/face/service/IHikFaceService.java
+115
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/service/IHikPlanService.java
.../mortals/xhx/module/hik/face/service/IHikPlanService.java
+86
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/service/impl/HikFaceServiceImpl.java
.../xhx/module/hik/face/service/impl/HikFaceServiceImpl.java
+304
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/service/impl/HikPlanServiceImpl.java
.../xhx/module/hik/face/service/impl/HikPlanServiceImpl.java
+227
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/model/vo/PerformAttendAppealVo.java
...ls/xhx/module/perform/model/vo/PerformAttendAppealVo.java
+4
-0
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformAttendAppealServiceImpl.java
.../perform/service/impl/PerformAttendAppealServiceImpl.java
+57
-6
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/model/WindowOwnerEntity.java
...om/mortals/xhx/module/window/model/WindowOwnerEntity.java
+1
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowOwnerServiceImpl.java
...hx/module/window/service/impl/WindowOwnerServiceImpl.java
+3
-3
attendance-performance-manager/src/main/resources/bootstrap.yml
...ance-performance-manager/src/main/resources/bootstrap.yml
+1
-0
No files found.
attendance-performance-manager/pom.xml
View file @
1ee96ac7
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
<profiles.log.level>
info
</profiles.log.level>
<profiles.log.level>
info
</profiles.log.level>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.sms.smsSendUrl>
http://127.0.0.1:8089/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.smsSendUrl>
http://127.0.0.1:8089/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
k6BVS1PEbyzcJAE4
</profiles.sms.apiId>
<profiles.sms.apiId>
k6BVS1PEbyzcJAE4
</profiles.sms.apiId>
<profiles.hik.host>
8.136.255.30:8001
</profiles.hik.host>
<profiles.hik.host>
8.136.255.30:8001
</profiles.hik.host>
<profiles.hik.protocol>
http://
</profiles.hik.protocol>
<profiles.hik.protocol>
http://
</profiles.hik.protocol>
...
@@ -39,7 +40,7 @@
...
@@ -39,7 +40,7 @@
<profiles.dingtalk.agentId>
2625340030
</profiles.dingtalk.agentId>
<profiles.dingtalk.agentId>
2625340030
</profiles.dingtalk.agentId>
<profiles.dingtalk.appKey>
dingjcqjqjh1j82ho5zx
</profiles.dingtalk.appKey>
<profiles.dingtalk.appKey>
dingjcqjqjh1j82ho5zx
</profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret>
_wNw2J6sxTYcu3ddNkFlG3U-3UlQ-P_7ufLSJ4wRxgdUflm3lPf8LIODCQOGkydy
</profiles.dingtalk.appSecret>
<profiles.dingtalk.appSecret>
_wNw2J6sxTYcu3ddNkFlG3U-3UlQ-P_7ufLSJ4wRxgdUflm3lPf8LIODCQOGkydy
</profiles.dingtalk.appSecret>
<profiles.webUrl>
http://8.136.255.30:11039/attendance
</profiles.webUrl>
<package.environment>
serve
</package.environment>
<package.environment>
serve
</package.environment>
<skipUi>
false
</skipUi>
<skipUi>
false
</skipUi>
</properties>
</properties>
...
@@ -70,7 +71,7 @@
...
@@ -70,7 +71,7 @@
<profiles.dingtalk.agentId>
2652674890
</profiles.dingtalk.agentId>
<profiles.dingtalk.agentId>
2652674890
</profiles.dingtalk.agentId>
<profiles.dingtalk.appKey>
dingpqzradgfr4efdi2j
</profiles.dingtalk.appKey>
<profiles.dingtalk.appKey>
dingpqzradgfr4efdi2j
</profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret>
bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd
</profiles.dingtalk.appSecret>
<profiles.dingtalk.appSecret>
bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd
</profiles.dingtalk.appSecret>
<profiles.webUrl>
http://8.136.255.30:11039/attendance
</profiles.webUrl>
<package.environment>
test
</package.environment>
<package.environment>
test
</package.environment>
<skipUi>
false
</skipUi>
<skipUi>
false
</skipUi>
</properties>
</properties>
...
@@ -98,7 +99,7 @@
...
@@ -98,7 +99,7 @@
<profiles.dingtalk.agentId>
2652674890
</profiles.dingtalk.agentId>
<profiles.dingtalk.agentId>
2652674890
</profiles.dingtalk.agentId>
<profiles.dingtalk.appKey>
dingpqzradgfr4efdi2j
</profiles.dingtalk.appKey>
<profiles.dingtalk.appKey>
dingpqzradgfr4efdi2j
</profiles.dingtalk.appKey>
<profiles.dingtalk.appSecret>
bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd
</profiles.dingtalk.appSecret>
<profiles.dingtalk.appSecret>
bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd
</profiles.dingtalk.appSecret>
<profiles.webUrl>
http://112.19.80.237:11039/attendance
</profiles.webUrl>
<package.environment>
build
</package.environment>
<package.environment>
build
</package.environment>
<skipUi>
false
</skipUi>
<skipUi>
false
</skipUi>
</properties>
</properties>
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/message/MessageService.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.base.system.message
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
public
interface
MessageService
{
Rest
<
String
>
sendDingTalkWorkMsg
(
CheckDingMsg
checkDingMsg
);
Rest
<
String
>
sendDingTalkAppealMsg
(
CheckDingMsg
checkDingMsg
);
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/message/impl/MessageServiceImpl.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.base.system.message.impl
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.common.code.AppealResultEnum
;
import
com.mortals.xhx.common.code.SubAddTypeEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
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.Text
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
@Service
(
"messageService"
)
@Slf4j
public
class
MessageServiceImpl
implements
MessageService
{
@Value
(
"${webUrl:''}"
)
private
String
webUrl
;
@Autowired
private
IDingPersonService
dingPersonService
;
@Override
public
Rest
<
String
>
sendDingTalkWorkMsg
(
CheckDingMsg
dingMsg
)
{
WorkMsgReq
workMsgReq
=
new
WorkMsgReq
();
Msg
msg
=
new
Msg
();
msg
.
setMsgtype
(
"link"
);
Link
link
=
new
Link
();
link
.
setPicUrl
(
""
);
link
.
setMessageUrl
(
"webUrl"
+
dingMsg
.
getPath
());
if
(
SubAddTypeEnum
.
增加
.
getValue
()
==
dingMsg
.
getSubAddType
())
{
link
.
setText
(
String
.
format
(
"你好,经人工核实后你在%%-%s"
+
",系统自动增加绩效%s分,如有情况说明请及时向管理人员提交申诉处理,感谢你的配合。"
,
dingMsg
.
getDateTime
(),
dingMsg
.
getRuleStr
(),
dingMsg
.
getScore
()));
}
else
{
link
.
setText
(
String
.
format
(
"你好,经人工核实后你在%s违反%s"
+
",系统自动扣除绩效%s分,如有情况说明请及时向管理人员提交申诉处理,感谢你的配合。"
,
dingMsg
.
getDateTime
(),
dingMsg
.
getRuleStr
(),
dingMsg
.
getScore
()));
}
link
.
setTitle
(
String
.
format
(
"%s考核核查通知"
,
dingMsg
.
getPerformTypeStr
()));
msg
.
setLink
(
link
);
workMsgReq
.
setUseridList
(
dingMsg
.
getUserIds
());
Rest
<
String
>
sendWorkRest
=
dingPersonService
.
sendWorkMsg
(
workMsgReq
);
if
(
YesNoEnum
.
YES
.
getValue
()
==
sendWorkRest
.
getCode
())
{
String
requestId
=
sendWorkRest
.
getData
();
return
Rest
.
ok
(
requestId
);
}
else
{
log
.
error
(
"发送工作消息失败,msg:{}"
,
sendWorkRest
.
getMsg
());
return
Rest
.
fail
(
sendWorkRest
.
getMsg
());
}
}
@Override
public
Rest
<
String
>
sendDingTalkAppealMsg
(
CheckDingMsg
dingMsg
)
{
WorkMsgReq
workMsgReq
=
new
WorkMsgReq
();
Msg
msg
=
new
Msg
();
msg
.
setMsgtype
(
"text"
);
Text
text
=
new
Text
();
if
(
AppealResultEnum
.
通过
.
getValue
()
==
dingMsg
.
getAppealResult
())
{
text
.
setContent
(
String
.
format
(
"你好,你申诉的在%s违反%s,经人工核查后情况属实,本次申诉成功,将撤销之前的扣除绩效%s。"
,
dingMsg
.
getDateTime
(),
dingMsg
.
getRuleStr
(),
dingMsg
.
getScore
()));
}
else
{
text
.
setContent
(
String
.
format
(
"你好,你申诉的在%s违反%s,经人工核查后情况仍继续扣除%s。本次申诉失败,原因:%s,如有疑问请联系相关负责人。"
,
dingMsg
.
getDateTime
(),
dingMsg
.
getRuleStr
(),
dingMsg
.
getScore
(),
dingMsg
.
getAppealDesc
()));
}
msg
.
setText
(
text
);
workMsgReq
.
setUseridList
(
dingMsg
.
getUserIds
());
Rest
<
String
>
sendWorkRest
=
dingPersonService
.
sendWorkMsg
(
workMsgReq
);
if
(
YesNoEnum
.
YES
.
getValue
()
==
sendWorkRest
.
getCode
())
{
String
requestId
=
sendWorkRest
.
getData
();
return
Rest
.
ok
(
requestId
);
}
else
{
log
.
error
(
"发送工作消息失败,msg:{}"
,
sendWorkRest
.
getMsg
());
return
Rest
.
fail
(
sendWorkRest
.
getMsg
());
}
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/TestController.java
View file @
1ee96ac7
package
com.mortals.xhx.busiz
;
package
com.mortals.xhx.busiz
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.json.JSON
;
import
cn.hutool.json.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.utils.ServletUtils
;
import
com.mortals.xhx.base.system.idgenerator.service.IdgeneratorService
;
import
com.mortals.xhx.base.system.idgenerator.service.IdgeneratorService
;
import
com.mortals.xhx.base.system.upload.service.UploadService
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.hik.face.model.req.img.ImgReq
;
import
com.mortals.xhx.module.hik.face.service.IHikFaceService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffQuery
;
import
com.mortals.xhx.module.staff.model.StaffQuery
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
...
@@ -19,7 +27,10 @@ import org.springframework.util.ObjectUtils;
...
@@ -19,7 +27,10 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.ByteArrayInputStream
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -46,6 +57,10 @@ public class TestController {
...
@@ -46,6 +57,10 @@ public class TestController {
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
@Autowired
private
UserService
userService
;
private
UserService
userService
;
@Autowired
private
IHikFaceService
faceService
;
@Autowired
private
UploadService
uploadService
;
// @GetMapping("webservice")@GetMapping("idGens")
// @GetMapping("webservice")@GetMapping("idGens")
...
@@ -92,15 +107,15 @@ public class TestController {
...
@@ -92,15 +107,15 @@ public class TestController {
}
}
}
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
updateList
))
{
if
(!
ObjectUtils
.
isEmpty
(
updateList
))
{
log
.
info
(
"更新数量:"
+
updateList
.
size
());
log
.
info
(
"更新数量:"
+
updateList
.
size
());
for
(
StaffEntity
staffEntity
:
updateList
)
{
for
(
StaffEntity
staffEntity
:
updateList
)
{
staffService
.
update
(
staffEntity
);
staffService
.
update
(
staffEntity
);
//更新绑定的系统用户手机号码
//更新绑定的系统用户手机号码
UserQuery
userQuery
=
new
UserQuery
();
UserQuery
userQuery
=
new
UserQuery
();
userQuery
.
setCustomerId
(
staffEntity
.
getId
());
userQuery
.
setCustomerId
(
staffEntity
.
getId
());
UserEntity
userEntity
=
userService
.
selectOne
(
userQuery
);
UserEntity
userEntity
=
userService
.
selectOne
(
userQuery
);
if
(
userEntity
!=
null
)
{
if
(
userEntity
!=
null
)
{
Map
<
String
,
Object
>
condition
=
new
HashMap
<>(
1
);
Map
<
String
,
Object
>
condition
=
new
HashMap
<>(
1
);
condition
.
put
(
"id"
,
userEntity
.
getId
());
condition
.
put
(
"id"
,
userEntity
.
getId
());
Map
<
String
,
Object
>
data
=
new
HashMap
<>(
1
);
Map
<
String
,
Object
>
data
=
new
HashMap
<>(
1
);
...
@@ -110,7 +125,35 @@ public class TestController {
...
@@ -110,7 +125,35 @@ public class TestController {
}
}
}
}
return
"更新数量:"
+
updateList
.
size
();
return
"更新数量:"
+
updateList
.
size
();
}
@GetMapping
(
"downPersonsPic"
)
@UnAuth
public
String
downPersonsPic
()
{
List
<
StaffEntity
>
staffEntities
=
staffService
.
find
(
new
StaffQuery
());
ArrayList
<
StaffEntity
>
updateList
=
new
ArrayList
<>();
for
(
StaffEntity
staffEntity
:
staffEntities
)
{
if
(!
ObjectUtils
.
isEmpty
(
staffEntity
.
getPicUri
()))
{
ImgReq
imgReq
=
new
ImgReq
();
imgReq
.
setUrl
(
staffEntity
.
getPicUri
());
Rest
<
String
>
rest
=
faceService
.
downloadPicture
(
imgReq
);
if
(
YesNoEnum
.
YES
.
getValue
()
==
rest
.
getCode
())
{
byte
[]
bytes
=
Base64
.
decode
(
rest
.
getData
());
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
bytes
))
{
InputStream
inputStream
=
new
ByteArrayInputStream
(
bytes
);
MultipartFile
file
=
ServletUtils
.
getMultipartFile
(
inputStream
,
"snap.jpg"
);
String
filePath
=
uploadService
.
saveFileUpload
(
file
,
"file/fileupload/snap/"
+
DateUtil
.
today
(),
null
);
staffEntity
.
setPhotoPath
(
filePath
);
updateList
.
add
(
staffEntity
);
}
}
}
}
return
"更新数量:"
+
updateList
.
size
();
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/busiz/h5/web/ApiWebPerformController.java
View file @
1ee96ac7
...
@@ -42,6 +42,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
...
@@ -42,6 +42,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
private
PerformRulesService
rulesService
;
private
PerformRulesService
rulesService
;
@Autowired
@Autowired
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
private
PerformRulesCategoryService
categoryService
;
/**
/**
...
@@ -219,6 +221,11 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
...
@@ -219,6 +221,11 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity
.
setDeductTime
(
new
Date
());
recordEntity
.
setDeductTime
(
new
Date
());
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateTime
(
new
Date
());
recordEntity
.
setCreateTime
(
new
Date
());
PerformRulesCategoryEntity
categoryEntity
=
categoryService
.
get
(
rule
.
getCategoryId
());
recordEntity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getName
());
PerformAttendRecordEntity
save
=
attendRecordService
.
save
(
recordEntity
);
PerformAttendRecordEntity
save
=
attendRecordService
.
save
(
recordEntity
);
return
save
.
newEntity
();
return
save
.
newEntity
();
...
@@ -249,6 +256,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
...
@@ -249,6 +256,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity
.
setDeductTime
(
new
Date
());
recordEntity
.
setDeductTime
(
new
Date
());
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateTime
(
new
Date
());
recordEntity
.
setCreateTime
(
new
Date
());
PerformRulesCategoryEntity
categoryEntity
=
categoryService
.
get
(
rule
.
getCategoryId
());
recordEntity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getName
());
PerformReviewRecordEntity
save
=
reviewRecordService
.
save
(
recordEntity
);
PerformReviewRecordEntity
save
=
reviewRecordService
.
save
(
recordEntity
);
return
save
.
newEntity
();
return
save
.
newEntity
();
...
@@ -278,6 +287,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
...
@@ -278,6 +287,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateTime
(
new
Date
());
recordEntity
.
setCreateTime
(
new
Date
());
PerformRulesCategoryEntity
categoryEntity
=
categoryService
.
get
(
rule
.
getCategoryId
());
recordEntity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getName
());
PerformComplainRecordEntity
save
=
complainRecordService
.
save
(
recordEntity
);
PerformComplainRecordEntity
save
=
complainRecordService
.
save
(
recordEntity
);
return
save
.
newEntity
();
return
save
.
newEntity
();
...
@@ -307,6 +318,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
...
@@ -307,6 +318,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateTime
(
new
Date
());
recordEntity
.
setCreateTime
(
new
Date
());
PerformRulesCategoryEntity
categoryEntity
=
categoryService
.
get
(
rule
.
getCategoryId
());
recordEntity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getName
());
PerformGoworkRecordEntity
save
=
performGoworkRecordService
.
save
(
recordEntity
);
PerformGoworkRecordEntity
save
=
performGoworkRecordService
.
save
(
recordEntity
);
return
save
.
newEntity
();
return
save
.
newEntity
();
...
@@ -336,6 +349,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
...
@@ -336,6 +349,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateTime
(
new
Date
());
recordEntity
.
setCreateTime
(
new
Date
());
PerformRulesCategoryEntity
categoryEntity
=
categoryService
.
get
(
rule
.
getCategoryId
());
recordEntity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getName
());
PerformEffectRecordEntity
save
=
effectRecordService
.
save
(
recordEntity
);
PerformEffectRecordEntity
save
=
effectRecordService
.
save
(
recordEntity
);
return
save
.
newEntity
();
return
save
.
newEntity
();
}
}
...
@@ -366,6 +381,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
...
@@ -366,6 +381,8 @@ public class ApiWebPerformController extends AbstractBaseController<PerformReq>
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateUserId
(
1L
);
recordEntity
.
setCreateTime
(
new
Date
());
recordEntity
.
setCreateTime
(
new
Date
());
PerformRulesCategoryEntity
categoryEntity
=
categoryService
.
get
(
rule
.
getCategoryId
());
recordEntity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getName
());
PerformOtherRecordEntity
save
=
otherRecordService
.
save
(
recordEntity
);
PerformOtherRecordEntity
save
=
otherRecordService
.
save
(
recordEntity
);
return
save
.
newEntity
();
return
save
.
newEntity
();
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckAttendRecordServiceImpl.java
View file @
1ee96ac7
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckComplainRecordServiceImpl.java
View file @
1ee96ac7
package
com.mortals.xhx.module.check.service.impl
;
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
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.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.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckComplainRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckComplainRecordDao
;
import
com.mortals.xhx.module.check.model.CheckComplainRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckComplainRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.service.CheckComplainRecordService
;
import
com.mortals.xhx.module.check.service.CheckComplainRecordService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -41,9 +53,20 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
...
@@ -41,9 +53,20 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
@Autowired
@Autowired
private
StaffPerformSummaryService
staffPerformSummaryService
;
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Autowired
private
IDingPersonService
dingPersonService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
MessageService
messageService
;
@Override
@Override
protected
void
saveAfter
(
CheckComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
//发送钉钉通知信息
if
(
SubMethodEnum
.
系统自动
.
getValue
()
==
entity
.
getSubMethod
())
{
sendCheckDingTalk
(
entity
);
}
try
{
try
{
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setStaffId
(
entity
.
getStaffId
());
...
@@ -55,6 +78,32 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
...
@@ -55,6 +78,32 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
}
}
}
}
private
void
sendCheckDingTalk
(
CheckComplainRecordEntity
entity
)
{
String
ruleStr
=
String
.
format
(
"%s/%s/%s"
,
PerformTypeEnum
.
评价投诉绩效
.
getDesc
(),
entity
.
getCategoryName
(),
entity
.
getRuleName
());
//绩效核查通知
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
if
(!
ObjectUtils
.
isEmpty
(
staffCache
))
{
Rest
<
String
>
personRest
=
dingPersonService
.
getPersonByMobile
(
staffCache
.
getPhoneNumber
());
if
(
YesNoEnum
.
YES
.
getValue
()
==
personRest
.
getCode
())
{
CheckDingMsg
checkDingMsg
=
new
CheckDingMsg
();
checkDingMsg
.
setUserIds
(
personRest
.
getData
());
checkDingMsg
.
setDateTime
(
DateUtil
.
formatDateTime
(
entity
.
getComplainTime
()
==
null
?
new
Date
()
:
entity
.
getComplainTime
()));
checkDingMsg
.
setRuleStr
(
ruleStr
);
checkDingMsg
.
setPerformTypeStr
(
PerformTypeEnum
.
评价投诉绩效
.
getDesc
());
checkDingMsg
.
setScore
(
entity
.
getScore
().
toString
());
checkDingMsg
.
setSubAddType
(
entity
.
getSubAddType
());
checkDingMsg
.
setPath
(
String
.
format
(
"/api/v1/perform/info?id=%s&&performType=complain"
,
entity
.
getId
()));
Rest
<
String
>
msgRest
=
messageService
.
sendDingTalkWorkMsg
(
checkDingMsg
);
}
else
{
log
.
error
(
"根据手机号码获取人员错误,msg:{}"
,
personRest
.
getMsg
());
}
}
else
{
log
.
error
(
"员工未找到,staffId:{}"
,
entity
.
getStaffId
());
}
}
@Override
@Override
public
void
examine
(
CheckComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
public
void
examine
(
CheckComplainRecordEntity
entity
,
Context
context
)
throws
AppException
{
if
(
entity
.
getId
()==
null
){
if
(
entity
.
getId
()==
null
){
...
@@ -69,6 +118,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
...
@@ -69,6 +118,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
dao
.
update
(
entity
);
sendCheckDingTalk
(
entity
);
try
{
try
{
CheckComplainRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
CheckComplainRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(
temp
!=
null
)
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckEffectRecordServiceImpl.java
View file @
1ee96ac7
package
com.mortals.xhx.module.check.service.impl
;
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
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.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.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckEffectRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckEffectRecordDao
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckEffectRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.service.CheckEffectRecordService
;
import
com.mortals.xhx.module.check.service.CheckEffectRecordService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -41,9 +53,20 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
...
@@ -41,9 +53,20 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
@Autowired
@Autowired
private
StaffPerformSummaryService
staffPerformSummaryService
;
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Autowired
private
IDingPersonService
dingPersonService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
MessageService
messageService
;
@Override
@Override
protected
void
saveAfter
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
//发送钉钉通知信息
if
(
SubMethodEnum
.
系统自动
.
getValue
()
==
entity
.
getSubMethod
())
{
sendCheckDingTalk
(
entity
);
}
try
{
try
{
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setStaffId
(
entity
.
getStaffId
());
...
@@ -55,6 +78,32 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
...
@@ -55,6 +78,32 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
}
}
}
}
private
void
sendCheckDingTalk
(
CheckEffectRecordEntity
entity
)
{
String
ruleStr
=
String
.
format
(
"%s/%s/%s"
,
PerformTypeEnum
.
效能绩效
.
getDesc
(),
entity
.
getCategoryName
(),
entity
.
getRuleName
());
//绩效核查通知
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
if
(!
ObjectUtils
.
isEmpty
(
staffCache
))
{
Rest
<
String
>
personRest
=
dingPersonService
.
getPersonByMobile
(
staffCache
.
getPhoneNumber
());
if
(
YesNoEnum
.
YES
.
getValue
()
==
personRest
.
getCode
())
{
CheckDingMsg
checkDingMsg
=
new
CheckDingMsg
();
checkDingMsg
.
setUserIds
(
personRest
.
getData
());
checkDingMsg
.
setDateTime
(
DateUtil
.
formatDateTime
(
entity
.
getHappenTime
()
==
null
?
new
Date
()
:
entity
.
getHappenTime
()));
checkDingMsg
.
setRuleStr
(
ruleStr
);
checkDingMsg
.
setPerformTypeStr
(
PerformTypeEnum
.
办件绩效
.
getDesc
());
checkDingMsg
.
setScore
(
entity
.
getScore
().
toString
());
checkDingMsg
.
setSubAddType
(
entity
.
getSubAddType
());
checkDingMsg
.
setPath
(
String
.
format
(
"/api/v1/perform/info?id=%s&&performType=effect"
,
entity
.
getId
()));
Rest
<
String
>
msgRest
=
messageService
.
sendDingTalkWorkMsg
(
checkDingMsg
);
}
else
{
log
.
error
(
"根据手机号码获取人员错误,msg:{}"
,
personRest
.
getMsg
());
}
}
else
{
log
.
error
(
"员工未找到,staffId:{}"
,
entity
.
getStaffId
());
}
}
@Override
@Override
public
void
examine
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
public
void
examine
(
CheckEffectRecordEntity
entity
,
Context
context
)
throws
AppException
{
if
(
entity
.
getId
()==
null
){
if
(
entity
.
getId
()==
null
){
...
@@ -69,6 +118,7 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
...
@@ -69,6 +118,7 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
dao
.
update
(
entity
);
sendCheckDingTalk
(
entity
);
try
{
try
{
CheckEffectRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
CheckEffectRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(
temp
!=
null
)
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckGoworkRecordServiceImpl.java
View file @
1ee96ac7
package
com.mortals.xhx.module.check.service.impl
;
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
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.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.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.dao.CheckGoworkRecordDao
;
import
com.mortals.xhx.module.check.dao.CheckGoworkRecordDao
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckGoworkRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.service.CheckGoworkRecordService
;
import
com.mortals.xhx.module.check.service.CheckGoworkRecordService
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -41,9 +53,20 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
...
@@ -41,9 +53,20 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
@Autowired
@Autowired
private
StaffPerformSummaryService
staffPerformSummaryService
;
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Autowired
private
IDingPersonService
dingPersonService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
MessageService
messageService
;
@Override
@Override
protected
void
saveAfter
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
//发送钉钉通知信息
if
(
SubMethodEnum
.
系统自动
.
getValue
()
==
entity
.
getSubMethod
())
{
sendCheckDingTalk
(
entity
);
}
try
{
try
{
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setStaffId
(
entity
.
getStaffId
());
...
@@ -55,6 +78,30 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
...
@@ -55,6 +78,30 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
}
}
}
}
private
void
sendCheckDingTalk
(
CheckGoworkRecordEntity
entity
)
{
String
ruleStr
=
String
.
format
(
"%s/%s/%s"
,
PerformTypeEnum
.
办件绩效
.
getDesc
(),
entity
.
getCategoryName
(),
entity
.
getRuleName
());
//绩效核查通知
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
if
(!
ObjectUtils
.
isEmpty
(
staffCache
))
{
Rest
<
String
>
personRest
=
dingPersonService
.
getPersonByMobile
(
staffCache
.
getPhoneNumber
());
if
(
YesNoEnum
.
YES
.
getValue
()
==
personRest
.
getCode
())
{
CheckDingMsg
checkDingMsg
=
new
CheckDingMsg
();
checkDingMsg
.
setUserIds
(
personRest
.
getData
());
checkDingMsg
.
setDateTime
(
DateUtil
.
formatDateTime
(
entity
.
getGoworkTime
()
==
null
?
new
Date
()
:
entity
.
getGoworkTime
()));
checkDingMsg
.
setRuleStr
(
ruleStr
);
checkDingMsg
.
setPerformTypeStr
(
PerformTypeEnum
.
办件绩效
.
getDesc
());
checkDingMsg
.
setScore
(
entity
.
getScore
().
toString
());
checkDingMsg
.
setSubAddType
(
entity
.
getSubAddType
());
checkDingMsg
.
setPath
(
String
.
format
(
"/api/v1/perform/info?id=%s&&performType=gowork"
,
entity
.
getId
()));
Rest
<
String
>
msgRest
=
messageService
.
sendDingTalkWorkMsg
(
checkDingMsg
);
}
else
{
log
.
error
(
"根据手机号码获取人员错误,msg:{}"
,
personRest
.
getMsg
());
}
}
else
{
log
.
error
(
"员工未找到,staffId:{}"
,
entity
.
getStaffId
());
}
}
@Override
@Override
public
void
examine
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
public
void
examine
(
CheckGoworkRecordEntity
entity
,
Context
context
)
throws
AppException
{
if
(
entity
.
getId
()==
null
){
if
(
entity
.
getId
()==
null
){
...
@@ -69,6 +116,8 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
...
@@ -69,6 +116,8 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
dao
.
update
(
entity
);
//发送钉钉通知信息
sendCheckDingTalk
(
entity
);
try
{
try
{
CheckGoworkRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
CheckGoworkRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(
temp
!=
null
)
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckOtherRecordServiceImpl.java
View file @
1ee96ac7
package
com.mortals.xhx.module.check.service.impl
;
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
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.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.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
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.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.model.StaffPerformSummaryQuery
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffPerformSummaryService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,6 +32,7 @@ import com.mortals.xhx.module.check.dao.CheckOtherRecordDao;
...
@@ -20,6 +32,7 @@ import com.mortals.xhx.module.check.dao.CheckOtherRecordDao;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.model.CheckOtherRecordEntity
;
import
com.mortals.xhx.module.check.service.CheckOtherRecordService
;
import
com.mortals.xhx.module.check.service.CheckOtherRecordService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -28,12 +41,12 @@ import java.util.Date;
...
@@ -28,12 +41,12 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
/**
/**
* CheckOtherRecordService
* CheckOtherRecordService
* 其它绩效核查信息 service实现
* 其它绩效核查信息 service实现
*
*
* @author zxfei
* @author zxfei
* @date 2023-07-11
* @date 2023-07-11
*/
*/
@Service
(
"checkOtherRecordService"
)
@Service
(
"checkOtherRecordService"
)
@Slf4j
@Slf4j
public
class
CheckOtherRecordServiceImpl
extends
AbstractCRUDServiceImpl
<
CheckOtherRecordDao
,
CheckOtherRecordEntity
,
Long
>
implements
CheckOtherRecordService
{
public
class
CheckOtherRecordServiceImpl
extends
AbstractCRUDServiceImpl
<
CheckOtherRecordDao
,
CheckOtherRecordEntity
,
Long
>
implements
CheckOtherRecordService
{
...
@@ -41,25 +54,65 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -41,25 +54,65 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
@Autowired
@Autowired
private
StaffPerformSummaryService
staffPerformSummaryService
;
private
StaffPerformSummaryService
staffPerformSummaryService
;
@Autowired
private
IDingPersonService
dingPersonService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
MessageService
messageService
;
@Override
@Override
protected
void
saveAfter
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
try
{
//发送钉钉通知信息
if
(
SubMethodEnum
.
系统自动
.
getValue
()
==
entity
.
getSubMethod
())
{
sendCheckDingTalk
(
entity
);
}
try
{
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setStaffId
(
entity
.
getStaffId
());
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeStart
(
DateUtils
.
getStrDate
(
entity
.
getCheckTime
()));
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
query
.
setCheckTimeEnd
(
query
.
getCheckTimeStart
());
summaryCheck
(
query
);
summaryCheck
(
query
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
)
{
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
}
private
void
sendCheckDingTalk
(
CheckOtherRecordEntity
entity
)
{
String
ruleStr
=
String
.
format
(
"%s/%s/%s"
,
PerformTypeEnum
.
其它绩效
.
getDesc
(),
entity
.
getCategoryName
(),
entity
.
getRuleName
());
//绩效核查通知
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
if
(!
ObjectUtils
.
isEmpty
(
staffCache
))
{
Rest
<
String
>
personRest
=
dingPersonService
.
getPersonByMobile
(
staffCache
.
getPhoneNumber
());
if
(
YesNoEnum
.
YES
.
getValue
()
==
personRest
.
getCode
())
{
CheckDingMsg
checkDingMsg
=
new
CheckDingMsg
();
checkDingMsg
.
setUserIds
(
personRest
.
getData
());
checkDingMsg
.
setDateTime
(
DateUtil
.
formatDateTime
(
entity
.
getHappenTime
()
==
null
?
new
Date
()
:
entity
.
getHappenTime
()));
checkDingMsg
.
setRuleStr
(
ruleStr
);
checkDingMsg
.
setPerformTypeStr
(
PerformTypeEnum
.
评价差评绩效
.
getDesc
());
checkDingMsg
.
setScore
(
entity
.
getScore
().
toString
());
checkDingMsg
.
setSubAddType
(
entity
.
getSubAddType
());
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
());
}
}
else
{
log
.
error
(
"员工未找到,staffId:{}"
,
entity
.
getStaffId
());
}
}
}
}
@Override
@Override
public
void
examine
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
public
void
examine
(
CheckOtherRecordEntity
entity
,
Context
context
)
throws
AppException
{
if
(
entity
.
getId
()==
null
)
{
if
(
entity
.
getId
()
==
null
)
{
throw
new
AppException
(
"核查记录ID不能为空"
);
throw
new
AppException
(
"核查记录ID不能为空"
);
}
}
if
(
context
!=
null
&&
context
.
getUser
()
!=
null
)
{
if
(
context
!=
null
&&
context
.
getUser
()
!=
null
)
{
IUser
user
=
context
.
getUser
();
IUser
user
=
context
.
getUser
();
entity
.
setUpdateUserId
(
user
.
getId
());
entity
.
setUpdateUserId
(
user
.
getId
());
entity
.
setCheckPerson
(
user
.
getRealName
());
entity
.
setCheckPerson
(
user
.
getRealName
());
...
@@ -68,23 +121,26 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -68,23 +121,26 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
dao
.
update
(
entity
);
try
{
//发送钉钉通知信息
sendCheckDingTalk
(
entity
);
try
{
CheckOtherRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
CheckOtherRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(
temp
!=
null
)
{
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
StaffCheckSummaryQuery
query
=
new
StaffCheckSummaryQuery
();
query
.
setStaffId
(
temp
.
getStaffId
());
query
.
setStaffId
(
temp
.
getStaffId
());
summaryCheck
(
query
);
summaryCheck
(
query
);
}
}
}
catch
(
Exception
e
){
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"汇总已审核的核查记录出错"
,
e
);
}
}
}
}
@Override
@Override
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
{
public
List
<
StaffCheckSummaryVo
>
summaryCheck
(
StaffCheckSummaryQuery
query
)
throws
AppException
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
if
(
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
())
||
StringUtils
.
isEmpty
(
query
.
getCheckTimeStart
()))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
String
startTime
=
format
.
format
(
calendar
.
getTime
());
String
startTime
=
format
.
format
(
calendar
.
getTime
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
...
@@ -93,27 +149,27 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -93,27 +149,27 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
query
.
setCheckTimeEnd
(
endTime
);
query
.
setCheckTimeEnd
(
endTime
);
}
}
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
List
<
StaffCheckSummaryVo
>
summaryVoList
=
dao
.
summaryCheck
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
summaryVoList
))
{
for
(
StaffCheckSummaryVo
vo:
summaryVoList
)
{
for
(
StaffCheckSummaryVo
vo
:
summaryVoList
)
{
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
StaffPerformSummaryEntity
staffPerformSummaryEntity
=
new
StaffPerformSummaryEntity
();
BeanUtils
.
copyProperties
(
vo
,
staffPerformSummaryEntity
,
BeanUtil
.
getNullPropertyNames
(
vo
));
BeanUtils
.
copyProperties
(
vo
,
staffPerformSummaryEntity
,
BeanUtil
.
getNullPropertyNames
(
vo
));
staffPerformSummaryEntity
.
setOtherScore
(
vo
.
getSumScore
());
staffPerformSummaryEntity
.
setOtherScore
(
vo
.
getSumScore
());
StaffPerformSummaryQuery
summaryQuery
=
new
StaffPerformSummaryQuery
();
StaffPerformSummaryQuery
summaryQuery
=
new
StaffPerformSummaryQuery
();
summaryQuery
.
setStaffId
(
vo
.
getStaffId
());
summaryQuery
.
setStaffId
(
vo
.
getStaffId
());
summaryQuery
.
setYear
(
vo
.
getYear
());
summaryQuery
.
setYear
(
vo
.
getYear
());
summaryQuery
.
setMonth
(
vo
.
getMonth
());
summaryQuery
.
setMonth
(
vo
.
getMonth
());
StaffPerformSummaryEntity
temp
=
staffPerformSummaryService
.
selectOne
(
summaryQuery
);
StaffPerformSummaryEntity
temp
=
staffPerformSummaryService
.
selectOne
(
summaryQuery
);
if
(
temp
!=
null
)
{
if
(
temp
!=
null
)
{
if
(
temp
.
getReviewScore
()==
null
)
{
if
(
temp
.
getReviewScore
()
==
null
)
{
staffPerformSummaryEntity
.
setReviewScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setReviewScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getAttendScore
()==
null
)
{
if
(
temp
.
getAttendScore
()
==
null
)
{
staffPerformSummaryEntity
.
setAttendScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setAttendScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getGoworkScore
()==
null
)
{
if
(
temp
.
getGoworkScore
()
==
null
)
{
staffPerformSummaryEntity
.
setGoworkScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setGoworkScore
(
new
BigDecimal
(
0
));
}
}
if
(
temp
.
getEffectScore
()==
null
)
{
if
(
temp
.
getEffectScore
()
==
null
)
{
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setEffectScore
(
new
BigDecimal
(
0
));
}
}
BigDecimal
erro
=
new
BigDecimal
(
0
);
BigDecimal
erro
=
new
BigDecimal
(
0
);
...
@@ -131,7 +187,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
...
@@ -131,7 +187,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setId
(
temp
.
getId
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryEntity
.
setUpdateTime
(
new
Date
());
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
staffPerformSummaryService
.
update
(
staffPerformSummaryEntity
);
}
else
{
}
else
{
staffPerformSummaryEntity
.
setAttendScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setAttendScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setReviewScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setReviewScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setGoworkScore
(
new
BigDecimal
(
0
));
staffPerformSummaryEntity
.
setGoworkScore
(
new
BigDecimal
(
0
));
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
View file @
1ee96ac7
package
com.mortals.xhx.module.check.service.impl
;
package
com.mortals.xhx.module.check.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.StringUtils
;
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.CheckStatusEnum
;
import
com.mortals.xhx.common.code.PerformTypeEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.SubMethodEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.Link
;
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.Msg
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
...
@@ -55,6 +59,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
...
@@ -55,6 +59,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
private
IDingPersonService
dingPersonService
;
private
IDingPersonService
dingPersonService
;
@Autowired
@Autowired
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
private
MessageService
messageService
;
@Override
@Override
...
@@ -70,44 +76,38 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
...
@@ -70,44 +76,38 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
}
}
//发送钉钉通知信息
//发送钉钉通知信息
if
(
SubMethodEnum
.
系统自动
.
getValue
()
==
entity
.
getSubMethod
())
{
if
(
SubMethodEnum
.
系统自动
.
getValue
()
==
entity
.
getSubMethod
())
{
//绩效核查通知
sendCheckDingTalk
(
entity
);
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
}
if
(!
ObjectUtils
.
isEmpty
(
staffCache
))
{
Rest
<
String
>
personRest
=
dingPersonService
.
getPersonByMobile
(
staffCache
.
getPhoneNumber
());
if
(
YesNoEnum
.
YES
.
getValue
()
==
personRest
.
getCode
())
{
WorkMsgReq
workMsgReq
=
new
WorkMsgReq
();
Msg
msg
=
new
Msg
();
msg
.
setMsgtype
(
"link"
);
Link
link
=
new
Link
();
link
.
setPicUrl
(
"测试图片链接"
);
link
.
setMessageUrl
(
"http://www.baidu.com"
);
link
.
setText
(
"你有一条绩效考核核查通知,请及时查看!"
);
link
.
setTitle
(
"绩效考核核查通知"
);
msg
.
setLink
(
link
);
workMsgReq
.
setUseridList
(
personRest
.
getMsg
());
}
Rest
<
String
>
sendWorkRest
=
dingPersonService
.
sendWorkMsg
(
workMsgReq
);
if
(
YesNoEnum
.
YES
.
getValue
()
==
sendWorkRest
.
getCode
())
{
String
requestId
=
sendWorkRest
.
getData
();
}
else
{
private
void
sendCheckDingTalk
(
CheckReviewRecordEntity
entity
)
{
log
.
error
(
"发送工作消息失败,msg:{}"
,
sendWorkRest
.
getMsg
());
String
ruleStr
=
String
.
format
(
"%s/%s/%s"
,
PerformTypeEnum
.
评价差评绩效
.
getDesc
(),
entity
.
getCategoryName
(),
entity
.
getRuleName
());
}
}
else
{
//绩效核查通知
log
.
error
(
"根据手机号码获取人员错误,msg:{}"
,
personRest
.
getMsg
());
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
}
if
(!
ObjectUtils
.
isEmpty
(
staffCache
))
{
Rest
<
String
>
personRest
=
dingPersonService
.
getPersonByMobile
(
staffCache
.
getPhoneNumber
());
if
(
YesNoEnum
.
YES
.
getValue
()
==
personRest
.
getCode
())
{
CheckDingMsg
checkDingMsg
=
new
CheckDingMsg
();
checkDingMsg
.
setUserIds
(
personRest
.
getData
());
checkDingMsg
.
setDateTime
(
DateUtil
.
formatDateTime
(
entity
.
getReviewTime
()
==
null
?
new
Date
()
:
entity
.
getReviewTime
()));
checkDingMsg
.
setRuleStr
(
ruleStr
);
checkDingMsg
.
setPerformTypeStr
(
PerformTypeEnum
.
评价差评绩效
.
getDesc
());
checkDingMsg
.
setScore
(
entity
.
getScore
().
toString
());
checkDingMsg
.
setSubAddType
(
entity
.
getSubAddType
());
checkDingMsg
.
setPath
(
String
.
format
(
"/api/v1/perform/info?id=%s&&performType=review"
,
entity
.
getId
()));
Rest
<
String
>
msgRest
=
messageService
.
sendDingTalkWorkMsg
(
checkDingMsg
);
}
else
{
}
else
{
log
.
error
(
"
员工未找到,staffId:{}"
,
entity
.
getStaffId
());
log
.
error
(
"
根据手机号码获取人员错误,msg:{}"
,
personRest
.
getMsg
());
}
}
}
else
{
log
.
error
(
"员工未找到,staffId:{}"
,
entity
.
getStaffId
());
}
}
}
}
@Override
@Override
public
void
examine
(
CheckReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
public
void
examine
(
CheckReviewRecordEntity
entity
,
Context
context
)
throws
AppException
{
if
(
entity
.
getId
()
==
null
)
{
if
(
entity
.
getId
()
==
null
)
{
...
@@ -122,6 +122,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
...
@@ -122,6 +122,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setUpdateTime
(
entity
.
getCheckTime
());
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
entity
.
setCheckStatus
(
CheckStatusEnum
.
已处理
.
getValue
());
//处理状态(1.未处理,2.已处理)
dao
.
update
(
entity
);
dao
.
update
(
entity
);
//发送钉钉通知信息
sendCheckDingTalk
(
entity
);
try
{
try
{
CheckReviewRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
CheckReviewRecordEntity
temp
=
this
.
get
(
entity
.
getId
());
if
(
temp
!=
null
)
{
if
(
temp
!=
null
)
{
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/CheckDingMsg.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.dingding
;
import
lombok.Data
;
@Data
public
class
CheckDingMsg
{
private
String
userIds
;
private
String
dateTime
;
private
String
ruleStr
;
private
String
performTypeStr
;
private
String
score
;
private
Integer
subAddType
;
private
String
path
;
//请求路径相对地址
private
Integer
appealResult
;
private
String
appealDesc
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/FaceInfo.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.face
;
import
lombok.Data
;
@Data
public
class
FaceInfo
{
private
String
sex
;
private
String
name
;
private
String
certificateNum
;
private
String
certificateType
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/FaceListReq.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.face
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
FaceListReq
{
private
String
faceGroupIndexCode
;
private
int
pageNo
;
private
String
sex
;
private
String
name
;
private
int
pageSize
;
private
String
certificateNum
;
private
String
certificateType
;
private
List
<
String
>
indexCodes
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/FacePic.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.face
;
import
lombok.Data
;
@Data
public
class
FacePic
{
//地址
private
String
faceUrl
;
//base64
private
String
faceBinaryData
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/FaceReq.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.face
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
FaceReq
{
private
String
faceGroupIndexCode
;
private
FaceInfo
faceInfo
;
private
FacePic
facePic
;
//人脸集合id
private
List
<
String
>
indexCodes
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/face/ResRecognReq.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.face
;
import
lombok.Data
;
import
java.util.List
;
/**
* 人脸资源
*/
@Data
public
class
ResRecognReq
{
private
String
name
;
private
String
recognitionResourceType
;
private
List
<
String
>
indexCodes
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/group/FaceGroupReq.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.group
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
FaceGroupReq
{
private
String
name
;
private
String
description
;
//分组标识
private
List
<
String
>
indexCodes
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/img/ImgReq.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.img
;
import
lombok.Data
;
@Data
public
class
ImgReq
{
private
String
svrIndexCode
;
private
String
picUri
;
private
String
url
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/plan/PlanRecognListReq.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.plan
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
PlanRecognListReq
{
private
List
<
String
>
faceGroupIndexCodes
;
private
String
name
;
private
String
description
;
private
String
status
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/plan/PlanRecognReq.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.plan
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
PlanRecognReq
{
private
String
indexCode
;
private
List
<
String
>
cameraIndexCodes
;
private
List
<
String
>
faceGroupIndexCodes
;
private
String
name
;
private
String
description
;
private
List
<
String
>
recognitionResourceIndexCodes
;
private
String
recognitionResourceType
;
private
int
threshold
;
private
List
<
TimeBlockListItem
>
timeBlockList
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/plan/TimeBlockListItem.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.plan
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
TimeBlockListItem
{
private
String
dayOfWeek
;
private
List
<
TimeRangeItem
>
timeRange
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/plan/TimeRangeItem.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.plan
;
import
lombok.Data
;
@Data
public
class
TimeRangeItem
{
private
String
startTime
;
private
String
endTime
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/req/resource/ResourceReq.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.req.resource
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ResourceReq
{
private
String
name
;
private
String
recognitionResourceType
;
private
List
<
String
>
indexCodes
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/face/FaceDataInfo.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.rsp.face
;
import
com.mortals.xhx.module.hik.face.model.req.face.FaceInfo
;
import
com.mortals.xhx.module.hik.face.model.req.face.FacePic
;
import
lombok.Data
;
@Data
public
class
FaceDataInfo
{
private
String
faceGroupIndexCode
;
private
String
indexCode
;
private
FaceInfo
faceInfo
;
private
FacePic
facePic
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/face/ResRecognDataInfo.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.rsp.face
;
import
lombok.Data
;
@Data
public
class
ResRecognDataInfo
{
private
String
name
;
private
String
indexCode
;
private
String
recognitionResourceType
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/group/FaceGroupDataInfo.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.rsp.group
;
import
lombok.Data
;
@Data
public
class
FaceGroupDataInfo
{
private
String
name
;
private
String
indexCode
;
private
String
description
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/plan/PlanRecognInfo.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.rsp.plan
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
PlanRecognInfo
{
private
List
<
String
>
cameraIndexCodes
;
private
boolean
available
;
private
String
indexCode
;
private
String
description
;
private
int
threshold
;
private
String
recognitionPlanType
;
private
int
usingTime
;
private
List
<
String
>
faceGroupIndexCodes
;
private
String
name
;
private
List
<
String
>
recognitionResourceIndexCodes
;
private
String
recognitionResourceType
;
private
String
startTime
;
private
String
status
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/model/rsp/resource/ResourceDataInfo.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.model.rsp.resource
;
import
lombok.Data
;
@Data
public
class
ResourceDataInfo
{
private
String
name
;
private
String
indexCode
;
private
String
recognitionResourceType
;
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/service/IHikFaceService.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.service
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.module.hik.face.model.req.face.FaceListReq
;
import
com.mortals.xhx.module.hik.face.model.req.face.FaceReq
;
import
com.mortals.xhx.module.hik.face.model.req.face.ResRecognReq
;
import
com.mortals.xhx.module.hik.face.model.req.group.FaceGroupReq
;
import
com.mortals.xhx.module.hik.face.model.req.img.ImgReq
;
import
com.mortals.xhx.module.hik.face.model.req.resource.ResourceReq
;
import
com.mortals.xhx.module.hik.face.model.rsp.face.FaceDataInfo
;
import
com.mortals.xhx.module.hik.face.model.rsp.face.ResRecognDataInfo
;
import
com.mortals.xhx.module.hik.face.model.rsp.group.FaceGroupDataInfo
;
import
com.mortals.xhx.module.hik.face.model.rsp.resource.ResourceDataInfo
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* 海康门禁接口对接类
*
* @author:
* @date: 2023/4/12 17:47
*/
public
interface
IHikFaceService
{
/**
* 查询人脸
*
* @param faceListReq
* @return
*/
Rest
<
List
<
FaceDataInfo
>>
findFaceList
(
FaceListReq
faceListReq
);
/**
* 添加单个人脸
*
* @param faceReq
* @return
*/
Rest
<
FaceDataInfo
>
faceSingleAdd
(
FaceReq
faceReq
);
/**
* 修改单个人脸
*
* @param faceReq
* @return
*/
Rest
<
Boolean
>
faceSingleUpdate
(
FaceReq
faceReq
);
/**
* 删除单个人脸
*
* @param faceReq
* @return
*/
Rest
<
Boolean
>
faceSingleDel
(
FaceReq
faceReq
);
/**
* 查询人脸分组
*
* @param faceGroupReq
* @return
*/
Rest
<
List
<
FaceGroupDataInfo
>>
findFaceGroupList
(
FaceGroupReq
faceGroupReq
);
/**
* 添加人脸分组
*
* @param faceGroupReq
* @return
*/
Rest
<
FaceGroupDataInfo
>
faceGroupSingleAdd
(
FaceGroupReq
faceGroupReq
);
/**
* 删除人脸分组
*
* @param faceGroupReq
* @return
*/
Rest
<
Boolean
>
faceGroupSingleDel
(
FaceGroupReq
faceGroupReq
);
/**
* 查询人脸资源
*
* @param recognReq
* @return
*/
Rest
<
List
<
ResRecognDataInfo
>>
findResRecognList
(
ResRecognReq
recognReq
);
/**
* 下载抓拍人脸图片
*
* @param imgReq
* @return
*/
Rest
<
String
>
downloadPicture
(
ImgReq
imgReq
);
/**
* 获取识别资源
*
* @param recognReq
* @return
*/
Rest
<
List
<
ResourceDataInfo
>>
getResourceRecognition
(
ResourceReq
recognReq
);
InputStream
callPostImgs
(
ImgReq
imgReq
)
throws
Exception
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/service/IHikPlanService.java
0 → 100644
View file @
1ee96ac7
package
com.mortals.xhx.module.hik.face.service
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.module.hik.face.model.req.plan.PlanRecognListReq
;
import
com.mortals.xhx.module.hik.face.model.req.plan.PlanRecognReq
;
import
com.mortals.xhx.module.hik.face.model.rsp.plan.PlanRecognInfo
;
import
java.util.List
;
/**
* 海康门禁接口对接类
*
* @author:
* @date: 2023/4/12 17:47
*/
public
interface
IHikPlanService
{
/**
* 查询重点识别计划
*
* @param planRecognListReq
* @return
*/
Rest
<
List
<
PlanRecognInfo
>>
findPlanRecognBlackList
(
PlanRecognListReq
planRecognListReq
);
/**
* 添加人员监视计划
*
* @param planRecognReq
* @return
*/
Rest
<
String
>
planRecognBlackAdd
(
PlanRecognReq
planRecognReq
);
/**
* 人员监视计划删除
*
* @param planRecognReq
* @return
*/
Rest
<
Boolean
>
planRecognBlackDel
(
PlanRecognReq
planRecognReq
);
/**
* 查询陌生人识别计划
*
* @param planRecognListReq
* @return
*/
Rest
<
List
<
PlanRecognInfo
>>
findPlanRecognWhiteList
(
PlanRecognListReq
planRecognListReq
);
/**
* 添加陌生人监视计划
*
* @param planRecognReq
* @return
*/
Rest
<
String
>
planRecognWhiteAdd
(
PlanRecognReq
planRecognReq
);
/**
* 更新陌生人监视计划
*
* @param planRecognReq
* @return
*/
Rest
<
Boolean
>
planRecognWhiteUpdate
(
PlanRecognReq
planRecognReq
);
/**
* 陌生人人员监视计划删除
*
* @param planRecognReq
* @return
*/
Rest
<
Boolean
>
planRecognWhiteDel
(
PlanRecognReq
planRecognReq
);
/**
* 陌生人监视计划重新下发
*
* @param planRecognReq
* @return
*/
Rest
<
Boolean
>
planRecognWhiteReStart
(
PlanRecognReq
planRecognReq
);
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/service/impl/HikFaceServiceImpl.java
0 → 100644
View file @
1ee96ac7
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/hik/face/service/impl/HikPlanServiceImpl.java
0 → 100644
View file @
1ee96ac7
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/model/vo/PerformAttendAppealVo.java
View file @
1ee96ac7
...
@@ -22,4 +22,8 @@ public class PerformAttendAppealVo extends BaseEntityLong {
...
@@ -22,4 +22,8 @@ public class PerformAttendAppealVo extends BaseEntityLong {
*/
*/
private
Integer
statType
;
private
Integer
statType
;
private
String
categoryName
;
private
String
performTypeStr
;
}
}
\ No newline at end of file
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformAttendAppealServiceImpl.java
View file @
1ee96ac7
...
@@ -8,18 +8,22 @@ import com.mortals.framework.model.OrderCol;
...
@@ -8,18 +8,22 @@ import com.mortals.framework.model.OrderCol;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.xhx.base.system.message.MessageService
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.common.code.*
;
import
com.mortals.xhx.module.check.model.*
;
import
com.mortals.xhx.module.check.model.*
;
import
com.mortals.xhx.module.check.service.*
;
import
com.mortals.xhx.module.check.service.*
;
import
com.mortals.xhx.module.dingding.CheckDingMsg
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.perform.dao.PerformAttendAppealDao
;
import
com.mortals.xhx.module.perform.dao.PerformAttendAppealDao
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealEntity
;
import
com.mortals.xhx.module.perform.model.*
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealFilesEntity
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealFilesQuery
;
import
com.mortals.xhx.module.perform.model.PerformAttendAppealQuery
;
import
com.mortals.xhx.module.perform.model.vo.AppealInfo
;
import
com.mortals.xhx.module.perform.model.vo.AppealInfo
;
import
com.mortals.xhx.module.perform.model.vo.AppealSummaryQuery
;
import
com.mortals.xhx.module.perform.model.vo.AppealSummaryQuery
;
import
com.mortals.xhx.module.perform.service.PerformAttendAppealFilesService
;
import
com.mortals.xhx.module.perform.service.PerformAttendAppealFilesService
;
import
com.mortals.xhx.module.perform.service.PerformAttendAppealService
;
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.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -57,6 +61,41 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -57,6 +61,41 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
@Autowired
@Autowired
private
PerformAttendAppealFilesService
performAttendAppealFilesService
;
private
PerformAttendAppealFilesService
performAttendAppealFilesService
;
@Autowired
private
IDingPersonService
dingPersonService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
MessageService
messageService
;
@Autowired
private
PerformRulesCategoryService
categoryService
;
@Autowired
private
PerformRulesService
rulesService
;
private
void
sendCheckDingTalk
(
PerformAttendAppealEntity
entity
)
{
String
ruleStr
=
String
.
format
(
"%s/%s/%s"
,
PerformTypeEnum
.
getByValue
(
entity
.
getPerformType
()).
getDesc
(),
entity
.
getCategoryName
(),
entity
.
getRuleName
());
//绩效核查通知
StaffEntity
staffCache
=
staffService
.
getCache
(
entity
.
getStaffId
().
toString
());
if
(!
ObjectUtils
.
isEmpty
(
staffCache
))
{
Rest
<
String
>
personRest
=
dingPersonService
.
getPersonByMobile
(
staffCache
.
getPhoneNumber
());
if
(
YesNoEnum
.
YES
.
getValue
()
==
personRest
.
getCode
())
{
CheckDingMsg
checkDingMsg
=
new
CheckDingMsg
();
checkDingMsg
.
setUserIds
(
personRest
.
getData
());
checkDingMsg
.
setDateTime
(
DateUtil
.
formatDateTime
(
entity
.
getAppealTime
()
==
null
?
new
Date
()
:
entity
.
getAppealTime
()));
checkDingMsg
.
setRuleStr
(
ruleStr
);
checkDingMsg
.
setScore
(
entity
.
getScore
().
toString
());
checkDingMsg
.
setAppealResult
(
entity
.
getAppealResult
());
checkDingMsg
.
setAppealDesc
(
entity
.
getAppealDesc
());
Rest
<
String
>
msgRest
=
messageService
.
sendDingTalkAppealMsg
(
checkDingMsg
);
}
else
{
log
.
error
(
"根据手机号码获取人员错误,msg:{}"
,
personRest
.
getMsg
());
}
}
else
{
log
.
error
(
"员工未找到,staffId:{}"
,
entity
.
getStaffId
());
}
}
@Override
@Override
public
Rest
<
Void
>
audit
(
PerformAttendAppealEntity
appeal
,
Context
context
)
{
public
Rest
<
Void
>
audit
(
PerformAttendAppealEntity
appeal
,
Context
context
)
{
...
@@ -73,6 +112,15 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -73,6 +112,15 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
appealEntity
.
setUpdateTime
(
new
Date
());
appealEntity
.
setUpdateTime
(
new
Date
());
this
.
getDao
().
update
(
appealEntity
);
this
.
getDao
().
update
(
appealEntity
);
PerformRulesEntity
ruleCache
=
rulesService
.
getCache
(
appealEntity
.
getRuleId
().
toString
());
if
(!
ObjectUtils
.
isEmpty
(
ruleCache
))
{
PerformRulesCategoryEntity
categoryEntity
=
categoryService
.
get
(
ruleCache
.
getCategoryId
());
if
(!
ObjectUtils
.
isEmpty
(
categoryEntity
))
{
appealEntity
.
setCategoryName
(
categoryEntity
.
getName
());
}
}
String
appealMsg
=
"申诉成功,返回所扣分数,申诉ID:"
+
appeal
.
getId
().
toString
();
String
appealMsg
=
"申诉成功,返回所扣分数,申诉ID:"
+
appeal
.
getId
().
toString
();
if
(
appeal
.
getAppealResult
()
==
AppealResultEnum
.
通过
.
getValue
())
{
if
(
appeal
.
getAppealResult
()
==
AppealResultEnum
.
通过
.
getValue
())
{
if
(
appeal
.
getSubAddType
()
==
SubAddTypeEnum
.
扣除
.
getValue
())
{
if
(
appeal
.
getSubAddType
()
==
SubAddTypeEnum
.
扣除
.
getValue
())
{
...
@@ -149,6 +197,9 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -149,6 +197,9 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
}
}
}
}
}
}
sendCheckDingTalk
(
appealEntity
);
return
Rest
.
ok
();
return
Rest
.
ok
();
}
}
...
@@ -183,10 +234,10 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -183,10 +234,10 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
query
.
setSummaryType
(
SummaryTopTypeEnum
.
月
.
getValue
());
query
.
setSummaryType
(
SummaryTopTypeEnum
.
月
.
getValue
());
}
}
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
年
.
getValue
())
{
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
年
.
getValue
())
{
query
.
setCheckTimeStart
(
DateUtils
.
getCurrDateTime
(
"yyyy"
)
+
"-01-01"
);
query
.
setCheckTimeStart
(
DateUtils
.
getCurrDateTime
(
"yyyy"
)
+
"-01-01"
);
}
}
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
月
.
getValue
())
{
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
月
.
getValue
())
{
query
.
setCheckTimeStart
(
DateUtils
.
getCurrDateTime
(
"yyyy-MM"
)
+
"-01"
);
query
.
setCheckTimeStart
(
DateUtils
.
getCurrDateTime
(
"yyyy-MM"
)
+
"-01"
);
}
}
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
日
.
getValue
())
{
if
(
query
.
getSummaryType
()
==
SummaryTopTypeEnum
.
日
.
getValue
())
{
query
.
setCheckTimeStart
(
DateUtils
.
getCurrStrDate
());
query
.
setCheckTimeStart
(
DateUtils
.
getCurrStrDate
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/model/WindowOwnerEntity.java
View file @
1ee96ac7
...
@@ -85,7 +85,7 @@ public class WindowOwnerEntity extends WindowOwnerVo {
...
@@ -85,7 +85,7 @@ public class WindowOwnerEntity extends WindowOwnerVo {
this
.
phone
=
""
;
this
.
phone
=
""
;
this
.
windowCount
=
-
1
;
this
.
windowCount
=
0
;
this
.
remark
=
""
;
this
.
remark
=
""
;
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowOwnerServiceImpl.java
View file @
1ee96ac7
...
@@ -42,6 +42,8 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
...
@@ -42,6 +42,8 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getWindowOwnerDetailList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getWindowOwnerDetailList
()))
{
entity
.
setWindowCount
(
entity
.
getWindowOwnerDetailList
().
size
());
entity
.
setWindowCount
(
entity
.
getWindowOwnerDetailList
().
size
());
}
}
DeptEntity
deptEntity
=
deptService
.
get
(
entity
.
getId
());
entity
.
setDeptName
(
deptEntity
==
null
?
""
:
deptEntity
.
getDeptName
());
}
}
@Override
@Override
...
@@ -60,9 +62,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
...
@@ -60,9 +62,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
}).
count
();
}).
count
();
DeptEntity
deptEntity
=
deptService
.
get
(
entity
.
getId
());
entity
.
setDeptName
(
deptEntity
==
null
?
""
:
deptEntity
.
getDeptName
());
entity
.
setNumber
(
entity
.
getWindowOwnerDetailList
().
size
()
+
""
);
windowOwnerDetailService
.
save
(
entity
.
getWindowOwnerDetailList
());
windowOwnerDetailService
.
save
(
entity
.
getWindowOwnerDetailList
());
}
}
super
.
saveAfter
(
entity
,
context
);
super
.
saveAfter
(
entity
,
context
);
...
...
attendance-performance-manager/src/main/resources/bootstrap.yml
View file @
1ee96ac7
...
@@ -72,4 +72,5 @@ dingtalk:
...
@@ -72,4 +72,5 @@ dingtalk:
agentId
:
@
profiles.dingtalk.agentId@
agentId
:
@
profiles.dingtalk.agentId@
AppKey
:
@
profiles.dingtalk.appKey@
AppKey
:
@
profiles.dingtalk.appKey@
AppSecret
:
@
profiles.dingtalk.appSecret@
AppSecret
:
@
profiles.dingtalk.appSecret@
webUrl
:
@
profiles.webUrl@
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