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
f82c1cbb
Commit
f82c1cbb
authored
Feb 28, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
b34e1c82
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
FormInstanceMapper.java
...va/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
+2
-2
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+12
-2
FormInstanceMapper.xml
...em-equip/src/main/resources/mapper/FormInstanceMapper.xml
+2
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
View file @
f82c1cbb
...
...
@@ -138,7 +138,7 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
/**
* 修改仓库
*/
int
updateStr
(
@Param
(
"id"
)
Long
id
,
@Param
(
"name"
)
String
name
,
@Param
(
"fullName"
)
String
fullName
,
@Param
(
"parentId"
)
String
parentId
,
@Param
(
"code"
)
String
code
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
int
updateStr
(
@Param
(
"id"
)
Long
id
,
@Param
(
"name"
)
String
name
,
@Param
(
"fullName"
)
String
fullName
,
@Param
(
"parentId"
)
String
parentId
,
@Param
(
"code"
)
String
code
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"bizOrgName"
)
String
bizOrgName
);
/**
...
...
@@ -165,7 +165,7 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
/*
* 查询id下是否还有子类货位信息
* */
List
<
Map
<
String
,
String
>>
getParentId
(
Long
parentId
);
List
<
Map
<
String
,
Object
>>
getParentId
(
Long
parentId
);
Map
<
String
,
String
>
getIdAndType
(
String
id
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
f82c1cbb
...
...
@@ -344,10 +344,20 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
String
code
=
(
String
)
map
.
get
(
"code"
);
String
parentName
=
formInstanceMapper
.
getStuctureName
(
parentId
);
String
bizOrgCode
=
map
.
get
(
"bizOrgCode"
).
toString
();
String
bizOrgName
=
map
.
get
(
"bizOrgName"
).
toString
();
if
(!
"0"
.
equals
(
parentId
))
{
fullName
=
parentName
+
'-'
+
name
;
}
formInstanceMapper
.
updateStr
(
instanceId
,
name
,
fullName
,
parentId
,
code
,
bizOrgCode
);
formInstanceMapper
.
updateStr
(
instanceId
,
name
,
fullName
,
parentId
,
code
,
bizOrgCode
,
bizOrgName
);
/*若还有子级节点,一起修改*/
List
<
Map
<
String
,
Object
>>
result
=
formInstanceMapper
.
getParentId
(
instanceId
);
if
(
result
.
size
()>
0
&&
result
!=
null
){
result
.
forEach
(
e
->
{
long
id1
=
Long
.
parseLong
(
e
.
get
(
"id"
).
toString
());
formInstanceMapper
.
updateStr
(
id1
,
e
.
get
(
"name"
).
toString
(),
e
.
get
(
"full_name"
).
toString
(),
e
.
get
(
"parent_id"
).
toString
(),
e
.
get
(
"code"
).
toString
(),
bizOrgCode
,
bizOrgName
);
});
}
//3.修改仓库对应子数据
fullName
=
"0"
.
equals
(
parentId
)
?
name
+
"-"
:
"-"
+
name
;
name
=
beforFullName
+
"-"
;
...
...
@@ -1175,7 +1185,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
return
vo
;
}).
collect
(
Collectors
.
toList
());
// 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备
Map
<
String
,
Long
>
comMap
=
companyList
.
stream
().
collect
(
Collectors
.
toMap
(
BuildingTreeVo:
:
getBizOrgCode
,
BuildingTreeVo:
:
getId
));
Map
<
String
,
Long
>
comMap
=
orgUsrLists
.
stream
().
collect
(
Collectors
.
toMap
(
OrgUsrDto:
:
getBizOrgCode
,
OrgUsrDto:
:
getSequenceNbr
));
//增加了一层对树的过滤,过滤掉指定公司外的其他建筑。
List
<
BuildingTreeVo
>
collect
=
buildingTreeVos
.
stream
().
filter
(
build
->
companyList
.
stream
().
map
(
m
->
{
String
bizOrgCode
=
m
.
getBizOrgCode
();
...
...
amos-boot-system-equip/src/main/resources/mapper/FormInstanceMapper.xml
View file @
f82c1cbb
...
...
@@ -390,7 +390,8 @@
full_name = #{fullName},
parent_id = #{parentId},
code = #{code},
biz_org_code = #{bizOrgCode}
biz_org_code = #{bizOrgCode},
biz_org_name= #{bizOrgName}
where id = #{id}
</update>
<update
id=
"updateStrFullName"
>
...
...
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