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
7e531288
Commit
7e531288
authored
May 31, 2023
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册监管区域树获取修改
parent
9116e6c3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
11 deletions
+84
-11
BizCommonConstant.java
...in/amos/boot/module/tzs/api/common/BizCommonConstant.java
+15
-0
CompanyLevelEnum.java
...join/amos/boot/module/tzs/api/enums/CompanyLevelEnum.java
+53
-0
EnterpriseStatisticController.java
...tzs/flc/biz/controller/EnterpriseStatisticController.java
+2
-2
RegUnitInfoServiceImpl.java
...dule/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+14
-9
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/common/BizCommonConstant.java
0 → 100644
View file @
7e531288
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
common
;
/**
* @Description: 通用常量类
* @Author: DELL
* @Date: 2021/5/26
*/
public
interface
BizCommonConstant
{
/**
* 所有平台企业数据redisKey
*/
public
final
static
String
COMPANY_TREE_REDIS_KEY
=
"companyTreeAll"
;;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/CompanyLevelEnum.java
0 → 100644
View file @
7e531288
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
*
* <pre>
* 平台单位等级枚举
* </pre>
*
* @author tb
* @date 2023-05-31
*/
@Getter
@AllArgsConstructor
public
enum
CompanyLevelEnum
{
HEADQUARTER
(
"headquarter"
,
"省级"
),
PREFECTURE_LEVEL
(
"prefecture-level"
,
"地市级"
),
COUNTY
(
"county"
,
"区县级"
),
ORGANIZATION
(
"organization"
,
"基层机构"
),;
private
String
code
;
private
String
name
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
static
CompanyLevelEnum
getEnum
(
String
code
)
{
for
(
CompanyLevelEnum
status
:
CompanyLevelEnum
.
values
())
{
if
(
status
.
getCode
().
equals
(
code
))
{
return
status
;
}
}
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/EnterpriseStatisticController.java
View file @
7e531288
...
@@ -39,9 +39,9 @@ public class EnterpriseStatisticController extends BaseController {
...
@@ -39,9 +39,9 @@ public class EnterpriseStatisticController extends BaseController {
@ApiOperation
(
value
=
"根据搜索信息获取表格数据"
)
@ApiOperation
(
value
=
"根据搜索信息获取表格数据"
)
@GetMapping
(
value
=
"/getTableInfoPage"
)
@GetMapping
(
value
=
"/getTableInfoPage"
)
public
ResponseModel
<
Page
<
CylinderTableDto
>>
cylinderTableInfoPage
(
String
pageNumber
,
String
pageSize
,
public
ResponseModel
<
Page
<
CylinderTableDto
>>
cylinderTableInfoPage
(
String
pageNumber
,
String
pageSize
,
@RequestParam
(
value
=
"
developerAgency"
,
required
=
false
)
String
developerAgency
,
@RequestParam
(
value
=
"
regionName"
,
required
=
false
)
String
regionName
,
@RequestParam
(
value
=
"unitName"
,
required
=
false
)
String
unitName
)
{
@RequestParam
(
value
=
"unitName"
,
required
=
false
)
String
unitName
)
{
Page
<
CylinderTableDto
>
cylinderTableDtoPage
=
cylinderDateInfoService
.
selectTodayDatePage
(
pageNumber
,
pageSize
,
developerAgency
,
unitName
);
Page
<
CylinderTableDto
>
cylinderTableDtoPage
=
cylinderDateInfoService
.
selectTodayDatePage
(
pageNumber
,
pageSize
,
regionName
,
unitName
);
return
ResponseHelper
.
buildResponse
(
cylinderTableDtoPage
);
return
ResponseHelper
.
buildResponse
(
cylinderTableDtoPage
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
7e531288
...
@@ -12,9 +12,11 @@ import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
...
@@ -12,9 +12,11 @@ import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.api.common.BizCommonConstant
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.BaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.BaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.BaseUnitLicence
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.BaseUnitLicence
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.CompanyLevelEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.BaseUnitLicenceServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.BaseUnitLicenceServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.StartPlatformTokenService
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.StartPlatformTokenService
;
...
@@ -61,6 +63,7 @@ import java.util.*;
...
@@ -61,6 +63,7 @@ import java.util.*;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.FutureTask
;
import
java.util.concurrent.FutureTask
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
/**
* 单位注册信息表服务实现类
* 单位注册信息表服务实现类
...
@@ -415,13 +418,16 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -415,13 +418,16 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
// 组织架构中单位级别为:省级、地市级、区县级的单位
// 组织架构中单位级别为:省级、地市级、区县级的单位
List
<
CompanyModel
>
companyModels
=
new
ArrayList
<
CompanyModel
>();
List
<
CompanyModel
>
companyModels
=
new
ArrayList
<
CompanyModel
>();
if
(
StringUtils
.
isEmpty
(
orgCode
))
{
if
(
StringUtils
.
isEmpty
(
orgCode
))
{
companyModels
=
(
List
<
CompanyModel
>)
Privilege
.
companyClient
.
queryAgencyTree
(
null
).
getResult
();
if
(
redisUtil
.
hasKey
(
BizCommonConstant
.
COMPANY_TREE_REDIS_KEY
))
{
companyModels
=
(
List
<
CompanyModel
>)
redisUtil
.
get
(
BizCommonConstant
.
COMPANY_TREE_REDIS_KEY
);
}
else
{
companyModels
=
(
List
<
CompanyModel
>)
Privilege
.
companyClient
.
queryAgencyTree
(
null
).
getResult
();
redisUtil
.
set
(
BizCommonConstant
.
COMPANY_TREE_REDIS_KEY
,
companyModels
);
}
}
else
{
}
else
{
LinkedHashMap
<
Object
,
Object
>
l
=
(
LinkedHashMap
<
Object
,
Object
>)
Privilege
.
companyClient
LinkedHashMap
<
Object
,
Object
>
l
=
(
LinkedHashMap
<
Object
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
orgCode
).
getResult
();
.
queryByOrgcode
(
orgCode
).
getResult
();
for
(
Map
.
Entry
<
Object
,
Object
>
it
:
l
.
entrySet
())
{
for
(
Map
.
Entry
<
Object
,
Object
>
it
:
l
.
entrySet
())
{
Privilege
.
companyClient
.
queryByOrgcode
(
orgCode
).
getResult
();
CompanyModel
companyModel
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
it
.
getValue
()),
CompanyModel
companyModel
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
it
.
getValue
()),
CompanyModel
.
class
);
CompanyModel
.
class
);
if
(
companyModel
!=
null
)
{
if
(
companyModel
!=
null
)
{
...
@@ -431,9 +437,10 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -431,9 +437,10 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
break
;
break
;
}
}
}
}
return
companyModels
.
stream
().
filter
(
c
->
"headquarter"
.
equals
(
c
.
getLevel
())
List
<
CompanyModel
>
result
=
||
"prefecture-level"
.
equals
(
c
.
getLevel
())
||
"county"
.
equals
(
c
.
getLevel
(
))).
map
(
this
::
dealChildCompany
)
companyModels
.
stream
().
filter
(
c
->
!
ValidationUtil
.
isEmpty
(
CompanyLevelEnum
.
getEnum
(
c
.
getLevel
()
))).
map
(
this
::
dealChildCompany
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
return
result
;
}
}
@Override
@Override
...
@@ -529,8 +536,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -529,8 +536,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
cm
.
setChildren
(
this
.
getFilterChild
(
cm
.
getChildren
()
!=
null
?
cm
.
getChildren
()
:
new
ArrayList
()));
cm
.
setChildren
(
this
.
getFilterChild
(
cm
.
getChildren
()
!=
null
?
cm
.
getChildren
()
:
new
ArrayList
()));
cm
.
getChildren
().
stream
().
filter
(
n
->
{
cm
.
getChildren
().
stream
().
filter
(
n
->
{
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
n
),
CompanyModel
.
class
);
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
n
),
CompanyModel
.
class
);
return
"headquarter"
.
equals
(
c
.
getLevel
())
||
"prefecture-level"
.
equals
(
c
.
getLevel
())
return
!
ValidationUtil
.
isEmpty
(
CompanyLevelEnum
.
getEnum
(
c
.
getLevel
()));
||
"county"
.
equals
(
c
.
getLevel
());
}).
map
(
n
->
{
}).
map
(
n
->
{
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
n
),
CompanyModel
.
class
);
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
n
),
CompanyModel
.
class
);
return
dealChildCompany
(
c
);
return
dealChildCompany
(
c
);
...
@@ -541,8 +547,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -541,8 +547,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
private
List
getFilterChild
(
Collection
children
)
{
private
List
getFilterChild
(
Collection
children
)
{
return
(
List
)
children
.
stream
().
filter
(
n
->
{
return
(
List
)
children
.
stream
().
filter
(
n
->
{
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
n
),
CompanyModel
.
class
);
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
n
),
CompanyModel
.
class
);
return
"headquarter"
.
equals
(
c
.
getLevel
())
||
"prefecture-level"
.
equals
(
c
.
getLevel
())
return
!
ValidationUtil
.
isEmpty
(
CompanyLevelEnum
.
getEnum
(
c
.
getLevel
()));
||
"county"
.
equals
(
c
.
getLevel
());
}).
map
(
s
->
{
}).
map
(
s
->
{
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
s
),
CompanyModel
.
class
);
CompanyModel
c
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
s
),
CompanyModel
.
class
);
c
.
setChildren
(
this
.
getFilterChild
(
c
.
getChildren
()
!=
null
?
c
.
getChildren
()
:
new
ArrayList
()));
c
.
setChildren
(
this
.
getFilterChild
(
c
.
getChildren
()
!=
null
?
c
.
getChildren
()
:
new
ArrayList
()));
...
...
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