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
d1e74e53
Commit
d1e74e53
authored
Sep 19, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
30573 消防资源--> 消防器材配置接口开发, BUG修改
parent
17a1b3e1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
9 deletions
+44
-9
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+27
-0
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+1
-1
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+2
-1
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+13
-7
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+1
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
d1e74e53
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.controller;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
@@ -460,4 +461,30 @@ public class DataDictionaryController extends BaseController {
...
@@ -460,4 +461,30 @@ public class DataDictionaryController extends BaseController {
List
<
Map
<
String
,
Object
>>
listMap
=
iDataDictionaryService
.
listUserJobStatistic
(
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
listMap
=
iDataDictionaryService
.
listUserJobStatistic
(
bizOrgCode
);
return
ResponseHelper
.
buildResponse
(
listMap
);
return
ResponseHelper
.
buildResponse
(
listMap
);
}
}
/**
* 新增数据字典 - 存储默认展示视频
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/saveFireEquipConfig"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"存储默认展示视频"
,
notes
=
"存储默认展示视频"
)
public
boolean
saveFireEquipConfig
(
@RequestParam
String
ids
)
{
String
type
=
"ZYGL_XFQC"
;
LambdaUpdateWrapper
<
DataDictionary
>
lambda
=
new
LambdaUpdateWrapper
<>();
lambda
.
eq
(
DataDictionary:
:
getType
,
type
);
iDataDictionaryService
.
remove
(
lambda
);
List
<
DataDictionary
>
insertList
=
new
ArrayList
<>();
String
[]
split
=
ids
.
split
(
","
);
for
(
int
i
=
0
;
i
<
split
.
length
;
i
++)
{
DataDictionary
dataDictionary
=
new
DataDictionary
();
dataDictionary
.
setName
(
split
[
i
]);
dataDictionary
.
setCode
(
split
[
i
]);
dataDictionary
.
setType
(
type
);
insertList
.
add
(
dataDictionary
);
}
iDataDictionaryService
.
saveBatch
(
insertList
);
return
Boolean
.
TRUE
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
d1e74e53
...
@@ -859,7 +859,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -859,7 +859,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
value
=
"equipCode"
,
required
=
false
)
String
equipCode
,
@RequestParam
(
value
=
"equipCode"
,
required
=
false
)
String
equipCode
,
@RequestParam
(
value
=
"indexKey"
,
required
=
false
)
String
indexKey
)
{
@RequestParam
(
value
=
"indexKey"
,
required
=
false
)
String
indexKey
)
throws
ParseException
{
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
))
{
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
d1e74e53
...
@@ -20,6 +20,7 @@ import com.yeejoin.equipmanage.common.vo.*;
...
@@ -20,6 +20,7 @@ import com.yeejoin.equipmanage.common.vo.*;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.text.ParseException
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -332,5 +333,5 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
...
@@ -332,5 +333,5 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
EquipTrendResultVo
operatingTrendIot
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
);
EquipTrendResultVo
operatingTrendIot
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
);
EquipTrendResultVo
operatingTrendPressurePump
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
);
EquipTrendResultVo
operatingTrendPressurePump
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
)
throws
ParseException
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
d1e74e53
...
@@ -2344,10 +2344,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -2344,10 +2344,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
}
@Override
@Override
public
EquipTrendResultVo
operatingTrendPressurePump
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
)
{
public
EquipTrendResultVo
operatingTrendPressurePump
(
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
equipCode
,
String
indexKey
)
throws
ParseException
{
// 定义一个DateTimeFormatter来匹配时间字符串的格式
// 定义一个DateTimeFormatter来匹配时间字符串的格式
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
// 使用parse方法将字符串解析为LocalDateTime对象
// 使用parse方法将字符串解析为LocalDateTime对象
LocalDateTime
startTimeLocal
=
LocalDateTime
.
parse
(
startTime
,
formatter
);
LocalDateTime
startTimeLocal
=
LocalDateTime
.
parse
(
startTime
,
formatter
);
LocalDateTime
endTimeLocal
=
LocalDateTime
.
parse
(
endTime
,
formatter
);
LocalDateTime
endTimeLocal
=
LocalDateTime
.
parse
(
endTime
,
formatter
);
...
@@ -2386,20 +2385,27 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -2386,20 +2385,27 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"调用AMOS-API-IOT服务失败,请检查服务是否正常!"
);
throw
new
RuntimeException
(
"调用AMOS-API-IOT服务失败,请检查服务是否正常!"
);
}
}
HashMap
<
String
,
Integer
>
stringIntegerHashMap
=
new
HashMap
<>();
if
(
200
==
entity
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getResult
()))
{
if
(
200
==
entity
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
entity
.
getResult
()))
{
String
json
=
JSON
.
toJSONString
(
entity
.
getResult
());
String
json
=
JSON
.
toJSONString
(
entity
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json
);
List
<
Map
<
String
,
String
>>
listObject
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json
);
List
<
String
>
values
=
new
ArrayList
<>();
List
<
String
>
values
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
mapList
:
listObject
)
{
for
(
Map
<
String
,
String
>
mapList
:
listObject
)
{
if
(
mapList
.
containsKey
(
indexKey
))
{
String
time
=
change
(
mapList
.
get
(
"time"
)).
substring
(
0
,
13
);
long
countNum
=
allTimeList
.
stream
().
filter
(
item
->
mapList
.
get
(
"time"
).
contains
(
item
)).
count
();
if
(
stringIntegerHashMap
.
containsKey
(
time
))
{
values
.
add
(
String
.
valueOf
(
countNum
)
);
stringIntegerHashMap
.
put
(
time
,
stringIntegerHashMap
.
get
(
time
)
+
1
);
}
else
{
}
else
{
values
.
add
(
"0"
);
stringIntegerHashMap
.
put
(
time
,
1
);
}
}
}
}
yaxisList
.
add
(
values
);
}
}
List
<
String
>
values
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
allTimeList
.
size
();
i
++)
{
values
.
add
(
stringIntegerHashMap
.
getOrDefault
(
allTimeList
.
get
(
i
),
0
).
toString
());
}
yaxisList
.
add
(
values
);
}
}
equipTrendResultVo
.
setxAxisData
(
allTimeList
);
equipTrendResultVo
.
setxAxisData
(
allTimeList
);
equipTrendResultVo
.
setLegends
(
legends
);
equipTrendResultVo
.
setLegends
(
legends
);
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
d1e74e53
...
@@ -3026,6 +3026,7 @@
...
@@ -3026,6 +3026,7 @@
LEFT JOIN ( SELECT * FROM wl_equipment_specific_index WHERE equipment_index_key = #{indexKey} ) c ON a.id = c.equipment_specific_id
LEFT JOIN ( SELECT * FROM wl_equipment_specific_index WHERE equipment_index_key = #{indexKey} ) c ON a.id = c.equipment_specific_id
<where>
<where>
a.`equipment_code` LIKE concat(#{code}, '%')
a.`equipment_code` LIKE concat(#{code}, '%')
AND a.iot_code is not null AND a.iot_code != ''
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND a.biz_org_code LIKE concat(#{bizOrgCode}, '%')
AND a.biz_org_code LIKE concat(#{bizOrgCode}, '%')
</if>
</if>
...
...
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