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
ca918b83
Commit
ca918b83
authored
Sep 13, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug及站端相关优化项
parent
4fa061a7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
16 deletions
+35
-16
BuildingController.java
...om/yeejoin/equipmanage/controller/BuildingController.java
+5
-1
FormInstanceMapper.java
...va/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
+1
-1
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+1
-1
IFormInstanceService.java
...com/yeejoin/equipmanage/service/IFormInstanceService.java
+1
-1
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+21
-9
DownloadFileService.java
...yeejoin/equipmanage/service/impl/DownloadFileService.java
+1
-1
FormInstanceServiceImpl.java
...oin/equipmanage/service/impl/FormInstanceServiceImpl.java
+2
-2
FormInstanceMapper.xml
...em-equip/src/main/resources/mapper/FormInstanceMapper.xml
+3
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingController.java
View file @
ca918b83
...
@@ -4,7 +4,9 @@ import java.util.LinkedHashMap;
...
@@ -4,7 +4,9 @@ import java.util.LinkedHashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -105,7 +107,9 @@ public class BuildingController extends AbstractBaseController {
...
@@ -105,7 +107,9 @@ public class BuildingController extends AbstractBaseController {
@ApiOperation
(
"消防建筑树"
)
@ApiOperation
(
"消防建筑树"
)
@GetMapping
(
value
=
"/tree"
)
@GetMapping
(
value
=
"/tree"
)
public
List
<
BuildingTreeVo
>
getBuildingTree
()
{
public
List
<
BuildingTreeVo
>
getBuildingTree
()
{
return
buildService
.
getBuildingTree
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
return
buildService
.
getBuildingTree
(
bizOrgCode
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"消防建筑树列表信息"
)
@ApiOperation
(
"消防建筑树列表信息"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
View file @
ca918b83
...
@@ -47,7 +47,7 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
...
@@ -47,7 +47,7 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
* @param parentId
* @param parentId
* @return
* @return
*/
*/
List
<
Map
<
String
,
Object
>>
querySpecialChildrenList
(
String
parentId
);
List
<
Map
<
String
,
Object
>>
querySpecialChildrenList
(
String
parentId
,
String
bizOrgCode
);
/**
/**
* 查询指定节点的子
* 查询指定节点的子
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
ca918b83
...
@@ -74,7 +74,7 @@ public interface IBuilldService extends IService<Building> {
...
@@ -74,7 +74,7 @@ public interface IBuilldService extends IService<Building> {
*
*
* @return List<BuildingTreeVo>
* @return List<BuildingTreeVo>
*/
*/
List
<
BuildingTreeVo
>
getBuildingTree
();
List
<
BuildingTreeVo
>
getBuildingTree
(
String
bizOrgCode
);
/**
/**
* 消防建筑树查询接口(带条件bizOrgCode)
* 消防建筑树查询接口(带条件bizOrgCode)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFormInstanceService.java
View file @
ca918b83
...
@@ -70,7 +70,7 @@ public interface IFormInstanceService extends IService<FormInstance> {
...
@@ -70,7 +70,7 @@ public interface IFormInstanceService extends IService<FormInstance> {
* @param parentId 父节点
* @param parentId 父节点
* @return List<Map < String, Object>>
* @return List<Map < String, Object>>
*/
*/
List
<
Map
<
String
,
Object
>>
getSpecialChildrenList
(
String
parentId
);
List
<
Map
<
String
,
Object
>>
getSpecialChildrenList
(
String
parentId
,
String
bizOrgCode
);
/**
/**
* 查询指定节点的下降
* 查询指定节点的下降
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
ca918b83
...
@@ -451,8 +451,20 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -451,8 +451,20 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
}
@Override
@Override
public
List
<
BuildingTreeVo
>
getBuildingTree
(
String
bizOrgCode
)
{
List
<
BuildingTreeVo
>
allListVo
=
getBuildingTreeVos
(
true
,
bizOrgCode
);
return
allListVo
.
stream
().
filter
(
s
->
"-1"
.
equals
(
s
.
getParentId
())).
map
(
s
->
{
BuildingTreeVo
t
=
new
BuildingTreeVo
();
Bean
.
copyExistPropertis
(
s
,
t
);
t
.
setChildren
(
this
.
getChildren
(
t
.
getInstanceId
(),
allListVo
));
t
.
setDetailPaneApi
(
address
);
t
.
setApiUrl
(
apiUrl
);
return
t
;
}).
collect
(
Collectors
.
toList
());
}
public
List
<
BuildingTreeVo
>
getBuildingTree
()
{
public
List
<
BuildingTreeVo
>
getBuildingTree
()
{
List
<
BuildingTreeVo
>
allListVo
=
getBuildingTreeVos
(
true
);
List
<
BuildingTreeVo
>
allListVo
=
getBuildingTreeVos
(
true
,
null
);
return
allListVo
.
stream
().
filter
(
s
->
"-1"
.
equals
(
s
.
getParentId
())).
map
(
s
->
{
return
allListVo
.
stream
().
filter
(
s
->
"-1"
.
equals
(
s
.
getParentId
())).
map
(
s
->
{
BuildingTreeVo
t
=
new
BuildingTreeVo
();
BuildingTreeVo
t
=
new
BuildingTreeVo
();
Bean
.
copyExistPropertis
(
s
,
t
);
Bean
.
copyExistPropertis
(
s
,
t
);
...
@@ -487,12 +499,12 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -487,12 +499,12 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getBuildingDetaiList
()
{
public
List
<
Map
<
String
,
Object
>>
getBuildingDetaiList
()
{
return
iFormInstanceService
.
getSpecialChildrenList
(
null
);
return
iFormInstanceService
.
getSpecialChildrenList
(
null
,
null
);
}
}
private
List
<
BuildingTreeVo
>
getBuildingTreeVos
(
Boolean
isContainRootNode
)
{
private
List
<
BuildingTreeVo
>
getBuildingTreeVos
(
Boolean
isContainRootNode
,
String
bizOrgCode
)
{
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
);
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
,
bizOrgCode
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
,
isContainRootNode
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
,
isContainRootNode
);
Map
<
Long
,
String
>
absolutePositionMap
=
getBuildingAbsolutePosition
(
allListVo
);
Map
<
Long
,
String
>
absolutePositionMap
=
getBuildingAbsolutePosition
(
allListVo
);
allListVo
.
forEach
(
s
->
s
.
setAbsolutePosition
(
absolutePositionMap
.
get
(
s
.
getId
())));
allListVo
.
forEach
(
s
->
s
.
setAbsolutePosition
(
absolutePositionMap
.
get
(
s
.
getId
())));
...
@@ -502,7 +514,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -502,7 +514,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
List
<
BuildingTreeVo
>
getBuildingTierTree
(
Integer
tier
)
{
public
List
<
BuildingTreeVo
>
getBuildingTierTree
(
Integer
tier
)
{
if
(
tier
!=
null
)
{
if
(
tier
!=
null
)
{
List
<
BuildingTreeVo
>
list
=
getBuildingTreeVos
(
true
);
List
<
BuildingTreeVo
>
list
=
getBuildingTreeVos
(
true
,
null
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(
tier
==
1
)
{
if
(
tier
==
1
)
{
List
<
BuildingTreeVo
>
collect
=
list
.
stream
().
filter
(
x
->
"-1"
.
equals
(
x
.
getParentId
())
||
"building"
.
equalsIgnoreCase
(
x
.
getGroupType
())).
collect
(
Collectors
.
toList
());
List
<
BuildingTreeVo
>
collect
=
list
.
stream
().
filter
(
x
->
"-1"
.
equals
(
x
.
getParentId
())
||
"building"
.
equalsIgnoreCase
(
x
.
getGroupType
())).
collect
(
Collectors
.
toList
());
...
@@ -1191,7 +1203,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1191,7 +1203,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
Map
<
Long
,
String
>
getBuildingAbsolutePosition
()
{
public
Map
<
Long
,
String
>
getBuildingAbsolutePosition
()
{
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
);
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
,
null
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
,
true
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
,
true
);
return
getBuildingAbsolutePosition
(
allListVo
);
return
getBuildingAbsolutePosition
(
allListVo
);
}
}
...
@@ -1199,7 +1211,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1199,7 +1211,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
Map
<
String
,
Long
>
getBuildingCodeKey
()
{
public
Map
<
String
,
Long
>
getBuildingCodeKey
()
{
Map
<
String
,
Long
>
resMap
=
new
HashMap
<>();
Map
<
String
,
Long
>
resMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
);
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
,
null
);
if
(!
allList
.
isEmpty
())
{
if
(!
allList
.
isEmpty
())
{
allList
.
forEach
(
map
->
resMap
.
put
(
String
.
valueOf
(
map
.
get
(
"code"
)),
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"id"
)))));
allList
.
forEach
(
map
->
resMap
.
put
(
String
.
valueOf
(
map
.
get
(
"code"
)),
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"id"
)))));
}
}
...
@@ -1361,7 +1373,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1361,7 +1373,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
if
(
StringUtils
.
isEmpty
(
authKey
))
{
if
(
StringUtils
.
isEmpty
(
authKey
))
{
authKey
=
this
.
authKey
;
authKey
=
this
.
authKey
;
}
}
List
<
BuildingTreeVo
>
buildingTreeVos
=
getBuildingTreeVos
(
false
);
List
<
BuildingTreeVo
>
buildingTreeVos
=
getBuildingTreeVos
(
false
,
null
);
// 1.获取公司list
// 1.获取公司list
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
);
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
);
if
(
orgUsrLists
.
isEmpty
()){
if
(
orgUsrLists
.
isEmpty
()){
...
@@ -1511,7 +1523,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1511,7 +1523,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
//如果传递的为部门bizOrgCode 取其上级单位下的建筑
//如果传递的为部门bizOrgCode 取其上级单位下的建筑
// ResponseModel<OrgUsrDto> companyByBizOrgCodeList = jcsFeign.getCompanyByBizOrgCodeList(bizOrgCode);
// ResponseModel<OrgUsrDto> companyByBizOrgCodeList = jcsFeign.getCompanyByBizOrgCodeList(bizOrgCode);
// String resultCode = companyByBizOrgCodeList.getResult().getBizOrgCode();
// String resultCode = companyByBizOrgCodeList.getResult().getBizOrgCode();
List
<
BuildingTreeVo
>
buildingTreeVos
=
this
.
getBuildingTreeVos
(
true
);
List
<
BuildingTreeVo
>
buildingTreeVos
=
this
.
getBuildingTreeVos
(
true
,
null
);
List
<
BuildingTreeVo
>
orgBuildingTreeVos
=
buildingTreeVos
.
stream
().
filter
(
b
->
b
.
getBizOrgCode
()
!=
null
&&
b
.
getBizOrgCode
().
contains
(
bizOrgCode
)).
collect
(
Collectors
.
toList
());
List
<
BuildingTreeVo
>
orgBuildingTreeVos
=
buildingTreeVos
.
stream
().
filter
(
b
->
b
.
getBizOrgCode
()
!=
null
&&
b
.
getBizOrgCode
().
contains
(
bizOrgCode
)).
collect
(
Collectors
.
toList
());
return
buildingTreeVos
.
stream
().
filter
(
b
->
"-1"
.
equals
(
b
.
getParentId
())).
peek
(
b
->
{
return
buildingTreeVos
.
stream
().
filter
(
b
->
"-1"
.
equals
(
b
.
getParentId
())).
peek
(
b
->
{
b
.
setId
(
0L
);
b
.
setId
(
0L
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/DownloadFileService.java
View file @
ca918b83
...
@@ -72,7 +72,7 @@ public class DownloadFileService implements IDownloadFileService {
...
@@ -72,7 +72,7 @@ public class DownloadFileService implements IDownloadFileService {
//建筑信息
//建筑信息
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
);
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
,
null
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
);
appDownload
.
setBuildTree
(
allListVo
);
appDownload
.
setBuildTree
(
allListVo
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FormInstanceServiceImpl.java
View file @
ca918b83
...
@@ -432,8 +432,8 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
...
@@ -432,8 +432,8 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getSpecialChildrenList
(
String
parentId
)
{
public
List
<
Map
<
String
,
Object
>>
getSpecialChildrenList
(
String
parentId
,
String
bizOrgCode
)
{
return
this
.
baseMapper
.
querySpecialChildrenList
(
parentId
);
return
this
.
baseMapper
.
querySpecialChildrenList
(
parentId
,
bizOrgCode
);
}
}
@Override
@Override
...
...
amos-boot-system-equip/src/main/resources/mapper/FormInstanceMapper.xml
View file @
ca918b83
...
@@ -120,6 +120,9 @@
...
@@ -120,6 +120,9 @@
<if
test=
"parentId != null and parentId !=''"
>
<if
test=
"parentId != null and parentId !=''"
>
sa.parentId = #{parentId}
sa.parentId = #{parentId}
</if>
</if>
<if
test=
"bizOrgCode != null and bizOrgCode !=''"
>
sa.bizOrgCode like CONCAT(#{bizOrgCode},'%')
</if>
</where>
</where>
</select>
</select>
<select
id=
"queryPage"
resultType=
"hashmap"
>
<select
id=
"queryPage"
resultType=
"hashmap"
>
...
...
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