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
98269fab
Commit
98269fab
authored
Aug 30, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(tcm):1,新增接口:人员菜单下人员类型查询;2,人员详情接口兼容工作人员有多个资质
parent
72ade460
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
7 deletions
+60
-7
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
+6
-0
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+3
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+9
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+37
-0
TzsUserPermissionServiceImpl.java
...le/tcm/biz/service/impl/TzsUserPermissionServiceImpl.java
+5
-7
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 @
98269fab
...
...
@@ -110,4 +110,10 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"职称"
)
private
String
jobTitle
;
@ApiModelProperty
(
value
=
"菜单类型,具体见TzsUserInfoServiceImpl中的menuMap"
)
private
String
menuType
;
@ApiModelProperty
(
value
=
"菜单类型下的所有人员类型"
)
private
String
menuTypeUnderPost
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
98269fab
...
...
@@ -47,6 +47,9 @@
<if
test=
"dto.amosUserName != '' and dto.amosUserName != null"
>
and amos_user_name like concat('%',#{dto.amosUserName},'%')
</if>
<if
test=
"dto.menuTypeUnderPost != '' and dto.menuTypeUnderPost != null"
>
and post::jsonb
<![CDATA[@>]]>
#{dto.menuTypeUnderPost}::jsonb
</if>
<if
test=
"dto.postName != '' and dto.postName != null"
>
and post like concat('%',#{dto.postName},'%')
</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 @
98269fab
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.UserPermissionDto
;
...
...
@@ -311,4 +312,12 @@ public class TzsUserInfoController extends BaseController {
List
<
UserPermissionDto
>
userPermissionDtos
=
tzsUserInfoServiceImpl
.
getUserPermissionByCompanySeq
(
comSeq
);
return
ResponseHelper
.
buildResponse
(
userPermissionDtos
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员管理-人员类型-查询指定菜单下的人员类型"
,
notes
=
"人员管理-人员类型-查询指定菜单下的人员类型"
)
@GetMapping
(
value
=
"/userTypeUnderMenu"
)
public
ResponseModel
<
List
<
DataDictionary
>>
userTypeUnderMenu
(
@RequestParam
(
"menuType"
)
String
menuType
)
{
List
<
DataDictionary
>
dataDictionaries
=
tzsUserInfoServiceImpl
.
userTypeUnderMenu
(
menuType
);
return
ResponseHelper
.
buildResponse
(
dataDictionaries
);
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
98269fab
...
...
@@ -95,8 +95,36 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
statusColorMap
.
put
(
"正常"
,
"#18B100"
);
}
private
static
Map
<
String
,
List
<
String
>>
menuMap
=
new
HashMap
<>();
static
{
// 业务办理人员管理
menuMap
.
put
(
"ywblry"
,
Collections
.
singletonList
(
"6616"
));
// 主要负责人管理
menuMap
.
put
(
"zyfzr"
,
Collections
.
singletonList
(
"6548"
));
// 作业人员管理
menuMap
.
put
(
"zyry"
,
Collections
.
singletonList
(
"6552"
));
// 检测人员管理
menuMap
.
put
(
"jcry"
,
Collections
.
singletonList
(
"66152"
));
// 安全总监管理
menuMap
.
put
(
"aqzj"
,
Collections
.
singletonList
(
"6547"
));
// 质量保证体系人员管理
menuMap
.
put
(
"zlbztxry"
,
Arrays
.
asList
(
"6551"
,
"6550"
));
// 质量安全员管理
menuMap
.
put
(
"zlaqy"
,
Collections
.
singletonList
(
"6551"
));
// 质量安全总监管理
menuMap
.
put
(
"zlaqzj"
,
Collections
.
singletonList
(
"6550"
));
// 安全员管理
menuMap
.
put
(
"aqy"
,
Collections
.
singletonList
(
"6549"
));
// 检验人员管理
menuMap
.
put
(
"jyry"
,
Collections
.
singletonList
(
"66151"
));
// 其他人员管理
menuMap
.
put
(
"qtry"
,
Arrays
.
asList
(
"6546"
,
"6617"
,
"6553"
));
}
@Override
public
Page
<
TzsUserInfoDto
>
page
(
TzsUserInfoDto
dto
,
Page
<
TzsUserInfoDto
>
page
)
{
dto
.
setMenuTypeUnderPost
(
JSON
.
toJSONString
(
menuMap
.
get
(
dto
.
getMenuType
())));
Page
<
TzsUserInfoDto
>
tzsUserInfoDtoPage
=
tzsUserInfoMapper
.
selectPageMessage
(
page
,
dto
);
tzsUserInfoDtoPage
.
getRecords
().
forEach
(
item
->
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
getProfile
()))
{
...
...
@@ -844,4 +872,13 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
this
.
updateWithModel
(
tzsUserInfoDto
);
return
tzsUserInfoDto
;
}
public
List
<
DataDictionary
>
userTypeUnderMenu
(
String
menu
)
{
List
<
String
>
userTypeCode
=
menuMap
.
getOrDefault
(
menu
,
new
ArrayList
<>());
if
(
userTypeCode
.
isEmpty
())
{
return
Collections
.
emptyList
();
}
return
iDataDictionaryService
.
getBaseMapper
().
selectBatchIds
(
userTypeCode
);
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserPermissionServiceImpl.java
View file @
98269fab
...
...
@@ -24,7 +24,6 @@ import java.time.format.DateTimeFormatter;
import
java.time.format.DateTimeFormatterBuilder
;
import
java.time.temporal.ChronoField
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 用户资质信息表服务实现类
...
...
@@ -50,7 +49,7 @@ public class TzsUserPermissionServiceImpl extends BaseService<TzsUserPermissionD
/**
* 需要转换的附件字段 jsonString化字段
*/
private
final
String
[]
ATTACHMENTS
=
{
"certAttachment"
,
"
otherItem"
,
"itemCode"
,
"permissionItem"
};
private
final
String
[]
ATTACHMENTS
=
{
"certAttachment"
,
"
itemCode"
,
"permissionItem"
};
/**
* 分页查询
...
...
@@ -147,7 +146,7 @@ public class TzsUserPermissionServiceImpl extends BaseService<TzsUserPermissionD
permission
.
setCertAttachment
(
JSONArray
.
toJSONString
(
permissionData
.
get
(
"certAttachment"
)));
permission
.
setCertType
(
ZYRY_TYPE
.
equals
(
type
)
?
String
.
valueOf
(
permissionData
.
get
(
"certType"
))
:
null
);
permission
.
setJobItem
(
ZYRY_TYPE
.
equals
(
type
)
?
String
.
valueOf
(
permissionData
.
get
(
"jobItem"
))
:
null
);
permission
.
setOtherItem
(
ZYRY_TYPE
.
equals
(
type
)
?
JSONArray
.
toJSONString
(
permissionData
.
get
(
"otherItem"
)
)
:
null
);
permission
.
setOtherItem
(
ZYRY_TYPE
.
equals
(
type
)
?
(
String
)
permissionData
.
get
(
"otherItem"
)
:
null
);
permission
.
setItemCode
(
ZYRY_TYPE
.
equals
(
type
)
?
JSONArray
.
toJSONString
(
permissionData
.
get
(
"itemCode"
))
:
null
);
return
permission
;
}
...
...
@@ -204,10 +203,8 @@ public class TzsUserPermissionServiceImpl extends BaseService<TzsUserPermissionD
}
// 作业项目【jobItem】 字段特殊处理
JSONArray
jobItem
=
JSON
.
parseArray
(
String
.
valueOf
(
json
.
get
(
"jobItem"
)));
json
.
put
(
"jobItem"
,
jobItem
);
if
(!(
jobItem
==
null
||
jobItem
.
isEmpty
()))
{
json
.
put
(
"doNotDelJobItem"
,
jobItem
.
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
joining
(
","
)));
}
json
.
put
(
"jobItem"
,
jobItem
);
return
json
;
}
}
\ No newline at end of file
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