Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
86d792dd
Commit
86d792dd
authored
Jul 29, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改审批
parent
e265f1df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
17 deletions
+24
-17
AuditLogApiServiceImpl.java
...enterprise/service/outer/impl/AuditLogApiServiceImpl.java
+24
-17
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AuditLogApiServiceImpl.java
View file @
86d792dd
...
...
@@ -122,7 +122,12 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
}
// 判断有没有审核员, 没有审核员就返回错误
ServiceResponse
<
List
<
AuditorDTO
>>
auditorResponse
=
auditorApiService
.
listAuditorByProject
(
auditLogDTO
.
getProjectItemId
(),
auditLogDTO
.
getApplyUserId
(),
auditLogDTO
.
getEnterpriseId
());
ServiceResponse
<
List
<
AuditorDTO
>>
auditorResponse
;
if
(
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
()))
{
auditorResponse
=
auditorApiService
.
listAuditorByProject
(
auditLogDTO
.
getProjectItemCode
(),
auditLogDTO
.
getEnterpriseId
());
}
else
{
auditorResponse
=
auditorApiService
.
listAuditorByProject
(
auditLogDTO
.
getProjectItemId
(),
auditLogDTO
.
getApplyUserId
(),
auditLogDTO
.
getEnterpriseId
());
}
// 普通管理员需要判断是否有审核员
if
(!
auditorResponse
.
isSuccess
())
{
...
...
@@ -162,7 +167,7 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
// 发送微信模板消息
sendWxMessage
(
auditorDTO
,
auditLogDTO
);
}
if
(
auditorDTO
.
getUserId
()
!=
null
)
{
if
(
auditorDTO
.
getUserId
()
!=
null
&&
!
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
())
)
{
ServiceResponse
<
UserDTO
>
userResponse
=
userApiService
.
getUserInfoById
(
auditorDTO
.
getUserId
());
if
(
userResponse
.
isSuccess
())
{
UserDTO
userDTO
=
userResponse
.
getResult
();
...
...
@@ -244,21 +249,23 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
// }
// 修改审批状态
auditLogService
.
updateAudit
(
auditLogDTO
);
// 回调
String
extraInfo
=
auditLog
.
getExtraInfo
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
extraInfo
);
jsonObject
.
put
(
"auditResult"
,
auditLogDTO
.
getAuditResult
());
jsonObject
.
put
(
"auditorId"
,
auditLogDTO
.
getAuditorId
());
jsonObject
.
put
(
"auditorPhone"
,
auditLogDTO
.
getAuditorPhone
());
jsonObject
.
put
(
"auditorName"
,
auditLogDTO
.
getAuditorName
());
jsonObject
.
put
(
"auditReason"
,
auditLogDTO
.
getAuditReason
());
String
[]
callback
=
projectItem
.
getCallbackUrl
().
split
(
GlobalInfo
.
FLAG_COMMA
);
AsyncCallbackUtils
.
callBack
(
jsonObject
,
callback
[
0
],
callback
[
1
]);
//发送通知消息
String
url
=
config
.
getHost
()
+
"/damo-system/examine-logs"
;
String
result
=
auditLogDTO
.
getAuditResult
()
==
1
?
"已通过"
:
"未通过"
;
String
content
=
"您的操作"
+
result
+
"审核,可以在<a href='"
+
url
+
"' style='color:#2f54ed'>审核日志</a>查看到本次审核记录"
;
this
.
pushMessageApiService
.
pushUserMessage
(
auditLog
.
getEnterpriseId
(),
auditLog
.
getApplyUserId
(),
"系统消息"
,
"审核结果"
,
content
);
if
(
StringUtils
.
isNotBlank
(
projectItem
.
getCallbackUrl
()))
{
// 回调
String
extraInfo
=
auditLog
.
getExtraInfo
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
extraInfo
);
jsonObject
.
put
(
"auditResult"
,
auditLogDTO
.
getAuditResult
());
jsonObject
.
put
(
"auditorId"
,
auditLogDTO
.
getAuditorId
());
jsonObject
.
put
(
"auditorPhone"
,
auditLogDTO
.
getAuditorPhone
());
jsonObject
.
put
(
"auditorName"
,
auditLogDTO
.
getAuditorName
());
jsonObject
.
put
(
"auditReason"
,
auditLogDTO
.
getAuditReason
());
String
[]
callback
=
projectItem
.
getCallbackUrl
().
split
(
GlobalInfo
.
FLAG_COMMA
);
AsyncCallbackUtils
.
callBack
(
jsonObject
,
callback
[
0
],
callback
[
1
]);
//发送通知消息
String
url
=
config
.
getHost
()
+
"/damo-system/examine-logs"
;
String
result
=
auditLogDTO
.
getAuditResult
()
==
1
?
"已通过"
:
"未通过"
;
String
content
=
"您的操作"
+
result
+
"审核,可以在<a href='"
+
url
+
"' style='color:#2f54ed'>审核日志</a>查看到本次审核记录"
;
this
.
pushMessageApiService
.
pushUserMessage
(
auditLog
.
getEnterpriseId
(),
auditLog
.
getApplyUserId
(),
"系统消息"
,
"审核结果"
,
content
);
}
return
EnterpriseServiceResponse
.
success
();
}
...
...
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