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
31190318
Commit
31190318
authored
Dec 22, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 根据公司的unitCode获取检测检验人员联系电话
parent
840bf9fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
CommonController.java
...mos/boot/module/jyjc/biz/controller/CommonController.java
+21
-2
CommonserviceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
+4
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/CommonController.java
View file @
31190318
...
...
@@ -18,6 +18,7 @@ import java.util.Collections;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author system_generator
...
...
@@ -46,14 +47,32 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getUserPhonesByPersonCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验人员
列表"
,
notes
=
"根据公司的unitCode获取检测检验人员列表
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验人员
联系电话"
,
notes
=
"根据公司的unitCode获取检测检验人员联系电话
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserPhonesByPersonCode
(
@RequestParam
String
unitCode
)
{
List
<
TzsUserInfo
>
userPhones
=
commonserviceImpl
.
getUserPhonesByPersonCode
(
unitCode
);
if
(
CollectionUtils
.
isEmpty
(
userPhones
)){
return
null
;
}
List
<
String
>
phones
=
userPhones
.
stream
().
map
(
TzsUserInfo:
:
getPhone
).
collect
(
Collectors
.
toList
());
String
phone
=
String
.
join
(
","
,
phones
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"phone"
,
phone
);
return
ResponseHelper
.
buildResponse
(
map
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getInnerPersonCodeByPersonCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验人员内部编号"
,
notes
=
"根据公司的unitCode获取检测检验人员内部编号"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getInnerPersonCodeByPersonCode
(
@RequestParam
String
unitCode
)
{
List
<
TzsUserInfo
>
userPhones
=
commonserviceImpl
.
getUserPhonesByPersonCode
(
unitCode
);
if
(
CollectionUtils
.
isEmpty
(
userPhones
)){
return
null
;
}
List
<
String
>
phones
=
userPhones
.
stream
().
map
(
TzsUserInfo:
:
getInnerPersonCode
).
collect
(
Collectors
.
toList
());
String
innerPersonCode
=
String
.
join
(
","
,
phones
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"
phone"
,
userPhones
.
get
(
0
).
getPhone
()
==
null
?
""
:
userPhones
.
get
(
0
).
getPhone
()
);
map
.
put
(
"
innerPersonCode"
,
innerPersonCode
);
return
ResponseHelper
.
buildResponse
(
map
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
View file @
31190318
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -50,8 +51,10 @@ public class CommonserviceImpl {
}
public
List
<
TzsUserInfo
>
getUserPhonesByPersonCode
(
String
personCode
)
{
List
<
String
>
ids
=
StrUtil
.
split
(
personCode
,
","
);
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"sequence_nbr"
,
personCode
);
userInfoQueryWrapper
.
in
(
"sequence_nbr"
,
ids
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
return
userInfos
;
}
...
...
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