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
bf755375
Commit
bf755375
authored
Mar 18, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 驻站消防员新增查询条件
parent
5b620747
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
11 deletions
+43
-11
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+10
-7
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+33
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
bf755375
...
...
@@ -82,8 +82,11 @@
<if
test=
"map.positionType != null and map.positionType != ''"
>
AND FIND_IN_SET(#{map.positionType},g.positionType)
</if>
<if
test=
"map.peopleType != null and map.peopleType != ''"
>
AND g.peopleType = #{map.peopleType}
<if
test=
"map.peopleTypes != null and map.peopleTypes.size() > 0"
>
AND g.peopleType IN
<foreach
item=
"item"
index=
"index"
collection=
"map.peopleTypes"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"map.fireManagementPostOne != null and map.fireManagementPostOne != ''"
>
AND locate(#{map.fireManagementPostOne}, g.fireManagementPost)
...
...
@@ -189,8 +192,11 @@
<if
test=
"map.positionType != null and map.positionType != ''"
>
AND FIND_IN_SET(#{map.positionType},g.positionType)
</if>
<if
test=
"map.peopleType != null and map.peopleType != ''"
>
AND g.peopleType = #{map.peopleType}
<if
test=
"map.peopleTypes != null and map.peopleTypes.size() > 0"
>
AND g.peopleType IN
<foreach
item=
"item"
index=
"index"
collection=
"map.peopleTypes"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"map.fireManagementPostOne != null and map.fireManagementPostOne != ''"
>
AND locate(#{map.fireManagementPostOne}, g.fireManagementPost)
...
...
@@ -211,12 +217,9 @@
) a where a.sequenceNbr is not null
<if
test=
"map.fieldsValue != null"
>
<foreach
collection=
"map.fieldsValue.keys"
item=
"item"
>
<if
test=
"item != 'bizOrgName'"
>
AND a.${item} = #{map.fieldsValue[${item}]}
</if>
</foreach>
</if>
order by CONVERT(a.companyName USING gbk) ASC, a.personStatus DESC, a.recDate DESC
...
...
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 @
bf755375
...
...
@@ -624,7 +624,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
String
peopleType
=
""
;
if
(
req
.
containsKey
(
"peopleType"
))
{
peopleType
=
req
.
get
(
"peopleType"
).
toString
();
map
.
put
(
"peopleType"
,
peopleType
);
List
<
String
>
peopleTypes
=
Arrays
.
stream
(
peopleType
.
split
(
","
)).
filter
(
StringUtils:
:
isNotBlank
).
distinct
().
collect
(
Collectors
.
toList
());
map
.
put
(
"peopleTypes"
,
peopleTypes
);
}
String
personStatus
=
""
;
...
...
@@ -943,11 +944,39 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
List
<
Map
<
String
,
Object
>>
selectStatic
(
String
bizOrgCode
,
String
type
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
if
(
"1601"
.
equals
(
type
))
{
List
<
Map
<
String
,
Object
>>
listMap
=
new
ArrayList
<>()
;
if
(
"1601"
.
equals
(
type
))
{
listMap
=
this
.
baseMapper
.
selectStaticFire
(
bizOrgCode
);
}
else
{
}
else
if
(
"1602"
.
equals
(
type
))
{
listMap
=
this
.
baseMapper
.
selectStaticYw
(
bizOrgCode
);
}
else
if
(
"1601,1602"
.
equals
(
type
))
{
// 查询“驻站消防”数据
Map
<
String
,
Integer
>
tempMap
=
new
HashMap
<>();
int
total
=
0
;
List
<
Map
<
String
,
Object
>>
listMap1
=
this
.
baseMapper
.
selectStaticFire
(
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
listMap2
=
this
.
baseMapper
.
selectStaticYw
(
bizOrgCode
);
for
(
Map
<
String
,
Object
>
map
:
listMap1
)
{
String
postName
=
map
.
get
(
"postName"
).
toString
();
int
num
=
Integer
.
parseInt
(
map
.
get
(
"num"
).
toString
());
tempMap
.
put
(
postName
,
tempMap
.
getOrDefault
(
postName
,
0
)
+
num
);
total
+=
num
;
}
for
(
Map
<
String
,
Object
>
map
:
listMap2
)
{
String
postName
=
map
.
get
(
"postName"
).
toString
();
int
num
=
Integer
.
parseInt
(
map
.
get
(
"num"
).
toString
());
tempMap
.
put
(
postName
,
tempMap
.
getOrDefault
(
postName
,
0
)
+
num
);
total
+=
num
;
}
// 结果转换
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
tempMap
.
entrySet
())
{
int
finalTotal
=
total
;
Map
<
String
,
Object
>
item
=
new
HashMap
<
String
,
Object
>()
{{
this
.
put
(
"postName"
,
entry
.
getKey
());
this
.
put
(
"num"
,
entry
.
getValue
());
float
percent
=
((
float
)
(
entry
.
getValue
()
*
100
)
/
finalTotal
);
this
.
put
(
"percent"
,
percent
);
}};
listMap
.
add
(
item
);
}
}
return
listMap
;
}
...
...
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