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
51d11ec5
Commit
51d11ec5
authored
Jun 05, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
冲突
parents
7e3e0e81
921e0a73
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
210 additions
and
66 deletions
+210
-66
pom.xml
YeeAmosFireAutoSysCommon/pom.xml
+1
-1
RegionTreeResponse.java
...oin/amos/fas/core/common/response/RegionTreeResponse.java
+4
-1
pom.xml
YeeAmosFireAutoSysService/pom.xml
+2
-2
SimpleTipAction.java
...com/yeejoin/amos/fas/business/action/SimpleTipAction.java
+16
-3
JpushMsgContentBo.java
...a/com/yeejoin/amos/fas/business/bo/JpushMsgContentBo.java
+9
-0
MsgParamBo.java
...ain/java/com/yeejoin/amos/fas/business/bo/MsgParamBo.java
+9
-0
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+1
-1
FireEquipMapper.java
...yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
+2
-0
FmeaServiceImpl.java
...ejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
+4
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+43
-15
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+1
-1
BasicsRo.java
...com/yeejoin/amos/fas/business/service/model/BasicsRo.java
+3
-1
ProtalDataRo.java
...yeejoin/amos/fas/business/service/model/ProtalDataRo.java
+10
-0
RiskSourceRuleRo.java
...oin/amos/fas/business/service/model/RiskSourceRuleRo.java
+44
-5
RsDataQueue.java
.../java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
+18
-2
pom.xml
YeeAmosFireAutoSysStart/pom.xml
+2
-2
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+3
-0
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+1
-1
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+9
-3
dbTemplate_risk_source.xml
...t/src/main/resources/db/mapper/dbTemplate_risk_source.xml
+2
-2
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+25
-25
pom.xml
pom.xml
+1
-1
No files found.
YeeAmosFireAutoSysCommon/pom.xml
View file @
51d11ec5
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
2.
1.0
</version>
<version>
2.
0.3
</version>
</parent>
</parent>
<!-- <dependencies>
<!-- <dependencies>
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/core/common/response/RegionTreeResponse.java
View file @
51d11ec5
...
@@ -6,11 +6,14 @@ import java.util.ArrayList;
...
@@ -6,11 +6,14 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
<<<<<<<
HEAD
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
=======
>>>>>>>
921
e0a7332a4d0bf04cfb46d2e79943677dd8c73
public
class
RegionTreeResponse
{
public
class
RegionTreeResponse
{
...
@@ -24,7 +27,7 @@ public class RegionTreeResponse {
...
@@ -24,7 +27,7 @@ public class RegionTreeResponse {
private
Boolean
isBind
;
private
Boolean
isBind
;
private
String
type
;
private
String
type
;
private
Boolean
isRegion
;
private
Boolean
isRegion
;
private
JSONArray
position3d
;
private
JSONArray
position3d
=
new
JSONArray
();
;
private
String
routePath
;
private
String
routePath
;
private
String
level
;
private
String
level
;
private
String
levelStr
;
private
String
levelStr
;
...
...
YeeAmosFireAutoSysService/pom.xml
View file @
51d11ec5
...
@@ -14,14 +14,14 @@
...
@@ -14,14 +14,14 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
2.
1.0
</version>
<version>
2.
0.3
</version>
</parent>
</parent>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysCommon
</artifactId>
<artifactId>
YeeAmosFireAutoSysCommon
</artifactId>
<version>
2.
1.0
</version>
<version>
2.
0.3
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/SimpleTipAction.java
View file @
51d11ec5
...
@@ -4,7 +4,12 @@ import java.lang.reflect.Constructor;
...
@@ -4,7 +4,12 @@ import java.lang.reflect.Constructor;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.UUID
;
import
com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo
;
import
com.yeejoin.amos.fas.core.common.request.DateUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
org.jsoup.helper.DataUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -19,6 +24,8 @@ import com.yeejoin.amos.fas.business.service.model.ToipResponse;
...
@@ -19,6 +24,8 @@ import com.yeejoin.amos.fas.business.service.model.ToipResponse;
import
com.yeejoin.amos.fas.dao.entity.BusinessEntity
;
import
com.yeejoin.amos.fas.dao.entity.BusinessEntity
;
import
com.yeejoin.amos.fas.dao.entity.Message
;
import
com.yeejoin.amos.fas.dao.entity.Message
;
import
com.yeejoin.amos.fas.dao.entity.MessageRo
;
import
com.yeejoin.amos.fas.dao.entity.MessageRo
;
import
org.springframework.util.unit.DataUnit
;
/**
/**
*
*
* <pre>
* <pre>
...
@@ -39,10 +46,8 @@ public class SimpleTipAction implements CustomerAction
...
@@ -39,10 +46,8 @@ public class SimpleTipAction implements CustomerAction
//@ExposeAction("消息提示")
//@ExposeAction("消息提示")
public
void
sendMessageTip
(
Object
bizobj
,
String
title
,
String
content
,
String
type
)
public
void
sendMessageTip
(
Object
bizobj
,
String
title
,
String
content
,
String
type
)
{
{
try
try
{
{
ELEvaluationContext
.
setVariable
(
"bizobj"
,
bizobj
);
ELEvaluationContext
.
setVariable
(
"bizobj"
,
bizobj
);
TipResult
result
=
new
TipResult
();
TipResult
result
=
new
TipResult
();
result
.
add
(
bizobj
);
result
.
add
(
bizobj
);
...
@@ -54,7 +59,6 @@ public class SimpleTipAction implements CustomerAction
...
@@ -54,7 +59,6 @@ public class SimpleTipAction implements CustomerAction
tempmap2
.
put
(
"content"
,
content
);
tempmap2
.
put
(
"content"
,
content
);
result
.
add
(
tempmap2
);
result
.
add
(
tempmap2
);
Constructor
<?>
constructor
;
Constructor
<?>
constructor
;
constructor
=
Class
.
forName
(
constructor
=
Class
.
forName
(
...
@@ -91,11 +95,20 @@ public class SimpleTipAction implements CustomerAction
...
@@ -91,11 +95,20 @@ public class SimpleTipAction implements CustomerAction
message
.
setTitle
(
map
.
get
(
"title"
).
toString
());
message
.
setTitle
(
map
.
get
(
"title"
).
toString
());
}
}
}
}
if
(
abstractActionResult
.
getToipResponse
().
getBizObj
()
instanceof
MessageRo
)
{
MessageRo
messageRo
=
(
MessageRo
)
abstractActionResult
.
getToipResponse
().
getBizObj
();
MessageRo
messageRo
=
(
MessageRo
)
abstractActionResult
.
getToipResponse
().
getBizObj
();
message
.
setTime
(
messageRo
.
getDateTime
());
message
.
setTime
(
messageRo
.
getDateTime
());
message
.
setBizId
(
messageRo
.
getId
());
message
.
setBizId
(
messageRo
.
getId
());
}
if
(
abstractActionResult
.
getToipResponse
().
getBizObj
()
instanceof
RiskSourceRuleRo
)
{
RiskSourceRuleRo
riskSourceRuleRo
=
(
RiskSourceRuleRo
)
abstractActionResult
.
getToipResponse
().
getBizObj
();
message
.
setTime
(
DateUtil
.
getNow
());
message
.
setBizId
(
StringUtil
.
isNotEmpty
(
riskSourceRuleRo
.
getId
())
?
String
.
valueOf
(
riskSourceRuleRo
.
getId
())
:
""
);
}
message
.
setBizclassName
(
abstractActionResult
.
getToipResponse
().
getBizObj
().
getClass
().
toString
());
message
.
setBizclassName
(
abstractActionResult
.
getToipResponse
().
getBizObj
().
getClass
().
toString
());
message
.
setType
(
type
);
message
.
setType
(
type
);
message
.
setId
(
UUID
.
randomUUID
().
toString
());
messageService
.
save
(
message
);
messageService
.
save
(
message
);
}
}
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/bo/JpushMsgContentBo.java
View file @
51d11ec5
...
@@ -21,6 +21,15 @@ public class JpushMsgContentBo {
...
@@ -21,6 +21,15 @@ public class JpushMsgContentBo {
* 巡检状态
* 巡检状态
*/
*/
private
String
checkStatus
;
private
String
checkStatus
;
public
String
getCheckStatus
()
{
return
checkStatus
;
}
public
void
setCheckStatus
(
String
checkStatus
)
{
this
.
checkStatus
=
checkStatus
;
}
/**
/**
* 执行日期
* 执行日期
*/
*/
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/bo/MsgParamBo.java
View file @
51d11ec5
...
@@ -19,6 +19,15 @@ public class MsgParamBo {
...
@@ -19,6 +19,15 @@ public class MsgParamBo {
private
BigDecimal
rpn
;
private
BigDecimal
rpn
;
private
String
level
;
private
String
level
;
private
String
relationName
;
private
String
relationName
;
private
String
checkStatus
;
public
String
getCheckStatus
()
{
return
checkStatus
;
}
public
void
setCheckStatus
(
String
checkStatus
)
{
this
.
checkStatus
=
checkStatus
;
}
public
String
getToke
()
{
public
String
getToke
()
{
return
toke
;
return
toke
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
51d11ec5
...
@@ -564,7 +564,7 @@ public class RiskSourceController extends BaseController {
...
@@ -564,7 +564,7 @@ public class RiskSourceController extends BaseController {
}
}
//
@Authorization(ingore = true)
//
@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"上传巡检数据"
,
notes
=
"上传巡检数据"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"上传巡检数据"
,
notes
=
"上传巡检数据"
)
@RequestMapping
(
value
=
"/data/patroldata"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/data/patroldata"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
postPatrolData
(
@RequestBody
ProtalDataRo
protalData
)
throws
Exception
{
public
CommonResponse
postPatrolData
(
@RequestBody
ProtalDataRo
protalData
)
throws
Exception
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
View file @
51d11ec5
...
@@ -76,4 +76,6 @@ public interface FireEquipMapper extends BaseMapper {
...
@@ -76,4 +76,6 @@ public interface FireEquipMapper extends BaseMapper {
Long
queryEquimentRelationCount
(
Long
queryEquimentRelationCount
(
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"fname"
)
String
fname
);
@Param
(
"fname"
)
String
fname
);
FireEquipmentEntity
findById
(
@Param
(
"id"
)
Long
id
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FmeaServiceImpl.java
View file @
51d11ec5
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IFmeaService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFmeaService
;
import
com.yeejoin.amos.fas.business.service.model.RiskSourceRo
;
import
com.yeejoin.amos.fas.business.service.model.RiskSourceRo
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskFactor
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
...
@@ -94,6 +95,7 @@ public class FmeaServiceImpl implements IFmeaService {
...
@@ -94,6 +95,7 @@ public class FmeaServiceImpl implements IFmeaService {
userIds
.
add
(
String
.
valueOf
(
map
.
get
(
"personLeaderId"
)));
userIds
.
add
(
String
.
valueOf
(
map
.
get
(
"personLeaderId"
)));
userIds
.
add
(
String
.
valueOf
(
map
.
get
(
"identifyUserId"
)));
userIds
.
add
(
String
.
valueOf
(
map
.
get
(
"identifyUserId"
)));
}
}
userIds
.
remove
(
"null"
);
userIds
.
remove
(
null
);
userIds
.
remove
(
null
);
userIds
.
remove
(
""
);
userIds
.
remove
(
""
);
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
...
@@ -101,6 +103,7 @@ public class FmeaServiceImpl implements IFmeaService {
...
@@ -101,6 +103,7 @@ public class FmeaServiceImpl implements IFmeaService {
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIds
));
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIds
));
}
}
if
(
StringUtil
.
isNotEmpty
(
users
))
{
Map
<
String
,
String
>
userMap
=
users
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
));
Map
<
String
,
String
>
userMap
=
users
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
));
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
map
.
put
(
"companyLeaderName"
,
userMap
.
get
(
map
.
get
(
"companyLeaderId"
)));
map
.
put
(
"companyLeaderName"
,
userMap
.
get
(
map
.
get
(
"companyLeaderId"
)));
...
@@ -110,6 +113,7 @@ public class FmeaServiceImpl implements IFmeaService {
...
@@ -110,6 +113,7 @@ public class FmeaServiceImpl implements IFmeaService {
map
.
put
(
"identifyUserName"
,
userMap
.
get
(
map
.
get
(
"identifyUserId"
)));
map
.
put
(
"identifyUserName"
,
userMap
.
get
(
map
.
get
(
"identifyUserId"
)));
}
}
}
}
}
}
}
return
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
return
new
PageImpl
<
HashMap
<
String
,
Object
>>(
content
,
param
,
total
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
51d11ec5
...
@@ -547,17 +547,30 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -547,17 +547,30 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
if
(!
CollectionUtils
.
isEmpty
(
userIds
)){
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIds
));
users
=
remoteSecurityService
.
listUserByUserIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
userIds
));
}
}
Map
<
String
,
String
>
userMap
=
users
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
));
// Map<String, String> userMap = users.stream().collect(Collectors.toMap(AgencyUserModel::getUserId,AgencyUserModel::getRealName));
Map
<
String
,
String
>
userMap
=
new
HashMap
<>();
if
(
users
!=
null
){
userMap
=
users
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
));
}
List
<
DepartmentModel
>
depts
=
new
ArrayList
<>();
List
<
DepartmentModel
>
depts
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
deptIds
)){
if
(!
CollectionUtils
.
isEmpty
(
deptIds
)){
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIds
));
depts
=
remoteSecurityService
.
listDepartmentByDeptIds
(
toke
,
product
,
appKey
,
Joiner
.
on
(
","
).
join
(
deptIds
));
}
}
Map
<
Long
,
String
>
deptMap
=
depts
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentModel:
:
getSequenceNbr
,
DepartmentModel:
:
getDepartmentName
));
// Map<Long, String > deptMap = depts.stream().collect(Collectors.toMap(DepartmentModel::getSequenceNbr,DepartmentModel::getDepartmentName));
content
.
forEach
(
e
->
{
Map
<
Long
,
String
>
deptMap
=
new
HashMap
<>();
e
.
put
(
"userName"
,
userMap
.
get
(
e
.
get
(
"userId"
)));
if
(
depts
!=
null
){
e
.
put
(
"deptName"
,
deptMap
.
get
(
e
.
get
(
"deptId"
)));
deptMap
=
depts
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentModel:
:
getSequenceNbr
,
DepartmentModel:
:
getDepartmentName
));
e
.
put
(
"tel"
,
userMap
.
get
(
String
.
valueOf
(
e
.
get
(
"deptId"
)+
"tel"
)));
}
});
// content.forEach(e -> {
// e.put("userName",userMap.get(e.get("userId")));
// e.put("deptName",deptMap.get(e.get("deptId")));
// e.put("tel",userMap.get(String.valueOf(e.get("deptId")+"tel")));
// });
for
(
int
i
=
0
;
i
<
content
.
size
();
i
++){
content
.
get
(
i
).
put
(
"userName"
,
userMap
.
get
(
content
.
get
(
i
).
get
(
"userId"
)));
content
.
get
(
i
).
put
(
"deptName"
,
deptMap
.
get
(
content
.
get
(
i
).
get
(
"deptId"
)));
content
.
get
(
i
).
put
(
"tel"
,
userMap
.
get
(
String
.
valueOf
(
content
.
get
(
i
).
get
(
"deptId"
)+
"tel"
)));
}
}
}
return
new
PageImpl
<>(
content
,
pageable
,
total
);
return
new
PageImpl
<>(
content
,
pageable
,
total
);
}
}
...
@@ -581,11 +594,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -581,11 +594,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
@Override
@Async
@Async
public
void
processProtalData
(
String
toke
,
String
product
,
String
appKey
,
ProtalDataRo
protalData
)
{
public
void
processProtalData
(
String
toke
,
String
product
,
String
appKey
,
ProtalDataRo
protalData
)
{
if
(!
CollectionUtils
.
isEmpty
(
protalData
.
get
I
tems
()))
{
if
(!
CollectionUtils
.
isEmpty
(
protalData
.
get
PointInputi
tems
()))
{
Long
pointId
=
protalData
.
getId
();
Long
pointId
=
protalData
.
getId
();
List
<
Long
>
inputIds
=
Lists
.
newArrayList
();
List
<
Long
>
inputIds
=
Lists
.
newArrayList
();
Map
<
Long
,
CheckInputItemRo
>
map
=
Maps
.
newHashMap
();
Map
<
Long
,
CheckInputItemRo
>
map
=
Maps
.
newHashMap
();
for
(
CheckInputItemRo
checkInputItemRo
:
protalData
.
get
I
tems
())
{
for
(
CheckInputItemRo
checkInputItemRo
:
protalData
.
get
PointInputi
tems
())
{
inputIds
.
add
(
checkInputItemRo
.
getPointInputitemId
());
inputIds
.
add
(
checkInputItemRo
.
getPointInputitemId
());
map
.
put
(
checkInputItemRo
.
getPointInputitemId
(),
checkInputItemRo
);
map
.
put
(
checkInputItemRo
.
getPointInputitemId
(),
checkInputItemRo
);
}
}
...
@@ -928,12 +941,15 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -928,12 +941,15 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
else
if
(
param
.
getState
().
equals
(
"false"
))
{
}
else
if
(
param
.
getState
().
equals
(
"false"
))
{
state
=
0
;
state
=
0
;
}
}
if
(
state
!=
null
)
{
if
(
state
!=
null
)
{
if
(
ids
.
size
()
>
0
)
{
if
(
ids
.
size
()
>
0
)
{
fmeaEquipmentPointMapper
.
updateStateByIds
(
state
,
ids
);
fmeaEquipmentPointMapper
.
updateStateByIds
(
state
,
ids
);
}
}
final
Integer
st
=
state
;
String
monitor
=
fireEquipMapper
.
findById
(
fireEquipPointMapper
.
getByCode
(
param
.
getPointCode
()).
getFireEquipmentId
()).
getName
();
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addEquipmentMessage
(
fmeaId
,
param
.
getMonitor
()
));
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addEquipmentMessage
(
fmeaId
,
monitor
,
st
));
}
}
}
}
...
@@ -1136,6 +1152,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1136,6 +1152,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
jpushMsgContentBo
.
setLevel
(
msgParam
.
getLevel
());
jpushMsgContentBo
.
setLevel
(
msgParam
.
getLevel
());
jpushMsgContentBo
.
setRelationName
(
msgParam
.
getRelationName
());
jpushMsgContentBo
.
setRelationName
(
msgParam
.
getRelationName
());
jpushMsgContentBo
.
setRpn
(
msgParam
.
getRpn
());
jpushMsgContentBo
.
setRpn
(
msgParam
.
getRpn
());
jpushMsgContentBo
.
setCheckStatus
(
msgParam
.
getCheckStatus
());
msgBo
.
setTarget
(
this
.
getJpushTarget
(
msgParam
));
msgBo
.
setTarget
(
this
.
getJpushTarget
(
msgParam
));
msgBo
.
setMsg
(
jpushMsgContentBo
);
msgBo
.
setMsg
(
jpushMsgContentBo
);
}
}
...
@@ -1182,7 +1199,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1182,7 +1199,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
@Override
public
void
notifyFmeaFromAbnormal
(
public
void
notifyFmeaFromAbnormal
(
String
toke
,
String
product
,
String
appKey
,
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
String
notifyType
,
String
userName
,
String
relationName
)
{
Long
fmeaId
,
String
notifyType
,
String
userName
,
String
relationName
,
String
checkStatus
)
{
Fmea
fmea
=
fmeaMapper
.
getById
(
fmeaId
);
Fmea
fmea
=
fmeaMapper
.
getById
(
fmeaId
);
if
(
fmea
==
null
)
{
if
(
fmea
==
null
)
{
return
;
return
;
...
@@ -1218,7 +1235,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1218,7 +1235,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
msgParamBo
.
setLevel
(
newLevel
.
getName
());
msgParamBo
.
setLevel
(
newLevel
.
getName
());
msgParamBo
.
setUserName
(
userName
);
msgParamBo
.
setUserName
(
userName
);
msgParamBo
.
setNotifyType
(
notifyType
);
msgParamBo
.
setNotifyType
(
notifyType
);
msgParamBo
.
setCheckStatus
(
checkStatus
);
msgParamBo
.
setRelationName
(
relationName
);
msgParamBo
.
setRelationName
(
relationName
);
msgParamBo
.
setRpn
(
rpn
);
jpushMsgBo
=
this
.
getJushMessageInfo
(
msgParamBo
);
jpushMsgBo
=
this
.
getJushMessageInfo
(
msgParamBo
);
}
}
//1.3.更新fmea的rpn、风险等级及newOid
//1.3.更新fmea的rpn、风险等级及newOid
...
@@ -1286,6 +1305,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1286,6 +1305,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(
rpnValueBo
.
isEmpty
())
{
if
(
rpnValueBo
.
isEmpty
())
{
return
;
return
;
}
}
Fmea
caluFmea
=
fmeaMapper
.
getById
(
fmeaId
);
Integer
rpnDiffer
=
caluFmea
.
getRpn
().
intValue
()-
caluFmea
.
getRpni
().
intValue
();
String
checkStatus
=
jpushMsgBo
.
getMsg
().
getCheckStatus
();
BigDecimal
rpn
=
rpnValueBo
.
getRpn
();
BigDecimal
rpn
=
rpnValueBo
.
getRpn
();
BigDecimal
rpni
=
rpnValueBo
.
getRpni
();
BigDecimal
rpni
=
rpnValueBo
.
getRpni
();
List
<
RiskLevel
>
levels
=
riskLevelDao
.
findAll
();
List
<
RiskLevel
>
levels
=
riskLevelDao
.
findAll
();
...
@@ -1305,9 +1327,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1305,9 +1327,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
//3.更新父节点rpn、rpni、风险等级
//3.更新父节点rpn、rpni、风险等级
this
.
updateParentRpn
(
riskSource
.
getParentId
());
this
.
updateParentRpn
(
riskSource
.
getParentId
());
//4.极光推送给手机客户端
//4.极光推送给手机客户端
if
(
notifyType
==
"recovery"
||
notifyType
==
"fmeaUpdate"
||(
notifyType
==
"alarm"
&&
rpnDiffer
>
0
)||(
notifyType
==
"patrol"
&&
rpnDiffer
>
0
&&
checkStatus
.
equals
(
"不合格"
)))
jpushRiskSourceMessage
(
jpushMsgBo
);
jpushRiskSourceMessage
(
jpushMsgBo
);
//5.规则告警(消息)TODO
//5.规则告警(消息)TODO
notifyRule
(
riskSourceId
,
rpn
,
rpni
,
notifyType
,
changeType
);
if
(
notifyType
==
"recovery"
||
notifyType
==
"fmeaUpdate"
||(
notifyType
==
"alarm"
&&
rpnDiffer
>
0
)||(
notifyType
==
"patrol"
&&
rpnDiffer
>
0
&&
checkStatus
.
equals
(
"不合格"
)))
notifyRule
(
riskSourceId
,
rpn
,
rpni
,
notifyType
,
changeType
,
jpushMsgBo
.
getMsg
());
//6.通知全景监控屏幕数据刷新
//6.通知全景监控屏幕数据刷新
iDataRefreshService
.
refreshViewData
(
DataRefreshTypeEum
.
rpn
.
getCode
());
iDataRefreshService
.
refreshViewData
(
DataRefreshTypeEum
.
rpn
.
getCode
());
}
}
...
@@ -1412,15 +1436,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1412,15 +1436,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
BigDecimal
rpnr
,
BigDecimal
rpnr
,
BigDecimal
rpni
,
BigDecimal
rpni
,
String
notifyType
,
String
notifyType
,
String
changeType
)
{
String
changeType
,
JpushMsgContentBo
msgContentBo
)
{
RiskSourceRuleRo
riskSourceRuleRo
=
new
RiskSourceRuleRo
();
RiskSourceRuleRo
riskSourceRuleRo
=
new
RiskSourceRuleRo
();
riskSourceRuleRo
.
setId
(
id
);
riskSourceRuleRo
.
setId
(
id
);
riskSourceRuleRo
.
setRpnr
(
rpnr
);
riskSourceRuleRo
.
setRpnr
(
rpnr
);
riskSourceRuleRo
.
setRpni
(
rpni
);
riskSourceRuleRo
.
setRpni
(
rpni
);
riskSourceRuleRo
.
setLevelChangeType
(
changeType
);
riskSourceRuleRo
.
setLevelChangeType
(
changeType
);
riskSourceRuleRo
.
setNotifyType
(
notifyType
);
riskSourceRuleRo
.
setType
(
notifyType
);
riskSourceRuleRo
.
setContent
(
msgContentBo
.
genMessage
());
riskSourceRuleRo
.
setTitle
(
msgContentBo
.
getSubject
());
riskSourceRuleRo
.
setRg
(
String
.
valueOf
(
rpnr
.
subtract
(
rpni
).
toBigInteger
()));
try
{
try
{
remoteRuleServer
.
fireRule
(
riskSourceRuleRo
,
"风险管控/riskSource"
);
// remoteRuleServer.fireRule(riskSourceRuleRo, "风险管控/riskSource");
ruleTrigger
.
publish
(
riskSourceRuleRo
,
"风险管控/riskSource"
,
null
);
// 没有配决策流,processIds传null即可
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"调用规则异常"
,
e
);
log
.
error
(
"调用规则异常"
,
e
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
51d11ec5
...
@@ -109,7 +109,7 @@ public interface IRiskSourceService {
...
@@ -109,7 +109,7 @@ public interface IRiskSourceService {
Integer
getChildTypeByPid
(
Long
riskSourceId
);
Integer
getChildTypeByPid
(
Long
riskSourceId
);
void
notifyFmeaFromAbnormal
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
String
notifyType
,
String
userName
,
String
relationName
);
void
notifyFmeaFromAbnormal
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
String
notifyType
,
String
userName
,
String
relationName
,
String
checkStatus
);
void
notifyFmeaFromUpdate
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
String
nofityType
,
String
userName
);
void
notifyFmeaFromUpdate
(
String
toke
,
String
product
,
String
appKey
,
Long
fmeaId
,
String
nofityType
,
String
userName
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/BasicsRo.java
View file @
51d11ec5
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
model
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
model
;
import
com.yeejoin.amos.fas.dao.entity.BusinessEntity
;
import
java.io.Serializable
;
import
java.io.Serializable
;
public
class
BasicsRo
implements
Serializable
{
public
class
BasicsRo
extends
BusinessEntity
implements
Serializable
{
private
String
batchNo
;
private
String
batchNo
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/ProtalDataRo.java
View file @
51d11ec5
...
@@ -49,6 +49,16 @@ public class ProtalDataRo extends BasicsRo {
...
@@ -49,6 +49,16 @@ public class ProtalDataRo extends BasicsRo {
private
List
<
CheckInputItemRo
>
items
;
private
List
<
CheckInputItemRo
>
items
;
private
List
<
CheckInputItemRo
>
pointInputitems
;
public
List
<
CheckInputItemRo
>
getPointInputitems
()
{
return
pointInputitems
;
}
public
void
setPointInputitems
(
List
<
CheckInputItemRo
>
pointInputitems
)
{
this
.
pointInputitems
=
pointInputitems
;
}
public
List
<
CheckInputItemRo
>
getItems
()
{
public
List
<
CheckInputItemRo
>
getItems
()
{
return
items
;
return
items
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/RiskSourceRuleRo.java
View file @
51d11ec5
...
@@ -4,10 +4,11 @@ import java.math.BigDecimal;
...
@@ -4,10 +4,11 @@ import java.math.BigDecimal;
public
class
RiskSourceRuleRo
extends
BasicsRo
{
public
class
RiskSourceRuleRo
extends
BasicsRo
{
private
static
final
long
serialVersionUID
=
-
1029442967802232957L
;
/**
/**
* patrol、equipment、update、delete
* patrol、equipment、update、delete
*/
*/
private
String
notifyT
ype
;
private
String
t
ype
;
private
Long
id
;
private
Long
id
;
...
@@ -16,10 +17,24 @@ public class RiskSourceRuleRo extends BasicsRo {
...
@@ -16,10 +17,24 @@ public class RiskSourceRuleRo extends BasicsRo {
private
BigDecimal
rpni
;
private
BigDecimal
rpni
;
/**
/**
* 风险增益
*/
private
String
rg
;
/**
* up、down、no
* up、down、no
*/
*/
private
String
levelChangeType
;
private
String
levelChangeType
;
/**
* 消息内容
*/
private
String
content
;
/**
* 消息标题
*/
private
String
title
;
public
Long
getId
()
{
public
Long
getId
()
{
return
id
;
return
id
;
}
}
...
@@ -52,11 +67,35 @@ public class RiskSourceRuleRo extends BasicsRo {
...
@@ -52,11 +67,35 @@ public class RiskSourceRuleRo extends BasicsRo {
this
.
levelChangeType
=
levelChangeType
;
this
.
levelChangeType
=
levelChangeType
;
}
}
public
String
getNotifyType
()
{
public
String
getType
()
{
return
notifyType
;
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getRg
()
{
return
rg
;
}
}
public
void
set
NotifyType
(
String
notifyType
)
{
public
void
set
Rg
(
String
rg
)
{
this
.
notifyType
=
notifyType
;
this
.
rg
=
rg
;
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
View file @
51d11ec5
...
@@ -78,6 +78,15 @@ public class RsDataQueue {
...
@@ -78,6 +78,15 @@ public class RsDataQueue {
blockingQueue
.
add
(
new
FmeaMessage
(
fmeaId
,
TriggerRpnChangeTypeEum
.
alarm
.
getCode
(),
""
,
equipmentName
,
""
));
blockingQueue
.
add
(
new
FmeaMessage
(
fmeaId
,
TriggerRpnChangeTypeEum
.
alarm
.
getCode
(),
""
,
equipmentName
,
""
));
}
}
public
void
addEquipmentMessage
(
Long
fmeaId
,
String
equipmentName
,
Integer
state
)
{
if
(
state
==
0
){
blockingQueue
.
add
(
new
FmeaMessage
(
fmeaId
,
TriggerRpnChangeTypeEum
.
alarmRecovery
.
getCode
(),
""
,
equipmentName
,
""
));
}
else
{
blockingQueue
.
add
(
new
FmeaMessage
(
fmeaId
,
TriggerRpnChangeTypeEum
.
alarm
.
getCode
(),
""
,
equipmentName
,
""
));
}
}
public
void
addDeleteMessage
(
Long
riskSourceId
)
{
public
void
addDeleteMessage
(
Long
riskSourceId
)
{
blockingQueue
.
add
(
new
FmeaMessage
(
riskSourceId
,
TriggerRpnChangeTypeEum
.
fmeaDelete
.
getCode
()));
blockingQueue
.
add
(
new
FmeaMessage
(
riskSourceId
,
TriggerRpnChangeTypeEum
.
fmeaDelete
.
getCode
()));
}
}
...
@@ -105,12 +114,19 @@ public class RsDataQueue {
...
@@ -105,12 +114,19 @@ public class RsDataQueue {
Long
handId
=
fmeaMessage
.
getHandId
();
Long
handId
=
fmeaMessage
.
getHandId
();
String
userName
=
fmeaMessage
.
getUserName
();
String
userName
=
fmeaMessage
.
getUserName
();
String
relationName
=
fmeaMessage
.
getRelationName
();
String
relationName
=
fmeaMessage
.
getRelationName
();
String
checkStatus
=
null
;
if
(
fmeaMessage
.
getCheckStatus
()!=
null
){
checkStatus
=(
fmeaMessage
.
getCheckStatus
().
equals
(
"1"
))?
"合格"
:
"不合格"
;
}
if
(
from
.
equals
(
TriggerRpnChangeTypeEum
.
patrol
.
getCode
()))
{
if
(
from
.
equals
(
TriggerRpnChangeTypeEum
.
patrol
.
getCode
()))
{
//巡检不合格通知
//巡检不合格通知
riskSourceService
.
notifyFmeaFromAbnormal
(
toke
.
getToke
(),
toke
.
getProduct
(),
toke
.
getAppKey
(),
handId
,
from
,
userName
,
relationName
);
riskSourceService
.
notifyFmeaFromAbnormal
(
toke
.
getToke
(),
toke
.
getProduct
(),
toke
.
getAppKey
(),
handId
,
from
,
userName
,
relationName
,
checkStatus
);
}
else
if
(
from
.
equals
(
TriggerRpnChangeTypeEum
.
alarm
.
getCode
()))
{
}
else
if
(
from
.
equals
(
TriggerRpnChangeTypeEum
.
alarm
.
getCode
()))
{
//设备告警
//设备告警
riskSourceService
.
notifyFmeaFromAbnormal
(
toke
.
getToke
(),
toke
.
getProduct
(),
toke
.
getAppKey
(),
handId
,
from
,
userName
,
relationName
);
riskSourceService
.
notifyFmeaFromAbnormal
(
toke
.
getToke
(),
toke
.
getProduct
(),
toke
.
getAppKey
(),
handId
,
from
,
userName
,
relationName
,
checkStatus
);
}
else
if
(
from
.
equals
(
TriggerRpnChangeTypeEum
.
alarmRecovery
.
getCode
()))
{
//设备告警恢复
riskSourceService
.
notifyFmeaFromAbnormal
(
toke
.
getToke
(),
toke
.
getProduct
(),
toke
.
getAppKey
(),
handId
,
from
,
userName
,
relationName
,
checkStatus
);
}
else
if
(
from
.
equals
(
TriggerRpnChangeTypeEum
.
fmeaUpdate
.
getCode
()))
{
}
else
if
(
from
.
equals
(
TriggerRpnChangeTypeEum
.
fmeaUpdate
.
getCode
()))
{
//危险因素评价修改通知
//危险因素评价修改通知
riskSourceService
.
notifyFmeaFromUpdate
(
toke
.
getToke
(),
toke
.
getProduct
(),
toke
.
getAppKey
(),
handId
,
from
,
userName
);
riskSourceService
.
notifyFmeaFromUpdate
(
toke
.
getToke
(),
toke
.
getProduct
(),
toke
.
getAppKey
(),
handId
,
from
,
userName
);
...
...
YeeAmosFireAutoSysStart/pom.xml
View file @
51d11ec5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
2.
1.0
</version>
<version>
2.
0.3
</version>
</parent>
</parent>
<dependencies>
<dependencies>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<dependency>
<dependency>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysService
</artifactId>
<artifactId>
YeeAmosFireAutoSysService
</artifactId>
<version>
2.
1.0
</version>
<version>
2.
0.3
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
51d11ec5
...
@@ -63,3 +63,5 @@ dutyMode.fegin.name=AMOS-DUTY
...
@@ -63,3 +63,5 @@ dutyMode.fegin.name=AMOS-DUTY
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load
=
true
rule.definition.load
=
true
rule.definition.model-package
=
com.yeejoin.amos.fas.business.service.model
rule.definition.model-package
=
com.yeejoin.amos.fas.business.service.model
amos.feign.gennerator.use-gateway
=
false
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
51d11ec5
spring.application.name
=
AMOS-AUTOSYS
-WJ
spring.application.name
=
AMOS-AUTOSYS
server.port
=
8083
server.port
=
8083
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
51d11ec5
...
@@ -256,8 +256,7 @@
...
@@ -256,8 +256,7 @@
frs.name riskSourceName
frs.name riskSourceName
from f_fire_equipment fe
from f_fire_equipment fe
left join f_risk_source frs on frs.id = fe.risk_source_id
left join f_risk_source frs on frs.id = fe.risk_source_id
where
<where>
1=1
<if
test=
"equipClassify!=null"
>
<if
test=
"equipClassify!=null"
>
and fe.equip_classify in ( ${equipClassify} )
and fe.equip_classify in ( ${equipClassify} )
</if>
</if>
...
@@ -268,6 +267,7 @@
...
@@ -268,6 +267,7 @@
<if
test=
"name!=null"
>
<if
test=
"name!=null"
>
and (fe.`name` like '%${name}%' or fe.`code` like '%${name}%')
and (fe.`name` like '%${name}%' or fe.`code` like '%${name}%')
</if>
</if>
</where>
LIMIT ${start},${length}
LIMIT ${start},${length}
</select>
</select>
...
@@ -301,8 +301,9 @@
...
@@ -301,8 +301,9 @@
FROM
FROM
f_equipment eq
f_equipment eq
LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id
LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id
WHERE 1=1
<where>
<if
test=
"id!=null"
>
AND eq.id = #{id}
</if>
<if
test=
"id!=null"
>
AND eq.id = #{id}
</if>
</where>
</select>
</select>
<select
id=
"findAllEquipPointInfo"
resultType=
"com.yeejoin.amos.fas.business.vo.EquipCommunicationData"
>
<select
id=
"findAllEquipPointInfo"
resultType=
"com.yeejoin.amos.fas.business.vo.EquipCommunicationData"
>
...
@@ -499,4 +500,8 @@
...
@@ -499,4 +500,8 @@
AND fe.`name` like '%${fname}%'
AND fe.`name` like '%${fname}%'
</if>
</if>
</select>
</select>
<select
id=
"findById"
resultType=
"com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity"
>
select name from f_fire_equipment where id= #{id}
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_risk_source.xml
View file @
51d11ec5
...
@@ -697,7 +697,7 @@
...
@@ -697,7 +697,7 @@
'riskSource' as type
'riskSource' as type
from f_risk_source rs
from f_risk_source rs
left join f_risk_level rl ON rs.risk_level_id = rl.id
left join f_risk_level rl ON rs.risk_level_id = rl.id
where is_region = 'TRUE' AND rs.org_code
like CONCAT(#{orgCode},'%')
where is_region = 'TRUE' AND rs.org_code
= #{orgCode}
</select>
</select>
<select
id=
"findRegionById"
resultType=
"java.util.HashMap"
>
<select
id=
"findRegionById"
resultType=
"java.util.HashMap"
>
...
@@ -715,7 +715,7 @@
...
@@ -715,7 +715,7 @@
IF(is_region = 'TRUE',1,0) as isRegion,
IF(is_region = 'TRUE',1,0) as isRegion,
(select name from f_risk_level where level = r.risk_level_id) as riskLevel
(select name from f_risk_level where level = r.risk_level_id) as riskLevel
from f_risk_source r
from f_risk_source r
where id=#{id} AND org_code
like CONCAT(#{orgCode},'%')
where id=#{id} AND org_code
= #{orgCode}
</select>
</select>
<update
id=
"batchSaveRegionUe4"
parameterType=
"java.util.List"
>
<update
id=
"batchSaveRegionUe4"
parameterType=
"java.util.List"
>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
51d11ec5
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
</when>
</when>
</choose>
</choose>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND R.org_code
like CONCAT(#{orgCode},'%')
AND R.org_code
= #{orgCode}
</if>
</if>
</select>
</select>
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
AND rs.id = #{pointId}
AND rs.id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND rs.org_code
like CONCAT(#{orgCode},'%')
AND rs.org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'patrol'"
>
<when
test=
"type == 'patrol'"
>
...
@@ -202,7 +202,7 @@
...
@@ -202,7 +202,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'impEquipment'"
>
<when
test=
"type == 'impEquipment'"
>
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'monitorEquipment'"
>
<when
test=
"type == 'monitorEquipment'"
>
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'video'"
>
<when
test=
"type == 'video'"
>
...
@@ -250,7 +250,7 @@
...
@@ -250,7 +250,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'hydrant'"
>
<when
test=
"type == 'hydrant'"
>
...
@@ -266,7 +266,7 @@
...
@@ -266,7 +266,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'pool'"
>
<when
test=
"type == 'pool'"
>
...
@@ -282,7 +282,7 @@
...
@@ -282,7 +282,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'fireCar'"
>
<when
test=
"type == 'fireCar'"
>
...
@@ -298,7 +298,7 @@
...
@@ -298,7 +298,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'fireEquipment'"
>
<when
test=
"type == 'fireEquipment'"
>
...
@@ -314,7 +314,7 @@
...
@@ -314,7 +314,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'fireChamber'"
>
<when
test=
"type == 'fireChamber'"
>
...
@@ -330,7 +330,7 @@
...
@@ -330,7 +330,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code like
CONCAT(#{orgCode},'%')
AND org_code like
= #{orgCode}
</if>
</if>
</when>
</when>
<when
test=
"type == 'fireFoamRoom'"
>
<when
test=
"type == 'fireFoamRoom'"
>
...
@@ -346,7 +346,7 @@
...
@@ -346,7 +346,7 @@
AND id = #{pointId}
AND id = #{pointId}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND org_code
like CONCAT(#{orgCode},'%')
AND org_code
= #{orgCode}
</if>
</if>
</when>
</when>
</choose>
</choose>
...
@@ -397,7 +397,7 @@
...
@@ -397,7 +397,7 @@
where
where
a.task_no = b.id
a.task_no = b.id
and a.`status` in ('2','3')
and a.`status` in ('2','3')
and
(b.org_code = #{orgCode} or b.org_code like CONCAT(#{orgCode},'-','%'))
and
b.org_code = #{orgCode}
) pt
) pt
where #{date} BETWEEN pt.begin_date and pt.end_date
where #{date} BETWEEN pt.begin_date and pt.end_date
</select>
</select>
...
@@ -477,7 +477,7 @@
...
@@ -477,7 +477,7 @@
left JOIN p_plan_task t on t.id=d.task_no
left JOIN p_plan_task t on t.id=d.task_no
WHERE
WHERE
DATEDIFF(t.begin_time,CURRENT_DATE) <= 0 AND DATEDIFF(t.end_time,CURRENT_DATE) >
= 0
DATEDIFF(t.begin_time,CURRENT_DATE) <= 0 AND DATEDIFF(t.end_time,CURRENT_DATE) >
= 0
AND
(t.org_code = #{org_code} or t.org_code like CONCAT(#{orgCode},'-','%'))
AND
t.org_code = #{org_code}
GROUP BY d.status
GROUP BY d.status
]]>
]]>
</select>
</select>
...
@@ -487,7 +487,7 @@
...
@@ -487,7 +487,7 @@
FROM f_rpn_change_log n
FROM f_rpn_change_log n
LEFT JOIN f_risk_source r ON r.id = n.risk_source_id
LEFT JOIN f_risk_source r ON r.id = n.risk_source_id
WHERE n.type = 1
WHERE n.type = 1
AND
(r.org_code = #{org_code} or r.org_code like CONCAT(#{orgCode},'-','%'))
AND
r.org_code = #{org_code}
ORDER BY n.create_date desc
ORDER BY n.create_date desc
limit 0,5
limit 0,5
</select>
</select>
...
@@ -500,7 +500,7 @@
...
@@ -500,7 +500,7 @@
left join p_point I ON I.id = p.point_id
left join p_point I ON I.id = p.point_id
where p.is_ok IN ('2', '3')
where p.is_ok IN ('2', '3')
AND I.is_delete = 0
AND I.is_delete = 0
AND p.org_code = #{orgCode}
or p.org_code like CONCAT(#{orgCode},'-','%')
AND p.org_code = #{orgCode}
ORDER BY p.check_time desc
ORDER BY p.check_time desc
limit 0,5
limit 0,5
</select>
</select>
...
@@ -617,7 +617,7 @@
...
@@ -617,7 +617,7 @@
FROM f_fire_equipment fe
FROM f_fire_equipment fe
WHERE fe.id IN (
WHERE fe.id IN (
select fire_equipment_id from f_equipment_fire_equipment
select fire_equipment_id from f_equipment_fire_equipment
) AND org_code
like CONCAT(#{orgCode},'%')
) AND org_code
= #{orgCode}
UNION ALL
UNION ALL
SELECT e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,'impEquipment' as type,'impEquipment' as level,
SELECT e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,'impEquipment' as type,'impEquipment' as level,
TMP.relationKeys,
TMP.relationKeys,
...
@@ -646,7 +646,7 @@
...
@@ -646,7 +646,7 @@
LEFT JOIN
LEFT JOIN
(select GROUP_CONCAT(fire_equipment_id) as relationKeys,equipment_id from f_equipment_fire_equipment GROUP BY equipment_id) tmp
(select GROUP_CONCAT(fire_equipment_id) as relationKeys,equipment_id from f_equipment_fire_equipment GROUP BY equipment_id) tmp
ON TMP.equipment_id = e.id
ON TMP.equipment_id = e.id
WHERE e.org_code
like CONCAT(#{orgCode},'%')
WHERE e.org_code
= #{orgCode}
UNION ALL
UNION ALL
SELECT id,name,code,ue4_location,ue4_rotation,
SELECT id,name,code,ue4_location,ue4_rotation,
case type
case type
...
@@ -683,7 +683,7 @@
...
@@ -683,7 +683,7 @@
when 2 then concat('pool-',id)
when 2 then concat('pool-',id)
end as `key`
end as `key`
FROM f_water_resource
FROM f_water_resource
WHERE org_code
like CONCAT(#{orgCode},'%')
WHERE org_code
= #{orgCode}
UNION ALL
UNION ALL
SELECT id,name,code,ue4_location,ue4_rotation,'fireChamber' as type,'fireChamber' as level,
SELECT id,name,code,ue4_location,ue4_rotation,'fireChamber' as type,'fireChamber' as level,
null as relationKeys,
null as relationKeys,
...
@@ -709,7 +709,7 @@
...
@@ -709,7 +709,7 @@
END position,
END position,
concat('fireChamber-',id) as `key`
concat('fireChamber-',id) as `key`
FROM f_fire_station
FROM f_fire_station
WHERE type = 1 AND org_code
like CONCAT(#{orgCode},'%')
WHERE type = 1 AND org_code
= #{orgCode}
UNION ALL
UNION ALL
SELECT id,name,car_num as code,ue4_location,ue4_rotation,'fireCar' as type,'fireCar' as level,
SELECT id,name,car_num as code,ue4_location,ue4_rotation,'fireCar' as type,'fireCar' as level,
null as relationKeys,
null as relationKeys,
...
@@ -735,7 +735,7 @@
...
@@ -735,7 +735,7 @@
END position,
END position,
concat('fireCar-',id) as `key`
concat('fireCar-',id) as `key`
FROM f_fire_car
FROM f_fire_car
WHERE org_code
like CONCAT(#{orgCode},'%')
WHERE org_code
= #{orgCode}
</select>
</select>
<select
id=
"initViewErrorNode"
resultType=
"com.yeejoin.amos.fas.business.vo.View3dNodeVo"
>
<select
id=
"initViewErrorNode"
resultType=
"com.yeejoin.amos.fas.business.vo.View3dNodeVo"
>
...
@@ -754,7 +754,7 @@
...
@@ -754,7 +754,7 @@
r.is_region
<![CDATA[<>]]>
'TRUE'
r.is_region
<![CDATA[<>]]>
'TRUE'
AND R.status = 'ANOMALY'
AND R.status = 'ANOMALY'
AND rl.id = r.risk_level_id
AND rl.id = r.risk_level_id
AND R.org_code
like CONCAT(#{orgCode},'%')
AND R.org_code
= #{orgCode}
UNION ALL
UNION ALL
select
select
p.id,p.name,p.point_no as code,p.ue4_location,p.ue4_rotation,
p.id,p.name,p.point_no as code,p.ue4_location,p.ue4_rotation,
...
@@ -779,7 +779,7 @@
...
@@ -779,7 +779,7 @@
end as title
end as title
from p_point p
from p_point p
where status in ('0','2','3')
where status in ('0','2','3')
AND p.org_code
like CONCAT(#{orgCode},'%')
AND p.org_code
= #{orgCode}
UNION ALL
UNION ALL
select
select
distinct e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,
distinct e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,
...
@@ -795,7 +795,7 @@
...
@@ -795,7 +795,7 @@
left join f_equipment_fire_equipment efe ON e.id = efe.equipment_id
left join f_equipment_fire_equipment efe ON e.id = efe.equipment_id
left join f_fire_equipment fe ON efe.fire_equipment_id = fe.id
left join f_fire_equipment fe ON efe.fire_equipment_id = fe.id
where fe.equip_status = 1
where fe.equip_status = 1
AND e.org_code
like CONCAT(#{orgCode},'%')
AND e.org_code
= #{orgCode}
) tmp
) tmp
where 1=1
where 1=1
<if
test=
"riskSourceId != null"
>
<if
test=
"riskSourceId != null"
>
...
@@ -963,7 +963,7 @@
...
@@ -963,7 +963,7 @@
AND temp.type = #{type}
AND temp.type = #{type}
</if>
</if>
<if
test=
"orgCode != null"
>
<if
test=
"orgCode != null"
>
AND temp.orgCode
like CONCAT(#{orgCode},'%')
AND temp.orgCode
= #{orgCode}
</if>
</if>
</select>
</select>
...
...
pom.xml
View file @
51d11ec5
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
2.
1.0
</version>
<version>
2.
0.3
</version>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<name>
YeeAmosFireAutoSysRoot
</name>
<name>
YeeAmosFireAutoSysRoot
</name>
...
...
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