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
8cbb0c18
Commit
8cbb0c18
authored
Sep 19, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
30573 消防资源--> 消防器材配置接口开发, BUG修改
parent
65bba10a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
13 deletions
+82
-13
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+26
-12
EquipCountBySystemVO.java
...in/equipmanage/common/entity/vo/EquipCountBySystemVO.java
+2
-0
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+7
-0
JcsFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/JcsFeign.java
+2
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+2
-0
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+3
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+4
-1
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+13
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+23
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
8cbb0c18
...
...
@@ -469,22 +469,36 @@ public class DataDictionaryController extends BaseController {
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/saveFireEquipConfig"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"存储
默认展示视频"
,
notes
=
"存储默认展示视频
"
)
public
boolean
saveFireEquipConfig
(
@RequestParam
String
id
s
)
{
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"存储
消防器材配置数据"
,
notes
=
"存储消防器材配置数据
"
)
public
ResponseModel
saveFireEquipConfig
(
@RequestParam
(
value
=
"codes"
,
required
=
false
)
String
code
s
)
{
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
);
if
(
StringUtils
.
isNotEmpty
(
codes
))
{
List
<
DataDictionary
>
insertList
=
new
ArrayList
<>();
String
[]
split
=
codes
.
split
(
","
);
for
(
int
i
=
0
;
i
<
split
.
length
;
i
++)
{
DataDictionary
dataDictionary
=
new
DataDictionary
();
dataDictionary
.
setName
(
split
[
i
]);
dataDictionary
.
setCode
(
split
[
i
]);
dataDictionary
.
setType
(
type
);
dataDictionary
.
setSortNum
(
i
+
1
);
insertList
.
add
(
dataDictionary
);
}
iDataDictionaryService
.
saveBatch
(
insertList
);
}
iDataDictionaryService
.
saveBatch
(
insertList
);
return
Boolean
.
TRUE
;
return
ResponseHelper
.
buildResponse
(
Boolean
.
TRUE
);
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getDictListByType"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典"
,
notes
=
"根据字典类型查询字典"
)
public
ResponseModel
<
List
<
DataDictionary
>>
getDictListByType
(
@RequestParam
String
type
)
throws
Exception
{
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
List
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquipCountBySystemVO.java
View file @
8cbb0c18
...
...
@@ -26,4 +26,6 @@ public class EquipCountBySystemVO {
private
String
unitName
;
@ApiModelProperty
(
value
=
"图标"
)
private
String
img
;
@ApiModelProperty
(
value
=
"排序字段"
)
private
int
sortNum
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
8cbb0c18
...
...
@@ -145,6 +145,13 @@ public class FireFightingSystemController extends AbstractBaseController {
return
fireFightingSystemService
.
getEquipCountPageBySystemId
(
systemId
,
pageNumber
,
pageSize
);
}
@RequestMapping
(
value
=
"/getFireEquipConfigInfo"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"根据字典查询相关信息"
)
public
List
<
EquipCountBySystemVO
>
getFireEquipConfigInfo
()
{
return
fireFightingSystemService
.
getFireEquipConfigInfo
();
}
@RequestMapping
(
value
=
"/getOneById"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"通过id查询消防系统信息"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/fegin/JcsFeign.java
View file @
8cbb0c18
...
...
@@ -209,4 +209,6 @@ public interface JcsFeign {
@GetMapping
(
value
=
"/data-dictionary/dataDictionaryIdFillMenu"
)
FeignClientResult
<
List
<
DataDictionary
>>
dataDictionaryIdFillMenu
(
@RequestParam
(
value
=
"type"
)
String
type
);
@GetMapping
(
value
=
"/data-dictionary/getDictListByType"
)
FeignClientResult
<
List
<
DataDictionary
>>
getDictListByType
(
@RequestParam
(
value
=
"type"
)
String
type
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
8cbb0c18
...
...
@@ -742,4 +742,6 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Page
<
Map
<
String
,
Object
>>
getEquipmentRunLogBySysInfo
(
Page
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemCode"
)
String
systemCode
,
@Param
(
"fireEquipmentName"
)
String
fireEquipmentName
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
List
<
EquipCountBySystemVO
>
getFireEquipConfigInfo
(
@Param
(
"codes"
)
List
<
String
>
codes
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
8cbb0c18
...
...
@@ -359,4 +359,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
List
<
Map
<
String
,
Object
>>
getFEquipInfoList
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getFEquipInfoListCategory
(
String
bizOrgCode
);
List
<
EquipCountBySystemVO
>
getFireEquipConfigInfo
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
8cbb0c18
...
...
@@ -2361,6 +2361,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
List
<
List
<
String
>>
yaxisList
=
new
ArrayList
<>();
EquipTrendResultVo
equipTrendResultVo
=
new
EquipTrendResultVo
();
//横坐标数据
List
<
String
>
allTimeListNew
=
new
ArrayList
<>();
for
(
EquipTrendInfoVo
equipInfo
:
equipList
)
{
//返回数据组装
List
<
String
>
maxMinInfo
=
new
ArrayList
<>();
...
...
@@ -2407,7 +2409,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
yaxisList
.
add
(
values
);
}
equipTrendResultVo
.
setxAxisData
(
allTimeList
);
List
<
String
>
collect
=
allTimeList
.
stream
().
map
(
item
->
item
+
":00"
).
collect
(
Collectors
.
toList
());
equipTrendResultVo
.
setxAxisData
(
collect
);
equipTrendResultVo
.
setLegends
(
legends
);
equipTrendResultVo
.
setThreshold
(
threshold
);
equipTrendResultVo
.
setyAxisData
(
yaxisList
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
8cbb0c18
...
...
@@ -2989,4 +2989,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
});
return
listNew
;
}
@Override
public
List
<
EquipCountBySystemVO
>
getFireEquipConfigInfo
()
{
List
<
DataDictionary
>
fireConfigInfoList
=
jcsFeignClient
.
getDictListByType
(
"ZYGL_XFQC"
).
getResult
();
if
(
CollUtil
.
isEmpty
(
fireConfigInfoList
))
{
return
new
ArrayList
<>();
}
Map
<
String
,
Integer
>
collect
=
fireConfigInfoList
.
stream
().
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getSortNum
));
List
<
String
>
codes
=
fireConfigInfoList
.
stream
().
map
(
DataDictionary:
:
getCode
).
collect
(
Collectors
.
toList
());
List
<
EquipCountBySystemVO
>
fireEquipConfigInfo
=
this
.
baseMapper
.
getFireEquipConfigInfo
(
codes
);
fireEquipConfigInfo
.
forEach
(
item
->
item
.
setSortNum
(
collect
.
getOrDefault
(
item
.
getEquipmentCode
(),
1
)));
return
fireEquipConfigInfo
.
stream
().
sorted
(
Comparator
.
comparingInt
(
EquipCountBySystemVO:
:
getSortNum
)).
collect
(
Collectors
.
toList
());
}
}
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
8cbb0c18
...
...
@@ -6772,4 +6772,27 @@
</where>
ORDER BY d.create_date desc
</select>
<select
id=
"getFireEquipConfigInfo"
resultMap=
"EquipCountBySystemId"
>
SELECT
wle.id equipment_id,
wle.code equipment_code,
wle.NAME equipment_name,
count(spe.id) num,
unit.name unit_name,
wle.shbz_img img,
cate.NAME AS equipmentCateGoryName
FROM
wl_equipment_specific AS spe
LEFT JOIN wl_equipment_detail AS det ON spe.equipment_detail_id = det.id
LEFT JOIN wl_equipment AS wle ON wle.id = det.equipment_id
LEFT JOIN wl_equipment_category cate ON cate.id = wle.category_id
LEFT JOIN wl_unit as unit ON wle.unit_id = unit.id
where
wle.code in
<foreach
collection=
"codes"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
group by wle.id
</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