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
80ae584f
Commit
80ae584f
authored
Sep 17, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
parent
42c16f34
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
1 deletion
+62
-1
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+2
-1
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+7
-0
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+47
-0
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+6
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceDto.java
View file @
80ae584f
...
@@ -316,8 +316,9 @@ public class WaterResourceDto extends BaseDto {
...
@@ -316,8 +316,9 @@ public class WaterResourceDto extends BaseDto {
@ExcelIgnore
@ExcelIgnore
@ApiModelProperty
(
"设施分类id"
)
@ApiModelProperty
(
"设施分类id"
)
private
Long
equipCategoryId
;
private
Long
equipCategoryId
;
// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
@ApiModelProperty
(
"设施分类名称"
)
@ApiModelProperty
(
"设施分类名称"
)
@ExplicitConstraint
(
indexNum
=
45
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getEquipCategory"
)
@ExcelProperty
(
value
=
"设施分类名称"
,
index
=
45
)
@ExcelProperty
(
value
=
"设施分类名称"
,
index
=
45
)
private
String
equipCategoryName
;
private
String
equipCategoryName
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
80ae584f
...
@@ -213,4 +213,11 @@ public interface EquipFeignClient {
...
@@ -213,4 +213,11 @@ public interface EquipFeignClient {
@RequestMapping
(
value
=
"/building/getAllBuilding"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/building/getAllBuilding"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
getAllBuilding
();
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
getAllBuilding
();
/**
* 查询所有建筑的数据字典// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
* @return
*/
@RequestMapping
(
value
=
"equipment-category/tree/{type}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
getEquipmentCategory
(
@PathVariable
String
type
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
80ae584f
...
@@ -156,6 +156,9 @@ public class DataSourcesImpl implements DataSources {
...
@@ -156,6 +156,9 @@ public class DataSourcesImpl implements DataSources {
case
"getDutyArea"
:
case
"getDutyArea"
:
str
=
getDutyArea
();
str
=
getDutyArea
();
break
;
break
;
case
"getEquipCategory"
:
str
=
getEquipCategory
();
break
;
}
}
}
}
return
str
;
return
str
;
...
@@ -377,4 +380,48 @@ public class DataSourcesImpl implements DataSources {
...
@@ -377,4 +380,48 @@ public class DataSourcesImpl implements DataSources {
String
[]
str
=
areaList
.
toArray
(
new
String
[
buildingList
.
size
()]);
String
[]
str
=
areaList
.
toArray
(
new
String
[
buildingList
.
size
()]);
return
str
;
return
str
;
}
}
/**
* 获取设施分类// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
* @return
*/
private
String
[]
getEquipCategory
()
{
String
type
=
"1"
;
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
response
=
equipFeignClient
.
getEquipmentCategory
(
type
);
// 筛选第一层
String
categoryCode
=
"90000000"
;
List
<
LinkedHashMap
<
String
,
Object
>>
categoryList
=
response
.
getResult
();
// 筛选第二层
String
fireCode
=
"93000000"
;
List
<
LinkedHashMap
<
String
,
Object
>>
fireList
=
Lists
.
newArrayList
();
// 筛选第三层
String
waterCode
=
"93060000"
;
List
<
LinkedHashMap
<
String
,
Object
>>
waterList
=
Lists
.
newArrayList
();
List
<
LinkedHashMap
<
String
,
Object
>>
category
=
Lists
.
newArrayList
();
List
<
String
>
resultList
=
Lists
.
newArrayList
();
for
(
LinkedHashMap
<
String
,
Object
>
t
:
categoryList
)
{
if
(
categoryCode
.
equals
(
t
.
get
(
"code"
).
toString
())){
fireList
=
(
List
<
LinkedHashMap
<
String
,
Object
>>)
t
.
get
(
"children"
);
}
}
// 筛选第二层
for
(
LinkedHashMap
<
String
,
Object
>
t
:
fireList
)
{
if
(
fireCode
.
equals
(
t
.
get
(
"code"
).
toString
())){
waterList
=
(
List
<
LinkedHashMap
<
String
,
Object
>>)
t
.
get
(
"children"
);
}
}
// 筛选第三层
for
(
LinkedHashMap
<
String
,
Object
>
t
:
waterList
)
{
if
(
waterCode
.
equals
(
t
.
get
(
"code"
).
toString
())){
category
=
(
List
<
LinkedHashMap
<
String
,
Object
>>)
t
.
get
(
"children"
);
}
}
category
.
forEach
(
t
->
{
resultList
.
add
(
t
.
get
(
"name"
)
+
"@"
+
t
.
get
(
"id"
));
});
String
[]
str
=
resultList
.
toArray
(
new
String
[
category
.
size
()]);
return
str
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
80ae584f
...
@@ -798,6 +798,12 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
...
@@ -798,6 +798,12 @@ if (excelDtoList != null && excelDtoList.size() > 0) {
item
.
setType
(
type
[
0
]);
item
.
setType
(
type
[
0
]);
item
.
setTypeCode
(
type
[
1
]);
item
.
setTypeCode
(
type
[
1
]);
}
}
// BUG 2935 优化项 分类从93060000 取得字典数据 by kongfm 2021-09-17
if
(
item
.
getEquipCategoryName
()
!=
null
)
{
String
[]
equipCategory
=
item
.
getEquipCategoryName
().
split
(
"@"
);
item
.
setEquipCategoryName
(
equipCategory
[
0
]);
item
.
setEquipCategoryId
(
Long
.
parseLong
(
equipCategory
[
1
]));
}
item
=
Bean
.
toPo
(
getCurrentInfo
(),
item
);
item
=
Bean
.
toPo
(
getCurrentInfo
(),
item
);
waterResourceServiceImpl
.
importByExcel
(
item
);
waterResourceServiceImpl
.
importByExcel
(
item
);
});
});
...
...
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