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
1cfbe778
Commit
1cfbe778
authored
Oct 24, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、人员管理-bug修改
2、两个规定-通过组id查询组及组内人员信息接口优化
parent
be1f456e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
25 deletions
+45
-25
GroupAndPersonInfoDto.java
...n/amos/boot/module/tcm/api/dto/GroupAndPersonInfoDto.java
+3
-10
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+1
-1
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+1
-3
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+19
-1
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+20
-9
pom.xml
amos-boot-system-tzs/pom.xml
+1
-1
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/GroupAndPersonInfoDto.java
View file @
1cfbe778
...
...
@@ -47,17 +47,10 @@ public class GroupAndPersonInfoDto {
private
String
unitCode
;
/**
*
监管机构组织机构代码
*
所在单位unitOrgCode
*/
@ApiModelProperty
(
value
=
"监管机构组织机构代码"
)
private
String
superviseOrgCode
;
/**
* 监管机构名称
*/
@ApiModelProperty
(
value
=
"监管机构名称"
)
private
String
superviseOrgName
;
@ApiModelProperty
(
value
=
"所在单位unitOrgCode"
)
private
String
unitOrgCode
;
/**
* 企业类型
...
...
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 @
1cfbe778
...
...
@@ -21,7 +21,7 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
void
updateQualificationsMessage
(
String
userId
,
List
<
TzsUserQualifications
>
list
);
void
deleteBatch
(
List
<
Long
>
ids
);
void
deleteBatch
(
Object
[]
ids
);
Map
<
String
,
Object
>
getDetail
(
Long
id
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
1cfbe778
...
...
@@ -158,9 +158,7 @@
tui.unit_name,
tui.unit_code,
replace(tzei.unit_type,'#', ',') unitType,
tzei.equip_category,
tzei.supervise_org_code,
tzei.supervise_org_name
tzei.equip_category
FROM
tzs_user_info tui
LEFT JOIN tz_base_enterprise_info tzei ON tui.unit_code = tzei.use_code
...
...
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 @
1cfbe778
...
...
@@ -3,6 +3,7 @@ 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.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -108,6 +109,7 @@ public class TzsUserInfoController extends BaseController {
LambdaQueryWrapper
<
TzsUserInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TzsUserInfo:
:
getCertificateType
,
tzsUserInfo
.
getCertificateType
());
queryWrapper
.
eq
(
TzsUserInfo:
:
getCertificateNum
,
tzsUserInfo
.
getCertificateNum
());
queryWrapper
.
ne
(
TzsUserInfo:
:
getSequenceNbr
,
rowId
);
TzsUserInfo
certificateNum
=
tzsUserInfoMapper
.
selectOne
(
queryWrapper
);
if
(!
ObjectUtils
.
isEmpty
(
certificateNum
)){
throw
new
BadRequest
(
"证件号码重复,请核对!"
);
...
...
@@ -115,6 +117,7 @@ public class TzsUserInfoController extends BaseController {
LambdaQueryWrapper
<
TzsUserInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
TzsUserInfo:
:
getPhone
,
tzsUserInfo
.
getPhone
());
queryWrapper1
.
ne
(
TzsUserInfo:
:
getSequenceNbr
,
rowId
);
TzsUserInfo
phone
=
tzsUserInfoMapper
.
selectOne
(
queryWrapper1
);
if
(!
ObjectUtils
.
isEmpty
(
phone
)){
throw
new
BadRequest
(
"联系电话重复,请核对!"
);
...
...
@@ -149,7 +152,22 @@ public class TzsUserInfoController extends BaseController {
@PostMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Object
>
deleteBatch
(
@RequestBody
JSONObject
map
)
{
List
<
Long
>
ids
=
(
List
<
Long
>)
map
.
get
(
"ids"
);
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
}
TzsUserInfo
tzsUserInfo
=
tzsUserInfoMapper
.
selectOne
(
new
QueryWrapper
<
TzsUserInfo
>().
eq
(
"amos_user_id"
,
reginParams
.
getUserModel
().
getUserId
()));
Object
[]
ids
=
((
List
<
Long
>)
map
.
get
(
"ids"
)).
toArray
();
Boolean
flag
=
false
;
for
(
Object
id
:
ids
)
{
if
(
id
.
equals
(
tzsUserInfo
.
getSequenceNbr
().
toString
()))
{
flag
=
true
;
break
;
}
}
if
(
flag
)
{
throw
new
BadRequest
(
"不能删除当前登录人所对应的数据,请取消勾选后再做删除处理"
);
}
tzsUserInfoService
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
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 @
1cfbe778
...
...
@@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -152,17 +153,21 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
@Override
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteBatch
(
Object
[]
ids1
)
{
LambdaQueryWrapper
<
TzsUserInfo
>
lambda
=
new
QueryWrapper
<
TzsUserInfo
>().
lambda
();
lambda
.
in
(
TzsUserInfo:
:
getSequenceNbr
,
ids
);
lambda
.
in
(
TzsUserInfo:
:
getSequenceNbr
,
ids
1
);
TzsUserInfo
tzsUserInfo
=
new
TzsUserInfo
();
tzsUserInfo
.
setIsDelete
(
true
);
tzsUserInfoMapper
.
update
(
tzsUserInfo
,
lambda
);
LambdaQueryWrapper
<
TzsUserQualifications
>
qualificationsLambda
=
new
QueryWrapper
<
TzsUserQualifications
>().
lambda
();
qualificationsLambda
.
in
(
TzsUserQualifications:
:
getUserInfoId
,
ids
);
TzsUserQualifications
tzsUserQualifications
=
new
TzsUserQualifications
();
tzsUserQualifications
.
setIsDelete
(
true
);
tzsUserQualificationsService
.
update
(
tzsUserQualifications
,
qualificationsLambda
);
for
(
Object
id
:
ids1
)
{
tzsUserEquipMapper
.
delete
(
new
QueryWrapper
<
TzsUserEquip
>().
eq
(
"user_seq"
,
id
));
}
// LambdaQueryWrapper<TzsUserQualifications> qualificationsLambda = new QueryWrapper<TzsUserQualifications>().lambda();
// qualificationsLambda.in(TzsUserQualifications::getUserInfoId, ids);
// TzsUserQualifications tzsUserQualifications = new TzsUserQualifications();
// tzsUserQualifications.setIsDelete(true);
// tzsUserQualificationsService.update(tzsUserQualifications, qualificationsLambda);
}
@Override
...
...
@@ -434,14 +439,20 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
public
List
<
GroupAndPersonInfoDto
>
getGroupAndPersonInfo
(
Long
groupId
)
{
List
<
GroupAndPersonInfoDto
>
result
=
new
ArrayList
<>();
List
<
AgencyUserModel
>
agencyUserModelList
=
Privilege
.
groupUserClient
.
queryForList
(
groupId
).
getResult
();
List
<
CompanyModel
>
companyModelList
=
Privilege
.
companyClient
.
queryForCompanyList
(
null
,
"company"
).
getResult
();
HashMap
<
String
,
Object
>
companyMap
=
new
HashMap
<>();
for
(
CompanyModel
companyModel
:
companyModelList
)
{
companyMap
.
put
(
companyModel
.
getCompanyCode
(),
companyModel
.
getOrgCode
());
}
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getByExtend
(
groupId
.
toString
(),
QYRYGW
);
if
(!
ObjectUtils
.
isEmpty
(
agencyUserModelList
)
&&
agencyUserModelList
.
size
()
>
0
)
{
for
(
AgencyUserModel
agencyUserModel
:
agencyUserModelList
)
{
GroupAndPersonInfoDto
groupAndPersonInfoDto
=
tzsUserInfoMapper
.
getUnitInfoByUserId
(
agencyUserModel
.
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
groupAndPersonInfoDto
))
{
groupAndPersonInfoDto
.
setGroupId
(
groupId
);
String
groupName
=
ObjectUtils
.
isEmpty
(
dataDictionary
)
?
null
:
dataDictionary
.
getName
();
groupAndPersonInfoDto
.
setGroupName
(
groupName
);
groupAndPersonInfoDto
.
setGroupName
(
ObjectUtils
.
isEmpty
(
dataDictionary
)
?
null
:
dataDictionary
.
getName
());
String
unitOrgCode
=
String
.
valueOf
(
companyMap
.
get
(
groupAndPersonInfoDto
.
getUnitCode
()));
groupAndPersonInfoDto
.
setUnitOrgCode
(
"null"
.
equals
(
unitOrgCode
)?
null
:
unitOrgCode
);
groupAndPersonInfoDto
.
setUserId
(
agencyUserModel
.
getUserId
());
groupAndPersonInfoDto
.
setUserName
(
agencyUserModel
.
getRealName
());
String
[]
UnitType
=
groupAndPersonInfoDto
.
getUnitType
().
split
(
","
);
...
...
amos-boot-system-tzs/pom.xml
View file @
1cfbe778
...
...
@@ -43,7 +43,7 @@
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-privilege
</artifactId>
<version>
1.8.
5
</version>
<version>
1.8.
6
</version>
</dependency>
<dependency>
...
...
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