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
e8480d6c
Commit
e8480d6c
authored
Aug 05, 2021
by
changhong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
91afbfc7
9e30c6f8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
16 deletions
+41
-16
KeySiteExcleDto.java
...join/amos/boot/module/common/api/dto/KeySiteExcleDto.java
+1
-1
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+2
-2
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+13
-0
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+25
-13
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/KeySiteExcleDto.java
View file @
e8480d6c
...
...
@@ -29,7 +29,7 @@ public class KeySiteExcleDto implements Serializable {
private
String
name
;
@ExcelProperty
(
value
=
"所属单位/部门id"
,
index
=
1
)
@ExplicitConstraint
(
indexNum
=
1
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getCompany
List
"
)
//固定下拉内容
@ExplicitConstraint
(
indexNum
=
1
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getCompany
DetailTree
"
)
//固定下拉内容
@ApiModelProperty
(
value
=
"所属单位/部门id"
)
private
String
belongName
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
e8480d6c
...
...
@@ -328,9 +328,9 @@ public class CommandController extends BaseController {
* **/
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"JQ"
)
@GetMapping
(
value
=
"JQ
/{id}
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询灾情详情"
,
notes
=
"根据id查询灾情详情"
)
public
ResponseModel
<
Object
>
selectById
(
Long
id
)
{
public
ResponseModel
<
Object
>
selectById
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledKeyValueLabelById
(
id
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
e8480d6c
...
...
@@ -974,4 +974,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
});
return
lidataDtos
;
}
public
List
<
OrgUsr
>
getCompanyDetailTree
()
{
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<
OrgUsr
>();
wrapper
.
eq
(
OrgUsr:
:
getBizOrgType
,
"COMPANY"
);
wrapper
.
eq
(
OrgUsr:
:
getIsDelete
,
false
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
}
\ No newline at end of file
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 @
e8480d6c
...
...
@@ -89,9 +89,8 @@ public class DataSourcesImpl implements DataSources {
headers
.
setContentType
(
MediaType
.
valueOf
(
"application/json; charset=utf-8"
));
// 用HttpEntity封装整个请求报文
HttpEntity
<
Object
>
httpEntity
=
new
HttpEntity
<>(
null
,
headers
);
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
exchange
(
"http://"
+
systemctl
+
"/systemctl"
+
"/v1"
+
"/region/tree/parent"
,
HttpMethod
.
GET
,
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
exchange
(
"http://"
+
systemctl
+
"/systemctl"
+
"/v1"
+
"/region/tree/parent"
,
HttpMethod
.
GET
,
httpEntity
,
String
.
class
);
String
body
=
responseEntity
.
getBody
();
break
;
...
...
@@ -120,10 +119,13 @@ public class DataSourcesImpl implements DataSources {
str
=
getCarList
();
break
;
case
"getCompanyAndDeparementTree"
:
str
=
getCompanyAndDeparementTree
();
str
=
getCompanyAndDeparementTree
();
break
;
case
"getBuildTree"
:
str
=
getBuildTree
();
str
=
getBuildTree
();
break
;
case
"getCompanyDetailTree"
:
str
=
getCompanyDetailTree
();
break
;
}
}
...
...
@@ -230,16 +232,17 @@ public class DataSourcesImpl implements DataSources {
String
[]
str
=
names
.
toArray
(
new
String
[
names
.
size
()]);
return
str
;
}
private
String
[]
getCompanyAndDeparementTree
()
throws
Exception
{
List
<
OrgMenuDto
>
menus
=
orgUsrService
.
getTree
(
null
,
maintenanceCompanyService
.
getCompanyAndDepartmentTree
(),
MaintenanceCompany
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getName"
,
"getParentId"
,
"getType"
);
List
<
OrgMenuDto
>
menus
=
orgUsrService
.
getTree
(
null
,
maintenanceCompanyService
.
getCompanyAndDepartmentTree
(),
MaintenanceCompany
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getName"
,
"getParentId"
,
"getType"
);
List
<
String
>
stringList
=
new
ArrayList
<
String
>();
initCompanyList
(
menus
,
stringList
);
String
[]
str
=
stringList
.
toArray
(
new
String
[
stringList
.
size
()]);
return
str
;
}
private
String
[]
getBuildTree
()
throws
Exception
{
List
<
Object
>
menus
=
keySiteService
.
getBuildTree
();
List
<
String
>
stringList
=
new
ArrayList
<
String
>();
...
...
@@ -249,16 +252,25 @@ public class DataSourcesImpl implements DataSources {
}
private
void
initBuildTreeList
(
List
<
Object
>
menus
,
List
<
String
>
stringList
)
{
private
void
initBuildTreeList
(
List
<
Object
>
menus
,
List
<
String
>
stringList
)
{
for
(
Object
orgMenuDto
:
menus
)
{
JSONObject
detailObject
=
JSONObject
.
parseObject
(
orgMenuDto
.
toString
());
if
(
detailObject
.
containsKey
(
"id"
))
{
stringList
.
add
(
detailObject
.
getString
(
"name"
)
+
"@"
+
detailObject
.
getString
(
"id
"
));
JSONObject
detailObject
=
JSONObject
.
parseObject
(
orgMenuDto
.
toString
());
if
(
detailObject
.
containsKey
(
"id"
))
{
stringList
.
add
(
detailObject
.
getString
(
"id"
)
+
"@"
+
detailObject
.
getString
(
"name
"
));
}
JSONArray
children
=
detailObject
.
getJSONArray
(
"children"
);
if
(
children
!=
null
&&
children
.
size
()
>
0
)
{
initBuildTreeList
(
children
,
stringList
);
}
}
}
}
private
String
[]
getCompanyDetailTree
()
throws
Exception
{
List
<
OrgMenuDto
>
orgUsrTree
=
orgUsrService
.
getTree
(
null
,
orgUsrService
.
getCompanyDetailTree
(),
OrgUsr
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getBizOrgName"
,
"getParentId"
,
"getBizOrgType"
);
List
<
String
>
stringList
=
new
ArrayList
<
String
>();
initCompanyList
(
orgUsrTree
,
stringList
);
String
[]
str
=
stringList
.
toArray
(
new
String
[
stringList
.
size
()]);
return
str
;
}
}
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