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
3c35a0e9
Commit
3c35a0e9
authored
May 09, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求:3309
parent
43fa47c1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
122 additions
and
21 deletions
+122
-21
UserPermissionDto.java
...in/amos/boot/module/common/api/dto/UserPermissionDto.java
+10
-0
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
+15
-3
TzsUserInfo.java
.../yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
+24
-0
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+6
-1
TzsUserInfoVo.java
...om/yeejoin/amos/boot/module/tcm/api/vo/TzsUserInfoVo.java
+6
-0
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+18
-8
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+43
-9
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+0
-0
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/UserPermissionDto.java
View file @
3c35a0e9
...
...
@@ -112,4 +112,14 @@ public class UserPermissionDto {
* 人员类型code
*/
private
String
postCode
;
/**
* 人员子类型code
*/
private
String
subPostCode
;
/**
* 人员子类型名称
*/
private
String
subPostName
;
}
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 @
3c35a0e9
...
...
@@ -8,7 +8,6 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
/**
* 用户信息
...
...
@@ -115,10 +114,23 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"菜单类型,具体见TzsUserInfoServiceImpl中的menuMap"
)
private
String
menuType
;
@ApiModelProperty
(
value
=
"菜单类型下的所有人员类型"
)
private
List
<
String
>
menuTypeUnderPost
;
// 需求调整 一个菜单整合所有人员
// @ApiModelProperty(value = "菜单类型下的所有人员类型")
// private List<String> menuTypeUnderPost;
@ApiModelProperty
(
"二维码状态0异常1正常"
)
private
String
qrCodeState
;
@ApiModelProperty
(
"岗位子类型(多个逗号分割)"
)
private
String
subPost
;
@ApiModelProperty
(
"岗位子类型名称(多个逗号分割)"
)
private
String
subPostName
;
@ApiModelProperty
(
value
=
"人员转出标识(1:已转出,0:未转出,空值默认为未转出0)"
)
protected
String
transferOut
;
@ApiModelProperty
(
value
=
"人员转出时间"
)
protected
Date
transferOutTime
;
}
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 @
3c35a0e9
...
...
@@ -200,4 +200,28 @@ public class TzsUserInfo extends BaseEntity {
*/
@TableField
(
"qr_code_state"
)
private
String
qrCodeState
;
/**
* 岗位子类型(多个逗号分割)
*/
@TableField
(
"sub_post"
)
private
String
subPost
;
/**
* 岗位子类型名称(多个逗号分割)
*/
@TableField
(
"sub_post_name"
)
private
String
subPostName
;
/**
* 人员转出标识(1:已转出,0:未转出,空值默认为未转出0)
*/
@TableField
(
value
=
"transfer_out"
)
protected
String
transferOut
;
/**
* 人员转出时间
*/
@TableField
(
value
=
"transfer_out_time"
)
protected
Date
transferOutTime
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzsUserInfoService.java
View file @
3c35a0e9
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tcm.api.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.GroupAndPersonInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzIndividualityDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
...
...
@@ -33,7 +34,11 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
List
<
Map
<
String
,
Object
>>
getEquipmentType
(
String
creditCode
);
List
<
Map
<
String
,
Object
>>
getUserType
(
String
unitType
,
String
formType
);
List
<
Map
<
String
,
Object
>>
getUserAllPostType
();
List
<
DataDictionary
>
getSubPostByParentsIds
(
String
postIds
);
Boolean
personnelTransferOut
(
String
userSeqNbrs
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/vo/TzsUserInfoVo.java
View file @
3c35a0e9
...
...
@@ -161,4 +161,10 @@ public class TzsUserInfoVo {
@ApiModelProperty
(
value
=
"人员类型名称"
)
private
String
postName
;
@ApiModelProperty
(
"岗位子类型(多个逗号分割)"
)
private
JSONArray
subPost
;
@ApiModelProperty
(
"岗位子类型名称(多个逗号分割)"
)
private
String
subPostName
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
3c35a0e9
...
...
@@ -23,7 +23,8 @@
'男' ELSE '女'
END AS gender,
unit_code,
case when (SELECT count(1) from tzs_user_equip WHERE user_seq = sequence_nbr )>0 then '是' else '否' END as state
case when (SELECT count(1) from tzs_user_equip WHERE user_seq = sequence_nbr )>0 then '是' else '否' END as state,
IFNULL(sub_post_name, '—') as sub_post_name
FROM
tzs_user_info
</sql>
...
...
@@ -50,13 +51,16 @@
<if
test=
"dto.amosUserName != '' and dto.amosUserName != null"
>
and amos_user_name like concat('%',#{dto.amosUserName},'%')
</if>
<if
test=
"dto.menuTypeUnderPost != null and dto.menuTypeUnderPost.size() > 0"
>
AND (
<foreach
collection=
"dto.menuTypeUnderPost"
separator=
"or"
item=
"postType"
>
new_post like concat('%',#{postType},'%')
</foreach>
)
<if
test=
"dto.subPost != '' and dto.subPost != null"
>
and sub_post like concat('%',#{dto.subPost},'%')
</if>
<!-- <if test="dto.menuTypeUnderPost != null and dto.menuTypeUnderPost.size() > 0">-->
<!-- AND (-->
<!-- <foreach collection="dto.menuTypeUnderPost" separator="or" item="postType">-->
<!-- new_post like concat('%',#{postType},'%')-->
<!-- </foreach>-->
<!-- )-->
<!-- </if>-->
<if
test=
"dto.postName != '' and dto.postName != null"
>
and post like concat('%',#{dto.postName},'%')
</if>
...
...
@@ -242,6 +246,7 @@
"cb_data_dictionary"
WHERE
is_delete = false
and (parent is null or parent = '')
and type in
<foreach
collection=
"typeList"
separator=
","
item=
"type"
open=
"("
close=
")"
>
#{type}
...
...
@@ -300,6 +305,7 @@
u.certificate_num,
u.identification as identificationStr,
e.use_unit,
u.sub_post_name,
u.new_post as post,
u.sequence_nbr as uid,
u.sequence_nbr as "rowId",
...
...
@@ -325,6 +331,9 @@
<if
test=
"filter.postCode != null and filter.postCode != ''"
>
and u.new_post like concat('%',#{filter.postCode}, '%')
</if>
<if
test=
"filter.subPostCode != null and filter.subPostCode != ''"
>
and u.sub_post like concat('%',#{filter.subPostCode}, '%')
</if>
<if
test=
"filter.superviseOrgCode != null and filter.superviseOrgCode != ''"
>
and e.supervise_org_code like concat('%',#{filter.superviseOrgCode}, '%')
</if>
...
...
@@ -343,6 +352,6 @@
and (a.fullAddress like concat('%',#{filter.fullAddress},'%'))
</if>
</where>
order by a.
rec_date
order by a.
uid desc
</select>
</mapper>
\ No newline at end of file
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 @
3c35a0e9
...
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.tcm.biz.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
...
...
@@ -37,9 +39,9 @@ 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
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@Api
(
tags
=
"用户信息Api"
)
...
...
@@ -193,10 +195,16 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据单位类型获取人员类型"
,
notes
=
"根据单位类型获取人员类型"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUserType
(
@RequestParam
(
value
=
"unitType"
)
String
unitType
,
@RequestParam
(
value
=
"formType"
,
defaultValue
=
"add"
)
String
formType
)
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getUserType
(
unitType
,
formType
));
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取所有人员类型"
,
notes
=
"获取所有人员类型"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUserAllPostType
()
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getUserAllPostType
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getSubPostByParentsIds"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据岗位父类型ids获取对应岗位子类型"
,
notes
=
"根据岗位父类型ids获取对应岗位子类型"
)
public
ResponseModel
<
List
<
DataDictionary
>>
getSubPostByParentsIds
(
@RequestParam
(
value
=
"postIds"
)
String
postIds
)
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getSubPostByParentsIds
(
postIds
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
@@ -326,10 +334,10 @@ public class TzsUserInfoController extends BaseController {
}
@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
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员管理-人员类型-查询
所有人员类型"
,
notes
=
"人员管理-人员类型-查询所有
人员类型"
)
@GetMapping
(
value
=
"/
getAllUserType
"
)
public
ResponseModel
<
List
<
DataDictionary
>>
getAllUserType
(
)
{
List
<
DataDictionary
>
dataDictionaries
=
tzsUserInfoServiceImpl
.
getAllUserType
(
);
return
ResponseHelper
.
buildResponse
(
dataDictionaries
);
}
...
...
@@ -360,4 +368,30 @@ public class TzsUserInfoController extends BaseController {
public
ResponseModel
<?>
importUser
(
@RequestBody
MultipartFile
file
)
{
return
tzsUserInfoService
.
importUserBatch
(
file
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/personnelTransferOut"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员转出:逻辑删除人员并删除关联的系统账号"
,
notes
=
"人员转出:逻辑删除人员并删除关联的系统账号"
)
public
ResponseModel
<
Boolean
>
personnelTransferOut
(
@RequestParam
(
value
=
"userSeqNbrs"
)
String
userSeqNbrs
)
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
personnelTransferOut
(
userSeqNbrs
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/historicalOperatorHandling"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"需求3309 人员管理调整后:历史的维保人员(作业人员含电梯维修资质的刷入子类型:持证人员)"
,
notes
=
"需求3309 人员管理调整后:历史的维保人员(作业人员含电梯维修资质的刷入子类型:持证人员)"
)
public
ResponseModel
<
Object
>
historicalOperatorHandling
()
{
// userinfo表中旧的post字段保存了旧字典值6618(维保人员)
List
<
Long
>
sesqNbrs
=
tzsUserInfoService
.
getBaseMapper
()
.
selectList
(
new
LambdaQueryWrapper
<
TzsUserInfo
>()
.
like
(
TzsUserInfo:
:
getPost
,
"6618"
)
.
select
(
TzsUserInfo:
:
getSequenceNbr
))
.
stream
()
.
map
(
TzsUserInfo:
:
getSequenceNbr
)
.
collect
(
Collectors
.
toList
());
tzsUserInfoService
.
getBaseMapper
().
update
(
null
,
new
LambdaUpdateWrapper
<
TzsUserInfo
>()
.
set
(
TzsUserInfo:
:
getSubPost
,
"[\"6713\"]"
)
.
set
(
TzsUserInfo:
:
getSubPostName
,
"持证人员"
)
.
in
(
TzsUserInfo:
:
getSequenceNbr
,
sesqNbrs
));
return
ResponseHelper
.
buildResponse
(
"更新数据:"
+
sesqNbrs
.
size
()
+
"条"
);
}
}
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 @
3c35a0e9
This diff is collapsed.
Click to expand it.
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