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
a1a828dd
Commit
a1a828dd
authored
Apr 07, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中心级优化项
parent
38ea4de3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
41 deletions
+45
-41
DataDictionaryMapper.java
...amos/boot/biz/common/dao/mapper/DataDictionaryMapper.java
+2
-0
DataDictionaryMapper.xml
...common/src/main/resources/mapper/DataDictionaryMapper.xml
+9
-2
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+34
-39
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dao/mapper/DataDictionaryMapper.java
View file @
a1a828dd
...
@@ -29,6 +29,8 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
...
@@ -29,6 +29,8 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
* @return
* @return
*/
*/
public
DataDictionary
getByCode
(
String
code
,
String
type
);
public
DataDictionary
getByCode
(
String
code
,
String
type
);
public
DataDictionary
getByType
(
@Param
(
"type"
)
String
type
);
public
List
<
DataDictionary
>
getFireTeamTypeTree
(
String
bizOrgCode
);
public
List
<
DataDictionary
>
getFireTeamTypeTree
(
String
bizOrgCode
);
...
...
amos-boot-biz-common/src/main/resources/mapper/DataDictionaryMapper.xml
View file @
a1a828dd
...
@@ -116,6 +116,13 @@ WHERE
...
@@ -116,6 +116,13 @@ WHERE
cdd.type = 'XFSYLX'
cdd.type = 'XFSYLX'
</select>
</select>
<select
id=
"getByType"
resultType=
"com.yeejoin.amos.boot.biz.common.entity.DataDictionary"
>
SELECT
*
FROM
cb_data_dictionary cbb
WHERE
cbb.is_delete = 0 and cbb.type = #{type}
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
a1a828dd
...
@@ -625,33 +625,31 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -625,33 +625,31 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 2021-09-16
// 2021-09-16
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
amosIds
.
add
(
t
.
get
(
"amosOrgId"
).
toString
());
amosIds
.
add
(
t
.
get
(
"amosOrgId"
).
toString
());
String
chargePersonId
=
iOrgUsrService
.
getIdNumberByAmosId
(
t
.
get
(
"amosOrgId"
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
t
.
get
(
"certificateTypeValue"
))
&&
"120"
.
equals
(
t
.
get
(
"certificateTypeValue"
).
toString
()))
{
t
.
put
(
"chargePersonId"
,
chargePersonId
);
t
.
put
(
"chargePersonId"
,
t
.
get
(
"certificatesNumber"
));
}
}
else
{
}
else
{
t
.
put
(
"chargePersonId"
,
null
);
t
.
put
(
"chargePersonId"
,
null
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
t
.
get
(
"state"
)))
{
DataDictionary
gwmc
=
dataDictionaryService
.
getByCode
(
t
.
get
(
"state"
).
toString
(),
"RYZT"
);
if
(!
ObjectUtils
.
isEmpty
(
gwmc
))
{
t
.
put
(
"stateName"
,
gwmc
.
getName
());
}
else
{
t
.
put
(
"stateName"
,
t
.
get
(
"state"
));
}
}
});
});
List
<
DataDictionary
>
dictList
=
dataDictionaryService
.
getByType
(
"RYZT"
);
Map
<
String
,
String
>
dictMap
=
dictList
.
stream
().
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
));
Map
<
String
,
AgencyUserModel
>
collect
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
amosIds
))
{
if
(
CollectionUtils
.
isNotEmpty
(
amosIds
))
{
String
join
=
String
.
join
(
","
,
amosIds
);
String
join
=
String
.
join
(
","
,
amosIds
);
List
<
AgencyUserModel
>
amosUser
=
Privilege
.
agencyUserClient
.
queryByIds
(
join
,
false
).
getResult
();
List
<
AgencyUserModel
>
amosUser
=
Privilege
.
agencyUserClient
.
queryByIds
(
join
,
false
).
getResult
();
Map
<
String
,
AgencyUserModel
>
collect
=
amosUser
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
t
->
t
));
collect
=
amosUser
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
t
->
t
));
list
.
stream
().
forEach
(
t
->
{
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
())
&&
collect
.
containsKey
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
t
.
put
(
"amosOrgCode"
,
collect
.
get
(
t
.
get
(
"amosOrgId"
).
toString
()).
getRealName
());
}
});
}
}
Map
<
String
,
AgencyUserModel
>
finalCollect
=
collect
;
list
.
forEach
(
t
->
{
if
(!
ObjectUtils
.
isEmpty
(
finalCollect
)
&&
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
())
&&
finalCollect
.
containsKey
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
t
.
put
(
"amosOrgCode"
,
finalCollect
.
get
(
t
.
get
(
"amosOrgId"
).
toString
()).
getRealName
());
}
if
(!
ObjectUtils
.
isEmpty
(
t
.
get
(
"state"
)))
{
t
.
put
(
"stateName"
,
dictMap
.
getOrDefault
(
t
.
get
(
"state"
).
toString
(),
t
.
get
(
"state"
).
toString
()));
}
});
if
(!
positionType
.
equals
(
""
))
{
if
(!
positionType
.
equals
(
""
))
{
String
positionTypeFine
=
positionType
;
String
positionTypeFine
=
positionType
;
list
=
list
.
stream
().
filter
(
e
->
!
ObjectUtils
.
isEmpty
(
e
.
get
(
"positionType"
))
&&
String
.
valueOf
(
e
.
get
(
"positionType"
)).
contains
(
positionTypeFine
)).
collect
(
Collectors
.
toList
());
list
=
list
.
stream
().
filter
(
e
->
!
ObjectUtils
.
isEmpty
(
e
.
get
(
"positionType"
))
&&
String
.
valueOf
(
e
.
get
(
"positionType"
)).
contains
(
positionTypeFine
)).
collect
(
Collectors
.
toList
());
...
@@ -721,41 +719,38 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -721,41 +719,38 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
List
<
Map
<
String
,
Object
>>
list
=
this
.
baseMapper
.
selectPersonList
(
map
);
List
<
Map
<
String
,
Object
>>
list
=
this
.
baseMapper
.
selectPersonList
(
map
);
//处理循环中的远程调用(原有逻辑不变)
//处理循环中的远程调用(原有逻辑不变)
List
<
String
>
amosIds
=
new
ArrayList
<>();
List
<
String
>
amosIds
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
t
->
{
list
.
forEach
(
t
->
{
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm
// 2021-09-16
// 2021-09-16
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
amosIds
.
add
(
t
.
get
(
"amosOrgId"
).
toString
());
amosIds
.
add
(
t
.
get
(
"amosOrgId"
).
toString
());
if
(!
ObjectUtils
.
isEmpty
(
t
.
get
(
"certificateTypeValue"
))
&&
"120"
.
equals
(
t
.
get
(
"certificateTypeValue"
).
toString
()))
{
String
chargePersonId
=
iOrgUsrService
.
getIdNumberByAmosId
(
t
.
get
(
"amosOrgId"
).
toString
(
));
t
.
put
(
"chargePersonId"
,
t
.
get
(
"certificatesNumber"
));
t
.
put
(
"chargePersonId"
,
chargePersonId
);
}
}
else
{
}
else
{
t
.
put
(
"chargePersonId"
,
null
);
t
.
put
(
"chargePersonId"
,
null
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
t
.
get
(
"state"
)))
{
DataDictionary
gwmc
=
dataDictionaryService
.
getByCode
(
t
.
get
(
"state"
).
toString
(),
"RYZT"
);
if
(!
ObjectUtils
.
isEmpty
(
gwmc
))
{
t
.
put
(
"stateName"
,
gwmc
.
getName
());
}
else
{
t
.
put
(
"stateName"
,
t
.
get
(
"state"
));
}
}
});
});
List
<
DataDictionary
>
dictList
=
dataDictionaryService
.
getByType
(
"RYZT"
);
Map
<
String
,
String
>
dictMap
=
dictList
.
stream
().
collect
(
Collectors
.
toMap
(
DataDictionary:
:
getCode
,
DataDictionary:
:
getName
));
Map
<
String
,
AgencyUserModel
>
collect
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
amosIds
))
{
if
(
CollectionUtils
.
isNotEmpty
(
amosIds
))
{
String
join
=
String
.
join
(
","
,
amosIds
);
String
join
=
String
.
join
(
","
,
amosIds
);
List
<
AgencyUserModel
>
amosUser
=
Privilege
.
agencyUserClient
.
queryByIds
(
join
,
false
).
getResult
();
List
<
AgencyUserModel
>
amosUser
=
Privilege
.
agencyUserClient
.
queryByIds
(
join
,
false
).
getResult
();
Map
<
String
,
AgencyUserModel
>
collect
=
amosUser
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
t
->
t
));
collect
=
amosUser
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
t
->
t
));
list
.
stream
().
forEach
(
t
->
{
}
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
())
&&
collect
.
containsKey
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
Map
<
String
,
AgencyUserModel
>
finalCollect
=
collect
;
t
.
put
(
"amosOrgCode"
,
collect
.
get
(
t
.
get
(
"amosOrgId"
).
toString
()).
getRealName
());
list
.
forEach
(
t
->
{
if
(!
ObjectUtils
.
isEmpty
(
finalCollect
)
&&
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
())
&&
finalCollect
.
containsKey
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
t
.
put
(
"amosOrgCode"
,
finalCollect
.
get
(
t
.
get
(
"amosOrgId"
).
toString
()).
getRealName
());
}
if
(!
ObjectUtils
.
isEmpty
(
t
.
get
(
"state"
)))
{
t
.
put
(
"stateName"
,
dictMap
.
getOrDefault
(
t
.
get
(
"state"
).
toString
(),
t
.
get
(
"state"
).
toString
()));
}
}
});
});
}
/* Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束 */
/* Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束 */
pageBean
.
setRecords
(
list
);
pageBean
.
setRecords
(
list
);
return
pageBean
;
return
pageBean
;
}
}
...
...
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