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
bc05eb7a
Commit
bc05eb7a
authored
May 09, 2022
by
wanghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提供查性别接口
parent
03d21a9a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
13 deletions
+39
-13
FirefightersMapper.java
...mos/boot/module/common/api/mapper/FirefightersMapper.java
+9
-7
FirefightersMapper.xml
...mmon-api/src/main/resources/mapper/FirefightersMapper.xml
+8
-0
FirefightersServiceImpl.java
...dule/common/biz/service/impl/FirefightersServiceImpl.java
+12
-1
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+10
-5
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/mapper/FirefightersMapper.java
View file @
bc05eb7a
...
...
@@ -23,7 +23,7 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
List
<
FirefightersZhDto
>
getFirefighters
(
@Param
(
"pageNum"
)
int
pageNum
,
@Param
(
"pageSize"
)
int
pageSize
,
@Param
(
"par"
)
FirefightersDto
par
);
@Param
(
"par"
)
FirefightersDto
par
);
Map
<
String
,
Long
>
getFirefightersCount
(
@Param
(
"pageNum"
)
int
pageNum
,
@Param
(
"pageSize"
)
int
pageSize
,
@Param
(
"par"
)
FirefightersDto
par
);
...
...
@@ -32,12 +32,14 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
List
<
FirefightersTreeDto
>
getFirefightersJobTitleCount
(
String
bizOrgCode
);
List
<
Map
<
String
,
String
>>
getFirefightersName
(
);
List
<
Map
<
String
,
String
>>
getFirefightersName
(
);
List
<
FirefightersExcelDto
>
exportToExcel
(
Boolean
isDelete
,
String
name
,
String
postQualification
,
String
fireTeamId
,
String
state
,
String
areasExpertise
,
String
jobTitle
,
String
bizOrgCode
);
List
<
FirefightersExcelDto
>
exportToExcel
(
Boolean
isDelete
,
String
name
,
String
postQualification
,
String
fireTeamId
,
String
state
,
String
areasExpertise
,
String
jobTitle
,
String
bizOrgCode
);
List
<
FirefightersDto
>
queryById
(
@Param
(
"gw"
)
String
[]
gw
,
@Param
(
"name"
)
String
name
);
List
<
Map
<
String
,
String
>>
selectNormalFirePerson
(
String
jobId
);
List
<
FirefightersDto
>
queryById
(
@Param
(
"gw"
)
String
[]
gw
,
@Param
(
"name"
)
String
name
);
List
<
Map
<
String
,
String
>>
selectNormalFirePerson
(
String
jobId
);
List
<
Firefighters
>
getPersonByCodes
(
@Param
(
"list"
)
List
<
String
>
list
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersMapper.xml
View file @
bc05eb7a
...
...
@@ -263,4 +263,12 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
</select>
<select
id=
"getPersonByCodes"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.Firefighters"
>
select * from cb_firefighters where
employee_number in
<foreach
item=
"item"
collection=
"list"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
and is_delete = 0
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FirefightersServiceImpl.java
View file @
bc05eb7a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -186,5 +188,14 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
public
Object
getAllFirefightersPerson
(
String
jobId
)
{
return
firefightersMapper
.
selectNormalFirePerson
(
jobId
);
}
public
Map
<
String
,
String
>
getPersonByCodes
(
List
<
String
>
list
)
{
List
<
Firefighters
>
personByCodes
=
firefightersMapper
.
getPersonByCodes
(
list
);
// Map<String, String> personGenderMap = personByCodes.stream().distinct().collect(Collectors.toMap(Firefighters::getEmployeeNumber, Firefighters::getGender));
Map
<
String
,
String
>
personGenderMap
=
new
HashMap
<>();
for
(
Firefighters
personByCode
:
personByCodes
)
{
personGenderMap
.
put
(
personByCode
.
getEmployeeNumber
(),
personByCode
.
getGender
());
}
return
personGenderMap
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersController.java
View file @
bc05eb7a
...
...
@@ -18,11 +18,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -419,4 +415,13 @@ public class FirefightersController extends BaseController {
public
ResponseModel
<
Object
>
getAllFirefightersPerson
(
String
jobCode
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iFirefightersService
.
getAllFirefightersPerson
(
jobCode
));
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/get/personByCodes"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据code查性别"
,
notes
=
"根据code查性别"
)
public
ResponseModel
<
Map
<
String
,
String
>>
getPersonByCodes
(
@RequestParam
(
value
=
"list"
,
required
=
true
)
List
<
String
>
list
)
{
return
ResponseHelper
.
buildResponse
(
iFirefightersService
.
getPersonByCodes
(
list
));
}
}
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