Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
1f9130a4
Commit
1f9130a4
authored
Jan 12, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新接口
parent
a2bbd1eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
32 deletions
+102
-32
EquipmentIndex.java
...com/yeejoin/equipmanage/common/entity/EquipmentIndex.java
+6
-0
TopographyController.java
.../yeejoin/equipmanage/controller/TopographyController.java
+85
-31
wl-3.0.1.xml
...ot-system-equip/src/main/resources/changelog/wl-3.0.1.xml
+11
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentIndex.java
View file @
1f9130a4
...
...
@@ -105,4 +105,10 @@ public class EquipmentIndex extends BaseEntity {
@Transient
@TableField
(
exist
=
false
)
private
String
perfQuotaStr
;
/**
* 是否支持趋势查看
*/
@TableField
(
value
=
"is_trend"
)
private
Boolean
isTrend
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/TopographyController.java
View file @
1f9130a4
...
...
@@ -498,12 +498,17 @@ public class TopographyController extends AbstractBaseController {
@RequestMapping
(
value
=
"/equipment/detail"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据节点id查询详情"
,
notes
=
"根据节点id查询详情"
)
public
EquipmentDate
selectEquipmentDateById
(
@RequestParam
(
required
=
false
)
String
id
)
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
id
||
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
public
EquipmentDate
selectEquipmentDateById
(
@RequestParam
(
required
=
false
)
String
id
,
@RequestParam
(
required
=
false
)
String
equipSpeId
)
{
String
eqpId
;
if
(
StringUtil
.
isNotEmpty
(
equipSpeId
))
{
eqpId
=
equipSpeId
;
}
else
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
}
eqpId
=
detailDTO
.
getEqpId
();
}
String
eqpId
=
detailDTO
.
getEqpId
();
EquipmentDate
equipmentDate
=
new
EquipmentDate
();
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificService
.
getById
(
eqpId
);
QueryWrapper
<
EquipmentSpecificAlarm
>
wrapper
=
new
QueryWrapper
<>();
...
...
@@ -567,14 +572,25 @@ public class TopographyController extends AbstractBaseController {
@RequestMapping
(
value
=
"/equipment/alarm"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据节点id查询告警信息"
,
notes
=
"根据节点id查询告警信息"
)
public
ResponseModel
getAlarmInfo
(
@RequestParam
(
required
=
false
)
String
id
,
@RequestParam
(
required
=
false
)
int
status
,
@RequestParam
(
required
=
false
)
String
beginDate
,
@RequestParam
(
required
=
false
)
String
endDate
,
public
ResponseModel
getAlarmInfo
(
@RequestParam
(
required
=
false
)
String
id
,
@RequestParam
(
required
=
false
)
String
equipSpeId
,
@RequestParam
(
required
=
false
)
int
status
,
@RequestParam
(
required
=
false
)
String
confirmType
,
@RequestParam
(
required
=
false
)
String
cleanStatus
,
@RequestParam
(
required
=
false
)
String
beginDate
,
@RequestParam
(
required
=
false
)
String
endDate
,
CommonPageable
commonPageable
)
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
id
||
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
String
eqpId
;
if
(
StringUtil
.
isNotEmpty
(
equipSpeId
))
{
eqpId
=
equipSpeId
;
}
else
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
id
||
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
}
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificService
.
getById
(
detailDTO
.
getEqpId
());
eqpId
=
String
.
valueOf
(
equipmentSpecific
.
getId
());
}
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificService
.
getById
(
detailDTO
.
getEqpId
());
List
<
CommonRequest
>
queryRequests
=
new
ArrayList
<>();
CommonRequest
request
=
new
CommonRequest
();
request
.
setName
(
"beginDate"
);
...
...
@@ -586,12 +602,22 @@ public class TopographyController extends AbstractBaseController {
queryRequests
.
add
(
request1
);
CommonRequest
request2
=
new
CommonRequest
();
request2
.
setName
(
"id"
);
request2
.
setValue
(
StringUtil
.
isNotEmpty
(
String
.
valueOf
(
equipmentSpecific
.
getId
()))
?
StringUtils
.
trimToNull
(
String
.
valueOf
(
equipmentSpecific
.
getId
())
)
:
null
);
request2
.
setValue
(
StringUtil
.
isNotEmpty
(
eqpId
)
?
StringUtils
.
trimToNull
(
eqpId
)
:
null
);
queryRequests
.
add
(
request2
);
CommonRequest
request3
=
new
CommonRequest
();
request3
.
setName
(
"status"
);
request3
.
setValue
(
StringUtil
.
isNotEmpty
(
status
)
?
StringUtils
.
trimToNull
(
String
.
valueOf
(
status
))
:
null
);
queryRequests
.
add
(
request3
);
// confirmType: '' 为全部数据 0 为未确认 1为已确认
CommonRequest
request4
=
new
CommonRequest
();
request4
.
setName
(
"confirmType"
);
request4
.
setValue
(
StringUtil
.
isNotEmpty
(
confirmType
)
?
StringUtils
.
trimToNull
(
confirmType
)
:
null
);
queryRequests
.
add
(
request4
);
// cleanStatus: '' 为全部数据 1 为已消除 2为未消除
CommonRequest
request5
=
new
CommonRequest
();
request5
.
setName
(
"cleanStatus"
);
request5
.
setValue
(
StringUtil
.
isNotEmpty
(
cleanStatus
)
?
StringUtils
.
trimToNull
(
cleanStatus
)
:
null
);
queryRequests
.
add
(
request5
);
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
Page
<
TopographyAlarmVo
>
list
=
iEquipmentSpecificAlarmService
.
listAlarmsPageForTopography
(
param
);
return
CommonResponseUtil
.
success
(
list
);
...
...
@@ -603,12 +629,17 @@ public class TopographyController extends AbstractBaseController {
@RequestMapping
(
value
=
"/equipment/iot/info"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据节点id查询当前物联信息"
,
notes
=
"根据节点id查询当前物联信息"
)
public
Map
<
String
,
Object
>
getEquipmentIotInfo
(
@RequestParam
(
required
=
false
)
String
id
)
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
id
||
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
public
Map
<
String
,
Object
>
getEquipmentIotInfo
(
@RequestParam
(
required
=
false
)
String
id
,
@RequestParam
(
required
=
false
)
String
equipSpeId
)
{
String
eqpId
;
if
(
StringUtil
.
isNotEmpty
(
equipSpeId
))
{
eqpId
=
equipSpeId
;
}
else
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
}
eqpId
=
detailDTO
.
getEqpId
();
}
String
eqpId
=
detailDTO
.
getEqpId
();
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificService
.
getById
(
eqpId
);
EquipmentDetail
equipmentDetail
=
iEquipmentDetailService
.
getById
(
equipmentSpecific
.
getEquipmentDetailId
());
Long
equipmentId
=
equipmentDetail
.
getEquipmentId
();
...
...
@@ -688,13 +719,20 @@ public class TopographyController extends AbstractBaseController {
@RequestMapping
(
value
=
"/equipment/info"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据节点id查询当前节点物联数据记录"
,
notes
=
"根据节点id查询当前节点物联数据记录"
)
public
ResponseModel
getEquipmentIotInfo
(
@RequestParam
(
required
=
false
)
String
id
,
@RequestParam
(
required
=
false
)
String
beginDate
,
public
ResponseModel
getEquipmentIotInfo
(
@RequestParam
(
required
=
false
)
String
id
,
@RequestParam
(
required
=
false
)
String
equipSpeId
,
@RequestParam
(
required
=
false
)
String
beginDate
,
@RequestParam
(
required
=
false
)
String
endDate
)
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
id
||
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
String
eqpId
;
if
(
StringUtil
.
isNotEmpty
(
equipSpeId
))
{
eqpId
=
equipSpeId
;
}
else
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
}
eqpId
=
detailDTO
.
getEqpId
();
}
String
eqpId
=
detailDTO
.
getEqpId
();
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificService
.
getById
(
eqpId
);
String
iotCode
=
equipmentSpecific
.
getIotCode
();
String
prefix
=
null
;
...
...
@@ -765,16 +803,32 @@ public class TopographyController extends AbstractBaseController {
}
}
public
static
Map
<
String
,
String
>
mapStringToMap
(
String
str
)
{
str
=
str
.
substring
(
1
,
str
.
length
()
-
1
);
String
[]
strs
=
str
.
split
(
","
);
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
for
(
String
string
:
strs
)
{
String
key
=
string
.
split
(
"="
)[
0
];
String
value
=
string
.
split
(
"="
)[
1
];
map
.
put
(
key
,
value
);
/***
*
* 根拓补节点id查询当前节点物联数据记录
*
* **/
@RequestMapping
(
value
=
"/equipment/info"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据节点id查询当前节点物联数据记录"
,
notes
=
"根据节点id查询当前节点物联数据记录"
)
public
ResponseModel
getEquipmentIndexTrendInfo
(
@RequestParam
(
required
=
false
)
String
id
,
@RequestParam
(
required
=
false
)
String
equipSpeId
,
@RequestParam
(
required
=
false
)
String
beginDate
,
@RequestParam
(
required
=
false
)
String
endDate
)
{
String
eqpId
;
if
(
StringUtil
.
isNotEmpty
(
equipSpeId
))
{
eqpId
=
equipSpeId
;
}
else
{
TopographyNodeDetailDTO
detailDTO
=
topographyNodeDetailService
.
queryByNodeid
(
id
);
if
(
null
==
detailDTO
||
!
StringUtil
.
isNotEmpty
(
detailDTO
.
getEqpId
()))
{
throw
new
RuntimeException
(
"节点信息错误或此节点下未绑定装备!"
);
}
eqpId
=
detailDTO
.
getEqpId
();
}
return
map
;
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificService
.
getById
(
eqpId
);
return
CommonResponseUtil
.
success
();
}
}
amos-boot-system-equip/src/main/resources/changelog/wl-3.0.1.xml
View file @
1f9130a4
...
...
@@ -2261,7 +2261,17 @@
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1641977770-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"wl_equipment_index"
columnName=
"is_trend"
/>
</not>
</preConditions>
<comment>
wl_equipment_index add column is_trend
</comment>
<sql>
alter table `wl_equipment_index` add column `is_trend` bit(1) DEFAULT b'0' COMMENT '是否支持趋势查看, 默认false';
</sql>
</changeSet>
...
...
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