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
78191eea
Commit
78191eea
authored
Jul 26, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏使用者为监管单位,监管单位的公司code在创建公司时用的行政区划编码,直接返回公司编码即可
parent
497f7aff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
22 deletions
+8
-22
StCommonController.java
...t/module/statistcs/biz/controller/StCommonController.java
+4
-3
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+4
-19
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/StCommonController.java
View file @
78191eea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -16,7 +17,7 @@ import java.util.List;
@RestController
@Api
(
tags
=
"统计公共API"
)
@RequestMapping
(
value
=
"/st-common"
)
public
class
StCommonController
{
public
class
StCommonController
extends
BaseController
{
private
StCommonServiceImpl
commonService
;
...
...
@@ -30,8 +31,8 @@ public class StCommonController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserRegincode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户regionCode"
,
notes
=
"获取用户regionCode"
)
public
ResponseModel
<
List
<
String
>>
getUserRegin
c
ode
()
{
List
<
String
>
regionList
=
commonService
.
getUserRegionCode
();
public
ResponseModel
<
List
<
String
>>
getUserRegin
C
ode
()
{
List
<
String
>
regionList
=
commonService
.
getUserRegionCode
(
getSelectedOrgInfo
()
);
return
ResponseHelper
.
buildResponse
(
regionList
);
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/StCommonServiceImpl.java
View file @
78191eea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
org.springframework.stereotype.Service
;
import
java.util.
ArrayList
;
import
java.util.
Collections
;
import
java.util.List
;
/**
...
...
@@ -16,18 +12,7 @@ import java.util.List;
@Service
public
class
StCommonServiceImpl
{
public
List
<
String
>
getUserRegionCode
()
{
List
<
String
>
regionList
=
new
ArrayList
<>();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
CompanyModel
userCompany
=
me
.
getCompanys
().
get
(
0
);
String
regions
=
userCompany
.
getRegionSeq
();
if
(
regions
!=
null
)
{
String
[]
regionsId
=
regions
.
split
(
","
);
for
(
String
regionId:
regionsId
)
{
RegionModel
region
=
Systemctl
.
regionClient
.
getRegion
(
Long
.
valueOf
(
regionId
)).
getResult
();
regionList
.
add
(
region
.
getRegionCode
()
+
""
);
}
}
return
regionList
;
public
List
<
String
>
getUserRegionCode
(
ReginParams
selectedOrgInfo
)
{
return
Collections
.
singletonList
(
selectedOrgInfo
.
getCompany
().
getCompanyCode
());
}
}
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