Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
66bc74c0
Commit
66bc74c0
authored
Nov 06, 2020
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改系统账号登陆信息存储
parent
028f276b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
245 additions
and
340 deletions
+245
-340
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+0
-0
ContingencyRo.java
...yeejoin/amos/fas/business/action/model/ContingencyRo.java
+5
-1
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+0
-6
PushFeignServer.java
.../com/yeejoin/amos/fas/business/feign/PushFeignServer.java
+51
-51
RemoteRuleServer.java
...com/yeejoin/amos/fas/business/feign/RemoteRuleServer.java
+0
-0
RemoteSecurityService.java
...eejoin/amos/fas/business/feign/RemoteSecurityService.java
+45
-20
AppMessagePushService.java
...eejoin/amos/fas/business/jpush/AppMessagePushService.java
+3
-51
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+0
-4
DataRefreshServiceImpl.java
...mos/fas/business/service/impl/DataRefreshServiceImpl.java
+1
-0
FmeaServiceImpl.java
...ejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
+16
-76
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+0
-0
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+0
-6
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+0
-1
HttpUtil.java
...ain/java/com/yeejoin/amos/fas/business/util/HttpUtil.java
+109
-109
RsDataQueue.java
.../java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
+9
-8
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+3
-2
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+1
-2
application-test.properties
...toSysStart/src/main/resources/application-test.properties
+1
-2
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+1
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
66bc74c0
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/ContingencyRo.java
View file @
66bc74c0
...
...
@@ -17,7 +17,7 @@ public class ContingencyRo implements Serializable {
/**
*
*/
private
static
final
long
serialVersionUID
=
1863437780244849215
L
;
private
static
final
long
serialVersionUID
=
-
8687517896814257800
L
;
@Label
(
"消防设备名称"
)
private
String
fireEquipmentName
;
//消防设备名称
@Label
(
"消防设备id"
)
...
...
@@ -35,6 +35,10 @@ public class ContingencyRo implements Serializable {
//负责人名称,手机号
@Label
(
"重点设备id"
)
private
String
equipmentId
;
//重点设备id
@Label
(
"重点设备组织编码"
)
private
String
equipmentOrgCode
=
"10"
;
//重点设备组织编码
@Label
(
"重点设备名称"
)
private
String
equipmentName
;
@Label
(
"重点设备坐标"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
66bc74c0
...
...
@@ -278,10 +278,4 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
view3dService
.
listPointsByRegionId
(
regionId
,
type
));
}
@Permission
@ApiOperation
(
value
=
"预案人员测试方法"
,
notes
=
"预案人员测试方法"
)
@GetMapping
(
value
=
"dutyListByDate"
)
public
Map
<
String
,
String
>
getDutyListByDate
(){
return
view3dService
.
getDutyListByDate
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/PushFeignServer.java
View file @
66bc74c0
package
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
com.yeejoin.amos.fas.business.jpush.PushMsgParam
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
@Service
(
"pushFeignServer"
)
public
class
PushFeignServer
{
private
final
RestTemplate
restTemplate
;
public
PushFeignServer
()
{
this
.
restTemplate
=
new
RestTemplate
();
}
@Value
(
"${Push.fegin.name}"
)
private
String
RPushFeginName
;
private
static
String
sendMessage
=
"/api/user/sendMessage"
;
public
String
geturls
(
String
url
){
return
"http://"
+
RPushFeginName
+
url
;
}
public
HttpHeaders
getHeader
(
String
toke
,
String
product
,
String
appKey
){
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
set
(
"Content-Type"
,
"application/json"
);
headers
.
set
(
"token"
,
toke
);
headers
.
set
(
"product"
,
product
);
headers
.
set
(
"appKey"
,
appKey
);
return
headers
;
}
public
CommonResponse
sendMessage
(
String
toke
,
String
product
,
String
appKey
,
List
<
PushMsgParam
>
pushMsgParam
){
try
{
HttpEntity
httpEntity
=
new
HttpEntity
<>(
pushMsgParam
,
getHeader
(
toke
,
product
,
appKey
));
CommonResponse
commonResponse1
=
restTemplate
.
postForObject
(
geturls
(
sendMessage
),
httpEntity
,
CommonResponse
.
class
);
return
commonResponse1
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
CommonResponseUtil
.
failure
(
"发送失败"
);
}
}
}
//
package com.yeejoin.amos.fas.business.feign;
//
//
import java.util.List;
//
//
import org.springframework.beans.factory.annotation.Value;
//
import org.springframework.http.HttpEntity;
//
import org.springframework.http.HttpHeaders;
//
import org.springframework.http.MediaType;
//
import org.springframework.stereotype.Service;
//
import org.springframework.web.client.RestTemplate;
//
//
import com.yeejoin.amos.fas.business.jpush.PushMsgParam;
//
import com.yeejoin.amos.fas.core.util.CommonResponse;
//
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
//
@Service("pushFeignServer")
//
public class PushFeignServer {
//
private final RestTemplate restTemplate;
//
//
public PushFeignServer() {
//
this.restTemplate = new RestTemplate();
//
}
//
//
@Value("${Push.fegin.name}")
//
private String RPushFeginName;
//
private static String sendMessage = "/api/user/sendMessage";
//
//
public String geturls(String url){
//
return "http://"+RPushFeginName+url;
//
}
//
public HttpHeaders getHeader(String toke,String product,String appKey){
//
HttpHeaders headers = new HttpHeaders();
//
headers.setContentType(MediaType.APPLICATION_JSON);
//
headers.set("Content-Type", "application/json");
//
headers.set("token", toke);
//
headers.set("product",product);
//
headers.set("appKey", appKey);
//
return headers;
//
}
//
//
public CommonResponse sendMessage( String toke,String product,String appKey, List<PushMsgParam> pushMsgParam){
//
try {
//
HttpEntity httpEntity = new HttpEntity<>(pushMsgParam, getHeader( toke, product, appKey));
//
CommonResponse commonResponse1 = restTemplate.postForObject(geturls(sendMessage),httpEntity, CommonResponse.class);
//
return commonResponse1;
//
} catch (Exception e) {
//
e.printStackTrace();
//
return CommonResponseUtil.failure("发送失败");
//
//
}
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/RemoteRuleServer.java
View file @
66bc74c0
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/RemoteSecurityService.java
View file @
66bc74c0
...
...
@@ -6,16 +6,25 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.config.TokenOperation
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.util.CacheFactory
;
import
com.yeejoin.amos.fas.business.util.CacheMap
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.exception.PermissionException
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.*
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.ArrayList
;
...
...
@@ -23,6 +32,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
@Service
(
"remoteSecurityService"
)
...
...
@@ -35,12 +45,13 @@ public class RemoteSecurityService {
private
String
productWeb
;
@Value
(
"${security.appKeyWeb}"
)
private
String
appKeyWeb
;
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
//根据公司名称获取公司人
public
List
<
CompanyModel
>
listCompanyTree
(
String
toke
,
String
product
,
String
appKey
,
String
companyName
)
{
// CommonResponse commonResponse = iAmosSecurityServer.listCompanyTree();
//return handleArray(commonResponse, CompanyBo.class);
RequestContext
.
setToken
(
toke
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
...
...
@@ -61,9 +72,6 @@ public class RemoteSecurityService {
if
(
deparmentId
==
null
||
deparmentId
.
equals
(
""
))
{
return
null
;
}
// CommonResponse commonResponse = iAmosSecurityServer.getDepartmentByDeptId(deparmentId);
// return handleObj(commonResponse, DepartmentBo.class);
RequestContext
.
setToken
(
toke
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
...
...
@@ -97,8 +105,6 @@ public class RemoteSecurityService {
}
return
departmentModel
;
//CommonResponse commonResponse = iAmosSecurityServer.listDepartmentsByCompanyId(companyId);
//return handleArray(commonResponse, DepartmentBo.class);
}
// * 根据公司id查询机构用户
public
List
<
AgencyUserModel
>
listUserByCompanyId
(
String
toke
,
String
product
,
String
appKey
,
String
companyId
)
{
...
...
@@ -144,27 +150,46 @@ public class RemoteSecurityService {
return
agencyUserModel
;
}
public
Toke
come
()
{
public
Toke
getServerToken
()
{
IdPasswordAuthModel
dPasswordAuthModel
=
new
IdPasswordAuthModel
();
dPasswordAuthModel
.
setLoginId
(
loginId
);
dPasswordAuthModel
.
setPassword
(
password
);
Map
map
=
null
;
FeignClientResult
feignClientResult
;
Toke
oked
=
new
Toke
();
Toke
toke
=
null
;
try
{
RequestContext
.
setProduct
(
productWeb
);
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
map
=
(
Map
)
feignClientResult
.
getResult
(
);
if
(
map
!=
null
){
oked
.
setToke
(
map
.
get
(
"token"
).
toString
());
oked
.
setProduct
(
productWeb
);
oked
.
setAppKey
(
appKeyWeb
);
toke
=
JSON
.
parseObject
(
redisTemplate
.
opsForValue
().
get
(
buildKey
(
loginId
)),
Toke
.
class
);
if
(
ObjectUtils
.
isEmpty
(
toke
)){
toke
=
getLogin
(
dPasswordAuthModel
);
}
else
{
if
(!
TokenOperation
.
refresh
(
toke
.
getToke
()))
{
toke
=
getLogin
(
dPasswordAuthModel
);
}
}
}
catch
(
InnerInvokException
e
)
{
e
.
printStackTrace
();
}
return
oked
;
return
toke
;
}
private
Toke
getLogin
(
IdPasswordAuthModel
dPasswordAuthModel
){
Toke
toke
=
new
Toke
();
RequestContext
.
setProduct
(
productWeb
);
FeignClientResult
feignClientResult
=
Privilege
.
authClient
.
idpassword
(
dPasswordAuthModel
);
Map
map
=
(
Map
)
feignClientResult
.
getResult
();
if
(
map
!=
null
){
toke
.
setToke
(
map
.
get
(
"token"
).
toString
());
toke
.
setProduct
(
productWeb
);
toke
.
setAppKey
(
appKeyWeb
);
redisTemplate
.
opsForValue
().
set
(
buildKey
(
dPasswordAuthModel
.
getLoginId
()),
JSONObject
.
toJSONString
(
toke
),
28
,
TimeUnit
.
DAYS
);
}
return
toke
;
}
//redi缓存系统用户token信息
private
String
buildKey
(
String
username
)
{
return
"system_"
+
username
;
}
/**
* 用户id批量获取用户信息
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/jpush/AppMessagePushService.java
View file @
66bc74c0
package
com
.
yeejoin
.
amos
.
fas
.
business
.
jpush
;
import
cn.jpush.api.JPushClient
;
import
cn.jpush.api.push.model.Platform
;
import
cn.jpush.api.push.model.PushPayload
;
import
cn.jpush.api.push.model.audience.Audience
;
import
cn.jpush.api.push.model.notification.Notification
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
cn.jpush.api.push.model.PushPayload
;
@Service
public
class
AppMessagePushService
{
protected
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
AppMessagePushService
.
class
);
/*
@Value("${params.isPush}")
private String isPush;
private static final String APP_KEY = "1b3f7b961200f4b236811dfe";
private static final String MASTER_SECRET = "8b650e645fb3a43c96be02b2";
private static JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY);
*/
@Autowired
private
com
.
yeejoin
.
amos
.
fas
.
business
.
feign
.
PushFeign
PushFeign
;
// public void sendMessage(List<PushMsgParam> responses) {
// try {
// if (responses != null && "true".equals(isPush)) {
// for (PushMsgParam response : responses) {
// PushPayload payload = buildPushPayload(response);
// jpushClient.sendPush(payload);
// }
// }
// } catch (Exception e) {
// log.error("极光推送异常", e);
// }
// }
private
PushPayload
buildPushPayload
(
PushMsgParam
response
)
{
CommonResponse
commonResponse
=
PushFeign
.
buildPushPayload
(
response
);
return
(
PushPayload
)
commonResponse
.
getDataList
();
// if (JPushTypeEnum.ALL.getCode().equals(response.getType())) {
// return PushPayload.newBuilder()
// .setPlatform(Platform.android())
// .setAudience(Audience.all())
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
// .build();
// } else if (JPushTypeEnum.TAG.getCode().equals(response.getType())) {
// return PushPayload.newBuilder()
// .setPlatform(Platform.android())
// .setAudience(Audience.tag(response.getRecivers()))
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
// .build();
// } else {
// return PushPayload.newBuilder()
// .setPlatform(Platform.android())
// .setAudience(Audience.alias(response.getRecivers()))
// .setNotification(Notification.android(response.getContent(), response.getSubject(), response.getExtras()))
// .build();
// }
}
public
void
sendMessage
(
PushMsgParam
response
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
66bc74c0
...
...
@@ -31,7 +31,6 @@ import com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.feign.RemoteRuleServer
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.model.Operate
;
import
com.yeejoin.amos.fas.business.service.model.OperateGroup
;
...
...
@@ -51,9 +50,6 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
IContingencyOriginalDataDao
iContingencyOriginalDataDao
;
@Autowired
private
RemoteRuleServer
remoteRuleServer
;
@Autowired
private
RestTemplate
restTemplate
;
@Autowired
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/DataRefreshServiceImpl.java
View file @
66bc74c0
...
...
@@ -53,6 +53,7 @@ public class DataRefreshServiceImpl implements IDataRefreshService {
remoteWebSocketServer
.
sendMessage
(
"3dViewMessage"
,
JSON
.
toJSONString
(
param
));
}
catch
(
Exception
e
)
{
log
.
error
(
"通知前端数据刷新失败-->"
+
JSON
.
toJSONString
(
param
));
log
.
error
(
"通知前端数据刷新失败-->"
+
e
.
getMessage
());
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
View file @
66bc74c0
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.action.model.RiskSourceRo
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper
;
...
...
@@ -11,7 +26,6 @@ import com.yeejoin.amos.fas.business.dao.repository.IFmeaDao;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteRuleServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IFmeaService
;
...
...
@@ -20,20 +34,8 @@ import com.yeejoin.amos.fas.dao.entity.Fmea;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.bouncycastle.util.Arrays
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
(
"fmeaService"
)
public
class
FmeaServiceImpl
implements
IFmeaService
{
...
...
@@ -120,26 +122,6 @@ public class FmeaServiceImpl implements IFmeaService {
}
// public void updateRpniInfo(Long riskSourceId) {
//
//
// new Thread(() ->
// {
// String batchNo = UUID.randomUUID().toString();
//
// List<RiskSource> riskSources = new ArrayList<>();
//
// RiskSource riskSource = this.iRiskSourceDao.findById(riskSourceId);
// riskSources.add(riskSource);
// try {
// asymbleWithParent(batchNo, riskSources, RiskFactor.class.getSimpleName());
// } catch (Exception e) {
// e.printStackTrace();
// }
// }).start();
//
// }
@Override
public
int
queryControlObjCount
(
String
[]
ids
)
{
int
count1
=
iFmeaDao
.
countAssociatedEquipPointByIds
(
ids
);
...
...
@@ -150,48 +132,6 @@ public class FmeaServiceImpl implements IFmeaService {
return
0
;
//没有关联对象
}
// private boolean asymbleWithParent(String bacthNo, List<RiskSource> riskSourceList, String from) throws Exception {
// if (!CollectionUtils.isEmpty(riskSourceList)) {
// for (RiskSource riskSource : riskSourceList) {
// //当前规则
// RiskSourceRo riskSourceRo = this.transfer(bacthNo, riskSource, from, new BigDecimal(0));
//
// Object result = remoteRuleServer.fireRule(riskSourceRo, "风险管控/riskFactor");
// BigDecimal RPNi = updateRpn(result, riskSource, null);
// //处理返回结果
//
// //反查 父级风险点,取得处于第二级的父级风险点
// findParent(bacthNo, riskSource, RPNi);
// }
// }
// return true;
// }
// /**
// * 查询父节点风险点
// *
// * @param riskSource
// * @param RPNi
// * @return
// */
// private BigDecimal findParent(String bacthNo, RiskSource riskSource,
// BigDecimal RPNi) throws Exception {
// if (riskSource != null && riskSource.getId() != 0 && RPNi.doubleValue() != 0) {
// RiskSource parent = this.iRiskSourceDao.findOne(riskSource.getParentId());
// if (null != parent) {
// RiskSourceRo parentRiskResource = this.transfer(bacthNo, parent, "child", RPNi);
// Object result = remoteRuleServer.fireRule(parentRiskResource, "风险管控/riskFactorParent");
// updateRpn(result, parent, RPNi);
//
// if (parent.getParentId() != 0)
// this.findParent(bacthNo, parent, RPNi);
// }
// }
//
// return RPNi;
// }
private
RiskSourceRo
transfer
(
String
bacthNo
,
RiskSource
riskSource
,
String
from
,
BigDecimal
rpni
)
{
RiskSourceRo
riskSourceRo
=
new
RiskSourceRo
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
66bc74c0
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
66bc74c0
...
...
@@ -661,12 +661,6 @@ public class View3dServiceImpl implements IView3dService {
return
pointList
;
}
@Override
public
Map
<
String
,
String
>
getDutyListByDate
()
{
ContingencyAction
contingencyAction
=
new
ContingencyAction
();
Map
<
String
,
String
>
f1
=
contingencyAction
.
getStrengthMap
(
"F1"
);
return
f1
;
}
private
List
<
Map
<
String
,
Object
>>
getPointsByRegionIds
(
List
<
Long
>
ids
){
return
view3dMapper
.
getAllPointInRegions
(
ids
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
66bc74c0
...
...
@@ -174,5 +174,4 @@ public interface IView3dService {
*/
List
<
Map
<
String
,
Object
>>
listPointsByRegionId
(
Long
regionId
,
String
type
);
Map
<
String
,
String
>
getDutyListByDate
();
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/util/HttpUtil.java
View file @
66bc74c0
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
View file @
66bc74c0
...
...
@@ -102,14 +102,15 @@ public class RsDataQueue {
try
{
FmeaMessage
fmeaMessage
=
blockingQueue
.
take
();
if
(
riskSourceService
!=
null
)
{
//获取缓存
CacheMap
cacheMap
=
CacheFactory
.
newChacheMap
();
Toke
toke
=
cacheMap
.
getValue
(
TOKE
);
if
(
toke
==
null
)
{
toke
=
remoteSecurityService
.
come
();
Long
times
=
(
long
)
(
20
*
24
*
60
*
60
);
cacheMap
.
setex
(
TOKE
,
toke
,
times
);
}
//获取缓存
Toke
toke
=
remoteSecurityService
.
getServerToken
();
// CacheMap cacheMap = CacheFactory.newChacheMap();
// Toke toke = cacheMap.getValue(TOKE);
// if (toke == null) {
// toke = remoteSecurityService.come();
// Long times = (long) (20 * 24 * 60 * 60);
// cacheMap.setex(TOKE, toke, times);
// }
String
from
=
fmeaMessage
.
getNorifyFrom
();
Long
handId
=
fmeaMessage
.
getHandId
();
String
userName
=
fmeaMessage
.
getUserName
();
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
66bc74c0
...
...
@@ -28,7 +28,7 @@ spring.data.mongodb.uri = mongodb://172.16.11.33:27017/iecmonitor
#rule
#params.remoteRuleUrl=http://172.16.3.3:8080/
params.remoteRuleUrl
=
http://magintursh.xicp.net:18080/
params.remoteWebsocketUrl
=
http://172.16.1
0.72
:10600/
params.remoteWebsocketUrl
=
http://172.16.1
1.36
:10600/
spring.redis.database
=
0
spring.redis.host
=
172.16.10.85
...
...
@@ -56,14 +56,15 @@ emqx.password=a123456
Push.fegin.name
=
APPMESSAGEPUSHSERVICE-36
dutyMode.fegin.name
=
AMOSDUTYMODE
DutyMode.dutyUrl
=
http://172.16.10.72:10005/
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
rule.definition.model-package
=
com.yeejoin.amos.fas.business.action.model
rule.definition.default-agency
=
STATE_GRID
#Fegin service config
amos.feign.gennerator.use-gateway
=
true
autoSys.push.type
=
mqtt
#�����
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-docker.properties
View file @
66bc74c0
...
...
@@ -55,8 +55,7 @@ emqx.user-name=super
emqx.password
=
a123456
Push.fegin.name
=
AMOS-PUSH
dutyMode.fegin.name
=
AMOS-DUTY
DutyMode.dutyUrl
=
http://172.16.11.36:10005/
dutyMode.fegin.name
=
AMOSDUTYMODE
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-test.properties
View file @
66bc74c0
...
...
@@ -55,8 +55,7 @@ emqx.user-name=super
emqx.password
=
a123456
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOS-DUTY
DutyMode.dutyUrl
=
http://172.16.11.36:10005/
dutyMode.fegin.name
=
AMOSDUTYMODE
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
66bc74c0
spring.application.name
=
A
MOS-AUTOSYS
spring.application.name
=
A
mos-autosys
server.port
=
8083
...
...
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