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
071c4c65
Commit
071c4c65
authored
May 27, 2020
by
吴江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规则修改适配
parent
bea1dac1
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
657 additions
and
13 deletions
+657
-13
Message.java
...rc/main/java/com/yeejoin/amos/fas/dao/entity/Message.java
+183
-0
BubbleTipAction.java
...com/yeejoin/amos/fas/business/action/BubbleTipAction.java
+67
-0
RiskSituationAction.java
...yeejoin/amos/fas/business/action/RiskSituationAction.java
+125
-0
SimpleTipAction.java
...com/yeejoin/amos/fas/business/action/SimpleTipAction.java
+100
-0
ELEvaluationContext.java
...join/amos/fas/business/action/el/ELEvaluationContext.java
+37
-0
DataItemUtil.java
...m/yeejoin/amos/fas/business/action/util/DataItemUtil.java
+75
-0
BaseController.java
.../yeejoin/amos/fas/business/controller/BaseController.java
+2
-0
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+1
-1
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+3
-1
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+4
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+0
-0
ContingencyRo.java
...eejoin/amos/fas/business/service/model/ContingencyRo.java
+11
-1
YeeAmosFireAutoSysStart.java
...c/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
+25
-1
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+9
-4
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+7
-2
application-test.properties
...toSysStart/src/main/resources/application-test.properties
+7
-2
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+1
-1
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Message.java
0 → 100644
View file @
071c4c65
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
java.util.Date
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.GenericGenerator
;
/**
*
* <pre>
* 消息实体
* </pre>
*
* @author HK
* @version $Id: Message.java, v 0.1 2018年1月18日 下午7:48:58 HK Exp $
*/
@Entity
@Table
(
name
=
"toip_sys_message"
)
public
class
Message
extends
BusinessEntity
{
/**
* <pre>
*
* </pre>
*/
private
static
final
long
serialVersionUID
=
292329658525267887L
;
/**
* id
*/
@Id
@GeneratedValue
(
generator
=
"uuid"
)
@GenericGenerator
(
name
=
"uuid"
,
strategy
=
"uuid2"
)
@Column
(
name
=
"id"
,
nullable
=
false
,
length
=
36
)
protected
String
id
;
/**
* 时间
*/
private
Date
time
;
/**
* 标题
*/
private
String
title
;
/**
* 内容
*/
private
String
content
;
/**
* 类型
*/
private
String
type
;
/**
* 发送者
*/
private
String
sender
;
/**
* 接收者
*/
private
String
receiver
;
/**
* 已读者
*/
private
String
reader
;
/**
* 业务id
*/
private
String
bizId
;
/**
* 业务员实体名,例如com.yeejoin.amos.toip.bizrulebridge.entity.Fire
*/
private
String
bizclassName
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
Date
getTime
()
{
return
time
;
}
public
void
setTime
(
Date
time
)
{
this
.
time
=
time
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getSender
()
{
return
sender
;
}
public
void
setSender
(
String
sender
)
{
this
.
sender
=
sender
;
}
public
String
getReceiver
()
{
return
receiver
;
}
public
void
setReceiver
(
String
receiver
)
{
this
.
receiver
=
receiver
;
}
public
String
getReader
()
{
return
reader
;
}
public
void
setReader
(
String
reader
)
{
this
.
reader
=
reader
;
}
public
String
getBizId
()
{
return
bizId
;
}
public
void
setBizId
(
String
bizId
)
{
this
.
bizId
=
bizId
;
}
public
String
getBizclassName
()
{
return
bizclassName
;
}
public
void
setBizclassName
(
String
bizclassName
)
{
this
.
bizclassName
=
bizclassName
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/BubbleTipAction.java
0 → 100644
View file @
071c4c65
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
;
import
java.lang.reflect.Constructor
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.BubbleTipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
/**
*
* <pre>
* 气泡提示动作
* </pre>
*
* @author amos
* @version $Id: BubbleTipAction.java, v 0.1 2019年5月16日 上午10:42:32 amos Exp $
*/
@Component
public
class
BubbleTipAction
implements
CustomerAction
{
private
static
String
PACKAGEURL
=
"com.yeejoin.amos.rule.map.action.result.message."
;
//@ExposeAction("气泡提示")
public
void
sendBubbleTip
(
Object
bizobj
,
Boolean
showInfo
,
Object
title
,
String
type
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
tempmap1
.
put
(
"bizobj"
,
bizobj
);
result
.
add
(
tempmap1
);
//是否显示气泡
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"showInfo"
,
showInfo
);
result
.
add
(
tempmap2
);
//显示title提示
Map
<
String
,
Object
>
tempmap3
=
new
HashMap
<>();
tempmap3
.
put
(
"title"
,
title
);
result
.
add
(
tempmap3
);
//节点类型
Map
<
String
,
Object
>
tempmap4
=
new
HashMap
<>();
tempmap4
.
put
(
"type"
,
type
);
result
.
add
(
tempmap4
);
Constructor
<?>
constructor
;
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
)
.
getConstructor
(
ActionResult
.
class
);
ActionResultMessage
<?>
action
=
(
ActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
firstStr
=
"fromws"
;
String
secondStr
=
"map"
;
String
thirdStr
=
"bubble"
;
Object
obj
=
action
.
execute
(
firstStr
,
secondStr
,
thirdStr
);
result
.
setToipResponse
((
ToipResponse
)
obj
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/RiskSituationAction.java
0 → 100644
View file @
071c4c65
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
;
import
java.lang.reflect.Constructor
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.BubbleTipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
/**
*
* <pre>
* 风险态势图动作
* </pre>
*
* @author amos
* @version $Id: RiskSituationAction.java, v 0.1 2019年5月16日 下午5:26:27 amos Exp $
*/
@Component
public
class
RiskSituationAction
implements
CustomerAction
{
private
static
String
PACKAGEURL
=
"com.yeejoin.amos.rule.map.action.result.message."
;
//@ExposeAction("气泡提示")
public
void
sendBubbleTip
(
Object
bizobj
,
Boolean
showInfo
,
String
title
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
tempmap1
.
put
(
"bizobj"
,
bizobj
);
result
.
add
(
tempmap1
);
//是否显示气泡
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"showInfo"
,
showInfo
);
result
.
add
(
tempmap2
);
//显示title提示
Map
<
String
,
Object
>
tempmap3
=
new
HashMap
<>();
tempmap3
.
put
(
"title"
,
title
);
result
.
add
(
tempmap3
);
Constructor
<?>
constructor
;
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
)
.
getConstructor
(
ActionResult
.
class
);
ActionResultMessage
<?>
action
=
(
ActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
firstStr
=
"fromws"
;
String
secondStr
=
"riskSituation"
;
String
thirdStr
=
"bubble"
;
Object
obj
=
action
.
execute
(
firstStr
,
secondStr
,
thirdStr
);
result
.
setToipResponse
((
ToipResponse
)
obj
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
//@ExposeAction("区域颜色改变")
public
void
regionChange
(
Object
bizobj
,
String
colour
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
tempmap1
.
put
(
"bizobj"
,
bizobj
);
result
.
add
(
tempmap1
);
//更改颜色
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"colour"
,
colour
);
result
.
add
(
tempmap2
);
Constructor
<?>
constructor
;
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
)
.
getConstructor
(
ActionResult
.
class
);
ActionResultMessage
<?>
action
=
(
ActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
firstStr
=
"fromws"
;
String
secondStr
=
"riskSituation"
;
String
thirdStr
=
"colour"
;
Object
obj
=
action
.
execute
(
firstStr
,
secondStr
,
thirdStr
);
result
.
setToipResponse
((
ToipResponse
)
obj
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
//@ExposeAction(value = "区域闪烁",snapshot = false)
public
void
regionFlicker
(
Object
bizobj
,
Integer
frequency
)
{
BubbleTipResult
result
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
tempmap1
.
put
(
"bizobj"
,
bizobj
);
result
.
add
(
tempmap1
);
//更改颜色
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
tempmap2
.
put
(
"frequency"
,
frequency
);
result
.
add
(
tempmap2
);
Constructor
<?>
constructor
;
try
{
constructor
=
Class
.
forName
(
PACKAGEURL
+
result
.
getClass
().
getSimpleName
()
+
"Message"
)
.
getConstructor
(
ActionResult
.
class
);
ActionResultMessage
<?>
action
=
(
ActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
String
firstStr
=
"fromws"
;
String
secondStr
=
"riskSituation"
;
String
thirdStr
=
"flicker"
;
Object
obj
=
action
.
execute
(
firstStr
,
secondStr
,
thirdStr
);
result
.
setToipResponse
((
ToipResponse
)
obj
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/SimpleTipAction.java
0 → 100644
View file @
071c4c65
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
;
import
java.lang.reflect.Constructor
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.fas.business.action.el.ELEvaluationContext
;
import
com.yeejoin.amos.fas.business.action.result.AbstractActionResult
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.TipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
import
com.yeejoin.amos.fas.business.action.util.DataItemUtil
;
import
com.yeejoin.amos.fas.business.service.model.BasicsRo
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.dao.entity.BusinessEntity
;
import
com.yeejoin.amos.fas.dao.entity.Message
;
/**
*
* <pre>
* 消息提示动作
* </pre>
*
* @author amos
* @version $Id: SimpleTipAction.java, v 0.1 2019年4月24日 下午2:47:37 amos Exp $
*/
@Component
public
class
SimpleTipAction
implements
CustomerAction
{
private
static
String
PACKAGEURL
=
"com.yeejoin.amos.rule.map.action.result.message."
;
// @Autowired
// private IMessageService messageService;
//@ExposeAction("消息提示")
// public void sendMessageTip(Object bizobj, String title, String content,String type)
// {
//
// try
// {
//
// ELEvaluationContext.setVariable("bizobj",bizobj);
// TipResult result = new TipResult();
// result.add(bizobj);
// Map<String, Object> tempmap1 = new HashMap<>();
// tempmap1.put("title", title);
// result.add(tempmap1);
// Map<String, Object> tempmap2 = new HashMap<>();
// content =DataItemUtil.getNative(content);
// tempmap2.put("content", content);
// result.add(tempmap2);
//
//
// Constructor<?> constructor;
//
// constructor = Class.forName(
// PACKAGEURL + result.getClass().getSimpleName() + "Message")
// .getConstructor(ActionResult.class);
// ActionResultMessage<?> action = (ActionResultMessage<?>) constructor.newInstance(result);
// String firstStr = "fromws";
// String secondStr = "global";
// String thirdStr = "msg";
// result.setBizObj((BusinessEntity)bizobj);
// Object obj = action.execute(firstStr, secondStr, thirdStr);
// result.setToipResponse((ToipResponse) obj);
// saveMessageAction(result,type);
// }
// catch (Exception e)
// {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// }
// @SuppressWarnings("unchecked")
// private void saveMessageAction(AbstractActionResult abstractActionResult,String type)
// {
// Message message = new Message();
// List<Map<String, Object>> list = (List<Map<String, Object>>) abstractActionResult.getData();
// for(Map<String, Object> map : list) {
// for(String str: map.keySet()) {
// if(str.equals("content")) {
// message.setContent(map.get("content").toString());
// }else
// if (str.equals("title"))
// {
// message.setTitle(map.get("title").toString());
// }
// }
// BasicsRo basicsRo = (BasicsRo)abstractActionResult.getToipResponse().getBizObj();
// message.setTime(basicsRo.getDateTime());
// message.setBizId(basicsRo.getId());
// message.setBizclassName(abstractActionResult.getToipResponse().getBizObj().getClass().toString());
// message.setType(type);
// messageService.save(message);
// }
// }
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/el/ELEvaluationContext.java
0 → 100644
View file @
071c4c65
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
.
el
;
import
java.util.Map
;
import
org.springframework.expression.EvaluationContext
;
import
org.springframework.expression.ExpressionParser
;
import
org.springframework.expression.spel.standard.SpelExpressionParser
;
import
org.springframework.expression.spel.support.StandardEvaluationContext
;
public
class
ELEvaluationContext
{
private
static
EvaluationContext
instance
=
new
StandardEvaluationContext
();
private
static
ExpressionParser
parser
=
new
SpelExpressionParser
();
public
static
EvaluationContext
getInstance
()
{
return
instance
;
}
public
static
void
setVariable
(
String
name
,
Object
value
)
{
instance
.
setVariable
(
name
,
value
);
}
public
static
void
setVariable
(
Map
<
String
,
Object
>
vars
)
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
vars
.
entrySet
())
{
instance
.
setVariable
(
entry
.
getKey
(),
entry
.
getValue
());
}
}
public
static
Object
getValue
(
String
Expression
){
return
parser
.
parseExpression
(
Expression
).
getValue
(
instance
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/util/DataItemUtil.java
0 → 100644
View file @
071c4c65
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
.
util
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.fas.business.action.el.ELEvaluationContext
;
public
class
DataItemUtil
{
public
static
boolean
getEnable
(
JSONObject
jsonObject
)
{
try
{
return
jsonObject
.
getBooleanValue
(
"enable"
);
}
catch
(
Exception
e
)
{
return
false
;
}
}
public
static
String
getDisplayName
(
JSONObject
jsonObject
)
{
try
{
return
jsonObject
.
get
(
"displayname"
).
toString
();
}
catch
(
Exception
e
)
{
return
null
;
}
}
public
static
String
getValue
(
JSONObject
jsonObject
)
{
try
{
return
jsonObject
.
get
(
"value"
).
toString
();
}
catch
(
Exception
e
)
{
return
null
;
}
}
public
static
String
getName
(
JSONObject
jsonObject
)
{
try
{
return
jsonObject
.
get
(
"name"
).
toString
();
}
catch
(
Exception
e
)
{
return
null
;
}
}
public
static
String
getNative
(
String
str
)
{
Pattern
p
=
Pattern
.
compile
(
"\\{(.*?)\\}"
);
Matcher
m
=
p
.
matcher
(
str
);
while
(
m
.
find
())
{
String
parameter
=
m
.
group
();
Object
parametervalue
=
ELEvaluationContext
.
getValue
(
parameter
.
substring
(
1
,
parameter
.
length
()
-
1
));
if
(
parametervalue
!=
null
)
str
=
str
.
replace
(
parameter
,
parametervalue
!=
null
?
parametervalue
.
toString
()
:
null
);
}
return
str
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/BaseController.java
View file @
071c4c65
...
...
@@ -249,6 +249,8 @@ public class BaseController {
if
(
reginParams
.
getCompany
()
!=
null
)
{
return
reginParams
.
getCompany
().
getOrgCode
();
}
return
null
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
071c4c65
...
...
@@ -144,7 +144,7 @@ public interface View3dMapper extends BaseMapper{
*/
List
<
View3dNodeVo
>
initViewErrorNode
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
List
<
Node3DVoResponse
>
findViewDataByType
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
List
<
Node3DVoResponse
>
findViewDataByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"riskSourceId"
)
Long
riskSourceId
,
@Param
(
"orgCode"
)
String
orgCode
);
Long
retrieveAllCount
(
String
type
,
String
inputText
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
071c4c65
...
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -176,7 +177,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
parseLong
(
contingencyRo
.
getFireEquipmentId
()));
//Object result = remoteRuleServer.fireRuleFlow(contingencyRo, equipment.getReservePlan(),equipment.getName());
ruleTrigger
.
publish
(
contingencyRo
,
equipment
.
getReservePlan
());
equipment
.
setName
(
"极Ⅰ高端YY换流变A相"
);
ruleTrigger
.
publish
(
contingencyRo
,
equipment
.
getReservePlan
(),
ArrayUtils
.
toArray
(
equipment
.
getName
()));
BubbleTipResult
result1
=
new
BubbleTipResult
();
Map
<
String
,
Object
>
tempmap2
=
new
HashMap
<>();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
071c4c65
...
...
@@ -243,6 +243,10 @@ public class EquipmentServiceImpl implements IEquipmentService {
}
long
total
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPageCount
(
String
.
valueOf
(
equipmentId
));
List
<
FireEquipment
>
list
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPage
(
start
,
length
,
String
.
valueOf
(
equipmentId
));
if
(
commonPageable
==
null
)
{
commonPageable
=
new
CommonPageable
();
}
Page
result
=
new
PageImpl
(
list
,
commonPageable
,
total
);
return
result
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
071c4c65
This source diff could not be displayed because it is too large. You can
view the blob
instead.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/ContingencyRo.java
View file @
071c4c65
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
model
;
public
class
ContingencyRo
extends
BasicsRo
{
import
java.io.Serializable
;
public
class
ContingencyRo
implements
Serializable
{
private
String
batchNo
;
public
String
getBatchNo
()
{
return
batchNo
;
}
public
void
setBatchNo
(
String
batchNo
)
{
this
.
batchNo
=
batchNo
;
}
/**
*
...
...
YeeAmosFireAutoSysStart/src/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
View file @
071c4c65
...
...
@@ -8,9 +8,9 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeansException
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
...
...
@@ -18,6 +18,7 @@ import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
...
...
@@ -27,6 +28,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
import
com.yeejoin.amos.fas.context.IotContext
;
import
com.yeejoin.amos.filter.CrossDomainFilter
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
...
...
@@ -91,4 +93,25 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware
IotContext
.
getInstance
().
setApplicationContext
(
applicationContext
);
RsDataQueue
.
getInstance
().
start
();
}
/**
*
* <pre>
* 跨域处理的FilterBean
* </pre>
*
* @return
*/
@Bean
public
FilterRegistrationBean
crossFilterRegistrationBean
()
{
FilterRegistrationBean
registrationBean
=
new
FilterRegistrationBean
();
CrossDomainFilter
crossDomainFilter
=
new
CrossDomainFilter
();
registrationBean
.
setFilter
(
crossDomainFilter
);
// List<String> urlPatterns = new ArrayList<String>();
// urlPatterns.add("/*");
// registrationBean.setUrlPatterns(urlPatterns);
registrationBean
.
setOrder
(
0
);
//值小的Filter先执行
return
registrationBean
;
}
}
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
071c4c65
...
...
@@ -5,12 +5,12 @@ security.appKeyWeb=CONVERTER_STATION
#environment
#spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone
=
http://172.16.
10.72
:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://172.16.
3.75
:10001/eureka/
eureka.client.register-with-eureka
=
true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
spring.datasource.url
=
jdbc:mysql://172.16.11.33:3306/safety-business-2.0?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
...
...
@@ -53,5 +53,10 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name
=
super
emqx.password
=
a123456
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOS-DUTY
\ No newline at end of file
dutyMode.fegin.name
=
AMOS-DUTY
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
rule.definition.model-package
=
com.yeejoin.amos.fas.business.service.model
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application-docker.properties
View file @
071c4c65
...
...
@@ -10,6 +10,7 @@ eureka.client.register-with-eureka = true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
spring.datasource.url
=
jdbc:mysql://amos-mysql:3306/yeejoin_safety_business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
...
...
@@ -54,4 +55,8 @@ emqx.user-name=super
emqx.password
=
a123456
Push.fegin.name
=
AMOS-PUSH
dutyMode.fegin.name
=
AMOS-DUTY
\ No newline at end of file
dutyMode.fegin.name
=
AMOS-DUTY
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
rule.definition.model-package
=
com.yeejoin.amos.fas.business.service.model
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application-test.properties
View file @
071c4c65
...
...
@@ -10,6 +10,7 @@ eureka.client.register-with-eureka = true
eureka.client.fetch-registry
=
true
eureka.client.healthcheck.enabled
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
#DB properties:
spring.datasource.url
=
jdbc:mysql://47.103.14.66:3306/91-safety-business?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
...
...
@@ -54,4 +55,8 @@ emqx.user-name=super
emqx.password
=
a123456
Push.fegin.name
=
PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name
=
AMOS-DUTY
\ No newline at end of file
dutyMode.fegin.name
=
AMOS-DUTY
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
rule.definition.model-package
=
com.yeejoin.amos.fas.business.service.model
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
071c4c65
spring.application.name
=
AMOS-AUTOSYS
spring.application.name
=
AMOS-AUTOSYS
-WJ
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