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
5eb88a34
Commit
5eb88a34
authored
Jul 27, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
三小消防给水信息
parent
da8f1f80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
0 deletions
+83
-0
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+61
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+8
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+14
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfigureController.java
View file @
5eb88a34
...
...
@@ -245,6 +245,67 @@ public class ConfigureController extends AbstractBaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"消防给水3小稳压泵信息"
)
@GetMapping
(
"/getPressurePumpInfo3Small"
)
public
ResponseModel
getPressurePumpInfo3Small
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
List
<
Map
<
String
,
Object
>>
pressurePumpInfo
=
fireFightingSystemMapper
.
getPressurePumpInfo3Small
(
bizOrgCode
,
null
);
Map
<
String
,
Integer
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"total"
,
pressurePumpInfo
.
size
());
resultMap
.
put
(
"normalNum"
,
0
);
resultMap
.
put
(
"unNormalNum"
,
0
);
pressurePumpInfo
.
stream
().
map
(
item
->
{
item
.
put
(
"startAndStopNum"
,
0
);
item
.
put
(
"update_time"
,
"未知"
);
item
.
put
(
"equipment_index_name"
,
"未知"
);
String
prefix
=
null
;
String
suffix
=
null
;
String
iotCode
=
item
.
get
(
"iot_code"
).
toString
();
if
(
iotCode
.
length
()
>
8
)
{
prefix
=
iotCode
.
substring
(
0
,
8
);
suffix
=
iotCode
.
substring
(
8
);
}
else
{
throw
new
BadRequest
(
"装备物联编码错误,请确认!"
);
}
String
nowStrLong
=
DateUtils
.
getNowStrLong
();
Date
startDate
=
DateUtils
.
dateAddMinutes
(
null
,
-
4
);
String
startDateStr
=
DateUtils
.
convertDateToString
(
startDate
,
DateUtils
.
DATE_TIME_PATTERN
);
ResponseModel
entity1
=
null
;
ResponseModel
entity2
=
null
;
try
{
entity1
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
startDateStr
,
nowStrLong
,
prefix
,
suffix
,
"FHS_PressurePump_Start"
);
entity2
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
startDateStr
,
nowStrLong
,
prefix
,
suffix
,
"FHS_PressurePump_Stop"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(
200
==
entity1
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
entity1
.
getResult
())
&&
200
==
entity2
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
entity2
.
getResult
()))
{
String
json1
=
JSON
.
toJSONString
(
entity1
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
String
json2
=
JSON
.
toJSONString
(
entity1
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject2
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json2
);
int
num
=
listObject1
.
size
()
+
listObject2
.
size
();
item
.
put
(
"startAndStopNum"
,
num
);
}
item
.
put
(
"stateDesc"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
?
"正常"
:
"异常"
);
resultMap
.
put
(
"normalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
?
(
resultMap
.
get
(
"normalNum"
)
+
1
)
:
resultMap
.
get
(
"normalNum"
));
resultMap
.
put
(
"unNormalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
>
1
?
(
resultMap
.
get
(
"unNormalNum"
)
+
1
)
:
resultMap
.
get
(
"unNormalNum"
));
item
.
put
(
"normalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
?
1
:
0
);
item
.
put
(
"unNormalNum"
,
(
Integer
)
item
.
get
(
"startAndStopNum"
)
<=
1
?
0
:
1
);
Map
<
String
,
String
>
stateMap
=
fireFightingSystemMapper
.
queryPressureNowStateBySpecificId
((
Long
)
item
.
get
(
"id"
));
if
(!
ObjectUtils
.
isEmpty
(
stateMap
)
&&
stateMap
.
containsKey
(
"update_date"
)
&&
stateMap
.
containsKey
(
"equipment_index_name"
))
{
item
.
put
(
"update_time"
,
stateMap
.
get
(
"update"
));
item
.
put
(
"equipment_index_name"
,
stateMap
.
get
(
"equipment_index_name"
));
}
return
item
;
}).
collect
(
Collectors
.
toList
());
return
CommonResponseUtil
.
success
(
resultMap
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"3小水源信息"
)
@GetMapping
(
"/getSmallWaterInfo"
)
public
ResponseModel
getSmallWaterInfo
(
@RequestParam
(
required
=
false
)
String
systemCode
,
CommonPageable
commonPageable
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
5eb88a34
...
...
@@ -342,4 +342,12 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
* @return
*/
Map
<
String
,
String
>
queryPressureNowStateBySpecificId
(
@Param
(
"id"
)
Long
id
);
/**
* 稳压泵信息-3小消防给水信息
* @param bizOrgCode
* @param systemCode
* @return
*/
List
<
Map
<
String
,
Object
>>
getPressurePumpInfo3Small
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemCode"
)
String
systemCode
);
}
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
5eb88a34
...
...
@@ -2731,4 +2731,18 @@
i.update_date DESC
LIMIT 1
</select>
<select
id=
"getPressurePumpInfo3Small"
resultType=
"java.util.Map"
>
SELECT
ed.`name`,
ed.area,
es.iot_code,
es.id
FROM
wl_equipment_detail ed
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
WHERE
ed.`code` LIKE '92010800%'
AND biz_org_code = #{bizOrgCode}
</select>
</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