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
4290fc3f
Commit
4290fc3f
authored
Aug 18, 2023
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.人员列表未过滤公司bug
parent
c211c576
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
33 deletions
+51
-33
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
+3
-0
TzsUserInfo.java
.../yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
+8
-0
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+20
-19
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+20
-14
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
View file @
4290fc3f
...
...
@@ -62,6 +62,9 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"单位编码"
)
private
String
unitCode
;
@ApiModelProperty
(
value
=
"平台账号id"
)
private
String
amosUserId
;
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
View file @
4290fc3f
...
...
@@ -105,6 +105,14 @@ public class TzsUserInfo extends BaseEntity {
*/
@TableField
(
"unit_name"
)
private
String
unitName
;
/**
* 企业编码
*/
@TableField
(
"unit_code"
)
private
String
unitCode
;
/**
* 头像
*/
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
4290fc3f
...
...
@@ -4,27 +4,28 @@
<select
id=
"selectPageMessage"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto"
>
SELECT
sequence_nbr
,
name,
certificate_type,
certificate_num,
post,
phone,
birthday,
unit_name,
speciality,
profile,
amos_user_name,
amos_user_id,
lock_status,
CASE
WHEN gender = 1 THEN
'男' ELSE '女'
END AS gender
sequence_nbr
,
name,
certificate_type,
certificate_num,
post,
phone,
birthday,
unit_name,
speciality,
profile,
amos_user_name,
amos_user_id,
lock_status,
CASE
WHEN gender = 1 THEN
'男' ELSE '女'
END AS gender
FROM
tzs_user_info
tzs_user_info
<where>
is_delete = false
is_delete = false
and unit_code = #{dto.unitCode}
<if
test=
"dto.name != '' and dto.name != null"
>
and name like concat('%',#{dto.name},'%')
</if>
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
4290fc3f
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserQualifications
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserInfoService
;
import
com.yeejoin.amos.boot.module.tcm.biz.service.impl.TzsUserInfoServiceImpl
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
...
...
@@ -18,8 +19,10 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -44,14 +47,12 @@ public class TzsUserInfoController extends BaseController {
public
ResponseModel
<
TzsUserInfoDto
>
save
(
@RequestBody
JSONObject
map
)
{
Map
<
String
,
Object
>
userInfo
=
(
Map
<
String
,
Object
>)
map
.
get
(
"userInfo"
);
TzsUserInfoDto
tzsUserInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
userInfo
),
TzsUserInfoDto
.
class
);
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
if
(!
ObjectUtils
.
isEmpty
(
me
)){
List
<
CompanyModel
>
companys
=
me
.
getCompanys
();
if
(!
ObjectUtils
.
isEmpty
(
companys
)){
tzsUserInfo
.
setUnitName
(
companys
.
get
(
0
).
getCompanyName
());
}
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
if
(
companyModels
.
isEmpty
()){
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
}
tzsUserInfo
.
setUnitName
(
companyModels
.
get
(
0
).
getCompanyName
());
tzsUserInfo
.
setUnitCode
(
companyModels
.
get
(
0
).
getCompanyCode
());
Map
<
String
,
Object
>
qualificationsInfo
=
(
Map
<
String
,
Object
>)
map
.
get
(
"qualificationsInfo"
);
Object
subForm
=
qualificationsInfo
.
get
(
"subForm"
);
List
<
TzsUserQualifications
>
list
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
subForm
),
TzsUserQualifications
.
class
);
...
...
@@ -70,13 +71,12 @@ public class TzsUserInfoController extends BaseController {
@RequestParam
Long
rowId
)
{
Map
<
String
,
Object
>
userInfo
=
(
Map
<
String
,
Object
>)
map
.
get
(
"userInfo"
);
TzsUserInfo
tzsUserInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
userInfo
),
TzsUserInfo
.
class
);
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
if
(!
ObjectUtils
.
isEmpty
(
me
)){
List
<
CompanyModel
>
companys
=
me
.
getCompanys
();
if
(!
ObjectUtils
.
isEmpty
(
companys
)){
tzsUserInfo
.
setUnitName
(
companys
.
get
(
0
).
getCompanyName
());
}
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
if
(
companyModels
.
isEmpty
()){
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
}
tzsUserInfo
.
setUnitName
(
companyModels
.
get
(
0
).
getCompanyName
());
tzsUserInfo
.
setUnitCode
(
companyModels
.
get
(
0
).
getCompanyCode
());
Map
<
String
,
Object
>
qualificationsInfo
=
(
Map
<
String
,
Object
>)
map
.
get
(
"qualificationsInfo"
);
Object
subForm
=
qualificationsInfo
.
get
(
"subForm"
);
List
<
TzsUserQualifications
>
list
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
subForm
),
TzsUserQualifications
.
class
);
...
...
@@ -113,10 +113,16 @@ public class TzsUserInfoController extends BaseController {
public
ResponseModel
<
IPage
<
TzsUserInfoDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
String
current
,
@RequestParam
(
value
=
"size"
)
String
size
,
TzsUserInfoDto
dto
)
{
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
if
(
companyModels
.
isEmpty
()){
throw
new
BadRequest
(
"未指定人员归属单位信息"
);
}
dto
.
setUnitCode
(
companyModels
.
get
(
0
).
getCompanyCode
());
Page
<
TzsUserInfoDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
Long
.
parseLong
(
current
));
page
.
setSize
(
Long
.
parseLong
(
size
));
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
page
(
dto
,
page
));
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
page
(
dto
,
page
));
}
...
...
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