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
bc23b698
Commit
bc23b698
authored
Jan 06, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新接口
parent
79999b43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
8 deletions
+40
-8
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+38
-7
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+1
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+1
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
bc23b698
...
@@ -558,7 +558,19 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -558,7 +558,19 @@ public class SupervisionConfigureController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管网压力详情"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"管网压力详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"管网压力详情"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"管网压力详情"
)
public
ResponseModel
selectPipePressureDetail
(
@RequestParam
(
value
=
"equipmentSpecificId"
)
String
equipmentSpecificId
)
{
public
ResponseModel
selectPipePressureDetail
(
@RequestParam
(
value
=
"equipmentSpecificId"
)
String
equipmentSpecificId
)
{
if
(!
StringUtil
.
isNotEmpty
(
equipmentSpecificId
))
{
return
CommonResponseUtil
.
success
();
}
Map
<
String
,
Object
>
map
=
fireFightingSystemMapper
.
selectEquipmentSpecificById
(
equipmentSpecificId
);
Map
<
String
,
Object
>
map
=
fireFightingSystemMapper
.
selectEquipmentSpecificById
(
equipmentSpecificId
);
String
name
=
""
;
String
code
=
""
;
if
(
String
.
valueOf
(
map
.
get
(
"equipment_code"
)).
indexOf
(
"92011000"
)
!=
-
1
)
{
name
=
"管网压力"
;
code
=
"gwyl"
;
}
else
if
(
String
.
valueOf
(
map
.
get
(
"equipment_code"
)).
indexOf
(
"92011100"
)
!=
-
1
)
{
name
=
"水池液位"
;
code
=
"scyw"
;
}
if
(
ObjectUtils
.
isEmpty
(
map
)
||
ObjectUtils
.
isEmpty
(
map
.
get
(
"iot_code"
)))
{
if
(
ObjectUtils
.
isEmpty
(
map
)
||
ObjectUtils
.
isEmpty
(
map
.
get
(
"iot_code"
)))
{
return
CommonResponseUtil
.
success
(
null
);
return
CommonResponseUtil
.
success
(
null
);
}
}
...
@@ -593,14 +605,33 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -593,14 +605,33 @@ public class SupervisionConfigureController extends AbstractBaseController {
}
}
}
}
result
.
stream
().
map
(
item
->
{
List
<
Map
<
String
,
String
>>
res
=
new
ArrayList
<>();
if
(!
ObjectUtils
.
isEmpty
(
item
.
get
(
"time"
)))
{
for
(
Map
<
String
,
String
>
m
:
result
)
{
item
.
put
(
"time"
,
change
(
String
.
valueOf
(
item
.
get
(
"time"
))));
Map
<
String
,
String
>
item
=
new
HashMap
<>();
item
.
put
(
"time"
,
change
(
String
.
valueOf
(
m
.
get
(
"time"
))));
for
(
String
s
:
m
.
keySet
())
{
if
(!
s
.
equals
(
"time"
))
{
item
.
put
(
"value"
,
m
.
get
(
s
));
item
.
remove
(
s
);
continue
;
}
}
}
return
item
;
res
.
add
(
item
);
}).
collect
(
Collectors
.
toList
());
}
// result.stream().map(item -> {
return
CommonResponseUtil
.
success
(
result
);
// if (!ObjectUtils.isEmpty(item.get("time"))) {
// item.put("time", change(String.valueOf(item.get("time"))));
// }
// return item;
// }).collect(Collectors.toList());
List
<
Map
<
String
,
Object
>>
resList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"name"
,
name
);
map1
.
put
(
"xData"
,
res
.
stream
().
map
(
x
->
x
.
get
(
"time"
)).
collect
(
Collectors
.
toList
()));
map1
.
put
(
"yData"
,
res
.
stream
().
map
(
x
->
x
.
get
(
"value"
)).
collect
(
Collectors
.
toList
()));
Map
<
String
,
Object
>
resMap
=
new
HashMap
<>();
resMap
.
put
(
code
,
map1
);
return
CommonResponseUtil
.
success
(
resMap
);
}
}
private
String
change
(
String
time
)
{
private
String
change
(
String
time
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
bc23b698
...
@@ -986,6 +986,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -986,6 +986,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"key"
,
i
);
map
.
put
(
"key"
,
i
);
map
.
put
(
"name"
,
m
.
get
(
"equipmentName"
));
map
.
put
(
"name"
,
m
.
get
(
"equipmentName"
));
map
.
put
(
"equipmentCode"
,
m
.
get
(
"equipmentCode"
));
map
.
put
(
"code"
,
m
.
get
(
"code"
));
map
.
put
(
"code"
,
m
.
get
(
"code"
));
map
.
put
(
"value"
,
m
.
get
(
"flag"
));
map
.
put
(
"value"
,
m
.
get
(
"flag"
));
map
.
put
(
"unit"
,
""
);
map
.
put
(
"unit"
,
""
);
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
bc23b698
...
@@ -5671,7 +5671,7 @@
...
@@ -5671,7 +5671,7 @@
es.id
es.id
</select>
</select>
<select
id=
"selectEquipmentSpecificById"
resultType=
"java.util.Map"
>
<select
id=
"selectEquipmentSpecificById"
resultType=
"java.util.Map"
>
select
* from wl_equipment_specific where id = #{id}
select * from wl_equipment_specific where id = #{id}
</select>
</select>
</mapper>
</mapper>
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