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
a1270adc
Commit
a1270adc
authored
Mar 15, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
500e3c05
8e8caa9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
29 deletions
+22
-29
SpecialPositionStaffServiceImpl.java
...mon/biz/service/impl/SpecialPositionStaffServiceImpl.java
+17
-24
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+5
-5
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/SpecialPositionStaffServiceImpl.java
View file @
a1270adc
...
@@ -10,13 +10,13 @@ import com.yeejoin.amos.boot.module.common.api.mapper.SpecialPositionStaffMapper
...
@@ -10,13 +10,13 @@ import com.yeejoin.amos.boot.module.common.api.mapper.SpecialPositionStaffMapper
import
com.yeejoin.amos.boot.module.common.api.service.ISpecialPositionStaffService
;
import
com.yeejoin.amos.boot.module.common.api.service.ISpecialPositionStaffService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.stream.Collectors
;
import
java.util.List
;
/**
/**
* 特岗人员服务实现类
* 特岗人员服务实现类
...
@@ -70,32 +70,24 @@ public class SpecialPositionStaffServiceImpl extends BaseService<SpecialPosition
...
@@ -70,32 +70,24 @@ public class SpecialPositionStaffServiceImpl extends BaseService<SpecialPosition
List
<
Long
>
positionStaffCodeList
=
this
.
baseMapper
.
getPositionStaffCodeList
(
false
,
companyId
);
List
<
Long
>
positionStaffCodeList
=
this
.
baseMapper
.
getPositionStaffCodeList
(
false
,
companyId
);
// 排除已有数据的,返回
// 排除已有数据的,返回
/*bug 3483 陈召 2021-11-18 开始*/
/*bug 3483 陈召 2021-11-18 开始*/
List
<
MenuFrom
>
menuListds
=
new
ArrayList
<>();
//排除父岗位是否已有 有就删除
for
(
int
i
=
0
;
i
<
menuList
.
size
();
i
++)
{
List
<
MenuFrom
>
dataList
=
menuList
.
stream
().
filter
(
e
->
!
positionStaffCodeList
.
contains
(
Long
.
valueOf
(
e
.
getKey
()))).
collect
(
Collectors
.
toList
());
//排除父岗位是否已有 有就删除
for
(
ListIterator
<
MenuFrom
>
iterator
=
dataList
.
listIterator
();
iterator
.
hasNext
();){
if
(
positionStaffCodeList
.
contains
(
Long
.
valueOf
(
menuList
.
get
(
i
).
getKey
())))
{
MenuFrom
next
=
iterator
.
next
();
menuList
.
remove
(
i
);
if
(
null
!=
next
.
getChildren
()
&&
next
.
getChildren
().
size
()
>
0
)
{
i
--;
//排除子岗位是否已有 有就删除
}
List
<
MenuFrom
>
newChildren
=
next
.
getChildren
().
stream
().
filter
(
e
->
!
positionStaffCodeList
.
contains
(
Long
.
valueOf
(
e
.
getKey
()))).
collect
(
Collectors
.
toList
());
//排除子岗位是否已有 有就删除
//当子岗位全部删除时 父岗位也删除
if
(
null
!=
menuList
.
get
(
i
).
getChildren
()
&&
menuList
.
get
(
i
).
getChildren
().
size
()
>
0
){
if
(
ValidationUtil
.
isEmpty
(
newChildren
)){
List
<
MenuFrom
>
children
=
menuList
.
get
(
i
).
getChildren
();
iterator
.
remove
();
for
(
int
j
=
0
;
j
<
children
.
size
();
j
++)
{
}
else
{
if
(
positionStaffCodeList
.
contains
(
Long
.
valueOf
(
children
.
get
(
j
).
getKey
())))
{
next
.
setChildren
(
newChildren
);
menuList
.
get
(
i
).
getChildren
().
remove
(
j
);
j
--;
}
//当子岗位全部删除时 父岗位也删除
if
(
children
.
size
()
==
0
){
menuList
.
remove
(
i
);
i
--;
}
}
}
}
}
}
}
/*bug 3483 陈召 2021-11-18 结束*/
/*bug 3483 陈召 2021-11-18 结束*/
HashMap
<
Object
,
Object
>
objectObjectHashMap
=
new
HashMap
<>();
HashMap
<
Object
,
Object
>
objectObjectHashMap
=
new
HashMap
<>();
objectObjectHashMap
.
put
(
"GWMC"
,
menu
List
);
objectObjectHashMap
.
put
(
"GWMC"
,
data
List
);
return
objectObjectHashMap
;
return
objectObjectHashMap
;
}
}
}
}
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
a1270adc
...
@@ -169,12 +169,12 @@
...
@@ -169,12 +169,12 @@
UNION ALL
UNION ALL
SELECT
SELECT
wc.id,
wc.id,
'' systemId,
wc.iot_code AS iotCode,
'' systemName,
wc.iot_code AS iotCode,
'' as ecode,
'' as ecode,
'car' AS type,
'car' AS type,
wc.car_num AS `code`
wc.car_num AS `code`,
'' systemId,
'' systemName
FROM
FROM
wl_car wc
wl_car wc
where TRIM(wc.iot_code) != '' AND wc.iot_code IS NOT NULL
where TRIM(wc.iot_code) != '' AND wc.iot_code IS NOT NULL
...
...
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