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
6b2090e9
Commit
6b2090e9
authored
Jul 19, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/attendance-performance-platform
parents
5551afaa
f5ba5525
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
208 additions
and
32 deletions
+208
-32
attendance-performance-manager-ui/admin/src/views/perform/attend/appeal/drawershow.vue
...r-ui/admin/src/views/perform/attend/appeal/drawershow.vue
+17
-8
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/message/impl/MessageServiceImpl.java
...tals/xhx/base/system/message/impl/MessageServiceImpl.java
+2
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/dingmsg/api/DingMessageController.java
.../module/attendance/dingmsg/api/DingMessageController.java
+172
-10
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/IDingPersonService.java
.../module/dingding/personal/service/IDingPersonService.java
+3
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/impl/DingPersonServiceImpl.java
...dingding/personal/service/impl/DingPersonServiceImpl.java
+4
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformAttendAppealServiceImpl.java
.../perform/service/impl/PerformAttendAppealServiceImpl.java
+6
-6
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/web/PerformAttendAppealController.java
...xhx/module/perform/web/PerformAttendAppealController.java
+3
-0
attendance-performance-manager/src/main/resources/bootstrap.yml
...ance-performance-manager/src/main/resources/bootstrap.yml
+1
-2
No files found.
attendance-performance-manager-ui/admin/src/views/perform/attend/appeal/drawershow.vue
View file @
6b2090e9
...
@@ -131,9 +131,10 @@
...
@@ -131,9 +131,10 @@
>
>
<el-image
<el-image
v-if=
"
v-if=
"
val.filePath.includes(
val.filePath.includes('.png') ||
'.png' || '.jpg' || '.jpeg' || 'bmp'
val.filePath.includes('.jpg') ||
)
val.filePath.includes('.jpeg') ||
val.filePath.includes('.bmp')
"
"
style=
"width: 100px; height: 100px"
style=
"width: 100px; height: 100px"
:src=
"
:src=
"
...
@@ -156,7 +157,7 @@
...
@@ -156,7 +157,7 @@
alt=
""
alt=
""
@
click=
"hanldeDownloadFile(val)"
@
click=
"hanldeDownloadFile(val)"
/>
/>
{{
val
.
fileName
}}
<p>
{{
val
.
fileName
}}
</p>
</div>
</div>
</div>
</div>
</el-col>
</el-col>
...
@@ -780,14 +781,22 @@ export default {
...
@@ -780,14 +781,22 @@ export default {
flex-direction: column;
flex-direction: column;
justify-content: center;
justify-content: center;
align-items: center;
align-items: center;
width:
6
0px;
width:
10
0px;
height:
8
0px;
height:
10
0px;
cursor: pointer;
cursor: pointer;
margin-right: 10px;
img {
img {
width:
50px
;
width:
100%
;
height:
5
0px;
height:
8
0px;
margin-top: 10px;
margin-top: 10px;
}
}
p {
width: 100%;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
}
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/base/system/message/impl/MessageServiceImpl.java
View file @
6b2090e9
...
@@ -21,7 +21,7 @@ import org.springframework.stereotype.Service;
...
@@ -21,7 +21,7 @@ import org.springframework.stereotype.Service;
@Slf4j
@Slf4j
public
class
MessageServiceImpl
implements
MessageService
{
public
class
MessageServiceImpl
implements
MessageService
{
@Value
(
"${webUrl:
''
}"
)
@Value
(
"${webUrl:}"
)
private
String
webUrl
;
private
String
webUrl
;
@Autowired
@Autowired
private
IDingPersonService
dingPersonService
;
private
IDingPersonService
dingPersonService
;
...
@@ -34,6 +34,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -34,6 +34,7 @@ public class MessageServiceImpl implements MessageService {
Link
link
=
new
Link
();
Link
link
=
new
Link
();
//link.setMessageUrl(webUrl + dingMsg.getPath());
//link.setMessageUrl(webUrl + dingMsg.getPath());
link
.
setMessageUrl
(
webUrl
+
dingMsg
.
getPath
());
link
.
setMessageUrl
(
webUrl
+
dingMsg
.
getPath
());
log
.
info
(
"linkUrl:"
+
link
.
getMessageUrl
());
if
(
SubAddTypeEnum
.
增加
.
getValue
()
==
dingMsg
.
getSubAddType
())
{
if
(
SubAddTypeEnum
.
增加
.
getValue
()
==
dingMsg
.
getSubAddType
())
{
link
.
setText
(
String
.
format
(
"你好,经人工核实后你在%%-%s"
+
link
.
setText
(
String
.
format
(
"你好,经人工核实后你在%%-%s"
+
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/dingmsg/api/DingMessageController.java
View file @
6b2090e9
package
com.mortals.xhx.module.attendance.dingmsg.api
;
package
com.mortals.xhx.module.attendance.dingmsg.api
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody
;
import
com.dingtalk.api.DefaultDingTalkClient
;
import
com.dingtalk.api.DefaultDingTalkClient
;
import
com.dingtalk.api.DingTalkClient
;
import
com.dingtalk.api.DingTalkClient
;
import
com.dingtalk.api.request.OapiGettokenRequest
;
import
com.dingtalk.api.request.OapiGettokenRequest
;
...
@@ -13,18 +16,29 @@ import com.mortals.xhx.common.pdu.ApiRespPdu;
...
@@ -13,18 +16,29 @@ import com.mortals.xhx.common.pdu.ApiRespPdu;
import
com.mortals.xhx.module.attendance.dingmsg.DingCallbackCrypto
;
import
com.mortals.xhx.module.attendance.dingmsg.DingCallbackCrypto
;
import
com.mortals.xhx.module.attendance.dingmsg.dingmsgreq.DingResponsMeassageReq
;
import
com.mortals.xhx.module.attendance.dingmsg.dingmsgreq.DingResponsMeassageReq
;
import
com.mortals.xhx.module.attendance.dingmsg.dingmsgreq.EncryptReq
;
import
com.mortals.xhx.module.attendance.dingmsg.dingmsgreq.EncryptReq
;
import
com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity
;
import
com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordQuery
;
import
com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
com.mortals.xhx.module.dingding.personal.service.IDingPersonService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.Log
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.Map
;
import
static
cn
.
hutool
.
core
.
date
.
DatePattern
.*;
/**
/**
*
*
* 接收钉钉的审批消息推送
* 接收钉钉的审批消息推送
...
@@ -38,6 +52,9 @@ public class DingMessageController {
...
@@ -38,6 +52,9 @@ public class DingMessageController {
@Autowired
@Autowired
private
IDingPersonService
dingPersonService
;
private
IDingPersonService
dingPersonService
;
@Autowired
private
AttendanceLeaveRecordService
attendanceLeaveRecordService
;
/**
/**
* appKey
* appKey
...
@@ -67,7 +84,7 @@ public class DingMessageController {
...
@@ -67,7 +84,7 @@ public class DingMessageController {
@RequestParam
(
value
=
"timestamp"
,
required
=
false
)
String
timeStamp
,
@RequestParam
(
value
=
"timestamp"
,
required
=
false
)
String
timeStamp
,
@RequestParam
(
value
=
"nonce"
,
required
=
false
)
String
nonce
,
@RequestParam
(
value
=
"nonce"
,
required
=
false
)
String
nonce
,
@RequestBody
(
required
=
false
)
JSONObject
json
)
{
@RequestBody
(
required
=
false
)
JSONObject
json
)
{
log
.
info
(
"钉钉推送参数
"
+
msg_signature
+
"---"
+
timeStamp
+
"---"
+
nonce
+
"---"
+
json
.
toJSONString
()
);
// log.info("钉钉推送参数:
" + msg_signature+"---"+timeStamp+"---"+nonce+"---"+json.toJSONString() );
try
{
try
{
// 从http请求中获取加解密参数
// 从http请求中获取加解密参数
DingCallbackCrypto
callbackCrypto
=
new
DingCallbackCrypto
(
token
,
aesKey
,
appKey
);
DingCallbackCrypto
callbackCrypto
=
new
DingCallbackCrypto
(
token
,
aesKey
,
appKey
);
...
@@ -77,20 +94,153 @@ public class DingMessageController {
...
@@ -77,20 +94,153 @@ public class DingMessageController {
// 反序列化回调事件json数据
// 反序列化回调事件json数据
JSONObject
eventJson
=
JSON
.
parseObject
(
decryptMsg
);
JSONObject
eventJson
=
JSON
.
parseObject
(
decryptMsg
);
String
eventType
=
eventJson
.
getString
(
"EventType"
);
String
eventType
=
eventJson
.
getString
(
"EventType"
);
String
processInstanceId
=
eventJson
.
getString
(
"processInstanceId"
);
// 根据EventType分类处理
// 根据EventType分类处理
if
(
"check_url"
.
equals
(
eventType
))
{
if
(
"bpms_instance_change"
.
equals
(
eventType
)){
//请假等需要审批的消息
// 测试回调url的正确性
log
.
info
(
"测试回调url的正确性"
);
}
else
if
(
"bpms_instance_change"
.
equals
(
eventType
)){
//请假等需要审批的消息
// 处理审批实例始末(审批任务开始、结束)
// 处理审批实例始末(审批任务开始、结束)
// 存入数据库
// 存入数据库
// log.info("发生了:" + eventType + "事件" );
// log.info("发生了:" + eventType + "事件" );
// log.info("返回处理参数:" + eventJson.toJSONString() );
if
(
processInstanceId
!=
null
){
if
(
eventJson
.
getString
(
"processInstanceId"
)
!=
null
){
Rest
<
GetProcessInstanceResponseBody
.
GetProcessInstanceResponseBodyResult
>
rest
=
dingPersonService
.
getOaRecordsById
(
processInstanceId
);
Rest
<
String
>
rest
=
dingPersonService
.
getOaRecordsById
(
eventJson
.
getString
(
"processInstanceId"
));
if
(
rest
.
getCode
()
==
Rest
.
SUCCESS
){
log
.
info
(
"审批详情:"
+
rest
.
getData
());
GetProcessInstanceResponseBody
.
GetProcessInstanceResponseBodyResult
result
=
rest
.
getData
();
log
.
info
(
"审批详情:"
+
JSONObject
.
toJSONString
(
result
)
);
AttendanceLeaveRecordEntity
leaveRecordEntity
=
new
AttendanceLeaveRecordEntity
();
leaveRecordEntity
.
initAttrValue
();
leaveRecordEntity
.
setRemark
(
processInstanceId
);
//将钉钉的事物id作为备注填入数据库
leaveRecordEntity
.
setLeavePersonId
(
Long
.
parseLong
(
result
.
getOriginatorUserId
()));
leaveRecordEntity
.
setLeavePerson
(
result
.
getTitle
().
substring
(
0
,
result
.
getTitle
().
indexOf
(
"提交"
)));
leaveRecordEntity
.
setDeptId
(
Long
.
parseLong
(
result
.
getOriginatorDeptId
()));
leaveRecordEntity
.
setDeptName
(
result
.
getOriginatorDeptName
());
if
(
result
.
getTasks
().
size
()
>
0
){
Date
startTime
=
dateFormat
(
result
.
getTasks
().
get
(
0
).
getCreateTime
());
Date
endTime
=
dateFormat
(
result
.
getTasks
().
get
(
0
).
getFinishTime
());
leaveRecordEntity
.
setStartTime
(
startTime
);
leaveRecordEntity
.
setEndTime
(
endTime
);
leaveRecordEntity
.
setDuration
((
int
)
((
endTime
.
getTime
()
-
startTime
.
getTime
())/
1000
));
}
if
(
result
.
getFormComponentValues
().
size
()
>
0
){
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
result
.
getFormComponentValues
().
get
(
0
).
getValue
());
if
(
jsonArray
.
size
()
>
0
){
Date
startTime1
=
dateFormat
(
jsonArray
.
get
(
0
).
toString
());
leaveRecordEntity
.
setStartTime
(
startTime1
);
}
if
(
jsonArray
.
size
()
>
1
){
Date
endTime1
=
dateFormat
(
jsonArray
.
get
(
1
).
toString
());
leaveRecordEntity
.
setEndTime
(
endTime1
);
}
if
(
jsonArray
.
size
()
>
2
){
leaveRecordEntity
.
setDuration
((
int
)
(
Float
.
parseFloat
(
jsonArray
.
get
(
2
).
toString
())*
60
*
60
));
}
if
(
jsonArray
.
size
()
>
4
){
switch
(
jsonArray
.
get
(
4
).
toString
()){
case
"调休"
:
leaveRecordEntity
.
setLeaveType
(
2
);
break
;
case
"病假"
:
leaveRecordEntity
.
setLeaveType
(
3
);
break
;
case
"年假"
:
leaveRecordEntity
.
setLeaveType
(
4
);
break
;
case
"产假"
:
leaveRecordEntity
.
setLeaveType
(
5
);
break
;
case
"陪产假"
:
leaveRecordEntity
.
setLeaveType
(
6
);
break
;
case
"婚假"
:
leaveRecordEntity
.
setLeaveType
(
7
);
break
;
case
"例假"
:
leaveRecordEntity
.
setLeaveType
(
8
);
break
;
case
"哺乳假"
:
leaveRecordEntity
.
setLeaveType
(
9
);
break
;
case
"丧假"
:
leaveRecordEntity
.
setLeaveType
(
10
);
break
;
case
"回单位"
:
leaveRecordEntity
.
setLeaveType
(
11
);
break
;
case
"因公请假"
:
leaveRecordEntity
.
setLeaveType
(
12
);
break
;
case
"外出勘验"
:
leaveRecordEntity
.
setLeaveType
(
13
);
break
;
case
"值班补班"
:
leaveRecordEntity
.
setLeaveType
(
14
);
break
;
case
"体检"
:
leaveRecordEntity
.
setLeaveType
(
15
);
break
;
case
"隔离"
:
leaveRecordEntity
.
setLeaveType
(
16
);
break
;
case
"因公外出"
:
leaveRecordEntity
.
setLeaveType
(
17
);
break
;
case
"公休"
:
leaveRecordEntity
.
setLeaveType
(
18
);
break
;
case
"育儿假"
:
leaveRecordEntity
.
setLeaveType
(
19
);
break
;
case
"调回单位"
:
leaveRecordEntity
.
setLeaveType
(
20
);
break
;
case
"探亲假"
:
leaveRecordEntity
.
setLeaveType
(
21
);
break
;
default
:
leaveRecordEntity
.
setLeaveType
(
1
);
//默认事假
break
;
}
}
}
if
(
result
.
getStatus
().
equals
(
"NEW"
)
||
result
.
getStatus
().
equals
(
"RUNNING"
)){
leaveRecordEntity
.
setProcessStatus
(
1
);
}
else
if
(
result
.
getStatus
().
equals
(
"COMPLETED"
)
||
result
.
getStatus
().
equals
(
"CANCELED"
)
||
result
.
getStatus
().
equals
(
"TERMINATED"
)){
leaveRecordEntity
.
setProcessStatus
(
2
);
}
if
(
result
.
getResult
().
equals
(
"AGREE"
)){
leaveRecordEntity
.
setAuditResult
(
1
);
}
else
{
leaveRecordEntity
.
setAuditResult
(
2
);
}
leaveRecordEntity
.
setAuditDesc
(
result
.
getOperationRecords
().
get
(
0
).
getRemark
());
AttendanceLeaveRecordEntity
recordEntity
=
attendanceLeaveRecordService
.
selectOne
(
new
AttendanceLeaveRecordQuery
().
remark
(
processInstanceId
));
if
(
ObjectUtils
.
isEmpty
(
recordEntity
)){
leaveRecordEntity
.
setCreateTime
(
new
Date
());
leaveRecordEntity
.
setCreateUserId
(
1L
);
attendanceLeaveRecordService
.
save
(
leaveRecordEntity
);
}
else
{
leaveRecordEntity
.
setId
(
recordEntity
.
getId
());
leaveRecordEntity
.
setUpdateUserId
(
1L
);
leaveRecordEntity
.
setUpdateTime
(
new
Date
());
attendanceLeaveRecordService
.
update
(
leaveRecordEntity
);
}
}
}
}
}
}
else
{
else
{
...
@@ -109,4 +259,16 @@ public class DingMessageController {
...
@@ -109,4 +259,16 @@ public class DingMessageController {
}
}
private
Date
dateFormat
(
String
dateString
){
SimpleDateFormat
dateFormat_
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm'Z'"
);
Date
t
;
try
{
t
=
dateFormat_
.
parse
(
dateString
);
return
t
;
}
catch
(
ParseException
e
)
{
return
new
Date
(
System
.
currentTimeMillis
());
}
}
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/IDingPersonService.java
View file @
6b2090e9
package
com.mortals.xhx.module.dingding.personal.service
;
package
com.mortals.xhx.module.dingding.personal.service
;
import
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.module.dingding.IDingTalkService
;
import
com.mortals.xhx.module.dingding.IDingTalkService
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
import
com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq
;
...
@@ -8,6 +9,7 @@ import com.mortals.xhx.module.hik.person.model.req.org.OrgListReq;
...
@@ -8,6 +9,7 @@ import com.mortals.xhx.module.hik.person.model.req.org.OrgListReq;
import
com.mortals.xhx.module.hik.person.model.req.person.PersonReq
;
import
com.mortals.xhx.module.hik.person.model.req.person.PersonReq
;
import
com.mortals.xhx.module.hik.person.model.rsp.org.OrgDataInfo
;
import
com.mortals.xhx.module.hik.person.model.rsp.org.OrgDataInfo
;
import
com.mortals.xhx.module.hik.person.model.rsp.person.PersonDataInfo
;
import
com.mortals.xhx.module.hik.person.model.rsp.person.PersonDataInfo
;
import
org.apache.poi.ss.formula.functions.T
;
/**
/**
* 钉钉人事相关服务类
* 钉钉人事相关服务类
...
@@ -46,7 +48,7 @@ public interface IDingPersonService extends IDingTalkService {
...
@@ -46,7 +48,7 @@ public interface IDingPersonService extends IDingTalkService {
* @param processInstanceId 审批实例ID。
* @param processInstanceId 审批实例ID。
* @return
* @return
*/
*/
Rest
<
String
>
getOaRecordsById
(
String
processInstanceId
);
Rest
<
GetProcessInstanceResponseBody
.
GetProcessInstanceResponseBodyResult
>
getOaRecordsById
(
String
processInstanceId
);
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/impl/DingPersonServiceImpl.java
View file @
6b2090e9
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.dingding.personal.service.impl;
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.dingding.personal.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponse
;
import
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponse
;
import
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody
;
import
com.aliyun.tea.TeaException
;
import
com.aliyun.tea.TeaException
;
import
com.dingtalk.api.DingTalkClient
;
import
com.dingtalk.api.DingTalkClient
;
import
com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request
;
import
com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request
;
...
@@ -17,6 +18,7 @@ import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
...
@@ -17,6 +18,7 @@ import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
import
com.taobao.api.ApiException
;
import
com.taobao.api.ApiException
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.Log
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -70,7 +72,6 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
...
@@ -70,7 +72,6 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
public
Rest
<
String
>
sendWorkMsg
(
WorkMsgReq
workMsgReq
)
{
public
Rest
<
String
>
sendWorkMsg
(
WorkMsgReq
workMsgReq
)
{
try
{
try
{
DingTalkClient
client
=
getDingTalkClient
(
"/topapi/message/corpconversation/asyncsend_v2"
);
DingTalkClient
client
=
getDingTalkClient
(
"/topapi/message/corpconversation/asyncsend_v2"
);
OapiMessageCorpconversationAsyncsendV2Request
req
=
new
OapiMessageCorpconversationAsyncsendV2Request
();
OapiMessageCorpconversationAsyncsendV2Request
req
=
new
OapiMessageCorpconversationAsyncsendV2Request
();
req
.
setAgentId
(
agentId
);
req
.
setAgentId
(
agentId
);
req
.
setUseridList
(
workMsgReq
.
getUseridList
());
req
.
setUseridList
(
workMsgReq
.
getUseridList
());
...
@@ -123,7 +124,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
...
@@ -123,7 +124,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
}
}
@Override
@Override
public
Rest
<
String
>
getOaRecordsById
(
String
processInstanceId
)
{
public
Rest
<
GetProcessInstanceResponseBody
.
GetProcessInstanceResponseBodyResult
>
getOaRecordsById
(
String
processInstanceId
)
{
try
{
try
{
com
.
aliyun
.
dingtalkworkflow_1_0
.
Client
client
=
createClient
();
com
.
aliyun
.
dingtalkworkflow_1_0
.
Client
client
=
createClient
();
com
.
aliyun
.
dingtalkworkflow_1_0
.
models
.
GetProcessInstanceHeaders
getProcessInstanceHeaders
=
new
com
.
aliyun
.
dingtalkworkflow_1_0
.
models
.
GetProcessInstanceHeaders
();
com
.
aliyun
.
dingtalkworkflow_1_0
.
models
.
GetProcessInstanceHeaders
getProcessInstanceHeaders
=
new
com
.
aliyun
.
dingtalkworkflow_1_0
.
models
.
GetProcessInstanceHeaders
();
...
@@ -132,8 +133,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
...
@@ -132,8 +133,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
.
setProcessInstanceId
(
processInstanceId
);
.
setProcessInstanceId
(
processInstanceId
);
GetProcessInstanceResponse
rsp
=
client
.
getProcessInstanceWithOptions
(
getProcessInstanceRequest
,
getProcessInstanceHeaders
,
new
com
.
aliyun
.
teautil
.
models
.
RuntimeOptions
());
GetProcessInstanceResponse
rsp
=
client
.
getProcessInstanceWithOptions
(
getProcessInstanceRequest
,
getProcessInstanceHeaders
,
new
com
.
aliyun
.
teautil
.
models
.
RuntimeOptions
());
log
.
info
(
"根据id查询审批详情:"
,
rsp
.
getBody
().
getResult
().
toString
());
return
Rest
.
ok
(
"成功"
,
rsp
.
getBody
().
getResult
());
return
Rest
.
ok
(
"成功"
,
rsp
.
getBody
().
getResult
().
toString
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"根据用户查询审批详情失败"
,
e
);
log
.
info
(
"根据用户查询审批详情失败"
,
e
);
return
Rest
.
fail
(
e
.
getMessage
());
return
Rest
.
fail
(
e
.
getMessage
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/service/impl/PerformAttendAppealServiceImpl.java
View file @
6b2090e9
...
@@ -128,7 +128,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -128,7 +128,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
if
(
appeal
.
getSubAddType
()
==
SubAddTypeEnum
.
扣除
.
getValue
())
{
if
(
appeal
.
getSubAddType
()
==
SubAddTypeEnum
.
扣除
.
getValue
())
{
//需增一条记录后 冲销相关核查的记录
//需增一条记录后 冲销相关核查的记录
if
(
PerformTypeEnum
.
考勤绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
if
(
PerformTypeEnum
.
考勤绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
CheckAttendRecordEntity
checkEntity
=
checkAttendRecordService
.
get
(
appeal
.
getId
(),
context
);
CheckAttendRecordEntity
checkEntity
=
checkAttendRecordService
.
get
(
appeal
.
get
CheckRecord
Id
(),
context
);
CheckAttendRecordEntity
checkAttendRecordEntity
=
new
CheckAttendRecordEntity
();
CheckAttendRecordEntity
checkAttendRecordEntity
=
new
CheckAttendRecordEntity
();
checkAttendRecordEntity
.
initAttrValue
();
checkAttendRecordEntity
.
initAttrValue
();
...
@@ -138,7 +138,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -138,7 +138,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
checkAttendRecordEntity
.
setRemark
(
appealMsg
);
checkAttendRecordEntity
.
setRemark
(
appealMsg
);
checkAttendRecordService
.
save
(
checkAttendRecordEntity
,
context
);
checkAttendRecordService
.
save
(
checkAttendRecordEntity
,
context
);
}
else
if
(
PerformTypeEnum
.
评价差评绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
}
else
if
(
PerformTypeEnum
.
评价差评绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
CheckReviewRecordEntity
checkEntity
=
checkReviewRecordService
.
get
(
appeal
.
getId
(),
context
);
CheckReviewRecordEntity
checkEntity
=
checkReviewRecordService
.
get
(
appeal
.
get
CheckRecord
Id
(),
context
);
CheckReviewRecordEntity
checkRecordEntity
=
new
CheckReviewRecordEntity
();
CheckReviewRecordEntity
checkRecordEntity
=
new
CheckReviewRecordEntity
();
checkRecordEntity
.
initAttrValue
();
checkRecordEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
checkEntity
,
checkRecordEntity
,
new
String
[]{
"id"
,
"recordId"
});
BeanUtils
.
copyProperties
(
checkEntity
,
checkRecordEntity
,
new
String
[]{
"id"
,
"recordId"
});
...
@@ -149,7 +149,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -149,7 +149,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
checkRecordEntity
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
checkRecordEntity
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
checkReviewRecordService
.
save
(
checkRecordEntity
,
context
);
checkReviewRecordService
.
save
(
checkRecordEntity
,
context
);
}
else
if
(
PerformTypeEnum
.
评价投诉绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
}
else
if
(
PerformTypeEnum
.
评价投诉绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
CheckComplainRecordEntity
checkEntity
=
checkComplainRecordService
.
get
(
appeal
.
getId
(),
context
);
CheckComplainRecordEntity
checkEntity
=
checkComplainRecordService
.
get
(
appeal
.
get
CheckRecord
Id
(),
context
);
CheckComplainRecordEntity
checkRecordEntity
=
new
CheckComplainRecordEntity
();
CheckComplainRecordEntity
checkRecordEntity
=
new
CheckComplainRecordEntity
();
checkRecordEntity
.
initAttrValue
();
checkRecordEntity
.
initAttrValue
();
...
@@ -162,7 +162,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -162,7 +162,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
checkComplainRecordService
.
save
(
checkRecordEntity
,
context
);
checkComplainRecordService
.
save
(
checkRecordEntity
,
context
);
}
else
if
(
PerformTypeEnum
.
办件绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
}
else
if
(
PerformTypeEnum
.
办件绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
CheckGoworkRecordEntity
checkEntity
=
checkGoworkRecordService
.
get
(
appeal
.
getId
(),
context
);
CheckGoworkRecordEntity
checkEntity
=
checkGoworkRecordService
.
get
(
appeal
.
get
CheckRecord
Id
(),
context
);
CheckGoworkRecordEntity
checkRecordEntity
=
new
CheckGoworkRecordEntity
();
CheckGoworkRecordEntity
checkRecordEntity
=
new
CheckGoworkRecordEntity
();
checkRecordEntity
.
initAttrValue
();
checkRecordEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
checkEntity
,
checkRecordEntity
,
new
String
[]{
"id"
,
"recordId"
});
BeanUtils
.
copyProperties
(
checkEntity
,
checkRecordEntity
,
new
String
[]{
"id"
,
"recordId"
});
...
@@ -174,7 +174,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -174,7 +174,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
checkGoworkRecordService
.
save
(
checkRecordEntity
,
context
);
checkGoworkRecordService
.
save
(
checkRecordEntity
,
context
);
}
else
if
(
PerformTypeEnum
.
效能绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
}
else
if
(
PerformTypeEnum
.
效能绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
CheckEffectRecordEntity
checkEntity
=
checkEffectRecordService
.
get
(
appeal
.
getId
(),
context
);
CheckEffectRecordEntity
checkEntity
=
checkEffectRecordService
.
get
(
appeal
.
get
CheckRecord
Id
(),
context
);
CheckEffectRecordEntity
checkRecordEntity
=
new
CheckEffectRecordEntity
();
CheckEffectRecordEntity
checkRecordEntity
=
new
CheckEffectRecordEntity
();
checkRecordEntity
.
initAttrValue
();
checkRecordEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
checkEntity
,
checkRecordEntity
,
new
String
[]{
"id"
,
"recordId"
});
BeanUtils
.
copyProperties
(
checkEntity
,
checkRecordEntity
,
new
String
[]{
"id"
,
"recordId"
});
...
@@ -186,7 +186,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
...
@@ -186,7 +186,7 @@ public class PerformAttendAppealServiceImpl extends AbstractCRUDServiceImpl<Perf
checkEffectRecordService
.
save
(
checkRecordEntity
,
context
);
checkEffectRecordService
.
save
(
checkRecordEntity
,
context
);
}
else
if
(
PerformTypeEnum
.
其它绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
}
else
if
(
PerformTypeEnum
.
其它绩效
.
getValue
().
equals
(
appeal
.
getPerformType
()))
{
CheckOtherRecordEntity
checkEntity
=
checkOtherRecordService
.
get
(
appeal
.
getId
(),
context
);
CheckOtherRecordEntity
checkEntity
=
checkOtherRecordService
.
get
(
appeal
.
get
CheckRecord
Id
(),
context
);
CheckOtherRecordEntity
checkRecordEntity
=
new
CheckOtherRecordEntity
();
CheckOtherRecordEntity
checkRecordEntity
=
new
CheckOtherRecordEntity
();
checkRecordEntity
.
initAttrValue
();
checkRecordEntity
.
initAttrValue
();
BeanUtils
.
copyProperties
(
checkEntity
,
checkRecordEntity
,
new
String
[]{
"id"
,
"recordId"
});
BeanUtils
.
copyProperties
(
checkEntity
,
checkRecordEntity
,
new
String
[]{
"id"
,
"recordId"
});
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/web/PerformAttendAppealController.java
View file @
6b2090e9
...
@@ -15,6 +15,7 @@ import com.mortals.xhx.module.perform.model.PerformRulesQuery;
...
@@ -15,6 +15,7 @@ import com.mortals.xhx.module.perform.model.PerformRulesQuery;
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.PerformRulesService
;
import
com.mortals.xhx.module.perform.service.PerformRulesService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -54,6 +55,7 @@ import static java.util.stream.Collectors.toMap;
...
@@ -54,6 +55,7 @@ import static java.util.stream.Collectors.toMap;
*/
*/
@RestController
@RestController
@RequestMapping
(
"perform/attend/appeal"
)
@RequestMapping
(
"perform/attend/appeal"
)
@Slf4j
public
class
PerformAttendAppealController
extends
BaseCRUDJsonBodyMappingController
<
PerformAttendAppealService
,
PerformAttendAppealEntity
,
Long
>
{
public
class
PerformAttendAppealController
extends
BaseCRUDJsonBodyMappingController
<
PerformAttendAppealService
,
PerformAttendAppealEntity
,
Long
>
{
@Autowired
@Autowired
...
@@ -125,6 +127,7 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro
...
@@ -125,6 +127,7 @@ public class PerformAttendAppealController extends BaseCRUDJsonBodyMappingContro
*/
*/
@PostMapping
(
value
=
"audit"
)
@PostMapping
(
value
=
"audit"
)
public
String
appealAudit
(
@RequestBody
PerformAttendAppealEntity
appeal
)
{
public
String
appealAudit
(
@RequestBody
PerformAttendAppealEntity
appeal
)
{
log
.
info
(
"appeal audit ==>{}"
,
JSONObject
.
toJSONString
(
appeal
));
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
String
busiDesc
=
this
.
getModuleDesc
()
+
"审核"
;
String
busiDesc
=
this
.
getModuleDesc
()
+
"审核"
;
try
{
try
{
...
...
attendance-performance-manager/src/main/resources/bootstrap.yml
View file @
6b2090e9
...
@@ -66,13 +66,12 @@ hik:
...
@@ -66,13 +66,12 @@ hik:
# AppKey: dingpqzradgfr4efdi2j
# AppKey: dingpqzradgfr4efdi2j
# AppSecret: bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd
# AppSecret: bF2WALmo5_Wuj3hg5gXeWqezrYnZChUJ88HjzNWpkA9ivdOxfBDGOGYcfVRfB3vd
# domain: https://oapi.dingtalk.com
# domain: https://oapi.dingtalk.com
webUrl
:
@
profiles.webUrl@
dingtalk
:
dingtalk
:
domain
:
@
profiles.dingtalk.domain@
domain
:
@
profiles.dingtalk.domain@
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@
AesKey
:
@
profiles.dingtalk.aesKey@
AesKey
:
@
profiles.dingtalk.aesKey@
token
:
@
profiles.dingtalk.token@
token
:
@
profiles.dingtalk.token@
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