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
64eb0249
Commit
64eb0249
authored
Jul 18, 2022
by
Tkunkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制分系统下拉树只能选中第三级进行添加
parent
01bf8593
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
EquipmentCategoryServiceImpl.java
...quipmanage/service/impl/EquipmentCategoryServiceImpl.java
+15
-1
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+4
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentCategoryServiceImpl.java
View file @
64eb0249
...
@@ -477,21 +477,35 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
...
@@ -477,21 +477,35 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
Map
<
String
,
List
<
EquipmentCategory
>>
tmpMap
=
new
HashMap
<
String
,
List
<
EquipmentCategory
>>();
Map
<
String
,
List
<
EquipmentCategory
>>
tmpMap
=
new
HashMap
<
String
,
List
<
EquipmentCategory
>>();
equipmentCategories
.
forEach
(
action
->
{
equipmentCategories
.
forEach
(
action
->
{
if
(
action
.
getParentId
()
==
null
)
{
if
(
action
.
getParentId
()
==
null
)
{
action
.
setLevel
(
"0"
);
list
.
add
(
action
);
list
.
add
(
action
);
}
else
{
}
else
{
if
(
tmpMap
.
get
(
action
.
getParentId
().
toString
())
==
null
)
{
if
(
tmpMap
.
get
(
action
.
getParentId
().
toString
())
==
null
)
{
ArrayList
<
EquipmentCategory
>
tmplist
=
new
ArrayList
<
EquipmentCategory
>();
ArrayList
<
EquipmentCategory
>
tmplist
=
new
ArrayList
<
EquipmentCategory
>();
action
.
setLevel
(
"2"
);
tmplist
.
add
(
action
);
tmplist
.
add
(
action
);
tmpMap
.
put
(
action
.
getParentId
().
toString
(),
tmplist
);
tmpMap
.
put
(
action
.
getParentId
().
toString
(),
tmplist
);
}
else
{
}
else
{
if
(!
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
contains
(
action
))
{
if
(!
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
contains
(
action
))
{
action
.
setLevel
(
"2"
);
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
add
(
action
);
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
add
(
action
);
}
}
}
}
}
}
});
});
for
(
EquipmentCategory
type:
list
){
Long
category
=
type
.
getId
();
List
<
EquipmentCategory
>
equipment
=
tmpMap
.
get
(
category
.
toString
());
if
(
equipment
!=
null
){
for
(
EquipmentCategory
a:
equipment
){
a
.
setLevel
(
"1"
);
}
}
}
getChildrenList
(
list
,
tmpMap
);
getChildrenList
(
list
,
tmpMap
);
return
list
;
return
list
;
}
}
}
}
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
64eb0249
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://172.16.
11.201:3306/dl_business_v3.0.1.3
?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://172.16.
3.18:3306/business_v3.0.0.2
?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.password
=
Yeejoin@2020
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
...
@@ -12,7 +12,7 @@ spring.datasource.hikari.max-lifetime= 1800000
...
@@ -12,7 +12,7 @@ spring.datasource.hikari.max-lifetime= 1800000
spring.datasource.hikari.connection-timeout
=
60000
spring.datasource.hikari.connection-timeout
=
60000
spring.datasource.hikari.connection-test-query
=
SELECT 1
spring.datasource.hikari.connection-test-query
=
SELECT 1
eureka.instance.hostname
=
172.16.
11.201
eureka.instance.hostname
=
172.16.
3.18
eureka.instance.prefer-ip-address
=
true
eureka.instance.prefer-ip-address
=
true
eureka.client.serviceUrl.defaultZone
:
http://${eureka.instance.hostname}:10001/eureka/
eureka.client.serviceUrl.defaultZone
:
http://${eureka.instance.hostname}:10001/eureka/
...
@@ -25,9 +25,9 @@ security.appKeyApp=studio_normalapp_3056965
...
@@ -25,9 +25,9 @@ security.appKeyApp=studio_normalapp_3056965
#redis
#redis
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
172.16.
11.201
spring.redis.host
=
172.16.
3.18
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
123456
0
spring.redis.password
=
yeejoin@202
0
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.max-idle
=
10
...
...
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