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
59914395
Commit
59914395
authored
Sep 05, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(tcm):1,新增接口,从redis获取当前登录用户单位类型获取,避免多角色的单位获取到多个单位类型
parent
c1e2758f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+3
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+8
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+44
-0
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/service/ITzsUserInfoService.java
View file @
59914395
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.api.service;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tcm.api.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.GroupAndPersonInfoDto
;
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.TzIndividualityDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
...
@@ -35,6 +36,8 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
...
@@ -35,6 +36,8 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
Map
<
String
,
Object
>
getCompanyType
();
Map
<
String
,
Object
>
getCompanyType
();
Map
<
String
,
Object
>
getCompanyTypeForRedis
(
ReginParams
selectedOrgInfo
);
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
);
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
);
Boolean
equipBind
(
String
type
,
String
userSeq
,
String
creditCode
,
Map
<
String
,
Object
>
map
);
Boolean
equipBind
(
String
type
,
String
userSeq
,
String
creditCode
,
Map
<
String
,
Object
>
map
);
...
...
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 @
59914395
...
@@ -181,6 +181,14 @@ public class TzsUserInfoController extends BaseController {
...
@@ -181,6 +181,14 @@ public class TzsUserInfoController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyTypeForRedis"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"从redis获取当前登录用户单位类型获取,避免多角色的单位获取到多个单位类型"
,
notes
=
"从redis获取当前登录用户单位类型获取,避免多角色的单位获取到多个单位类型"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getCompanyTypeForRedis
()
{
ReginParams
selectedOrgInfo
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getCompanyTypeForRedis
(
selectedOrgInfo
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserType"
)
@GetMapping
(
value
=
"/getUserType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据单位类型获取人员类型"
,
notes
=
"根据单位类型获取人员类型"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据单位类型获取人员类型"
,
notes
=
"根据单位类型获取人员类型"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUserType
(
@RequestParam
(
value
=
"unitType"
)
String
unitType
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUserType
(
@RequestParam
(
value
=
"unitType"
)
String
unitType
)
{
...
...
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 @
59914395
...
@@ -477,6 +477,50 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -477,6 +477,50 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
@Override
@Override
public
Map
<
String
,
Object
>
getCompanyTypeForRedis
(
ReginParams
selectedOrgInfo
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"companyType"
,
null
);
CompanyBo
company
=
selectedOrgInfo
.
getCompany
();
if
(
ObjectUtils
.
isEmpty
(
company
))
{
return
result
;
}
result
.
put
(
"creditCode"
,
company
.
getCompanyCode
());
boolean
productCompany
=
false
;
boolean
useCompany
=
false
;
boolean
installCompany
=
false
;
boolean
inspectionCompany
=
false
;
String
companyType
=
company
.
getCompanyType
();
if
(
companyType
.
contains
(
"使用单位"
)
||
companyType
.
contains
(
"个人主体"
))
{
useCompany
=
true
;
}
if
(
companyType
.
contains
(
"充装单位"
)
||
companyType
.
contains
(
"安装改造维修单位"
)
||
companyType
.
contains
(
"制造单位"
)
||
companyType
.
contains
(
"设计单位"
))
{
productCompany
=
true
;
}
if
(
companyType
.
contains
(
"安装改造维修单位"
))
{
installCompany
=
true
;
}
if
(
companyType
.
contains
(
"检验检测机构"
))
{
inspectionCompany
=
true
;
}
StringBuilder
companyTypeStr
=
new
StringBuilder
();
if
(
useCompany
)
{
companyTypeStr
.
append
(
"use-"
);
}
if
(
productCompany
)
{
companyTypeStr
.
append
(
"pro-"
);
}
if
(
installCompany
)
{
companyTypeStr
.
append
(
"install-"
);
}
if
(
inspectionCompany
)
{
companyTypeStr
.
append
(
"inspection"
);
}
result
.
put
(
"companyType"
,
companyTypeStr
);
return
result
;
}
@Override
public
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
)
{
public
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
)
{
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
if
(
companyModels
.
isEmpty
())
{
if
(
companyModels
.
isEmpty
())
{
...
...
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