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
2be5ba07
Commit
2be5ba07
authored
Jul 28, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好办导购
parent
4dfad34f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
18 deletions
+35
-18
AuditTypeEnum.java
.../main/java/com/gic/enterprise/constant/AuditTypeEnum.java
+2
-1
AuditLogDTO.java
...api/src/main/java/com/gic/enterprise/dto/AuditLogDTO.java
+10
-0
AuditLogApiServiceImpl.java
...enterprise/service/outer/impl/AuditLogApiServiceImpl.java
+23
-17
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/AuditTypeEnum.java
View file @
2be5ba07
...
...
@@ -9,7 +9,8 @@ package com.gic.enterprise.constant;
public
enum
AuditTypeEnum
{
NORMAL
(
0
,
"普通审批项"
),
RISK_MODE
(
1
,
"风险模式审批"
),
DOWNLOAD_REPORT
(
2
,
"下载申请"
)
DOWNLOAD_REPORT
(
2
,
"下载申请"
),
HAOBAN
(
3
,
"好办"
)
;
private
Integer
code
;
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/AuditLogDTO.java
View file @
2be5ba07
...
...
@@ -14,6 +14,7 @@ import java.util.Date;
public
class
AuditLogDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
5504276110192964185L
;
public
interface
ApplyValid
{}
/**
...
...
@@ -117,6 +118,15 @@ public class AuditLogDTO implements Serializable {
private
String
position
;
private
String
projectName
;
private
String
applyUserPhone
;
private
String
auditUrl
;
public
String
getAuditUrl
()
{
return
auditUrl
;
}
public
void
setAuditUrl
(
String
auditUrl
)
{
this
.
auditUrl
=
auditUrl
;
}
public
Integer
getAuditLogId
()
{
return
auditLogId
;
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AuditLogApiServiceImpl.java
View file @
2be5ba07
...
...
@@ -97,23 +97,24 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
auditLogDTO
.
setProjectItemId
(
projectItem
.
getProjectItemId
());
auditLogDTO
.
setProjectItemName
(
projectItem
.
getProjectItemName
());
// 判断申请人是否存在
ServiceResponse
<
UserDTO
>
userServiceResponse
=
userApiService
.
getUserInfoById
(
auditLogDTO
.
getApplyUserId
());
if
(!
userServiceResponse
.
isSuccess
())
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
);
}
auditLogDTO
.
setApplyUserName
(
userServiceResponse
.
getResult
().
getUserName
());
auditLogDTO
.
setApplyUserPhone
(
userServiceResponse
.
getResult
().
getPhoneNumber
());
// 如果审批项是被禁用的 直接通过
if
(
projectItem
.
getUseStatus
()
==
0
||
userServiceResponse
.
getResult
().
getSuperAdmin
()
==
1
)
{
String
extraInfo
=
auditLogDTO
.
getExtraInfo
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
extraInfo
);
jsonObject
.
put
(
"auditResult"
,
DataSecurityAuditEnum
.
PASS
.
getCode
());
String
[]
callback
=
projectItem
.
getCallbackUrl
().
split
(
GlobalInfo
.
FLAG_COMMA
);
AsyncCallbackUtils
.
callBack
(
jsonObject
,
callback
[
0
],
callback
[
1
]);
return
EnterpriseServiceResponse
.
success
();
if
(!
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
()))
{
// 如果不是好办的 需要判断申请人
ServiceResponse
<
UserDTO
>
userServiceResponse
=
userApiService
.
getUserInfoById
(
auditLogDTO
.
getApplyUserId
());
if
(!
userServiceResponse
.
isSuccess
())
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
);
}
auditLogDTO
.
setApplyUserName
(
userServiceResponse
.
getResult
().
getUserName
());
auditLogDTO
.
setApplyUserPhone
(
userServiceResponse
.
getResult
().
getPhoneNumber
());
// 如果审批项是被禁用的 直接通过
if
(
projectItem
.
getUseStatus
()
==
0
||
userServiceResponse
.
getResult
().
getSuperAdmin
()
==
1
)
{
String
extraInfo
=
auditLogDTO
.
getExtraInfo
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
extraInfo
);
jsonObject
.
put
(
"auditResult"
,
DataSecurityAuditEnum
.
PASS
.
getCode
());
String
[]
callback
=
projectItem
.
getCallbackUrl
().
split
(
GlobalInfo
.
FLAG_COMMA
);
AsyncCallbackUtils
.
callBack
(
jsonObject
,
callback
[
0
],
callback
[
1
]);
return
EnterpriseServiceResponse
.
success
();
}
}
if
(
Constants
.
NORMAL_STATUS
.
equals
(
projectItem
.
getIsPlatform
()))
{
// todo 如果是平台审批项, 同一个平台审批项 如果24小时内有审核成功的,就拒绝提交
...
...
@@ -354,7 +355,12 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
String
position
=
userTypeEnum
!=
null
?
userTypeEnum
.
getMessage
()
:
""
;
String
[]
keyWord
=
{
enterprise
.
getEnterpriseName
(),
auditLogDTO
.
getApplyUserName
(),
position
,
auditLogDTO
.
getProjectItemName
()};
// todo 跳转地址
String
url
=
String
.
format
(
"%s/damo-system/wechat-approve.html?auditLogId=%d&openid=%s"
,
config
.
getHost
(),
auditLogDTO
.
getAuditLogId
(),
auditorDTO
.
getOpenid
());
String
url
;
if
(
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
()))
{
url
=
auditLogDTO
.
getAuditUrl
();
}
else
{
url
=
String
.
format
(
"%s/damo-system/wechat-approve.html?auditLogId=%d&openid=%s"
,
config
.
getHost
(),
auditLogDTO
.
getAuditLogId
(),
auditorDTO
.
getOpenid
());
}
logger
.
info
(
"微信跳转 url:{}"
,
url
);
this
.
wxTemplateRouterApiService
.
sendForDownloadData
(
auditorDTO
.
getOpenid
(),
url
,
keyWord
);
}
...
...
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