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
22759691
Commit
22759691
authored
Dec 30, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消防水源及队伍改造
parent
62fee8e2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
11 deletions
+25
-11
DataDictionaryServiceImpl.java
...ot/biz/common/service/impl/DataDictionaryServiceImpl.java
+3
-3
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+3
-2
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+19
-6
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/DataDictionaryServiceImpl.java
View file @
22759691
...
...
@@ -116,12 +116,12 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
}
public
List
<
Menu
>
getFireTeamTypeTree
(
String
bizOrgCode
)
throws
Exception
{
Menu
root
=
new
Menu
(
null
,
"消防队伍类型"
,
null
,
null
,
0
);
//
Menu root = new Menu(null, "消防队伍类型", null, null,0);
List
<
DataDictionary
>
list
=
dataDictionaryMapper
.
getFireTeamTypeTree
(
bizOrgCode
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
root
.
setChildren
(
menus
);
return
Lists
.
newArrayList
(
root
);
//
root.setChildren(menus);
return
Lists
.
newArrayList
(
menus
);
}
public
List
<
DataDictionary
>
getwaterResourceTypeTree
(
String
bizOrgCode
)
throws
Exception
{
List
<
DataDictionary
>
list
=
dataDictionaryMapper
.
getwaterResourceTypeTree
(
bizOrgCode
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
22759691
...
...
@@ -8,6 +8,7 @@ import java.util.Map;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -554,8 +555,8 @@ public class WaterResourceController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/typeTree/XFSYLX"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据bizOrgCode的值获取对应的消防水源树信息,含有队伍下统计数据"
,
notes
=
"根据bizOrgCode的值获取对应的消防水源树信息,含有队伍下统计数据"
)
public
ResponseModel
<
JSONObject
>
getwaterResourceTypeTree
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
throws
Exception
{
JSONObject
list
=
waterResourceServiceImpl
.
getwaterResourceTypeTree
(
bizOrgCode
);
public
ResponseModel
<
List
<
Menu
>
>
getwaterResourceTypeTree
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
throws
Exception
{
List
<
Menu
>
list
=
waterResourceServiceImpl
.
getwaterResourceTypeTree
(
bizOrgCode
);
return
ResponseHelper
.
buildResponse
(
list
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
22759691
...
...
@@ -11,6 +11,7 @@ import java.util.Optional;
import
javax.annotation.Resource
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -327,7 +328,8 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
return
result
;
}
public
JSONObject
getwaterResourceTypeTree
(
String
bizOrgCode
)
throws
Exception
{
public
List
<
Menu
>
getwaterResourceTypeTree
(
String
bizOrgCode
)
throws
Exception
{
List
<
Menu
>
list
=
new
ArrayList
<>();
ResponseModel
<
Object
>
response
=
equipFeignClient
.
list
();
if
(
response
.
getStatus
()
!=
200
)
{
return
null
;
...
...
@@ -372,6 +374,7 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
JSONArray
waterTypeDetailChildrenArray
=
waterTypeDetailJson
.
getJSONArray
(
"children"
);
JSONArray
array
=
new
JSONArray
();
for
(
Object
childObject
:
waterTypeDetailChildrenArray
)
{
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
childObject
));
String
codeStr
=
detail
.
getString
(
"code"
);
if
(
map
!=
null
&&
map
.
containsKey
(
codeStr
))
{
...
...
@@ -380,13 +383,23 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
}
else
{
detail
.
put
(
"num"
,
0
);
}
array
.
add
(
detail
);
Menu
menu
=
new
Menu
(
Long
.
valueOf
(
detail
.
get
(
"id"
).
toString
())
,
detail
.
get
(
"name"
).
toString
(),
null
,
Integer
.
parseInt
(
detail
.
get
(
"num"
).
toString
()));
list
.
add
(
menu
);
// if (detail.get("children").toString().length() == 2) {
// detail.put("children",null);
// }
// array.add(detail);
}
waterTypeDetailJson
.
remove
(
"children"
);
waterTypeDetailJson
.
put
(
"children"
,
array
);
waterTypeDetailJson
.
put
(
"num"
,
num
);
// waterTypeDetailJson.remove("children");
// if(array.size() == 0) {
// waterTypeDetailJson.put("children", null);
// } else {
// waterTypeDetailJson.put("children", array);
// }
// waterTypeDetailJson.put("num", num);
}
return
waterTypeDetailJson
;
return
list
;
}
public
Object
getwaterResourceType
()
throws
Exception
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<
Map
<
String
,
Object
>>();
...
...
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