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
df154c53
Commit
df154c53
authored
Jan 12, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加物联设备
parent
2ea72259
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
2 deletions
+72
-2
EquipTypeAmountPageDTO.java
...equipmanage/common/entity/dto/EquipTypeAmountPageDTO.java
+3
-0
CarController.java
...ava/com/yeejoin/equipmanage/controller/CarController.java
+15
-0
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+40
-0
application.properties
...ot-system-equip/src/main/resources/application.properties
+6
-2
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+8
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/dto/EquipTypeAmountPageDTO.java
View file @
df154c53
...
@@ -57,4 +57,7 @@ public class EquipTypeAmountPageDTO extends BaseDTO<EquipmentSpecific> {
...
@@ -57,4 +57,7 @@ public class EquipTypeAmountPageDTO extends BaseDTO<EquipmentSpecific> {
@ApiModelProperty
(
value
=
"队伍id"
)
@ApiModelProperty
(
value
=
"队伍id"
)
private
String
teamId
;
private
String
teamId
;
@ApiModelProperty
(
value
=
"是否物联"
)
private
String
isIot
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/CarController.java
View file @
df154c53
...
@@ -193,6 +193,12 @@ public class CarController extends AbstractBaseController {
...
@@ -193,6 +193,12 @@ public class CarController extends AbstractBaseController {
@Value
(
"${auth-key-fire-car}"
)
@Value
(
"${auth-key-fire-car}"
)
private
String
carAuthKey
;
private
String
carAuthKey
;
@Value
(
"${auth-key-fire-iot-equip:fire_iot-equip_info}"
)
private
String
iotAuthKey
;
@Autowired
@Autowired
JcsFeign
jcsFeign
;
JcsFeign
jcsFeign
;
@Autowired
@Autowired
...
@@ -1315,4 +1321,13 @@ public class CarController extends AbstractBaseController {
...
@@ -1315,4 +1321,13 @@ public class CarController extends AbstractBaseController {
FeignClientResult
<
List
<
OrgMenuDto
>>
menusList
=
jcsFeign
.
getCompanyDeptTreeWithAuth
(
carAuthKey
,
null
);
FeignClientResult
<
List
<
OrgMenuDto
>>
menusList
=
jcsFeign
.
getCompanyDeptTreeWithAuth
(
carAuthKey
,
null
);
return
ResponseHelper
.
buildResponse
(
menusList
.
getResult
());
return
ResponseHelper
.
buildResponse
(
menusList
.
getResult
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/iot/companyTreeByUserAndType"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登录人及类型获取公司部门树"
,
notes
=
"根据登录人及类型获取公司部门树"
)
public
ResponseModel
<
Object
>
iotcompanyTreeByUserAndType
()
throws
Exception
{
FeignClientResult
<
List
<
OrgMenuDto
>>
menusList
=
jcsFeign
.
getCompanyDeptTreeWithAuth
(
iotAuthKey
,
null
);
return
ResponseHelper
.
buildResponse
(
menusList
.
getResult
());
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
df154c53
...
@@ -303,7 +303,47 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -303,7 +303,47 @@ public class FireFightingSystemController extends AbstractBaseController {
@PostMapping
(
value
=
"/iot/getEquipTypeAmount"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"九大类下装备,通过code截取"
,
notes
=
"九大类下装备信息列表"
)
public
IPage
<
EquipTypeImgAmountVO
>
iotgetEquipTypeAmount
(
@RequestBody
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
equipTypeAmountPage
.
setIsIot
(
"1"
);
String
[]
result
=
hierarchy
.
split
(
","
);
Map
<
Integer
,
Integer
>
map
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
result
.
length
;
i
++)
{
map
.
put
(
i
,
Integer
.
valueOf
(
result
[
i
]));
}
if
(
StringUtil
.
isNotEmpty
(
equipTypeAmountPage
.
getEquipmentClassificationCode
()))
{
QueryWrapper
<
EquipmentCategory
>
equipmentCategoryQueryWrapper
=
new
QueryWrapper
<>();
equipmentCategoryQueryWrapper
.
eq
(
"code"
,
equipTypeAmountPage
.
getEquipmentClassificationCode
());
equipmentCategoryQueryWrapper
.
eq
(
"industry_code"
,
equipTypeAmountPage
.
getIndustryCode
());
EquipmentCategory
equipmentCategory
=
equipmentCategoryService
.
getOne
(
equipmentCategoryQueryWrapper
);
if
(
equipmentCategory
==
null
)
{
throw
new
RuntimeException
(
"装备定义code有误"
);
}
int
inhierarchy
=
1
;
for
(
int
i
=
0
;
i
<
result
.
length
+
1
;
i
++)
{
//进来先判断是否默认就是空,如果为空第一层
if
(
equipmentCategory
.
getParentId
()
==
null
)
{
//判断是否是最下面的子节点
if
(
i
>=
4
)
{
inhierarchy
=
8
;
}
else
{
inhierarchy
=
map
.
get
(
i
);
}
break
;
}
else
{
//查找到循环几次为空
equipmentCategory
=
equipmentCategoryService
.
getById
(
equipmentCategory
.
getParentId
());
}
}
return
fireFightingSystemService
.
getColaCategoryAmountList
(
inhierarchy
,
equipTypeAmountPage
.
getEquipmentClassificationCode
().
substring
(
0
,
inhierarchy
),
equipTypeAmountPage
);
}
else
{
return
fireFightingSystemService
.
getColaCategoryAmountList
(
0
,
null
,
equipTypeAmountPage
);
}
}
...
...
amos-boot-system-equip/src/main/resources/application.properties
View file @
df154c53
...
@@ -103,4 +103,8 @@ auth-key-fire-building=fire_building_info
...
@@ -103,4 +103,8 @@ auth-key-fire-building=fire_building_info
redis_car_type_count
=
carTypeAndCount
redis_car_type_count
=
carTypeAndCount
redis_equip_type_count
=
equipTypeAndCount
redis_equip_type_count
=
equipTypeAndCount
\ No newline at end of file
# 权限标识-物联装备
auth-key-fire-iot-equip
=
fire_iot-equip_info
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
df154c53
...
@@ -611,6 +611,11 @@
...
@@ -611,6 +611,11 @@
<if
test=
"codeHead!=null and codeHead!='' and codeHead!=' '"
>
<if
test=
"codeHead!=null and codeHead!='' and codeHead!=' '"
>
and LEFT (wle.CODE, #{hierarchy}) = #{codeHead}
and LEFT (wle.CODE, #{hierarchy}) = #{codeHead}
</if>
</if>
<if
test=
"equipTypeAmountPage.isIot!=null"
>
and wle.is_iot=1
</if>
<if
test=
"equipTypeAmountPage.industryCode!=null"
>
<if
test=
"equipTypeAmountPage.industryCode!=null"
>
and wec.industry_code = #{equipTypeAmountPage.industryCode}
and wec.industry_code = #{equipTypeAmountPage.industryCode}
</if>
</if>
...
@@ -713,6 +718,9 @@
...
@@ -713,6 +718,9 @@
<if
test=
"equipTypeAmountPage.industryCode!=null"
>
<if
test=
"equipTypeAmountPage.industryCode!=null"
>
and wec.industry_code = #{equipTypeAmountPage.industryCode}
and wec.industry_code = #{equipTypeAmountPage.industryCode}
</if>
</if>
<if
test=
"equipTypeAmountPage.isIot!=null"
>
and wle.is_iot=1
</if>
<if
test=
"equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''"
>
<if
test=
"equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''"
>
And wlc.`NAME` LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
And wlc.`NAME` LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
</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