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
0cac0506
Commit
0cac0506
authored
Jul 15, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加钉钉接口相关
parent
99cc36d4
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
4296 additions
and
4115 deletions
+4296
-4115
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
...er/src/main/java/com/mortals/xhx/common/key/RedisKey.java
+4
-11
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
...dule/check/service/impl/CheckReviewRecordServiceImpl.java
+3
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/AbstractDingTalkService.java
.../mortals/xhx/module/dingding/AbstractDingTalkService.java
+23
-25
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/IDingTalkService.java
...ava/com/mortals/xhx/module/dingding/IDingTalkService.java
+1
-1
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/impl/DingPersonServiceImpl.java
...dingding/personal/service/impl/DingPersonServiceImpl.java
+3
-4
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/model/PerformAttendAppealEntity.java
...s/xhx/module/perform/model/PerformAttendAppealEntity.java
+173
-160
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/model/PerformAttendAppealQuery.java
...ls/xhx/module/perform/model/PerformAttendAppealQuery.java
+1908
-1813
attendance-performance-manager/src/main/resources/sqlmap/module/perform/PerformAttendAppealMapper.xml
...urces/sqlmap/module/perform/PerformAttendAppealMapper.xml
+2172
-2098
db/add.sql
db/add.sql
+9
-0
doc/考勤绩效管理系统.docx
doc/考勤绩效管理系统.docx
+0
-0
No files found.
attendance-performance-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
View file @
0cac0506
...
...
@@ -9,18 +9,11 @@ public class RedisKey {
* 登录 key
*/
public
static
final
String
KEY_MENU_CACHE
=
"iot:base:MenuCacheKey:"
;
/**
* 设备心跳上报
*/
public
static
final
String
KEY_DEVICE_ONLINE_CACHE
=
"device:online:"
;
public
static
final
String
KEY_SITE_CACHE
=
"siteDict"
;
public
static
final
String
KEY_PLATFORM_CACHE
=
"platformDict"
;
public
static
final
String
KEY_PRODUCT_CACHE
=
"productDict"
;
/**
* 钉钉 访问token
*/
public
static
final
String
KEY_DINGTALK_ACCESSTOKEN_CACHE
=
"dingtalk:token:"
;
public
static
final
String
KEY_TOKEN_API_CACHE
=
"token:api:"
;
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/check/service/impl/CheckReviewRecordServiceImpl.java
View file @
0cac0506
...
...
@@ -83,9 +83,9 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
msg
.
setMsgtype
(
"link"
);
Link
link
=
new
Link
();
link
.
setPicUrl
(
"测试图片链接"
);
link
.
setMessageUrl
(
"
测试消息链接
"
);
link
.
setText
(
"
测试文本
"
);
link
.
setTitle
(
"
测试标题
"
);
link
.
setMessageUrl
(
"
http://www.baidu.com
"
);
link
.
setText
(
"
你有一条绩效考核核查通知,请及时查看!
"
);
link
.
setTitle
(
"
绩效考核核查通知
"
);
msg
.
setLink
(
link
);
workMsgReq
.
setUseridList
(
personRest
.
getMsg
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/AbstractDingTalkService.java
View file @
0cac0506
...
...
@@ -7,9 +7,12 @@ import com.dingtalk.api.response.OapiGettokenResponse;
import
com.hikvision.artemis.sdk.config.ArtemisConfig
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.pdu.ApiRespPdu
;
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.util.ObjectUtils
;
...
...
@@ -32,7 +35,7 @@ public abstract class AbstractDingTalkService implements IDingPersonService {
protected
Long
agentId
;
/**
*
AgentId
*
domain
*/
@Value
(
"${dingtalk.domain:https://oapi.dingtalk.com}"
)
protected
String
domain
;
...
...
@@ -49,43 +52,38 @@ public abstract class AbstractDingTalkService implements IDingPersonService {
@Value
(
"${dingtalk.AppSecret:''}"
)
protected
String
appSecret
;
/**
* getToken
*/
@Value
(
"${dingtalk.gettoken:https://oapi.dingtalk.com/gettoken}"
)
protected
String
getTokneUrl
;
protected
String
dingToken
;
@Autowired
private
ICacheService
cacheService
;
protected
DingTalkClient
getDingTalkClient
(
String
path
)
{
DingTalkClient
client
=
new
DefaultDingTalkClient
(
domain
+
path
);
return
client
;
}
protected
void
checkToken
()
{
if
(
ObjectUtils
.
isEmpty
(
dingToken
))
{
dingToken
=
getToken
().
getData
();
}
}
@Override
public
Rest
<
String
>
getToken
()
{
public
String
getToken
()
{
try
{
DingTalkClient
client
=
getDingTalkClient
(
"/gettoken"
);
OapiGettokenRequest
req
=
new
OapiGettokenRequest
();
req
.
setAppkey
(
appKey
);
req
.
setAppsecret
(
appSecret
);
OapiGettokenResponse
rsp
=
client
.
execute
(
req
);
log
.
info
(
"OapiGettokenResponse:{}"
,
rsp
.
getBody
());
if
(
rsp
.
getErrcode
()
==
0
)
{
return
Rest
.
ok
(
rsp
.
getAccessToken
());
String
dingToken
=
cacheService
.
get
(
RedisKey
.
KEY_DINGTALK_ACCESSTOKEN_CACHE
);
if
(
ObjectUtils
.
isEmpty
(
dingToken
))
{
DingTalkClient
client
=
getDingTalkClient
(
"/gettoken"
);
OapiGettokenRequest
req
=
new
OapiGettokenRequest
();
req
.
setAppkey
(
appKey
);
req
.
setAppsecret
(
appSecret
);
OapiGettokenResponse
rsp
=
client
.
execute
(
req
);
log
.
info
(
"OapiGettokenResponse:{}"
,
rsp
.
getBody
());
if
(
rsp
.
getErrcode
()
==
0
)
{
cacheService
.
setex
(
RedisKey
.
KEY_DINGTALK_ACCESSTOKEN_CACHE
,
rsp
.
getAccessToken
(),
4800
);
return
rsp
.
getAccessToken
();
}
else
{
throw
new
AppException
(
String
.
format
(
"code:{},errorMsg:{}"
,
rsp
.
getErrcode
(),
rsp
.
getErrmsg
()));
}
}
else
{
throw
new
AppException
(
rsp
.
getMessage
())
;
return
dingToken
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"获取TOKEN异常"
,
e
);
return
Rest
.
fail
(
e
.
getMessage
());
throw
new
AppException
(
e
.
getMessage
());
}
}
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/IDingTalkService.java
View file @
0cac0506
...
...
@@ -3,5 +3,5 @@ package com.mortals.xhx.module.dingding;
import
com.mortals.framework.common.Rest
;
public
interface
IDingTalkService
{
Rest
<
String
>
getToken
();
String
getToken
();
}
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dingding/personal/service/impl/DingPersonServiceImpl.java
View file @
0cac0506
...
...
@@ -24,11 +24,10 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
public
Rest
<
String
>
getPersonByMobile
(
String
mobile
)
{
try
{
DingTalkClient
client
=
getDingTalkClient
(
"/topapi/v2/user/getbymobile"
);
checkToken
();
OapiV2UserGetbymobileRequest
req
=
new
OapiV2UserGetbymobileRequest
();
req
.
setMobile
(
mobile
);
log
.
info
(
"getPersonByMobile:{}"
,
mobile
);
OapiV2UserGetbymobileResponse
rsp
=
client
.
execute
(
req
,
dingToken
);
OapiV2UserGetbymobileResponse
rsp
=
client
.
execute
(
req
,
getToken
()
);
log
.
info
(
"OapiV2UserGetbymobileResponse:{}"
,
rsp
.
getBody
());
if
(
rsp
.
getErrcode
()
==
0
)
{
return
Rest
.
ok
(
rsp
.
getResult
().
getUserid
());
...
...
@@ -45,13 +44,13 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
public
Rest
<
String
>
sendWorkMsg
(
WorkMsgReq
workMsgReq
)
{
try
{
DingTalkClient
client
=
getDingTalkClient
(
"/topapi/message/corpconversation/asyncsend_v2"
);
checkToken
();
OapiMessageCorpconversationAsyncsendV2Request
req
=
new
OapiMessageCorpconversationAsyncsendV2Request
();
req
.
setAgentId
(
agentId
);
req
.
setUseridList
(
workMsgReq
.
getUseridList
());
req
.
setMsg
(
JSON
.
toJSONString
(
workMsgReq
.
getMsg
()));
log
.
info
(
"sendWorkMsg:{}"
,
JSON
.
toJSONString
(
workMsgReq
));
OapiMessageCorpconversationAsyncsendV2Response
rsp
=
client
.
execute
(
req
,
dingToken
);
OapiMessageCorpconversationAsyncsendV2Response
rsp
=
client
.
execute
(
req
,
getToken
()
);
log
.
info
(
"OapiMessageResponse:{}"
,
rsp
.
getBody
());
if
(
rsp
.
getErrcode
()
==
0
)
{
return
Rest
.
ok
(
rsp
.
getMsg
(),
rsp
.
getRequestId
());
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/model/PerformAttendAppealEntity.java
View file @
0cac0506
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/java/com/mortals/xhx/module/perform/model/PerformAttendAppealQuery.java
View file @
0cac0506
This diff is collapsed.
Click to expand it.
attendance-performance-manager/src/main/resources/sqlmap/module/perform/PerformAttendAppealMapper.xml
View file @
0cac0506
This diff is collapsed.
Click to expand it.
db/add.sql
View file @
0cac0506
...
...
@@ -641,3 +641,12 @@ CREATE TABLE mortals_xhx_staff_perform_summary(
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'员工绩效统计'
;
-- ----------------------------
2023
-
7
-
15
-- ----------------------------
ALTER
TABLE
mortals_xhx_perform_attend_appeal
ADD
COLUMN
`deductPerson`
varchar
(
128
)
COMMENT
'扣分人员'
AFTER
subMethod
;
ALTER
TABLE
mortals_xhx_perform_attend_appeal
ADD
COLUMN
`deductTime`
datetime
COMMENT
'扣分时间'
AFTER
deductPerson
;
doc/考勤绩效管理系统.docx
View file @
0cac0506
No preview for this file type
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