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
8ff0ae47
Commit
8ff0ae47
authored
Jul 15, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适用类型 树接口
parent
d8fd4b2a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
174 additions
and
0 deletions
+174
-0
InputItem.java
...in/java/com/yeejoin/amos/patrol/dao/entity/InputItem.java
+48
-0
EquipmentCategoryController.java
...n/equipmanage/controller/EquipmentCategoryController.java
+66
-0
EquipmentCategoryMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentCategoryMapper.java
+4
-0
IEquipmentCategoryService.java
...eejoin/equipmanage/service/IEquipmentCategoryService.java
+4
-0
EquipmentCategoryServiceImpl.java
...quipmanage/service/impl/EquipmentCategoryServiceImpl.java
+10
-0
EquipmentCategoryMapper.xml
...uip/src/main/resources/mapper/EquipmentCategoryMapper.xml
+42
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-patrol-api/src/main/java/com/yeejoin/amos/patrol/dao/entity/InputItem.java
View file @
8ff0ae47
...
@@ -192,10 +192,58 @@ public class InputItem extends BasicEntity {
...
@@ -192,10 +192,58 @@ public class InputItem extends BasicEntity {
// 重点类型
// 重点类型
@Column
(
name
=
"key_parts_type"
)
@Column
(
name
=
"key_parts_type"
)
private
String
keyPartsType
;
private
String
keyPartsType
;
//自定义类型
//自定义类型
@Column
(
name
=
"custom_type"
)
@Column
(
name
=
"custom_type"
)
private
String
customType
;
private
String
customType
;
public
String
getBizOrgCode
()
{
return
bizOrgCode
;
}
public
void
setBizOrgCode
(
String
bizOrgCode
)
{
this
.
bizOrgCode
=
bizOrgCode
;
}
public
String
getBizOrgName
()
{
return
bizOrgName
;
}
public
void
setBizOrgName
(
String
bizOrgName
)
{
this
.
bizOrgName
=
bizOrgName
;
}
public
String
getEquipmentType
()
{
return
equipmentType
;
}
public
void
setEquipmentType
(
String
equipmentType
)
{
this
.
equipmentType
=
equipmentType
;
}
public
String
getFacilitiesType
()
{
return
facilitiesType
;
}
public
void
setFacilitiesType
(
String
facilitiesType
)
{
this
.
facilitiesType
=
facilitiesType
;
}
public
String
getKeyPartsType
()
{
return
keyPartsType
;
}
public
void
setKeyPartsType
(
String
keyPartsType
)
{
this
.
keyPartsType
=
keyPartsType
;
}
public
String
getCustomType
()
{
return
customType
;
}
public
void
setCustomType
(
String
customType
)
{
this
.
customType
=
customType
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentCategoryController.java
View file @
8ff0ae47
...
@@ -7,6 +7,7 @@ import java.util.HashSet;
...
@@ -7,6 +7,7 @@ import java.util.HashSet;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -291,6 +292,71 @@ public class EquipmentCategoryController extends AbstractBaseController {
...
@@ -291,6 +292,71 @@ public class EquipmentCategoryController extends AbstractBaseController {
return
list
;
return
list
;
}
}
/**
* 除消防设施全量数据树形结构返回
*
* @return
*/
@RequestMapping
(
value
=
"/equip-tree"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"除消防设施全量数据树形结构返回"
,
notes
=
"除消防设施全量数据树形结构返回"
)
public
List
<
EquipmentCategory
>
listEquip
()
{
List
<
EquipmentCategory
>
equipmentCategorys
=
this
.
iEquipmentCategoryService
.
getEquipmentCategoryListNotFacilities
(
Integer
.
valueOf
(
equipmentCategoryLeftTypeCode
));
List
<
EquipmentCategory
>
list
=
new
ArrayList
<>();
Map
<
String
,
List
<
EquipmentCategory
>>
tmpMap
=
new
HashMap
<
String
,
List
<
EquipmentCategory
>>();
equipmentCategorys
.
forEach
(
action
->
{
if
(
action
.
getParentId
()
==
null
)
{
list
.
add
(
action
);
}
else
{
if
(
tmpMap
.
get
(
action
.
getParentId
().
toString
())
==
null
)
{
ArrayList
<
EquipmentCategory
>
tmplist
=
new
ArrayList
<
EquipmentCategory
>();
tmplist
.
add
(
action
);
tmpMap
.
put
(
action
.
getParentId
().
toString
(),
tmplist
);
}
else
{
if
(!
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
contains
(
action
))
{
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
add
(
action
);
}
}
}
});
getChildren
(
list
,
tmpMap
);
return
list
;
}
/**
* 消防设施分类定义树
*
* @return
*/
@RequestMapping
(
value
=
"/list-tree-fire"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防设施分类定义树"
,
notes
=
"消防设施分类定义树"
)
public
List
<
EquipmentCategory
>
listFire
()
{
List
<
EquipmentCategory
>
equipmentCategorys
=
this
.
iEquipmentCategoryService
.
getEquipmentCategoryListByFacilities
(
Integer
.
valueOf
(
equipmentCategoryLeftTypeCode
));
List
<
EquipmentCategory
>
list
=
new
ArrayList
<>();
Map
<
String
,
List
<
EquipmentCategory
>>
tmpMap
=
new
HashMap
<
String
,
List
<
EquipmentCategory
>>();
equipmentCategorys
.
forEach
(
action
->
{
if
(
action
.
getName
().
equals
(
"消防设施"
))
{
list
.
add
(
action
);
}
else
{
if
(
tmpMap
.
get
(
action
.
getParentId
().
toString
())
==
null
)
{
ArrayList
<
EquipmentCategory
>
tmplist
=
new
ArrayList
<
EquipmentCategory
>();
tmplist
.
add
(
action
);
tmpMap
.
put
(
action
.
getParentId
().
toString
(),
tmplist
);
}
else
{
if
(!
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
contains
(
action
))
{
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
add
(
action
);
}
}
}
});
getChildren
(
list
,
tmpMap
);
return
list
;
}
/**
/**
*
*
* 获取子节点
* 获取子节点
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentCategoryMapper.java
View file @
8ff0ae47
...
@@ -53,6 +53,10 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
...
@@ -53,6 +53,10 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
int
checkUsed
(
String
id
);
int
checkUsed
(
String
id
);
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryListByFacilities
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryCarList
();
List
<
EquipmentCategory
>
getEquipmentCategoryCarList
();
List
<
EquipmentCategory
>
getEquipmentCategoryEquipmentList
();
List
<
EquipmentCategory
>
getEquipmentCategoryEquipmentList
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentCategoryService.java
View file @
8ff0ae47
...
@@ -47,6 +47,10 @@ public interface IEquipmentCategoryService extends IService<EquipmentCategory> {
...
@@ -47,6 +47,10 @@ public interface IEquipmentCategoryService extends IService<EquipmentCategory> {
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
)
;
List
<
EquipmentCategory
>
getEquipmentCategoryListByFacilities
(
Integer
head
)
;
/**
/**
* 根据分类定义id获取对应所有子分类id
* 根据分类定义id获取对应所有子分类id
*
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentCategoryServiceImpl.java
View file @
8ff0ae47
...
@@ -391,6 +391,16 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
...
@@ -391,6 +391,16 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
return
this
.
baseMapper
.
getEquipmentCategoryList
(
head
);
return
this
.
baseMapper
.
getEquipmentCategoryList
(
head
);
}
}
public
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
)
{
return
this
.
baseMapper
.
getEquipmentCategoryListNotFacilities
(
head
);
}
public
List
<
EquipmentCategory
>
getEquipmentCategoryListByFacilities
(
Integer
head
)
{
return
this
.
baseMapper
.
getEquipmentCategoryListByFacilities
(
head
);
}
@Override
@Override
public
List
<
Long
>
getAllChildCategoryIdList
(
Long
categoryId
)
{
public
List
<
Long
>
getAllChildCategoryIdList
(
Long
categoryId
)
{
return
this
.
baseMapper
.
getAllChildCategoryIdList
(
categoryId
);
return
this
.
baseMapper
.
getAllChildCategoryIdList
(
categoryId
);
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
8ff0ae47
...
@@ -304,6 +304,48 @@
...
@@ -304,6 +304,48 @@
left join wl_industry i on ec.industry_code = i.code
left join wl_industry i on ec.industry_code = i.code
</select>
</select>
<select
id=
"getEquipmentCategoryListNotFacilities"
resultMap=
"Category"
>
SELECT ec.id,
ec.parent_id,
ec.CODE,
ec.NAME,
ec.is_consumptive,
ec.description,
ec.industry_code,
ec.remark,
ec.create_date,
i.`name` as industryName,
-- industry_code = 2代表消防设备
IF(LEFT(ec.CODE, 1) = #{head} and ec.industry_code = 2, 'car', 'equipment')
AS type
FROM wl_equipment_category ec
left join wl_industry i on ec.industry_code = i.code
WHERE
ec.code NOT LIKE CONCAT ('930','%')
</select>
<select
id=
"getEquipmentCategoryListByFacilities"
resultMap=
"Category"
>
SELECT ec.id,
ec.parent_id,
ec.CODE,
ec.NAME,
ec.is_consumptive,
ec.description,
ec.industry_code,
ec.remark,
ec.create_date,
i.`name` as industryName,
-- industry_code = 2代表消防设备
IF(LEFT(ec.CODE, 1) = #{head} and ec.industry_code = 2, 'car', 'equipment')
AS type
FROM wl_equipment_category ec
left join wl_industry i on ec.industry_code = i.code
WHERE
ec.code LIKE CONCAT ('930','%')
</select>
<select
id=
"getEquipmentCategoryCarList"
resultMap=
"Category"
>
<select
id=
"getEquipmentCategoryCarList"
resultMap=
"Category"
>
SELECT
SELECT
id,
id,
...
...
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