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
0943ff64
Commit
0943ff64
authored
Oct 20, 2022
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改车辆近七日启停查询bug
parent
b0197507
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
16 deletions
+27
-16
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+25
-4
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+1
-7
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+1
-5
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 @
0943ff64
...
...
@@ -188,10 +188,31 @@ public class ConfigureController extends AbstractBaseController {
if
(!
CollectionUtils
.
isEmpty
(
fireCarInfoByWL
.
getRecords
()))
{
List
<
Map
<
String
,
Object
>>
records
=
fireCarInfoByWL
.
getRecords
();
records
.
forEach
(
item
->
{
String
carId
=
item
.
get
(
"id"
).
toString
();
Map
<
String
,
Object
>
fireCaStartBySeven
=
fireFightingSystemMapper
.
getFireCaStartBySeven
(
carId
);
Object
count
=
fireCaStartBySeven
.
get
(
"count"
);
item
.
put
(
"count"
,
count
.
toString
());
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
sevenDay
=
DateUtils
.
dateAddDays
(
null
,
-
7
);
String
seven
=
DateUtils
.
convertDateToString
(
sevenDay
,
DateUtils
.
DATE_TIME_PATTERN
);
ResponseModel
sevenEntity
=
null
;
try
{
sevenEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
seven
,
nowStrLong
,
prefix
,
suffix
,
"FireCar_Start"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(
200
==
sevenEntity
.
getStatus
())
{
String
json1
=
JSON
.
toJSONString
(
sevenEntity
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
List
<
Map
<
String
,
String
>>
collect
=
listObject1
.
stream
().
filter
(
t
->
(
t
.
containsKey
(
"FireCar_Start"
)
&&
t
.
get
(
"FireCar_Start"
).
equals
(
"true"
))).
collect
(
Collectors
.
toList
());
int
num
=
collect
.
size
();
item
.
put
(
"count"
,
num
);
}
if
(
item
.
containsKey
(
"carStateDate"
)
&&
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"carStateDate"
)))
{
try
{
Date
carStateDate
=
DateUtils
.
dateParse
(
item
.
get
(
"carStateDate"
).
toString
(),
"yyyy-MM-dd'T'HH:mm:ss"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
0943ff64
...
...
@@ -300,13 +300,7 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
*/
Page
<
Map
<
String
,
Object
>>
getFireCarInfoByWL
(
Page
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
/**
* 物联监控页面消防车辆信息
*
* @param carId
* @return
*/
Map
<
String
,
Object
>
getFireCaStartBySeven
(
@Param
(
"carId"
)
String
carId
);
/**
* 获取水源信息
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
0943ff64
...
...
@@ -2320,6 +2320,7 @@
(
SELECT
`wc`.`id` AS `id`,
`wc`.`iot_code` AS `iot_code`,
`wc`.`name` AS `name`,
IFNULL( max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_WaterCapacity' ) THEN `wcp`.`value` END ), 0 ) AS `waterCapacity`,
IFNULL( max( CASE WHEN ( `wcp`.`equipment_index_key` = 'FireCar_FoamCapacity' ) THEN `wcp`.`value` END ), 0 ) AS `foamCapacity`,
...
...
@@ -4531,11 +4532,6 @@
temp.notReturnd DESC
</select>
<select
id=
"getFireCaStartBySeven"
resultType=
"java.util.Map"
>
select count(1) as count from wl_car_property wcp where
wcp.create_date BETWEEN DATE_SUB(NOW(),INTERVAL 7 DAY) and now()
and equipment_index_key = 'FireCar_Start' and value = 'true' and car_id = #{carId}
</select>
<select
id=
"getWaterInfoBySuper"
resultType=
"java.util.Map"
>
select * from (
...
...
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