Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
e999f785
Commit
e999f785
authored
Aug 16, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.删除无用代码
parent
e4247baf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
105 deletions
+4
-105
AppServiceImpl.java
...mos/maintenance/business/service/impl/AppServiceImpl.java
+0
-10
RemoteSpcService.java
...join/amos/maintenance/common/remote/RemoteSpcService.java
+0
-86
RemoteWorkFlowService.java
...amos/maintenance/common/remote/RemoteWorkFlowService.java
+0
-0
application-dev.properties
...maintenance/src/main/resources/application-dev.properties
+4
-9
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/AppServiceImpl.java
View file @
e999f785
...
@@ -11,7 +11,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.IAppService;
...
@@ -11,7 +11,6 @@ import com.yeejoin.amos.maintenance.business.service.intfc.IAppService;
import
com.yeejoin.amos.maintenance.business.service.intfc.IMsgSubscribeService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IMsgSubscribeService
;
import
com.yeejoin.amos.maintenance.common.enums.MsgSubscribeTypeEnum
;
import
com.yeejoin.amos.maintenance.common.enums.MsgSubscribeTypeEnum
;
import
com.yeejoin.amos.maintenance.common.enums.YesOrNoEnum
;
import
com.yeejoin.amos.maintenance.common.enums.YesOrNoEnum
;
import
com.yeejoin.amos.maintenance.common.remote.RemoteWorkFlowService
;
import
com.yeejoin.amos.maintenance.dao.entity.AppVersion
;
import
com.yeejoin.amos.maintenance.dao.entity.AppVersion
;
import
com.yeejoin.amos.maintenance.dao.entity.MsgSubscribe
;
import
com.yeejoin.amos.maintenance.dao.entity.MsgSubscribe
;
import
org.assertj.core.util.Lists
;
import
org.assertj.core.util.Lists
;
...
@@ -29,8 +28,6 @@ public class AppServiceImpl implements IAppService {
...
@@ -29,8 +28,6 @@ public class AppServiceImpl implements IAppService {
@Autowired
@Autowired
private
AppVersionDao
appVersionDao
;
private
AppVersionDao
appVersionDao
;
@Autowired
@Autowired
private
RemoteWorkFlowService
remoteWorkFlowService
;
@Autowired
private
IMsgSubscribeService
msgSubscribeService
;
private
IMsgSubscribeService
msgSubscribeService
;
@Autowired
@Autowired
...
@@ -85,13 +82,6 @@ public class AppServiceImpl implements IAppService {
...
@@ -85,13 +82,6 @@ public class AppServiceImpl implements IAppService {
if
(
taskCount
>
0
)
{
if
(
taskCount
>
0
)
{
havetoDoList
.
add
(
"planPatrol"
);
havetoDoList
.
add
(
"planPatrol"
);
}
}
JSONObject
respBody
=
remoteWorkFlowService
.
pageTask
(
userId
,
Integer
.
parseInt
(
YesOrNoEnum
.
YES
.
getCode
()));
JSONArray
taskJsonList
=
respBody
.
getJSONArray
(
"data"
);
List
<
JSONObject
>
taskList
=
JSONObject
.
parseArray
(
taskJsonList
.
toJSONString
(),
JSONObject
.
class
);
List
<
String
>
bussinessKeys
=
new
ArrayList
<>();
for
(
JSONObject
json
:
taskList
)
{
bussinessKeys
.
add
(
json
.
getString
(
"businessKey"
));
}
return
havetoDoList
;
return
havetoDoList
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/common/remote/RemoteSpcService.java
deleted
100644 → 0
View file @
e4247baf
package
com
.
yeejoin
.
amos
.
maintenance
.
common
.
remote
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.maintenance.business.util.HttpUtil
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.common.enums.RiskFactorWorkFlowActionTypeEnum
;
import
com.yeejoin.amos.maintenance.common.enums.WorkFlowRiskFactorUriEnum
;
import
com.yeejoin.amos.maintenance.core.common.request.CheckResultPushSpcRequest
;
import
com.yeejoin.amos.maintenance.core.common.request.LatentDangerResultPushSpcRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
java.util.Map
;
@Service
(
"remoteSpcService"
)
public
class
RemoteSpcService
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
RemoteSpcService
.
class
);
@Value
(
"${params.spc.address}"
)
private
String
address
;
private
static
final
String
success
=
"SUCCESS"
;
private
String
buildUrl
(
String
address
,
WorkFlowRiskFactorUriEnum
workFlowRiskFactorUriEnum
,
Map
<
String
,
String
>
map
)
{
String
uri
=
workFlowRiskFactorUriEnum
.
getUri
();
String
params
=
workFlowRiskFactorUriEnum
.
getParams
();
if
(!
StringUtils
.
isEmpty
(
params
)
&&
map
!=
null
)
{
String
[]
paramsArr
=
params
.
split
(
","
);
for
(
String
param
:
paramsArr
)
{
uri
=
uri
.
replace
(
"{"
+
param
+
"}"
,
map
.
get
(
param
));
}
}
return
address
+
uri
;
}
private
JSONObject
handleResult
(
String
resultStr
)
{
if
(
resultStr
==
null
)
{
return
null
;
}
JSONObject
json
=
JSON
.
parseObject
(
resultStr
);
if
(
success
.
equals
(
json
.
getString
(
"result"
)))
{
return
json
;
}
return
null
;
}
public
JSONObject
wakeUpOrRestartRiskFactorFlow
(
String
instanceId
,
WorkFlowRiskFactorUriEnum
factorUriEnum
,
String
token
,
RiskFactorWorkFlowActionTypeEnum
actionType
)
{
String
url
=
buildUrl
(
address
,
factorUriEnum
,
null
);
JSONObject
body
=
new
JSONObject
();
body
.
put
(
"instanceId"
,
instanceId
);
body
.
put
(
"actionType"
,
actionType
.
getActionType
());
Map
<
String
,
String
>
headerMap
=
Maps
.
newHashMap
();
headerMap
.
put
(
XJConstant
.
TOKEN_KEY
,
token
);
String
resultStr
=
HttpUtil
.
sendHttpPostJsonWithHeader
(
url
,
body
.
toJSONString
(),
headerMap
);
return
handleResult
(
resultStr
);
}
public
JSONObject
pushSpcCheckResult
(
CheckResultPushSpcRequest
checkResultPushSpcRequest
)
{
String
url
=
buildUrl
(
address
,
WorkFlowRiskFactorUriEnum
.
检查结果推送
,
null
);
String
stringJson
=
JSONObject
.
toJSONString
(
checkResultPushSpcRequest
);
String
resultStr
=
HttpUtil
.
sendHttpPostJson
(
url
,
stringJson
);
return
handleResult
(
resultStr
);
}
public
JSONObject
pushLatentDangerExcuteResult
(
LatentDangerResultPushSpcRequest
latentDangerResultPushSpcRequest
)
{
String
url
=
buildUrl
(
address
,
WorkFlowRiskFactorUriEnum
.
隐患治理结果推送
,
null
);
String
stringJson
=
JSONObject
.
toJSONString
(
latentDangerResultPushSpcRequest
);
String
resultStr
=
HttpUtil
.
sendHttpPostJson
(
url
,
stringJson
);
logger
.
info
(
"\r\n请求路径=======================>"
+
url
+
"\r\n请求参数=======================>"
+
stringJson
+
"\r\n返回参数=======================>"
+
resultStr
);
return
handleResult
(
resultStr
);
}
public
JSONObject
queryPagetree
()
{
String
url
=
buildUrl
(
address
,
WorkFlowRiskFactorUriEnum
.
等级查询
,
null
);
String
resultStr
=
HttpUtil
.
sendHttpPostJson
(
url
,
null
);
return
handleResult
(
resultStr
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/common/remote/RemoteWorkFlowService.java
deleted
100644 → 0
View file @
e4247baf
This diff is collapsed.
Click to expand it.
amos-boot-system-maintenance/src/main/resources/application-dev.properties
View file @
e999f785
...
@@ -25,12 +25,6 @@ spring.redis.timeout=1000
...
@@ -25,12 +25,6 @@ spring.redis.timeout=1000
jobs.cron
=
0 0/1 22-23 * * ?
jobs.cron
=
0 0/1 22-23 * * ?
#jpush 推送配置项
#jpush 推送配置项
params.isPush
=
false
params.isPush
=
false
params.work.flow.normalProcessDefinitionKey
=
normalHazardManagement
params.work.flow.processDefinitionKey
=
hazardManagement
params.work.flow.address
=
http://172.16.10.80:30040
params.spc.address
=
http://172.16.3.89:9001
#websocket
#websocket
params.remoteWebsocketUrl
=
http://39.100.241.164:8080/
params.remoteWebsocketUrl
=
http://39.100.241.164:8080/
#websocket send message url
#websocket send message url
...
@@ -45,9 +39,9 @@ linux.img.path = /
...
@@ -45,9 +39,9 @@ linux.img.path = /
## emqx
## emqx
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}-1
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}-1
emqx.broker
=
tcp://172.16.1
0.85
:1883
emqx.broker
=
tcp://172.16.1
1.33
:1883
emqx.user-name
=
super
emqx.user-name
=
admin
emqx.password
=
a123456
emqx.password
=
public
emqx.max-inflight
=
1000
emqx.max-inflight
=
1000
file.url
=
http://39.98.45.134:9000/
file.url
=
http://39.98.45.134:9000/
\ No newline at end of file
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