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
5c6c6e34
Commit
5c6c6e34
authored
Jan 25, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
8f66e2ee
a9b5f524
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
12 deletions
+25
-12
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/IDingPersonService.java
.../module/dingding/personal/service/IDingPersonService.java
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/impl/DingPersonServiceImpl.java
...dingding/personal/service/impl/DingPersonServiceImpl.java
+23
-10
doc/审批表单列表.txt
doc/审批表单列表.txt
+0
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/IDingPersonService.java
View file @
5c6c6e34
...
@@ -83,8 +83,8 @@ public interface IDingPersonService extends IDingTalkService {
...
@@ -83,8 +83,8 @@ public interface IDingPersonService extends IDingTalkService {
* @param endTime 审批实例结束时间,Unix时间戳,单位毫秒。
* @param endTime 审批实例结束时间,Unix时间戳,单位毫秒。
* @param nextToken 分页游标。如果是非首次调用,该参数传上次调用时返回的nextToken。
* @param nextToken 分页游标。如果是非首次调用,该参数传上次调用时返回的nextToken。
* @param maxResults 分页参数,每页大小,最多传20。
* @param maxResults 分页参数,每页大小,最多传20。
* @param phone
发起人电话
* @param phone
s 发起人电话列表 最大列表长度为10
*/
*/
Rest
<
ListProcessInstanceIdsResponse
>
getProcessInstanceIdByPhone
(
String
processCode
,
long
startTime
,
long
endTime
,
long
nextToken
,
long
maxResults
,
String
phone
)
throws
Exception
;
Rest
<
ListProcessInstanceIdsResponse
>
getProcessInstanceIdByPhone
(
String
processCode
,
long
startTime
,
long
endTime
,
long
nextToken
,
long
maxResults
,
String
phone
s
)
throws
Exception
;
}
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/impl/DingPersonServiceImpl.java
View file @
5c6c6e34
...
@@ -42,6 +42,7 @@ import org.springframework.util.ObjectUtils;
...
@@ -42,6 +42,7 @@ import org.springframework.util.ObjectUtils;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -190,12 +191,12 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
...
@@ -190,12 +191,12 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
/**
/**
* 根据系统电话查询指定时间的审批表单
* 根据系统电话查询指定时间的审批表单
* @param processCode 审批流的唯一码
。
* @param processCode 审批流的唯一码
(详见doc下 审批表单列表.txt)。 请假:PROC-2E5C0DFF-3615-4409-A614-A2011FED5D38 外出:PROC-56D3ADEE-45A4-47BC-931A-2A0DC067DE32
* @param startTime 审批实例开始时间,Unix时间戳,单位毫秒
* @param startTime 审批实例开始时间,Unix时间戳,单位毫秒
* @param endTime 审批实例结束时间,Unix时间戳,单位毫秒。
* @param endTime 审批实例结束时间,Unix时间戳,单位毫秒。
* @param nextToken 分页游标。如果是非首次调用,该参数传上次调用时返回的nextToken。
* @param nextToken 分页游标。如果是非首次调用,该参数传上次调用时返回的nextToken。
* @param maxResults 分页参数,每页大小,最多传20。
* @param maxResults 分页参数,每页大小,最多传20。
* @param phone
发起人电话
* @param phone
s 发起人电话列表 最大列表长度为10
*
*
* @return 返回示例 {
* @return 返回示例 {
* "result" : {
* "result" : {
...
@@ -205,13 +206,27 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
...
@@ -205,13 +206,27 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
* "success" : true
* "success" : true
* }
* }
*/
*/
public
Rest
<
ListProcessInstanceIdsResponse
>
getProcessInstanceIdByPhone
(
String
processCode
,
long
startTime
,
long
endTime
,
long
nextToken
,
long
maxResults
,
String
phone
)
throws
Exception
{
public
Rest
<
ListProcessInstanceIdsResponse
>
getProcessInstanceIdByPhone
(
String
processCode
,
long
startTime
,
long
endTime
,
long
nextToken
,
long
maxResults
,
String
phone
s
)
throws
Exception
{
String
userIds
=
""
;
if
(!
phones
.
isEmpty
()){
List
<
String
>
phonesList
=
Arrays
.
asList
(
phones
);
for
(
String
phone
:
phonesList
){
Rest
<
String
>
mobileRest
=
getPersonByMobile
(
phone
);
Rest
<
String
>
mobileRest
=
getPersonByMobile
(
phone
);
if
(
mobileRest
.
getCode
()
==
Rest
.
SUCCESS
)
{
if
(
mobileRest
.
getCode
()
==
Rest
.
SUCCESS
){
String
userId
=
mobileRest
.
getData
();
userIds
+=
mobileRest
.
getData
()+
","
;
}
}
}
//去掉末尾的逗号
if
(
userIds
.
endsWith
(
","
)){
userIds
=
userIds
.
substring
(
0
,
userIds
.
lastIndexOf
(
","
));
}
if
(!
userIds
.
equals
(
""
))
{
com
.
aliyun
.
dingtalkworkflow_1_0
.
Client
client
=
new
com
.
aliyun
.
dingtalkworkflow_1_0
.
Client
(
setConfig
());
com
.
aliyun
.
dingtalkworkflow_1_0
.
Client
client
=
new
com
.
aliyun
.
dingtalkworkflow_1_0
.
Client
(
setConfig
());
com
.
aliyun
.
dingtalkworkflow_1_0
.
models
.
ListProcessInstanceIdsHeaders
listProcessInstanceIdsHeaders
=
new
com
.
aliyun
.
dingtalkworkflow_1_0
.
models
.
ListProcessInstanceIdsHeaders
();
com
.
aliyun
.
dingtalkworkflow_1_0
.
models
.
ListProcessInstanceIdsHeaders
listProcessInstanceIdsHeaders
=
new
com
.
aliyun
.
dingtalkworkflow_1_0
.
models
.
ListProcessInstanceIdsHeaders
();
listProcessInstanceIdsHeaders
.
xAcsDingtalkAccessToken
=
getToken
();
listProcessInstanceIdsHeaders
.
xAcsDingtalkAccessToken
=
getToken
();
...
@@ -224,7 +239,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
...
@@ -224,7 +239,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
.
setEndTime
(
endTime
)
.
setEndTime
(
endTime
)
.
setNextToken
(
nextToken
)
.
setNextToken
(
nextToken
)
.
setMaxResults
(
maxResults
)
.
setMaxResults
(
maxResults
)
.
setUserIds
(
java
.
util
.
Arrays
.
asList
(
userId
));
.
setUserIds
(
java
.
util
.
Arrays
.
asList
(
userId
s
));
try
{
try
{
ListProcessInstanceIdsResponse
rsp
=
client
.
listProcessInstanceIdsWithOptions
(
listProcessInstanceIdsRequest
,
listProcessInstanceIdsHeaders
,
new
RuntimeOptions
());
ListProcessInstanceIdsResponse
rsp
=
client
.
listProcessInstanceIdsWithOptions
(
listProcessInstanceIdsRequest
,
listProcessInstanceIdsHeaders
,
new
RuntimeOptions
());
return
Rest
.
ok
(
"成功"
,
rsp
);
return
Rest
.
ok
(
"成功"
,
rsp
);
...
@@ -237,11 +252,9 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
...
@@ -237,11 +252,9 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
}
}
return
Rest
.
fail
(
"获取审批实例列表失败:"
+
com
.
aliyun
.
teautil
.
Common
.
empty
(
err
.
message
));
return
Rest
.
fail
(
"获取审批实例列表失败:"
+
com
.
aliyun
.
teautil
.
Common
.
empty
(
err
.
message
));
}
}
}
else
{
log
.
error
(
"根据手机号: "
+
phone
+
" 未查询到钉钉userid; erro->"
+
mobileRest
.
getMsg
());
return
Rest
.
fail
(
"根据手机号: "
+
phone
+
" 未查询到钉钉userid; erro->"
+
mobileRest
.
getMsg
());
}
}
return
Rest
.
fail
(
"根据手机号: "
+
phones
+
" 未查询到钉钉userid"
);
}
}
...
...
doc/审批表单列表.txt
0 → 100644
View file @
5c6c6e34
This diff is collapsed.
Click to expand it.
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