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
f602cc19
Commit
f602cc19
authored
Nov 16, 2023
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register
parents
5d7903be
176817df
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
34 deletions
+22
-34
TzsUserInfoMapper.java
...in/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
+1
-1
PrivilegeFeginService.java
.../boot/module/tcm/flc/api/feign/PrivilegeFeginService.java
+6
-0
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+12
-13
EquipmentCategoryServiceImpl.java
...le/tcm/biz/service/impl/EquipmentCategoryServiceImpl.java
+2
-1
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+1
-19
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/mapper/TzsUserInfoMapper.java
View file @
f602cc19
...
...
@@ -29,5 +29,5 @@ public interface TzsUserInfoMapper extends BaseMapper<TzsUserInfo> {
List
<
String
>
selectUserIds
();
List
<
GroupAndPersonInfoDto
>
getUnitInfoByUserId
s
(
@Param
(
"userIds"
)
List
<
String
>
userIds
);
List
<
GroupAndPersonInfoDto
>
getUnitInfoByUserId
(
Long
groupId
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/api/feign/PrivilegeFeginService.java
View file @
f602cc19
...
...
@@ -8,12 +8,15 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.VerifyCodeAuthModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Collection
;
@FeignClient
(
value
=
"AMOS-API-PRIVILEGE"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
PrivilegeFeginService
{
...
...
@@ -24,6 +27,9 @@ public interface PrivilegeFeginService {
@RequestMapping
(
value
=
"/privilege/v1/company/tree"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
tree
(
@RequestHeader
(
"token"
)
String
token
,
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
);
@RequestMapping
(
value
=
{
"/privilege/v1/company/tree/cache"
},
method
=
{
RequestMethod
.
GET
})
FeignClientResult
queryAgencyTreeForCache
(
@RequestHeader
(
"token"
)
String
token
,
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
)
throws
InnerInvokException
;
//获取省级行政区划
@RequestMapping
(
value
=
"systemctl/v1/region/level"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
getProvince
(
@RequestParam
String
level
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
f602cc19
...
...
@@ -180,26 +180,24 @@
GROUP BY tui.amos_user_id
</select>
<select
id=
"getUnitInfoByUserId
s
"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.GroupAndPersonInfoDto"
>
<select
id=
"getUnitInfoByUserId"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.GroupAndPersonInfoDto"
>
SELECT
${groupId} groupId,
tui.amos_user_id userId,
tui.amos_user_name userName,
tui.unit_name,
tui.unit_code,
replace(tzei.unit_type,'#', ',') unitType,
tzei.equip_category
REPLACE ( tzei.unit_type, '#', ',' ) unitType,
tzei.equip_category,
pc.org_code
FROM
tzs_user_info tui
LEFT JOIN tz_base_enterprise_info tzei ON tui.unit_code = tzei.use_code
<where>
tzei.equip_category is not null
and tzei.is_delete = '0'
<if
test=
"userIds != null and userIds.size() > 0"
>
and amos_user_id in
<foreach
item=
"item"
collection=
"userIds"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</if>
</where>
LEFT JOIN privilege_company pc ON tui.unit_code = pc.company_code
WHERE
tzei.equip_category IS NOT NULL
AND tzei.is_delete = '0'
AND tzei.unit_type
<![CDATA[<>]]>
'检验检测机构'
AND tui.amos_user_id IN (SELECT USER_ID FROM privilege_group_user WHERE GROUP_SEQ = #{groupId})
</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/service/impl/EquipmentCategoryServiceImpl.java
View file @
f602cc19
...
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.module.tcm.biz.utils.JsonUtils;
import
com.yeejoin.amos.boot.module.tcm.flc.api.feign.IdxFeignService
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.feign.PrivilegeFeginService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
lombok.extern.slf4j.Slf4j
;
import
org.elasticsearch.action.search.SearchRequest
;
...
...
@@ -290,7 +291,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override
public
List
<
LinkedHashMap
>
creatTree
()
{
FeignClientResult
tree
=
privilegeFeginService
.
tre
e
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
FeignClientResult
tree
=
privilegeFeginService
.
queryAgencyTreeForCach
e
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
treeData
=
deleteRegulatorTreeData
(
result
);
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
...
...
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 @
f602cc19
...
...
@@ -457,28 +457,12 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
public
List
<
GroupAndPersonInfoDto
>
getGroupAndPersonInfo
(
Long
groupId
)
{
RequestContext
.
setProduct
(
amosRequestContext
.
getProduct
());
RequestContext
.
setAppKey
(
amosRequestContext
.
getAppKey
());
RequestContext
.
setToken
(
amosRequestContext
.
getToken
());
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
());
}
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
List
<
String
>
UserIds
=
agencyUserModelList
.
stream
().
map
(
AgencyUserModel:
:
getUserId
).
collect
(
Collectors
.
toList
());
List
<
GroupAndPersonInfoDto
>
groupAndPersonInfoDtoList
=
tzsUserInfoMapper
.
getUnitInfoByUserIds
(
UserIds
);
List
<
GroupAndPersonInfoDto
>
groupAndPersonInfoDtoList
=
tzsUserInfoMapper
.
getUnitInfoByUserId
(
groupId
);
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getByExtend
(
groupId
.
toString
(),
QYRYGW
);
for
(
GroupAndPersonInfoDto
groupAndPersonInfoDto
:
groupAndPersonInfoDtoList
)
{
if
(!
ObjectUtils
.
isEmpty
(
groupAndPersonInfoDto
))
{
groupAndPersonInfoDto
.
setGroupId
(
groupId
);
groupAndPersonInfoDto
.
setGroupName
(
ObjectUtils
.
isEmpty
(
dataDictionary
)
?
null
:
dataDictionary
.
getName
());
String
unitOrgCode
=
String
.
valueOf
(
companyMap
.
get
(
groupAndPersonInfoDto
.
getUnitCode
()));
groupAndPersonInfoDto
.
setUnitOrgCode
(
"null"
.
equals
(
unitOrgCode
)?
null
:
unitOrgCode
);
String
[]
UnitType
=
groupAndPersonInfoDto
.
getUnitType
().
split
(
","
);
if
(
UnitType
.
length
>
0
)
{
StringBuilder
unitTypeCode
=
new
StringBuilder
();
...
...
@@ -516,8 +500,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
result
.
add
(
groupAndPersonInfoDto
);
}
}
stopWatch
.
stop
();
System
.
out
.
printf
(
"组装数据耗时%f秒/n"
,
stopWatch
.
getTotalTimeSeconds
());
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