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
fa0010c1
Commit
fa0010c1
authored
Jul 30, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!27
parents
fca18a41
1b14eacc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
30 deletions
+47
-30
AuditLogApiServiceImpl.java
...enterprise/service/outer/impl/AuditLogApiServiceImpl.java
+36
-22
TabAuditLogMapper.xml
...e-service/src/main/resources/mapper/TabAuditLogMapper.xml
+0
-1
IndexModuleController.java
.../gic/enterprise/web/controller/IndexModuleController.java
+11
-7
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AuditLogApiServiceImpl.java
View file @
fa0010c1
...
...
@@ -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
();
}
...
...
@@ -350,19 +357,26 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
private
void
sendWxMessage
(
AuditorDTO
auditorDTO
,
AuditLogDTO
auditLogDTO
)
{
TabEnterprise
enterprise
=
enterpriseService
.
getEnterpriseById
(
auditLogDTO
.
getEnterpriseId
());
UserDTO
userDTO
=
userApiService
.
getUserById
(
auditLogDTO
.
getApplyUserId
()).
getResult
();
LoginUserTypeEnum
userTypeEnum
=
LoginUserTypeEnum
.
getByCode
(
userDTO
.
getLoginType
());
String
position
=
userTypeEnum
!=
null
?
userTypeEnum
.
getMessage
()
:
""
;
String
position
;
if
(
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
()))
{
position
=
StringUtils
.
isBlank
(
auditLogDTO
.
getPosition
())
?
""
:
auditLogDTO
.
getPosition
();
}
else
{
UserDTO
userDTO
=
userApiService
.
getUserById
(
auditLogDTO
.
getApplyUserId
()).
getResult
();
LoginUserTypeEnum
userTypeEnum
=
LoginUserTypeEnum
.
getByCode
(
userDTO
.
getLoginType
());
position
=
userTypeEnum
!=
null
?
userTypeEnum
.
getMessage
()
:
""
;
}
String
[]
keyWord
=
{
enterprise
.
getEnterpriseName
(),
auditLogDTO
.
getApplyUserName
(),
position
,
auditLogDTO
.
getProjectItemName
()};
// todo 跳转地址
String
url
;
if
(
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
()))
{
url
=
auditLogDTO
.
getAuditUrl
(
);
url
=
String
.
format
(
"%s%s?auditLogId=%d&openid=%s"
,
config
.
getHost
(),
auditLogDTO
.
getAuditUrl
(),
auditLogDTO
.
getAuditLogId
(),
auditorDTO
.
getOpenid
()
);
}
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
);
ServiceResponse
<
String
>
serviceResponse
=
this
.
wxTemplateRouterApiService
.
sendForDownloadData
(
auditorDTO
.
getOpenid
(),
url
,
keyWord
);
logger
.
info
(
"微信跳转结果:{},{}"
,
serviceResponse
.
getResult
(),
serviceResponse
.
getMessage
());
}
}
gic-platform-enterprise-service/src/main/resources/mapper/TabAuditLogMapper.xml
View file @
fa0010c1
...
...
@@ -265,7 +265,6 @@
from tab_audit_log
where status = 1
and audit_result = 0
-- and audit_expire_time
<
#{auditExpireTime}
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/IndexModuleController.java
View file @
fa0010c1
package
com
.
gic
.
enterprise
.
web
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.ChannelResourceDTO
;
...
...
@@ -10,7 +9,10 @@ import com.gic.commons.webapi.reponse.RestResponse;
import
com.gic.data.api.dto.*
;
import
com.gic.data.api.service.MemberDataApiService
;
import
com.gic.data.api.service.StoreStatisicsApiService
;
import
com.gic.enterprise.dto.*
;
import
com.gic.enterprise.dto.HelpCenterDTO
;
import
com.gic.enterprise.dto.IndexModuleDTO
;
import
com.gic.enterprise.dto.PushTypeDTO
;
import
com.gic.enterprise.dto.UserMessageDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.qo.PageQO
;
import
com.gic.enterprise.service.HelpCenterApiService
;
...
...
@@ -33,7 +35,6 @@ import com.gic.store.dto.StoreSearchDTO;
import
com.gic.store.service.ProvincesApiService
;
import
com.gic.store.service.StoreApiService
;
import
com.gic.store.service.StoreWidgetApiService
;
import
org.apache.catalina.User
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -44,7 +45,10 @@ import org.springframework.web.bind.annotation.RestController;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
*
...
...
@@ -315,7 +319,7 @@ public class IndexModuleController {
List
<
ResouceVO
>
applet
=
new
ArrayList
<>();
List
<
ResouceVO
>
service
=
new
ArrayList
<>();
List
<
ResouceVO
>
card
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
appletConfigIdList
)){
if
(
CollectionUtils
.
isNotEmpty
(
appletConfigIdList
)
&&
CollectionUtils
.
isNotEmpty
(
appletList
)
){
for
(
Long
s
:
appletConfigIdList
){
for
(
AppletsConfigSimpleOutputDTO
dto
:
appletList
){
if
(
s
.
longValue
()
==
dto
.
getAppletConfigId
().
longValue
()){
...
...
@@ -327,7 +331,7 @@ public class IndexModuleController {
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
serviceConfigIdList
)){
if
(
CollectionUtils
.
isNotEmpty
(
serviceConfigIdList
)
&&
CollectionUtils
.
isNotEmpty
(
serviceList
)
){
for
(
Long
s
:
serviceConfigIdList
){
for
(
ServiceConfigSimpleOutputDTO
dto
:
serviceList
){
if
(
s
.
longValue
()
==
dto
.
getServiceConfigId
().
longValue
()){
...
...
@@ -339,7 +343,7 @@ public class IndexModuleController {
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
cardConfigIdList
)){
if
(
CollectionUtils
.
isNotEmpty
(
cardConfigIdList
)
&&
CollectionUtils
.
isNotEmpty
(
memberCardList
)
){
for
(
Long
s
:
cardConfigIdList
){
for
(
OwnerMemberCardDTO
dto
:
memberCardList
){
if
(
s
.
longValue
()
==
dto
.
getCardConfigId
().
longValue
()){
...
...
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