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
5e604e3e
Commit
5e604e3e
authored
Oct 11, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
当前登录用户单位类型获取(全局变量用于人员类型区分)
parent
cff1d672
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+2
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+8
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+37
-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 @
5e604e3e
...
@@ -27,4 +27,6 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
...
@@ -27,4 +27,6 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
List
<
Map
<
String
,
Object
>>
getEquipmentType
(
String
creditCode
);
List
<
Map
<
String
,
Object
>>
getEquipmentType
(
String
creditCode
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
Map
<
String
,
Object
>
getCompanyType
();
}
}
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 @
5e604e3e
...
@@ -181,4 +181,12 @@ public class TzsUserInfoController extends BaseController {
...
@@ -181,4 +181,12 @@ public class TzsUserInfoController extends BaseController {
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getArrangementStatistic
(
companyModels
.
get
(
0
).
getCompanyCode
()));
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getArrangementStatistic
(
companyModels
.
get
(
0
).
getCompanyCode
()));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"当前登录用户单位类型获取"
,
notes
=
"当前登录用户单位类型获取"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getCompanyType
()
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getCompanyType
());
}
}
}
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 @
5e604e3e
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
...
@@ -19,8 +20,10 @@ import com.yeejoin.amos.boot.module.tcm.api.vo.TzsUserInfoVo;
...
@@ -19,8 +20,10 @@ import com.yeejoin.amos.boot.module.tcm.api.vo.TzsUserInfoVo;
import
com.yeejoin.amos.boot.module.tcm.api.vo.TzsUserQualificationsVo
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.TzsUserQualificationsVo
;
import
com.yeejoin.amos.boot.module.tcm.flc.biz.service.impl.RegUnitInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.tcm.flc.biz.service.impl.RegUnitInfoServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -29,6 +32,7 @@ import org.springframework.stereotype.Service;
...
@@ -29,6 +32,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -299,4 +303,37 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
...
@@ -299,4 +303,37 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
public
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
)
{
public
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
)
{
return
tzsUserInfoMapper
.
getArrangementStatistic
(
companyCode
);
return
tzsUserInfoMapper
.
getArrangementStatistic
(
companyCode
);
}
}
@Override
public
Map
<
String
,
Object
>
getCompanyType
()
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"companyType"
,
null
);
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
if
(
companyModels
.
isEmpty
()){
return
result
;
}
boolean
productCompany
=
false
;
boolean
useCompany
=
false
;
for
(
CompanyModel
companyModel
:
companyModels
)
{
String
companyType
=
companyModel
.
getCompanyType
();
if
(
companyType
.
contains
(
"使用单位"
)
||
companyType
.
contains
(
"个人主体"
)){
useCompany
=
true
;
}
if
(
companyType
.
contains
(
"充装单位"
)
||
companyType
.
contains
(
"安装改造维修单位"
)||
companyType
.
contains
(
"制造单位"
)
||
companyType
.
contains
(
"设计单位"
)){
productCompany
=
true
;
}
}
String
companyType
=
null
;
if
(
useCompany
){
companyType
=
"use"
;
}
if
(
productCompany
){
companyType
=
"pro"
;
}
if
(
useCompany
&&
productCompany
){
companyType
=
"useAndPro"
;
}
result
.
put
(
"companyType"
,
companyType
);
return
result
;
}
}
}
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