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
6ff3668e
Commit
6ff3668e
authored
Aug 09, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.人员过滤修改,代码优化
parent
e63fd598
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
34 deletions
+18
-34
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+1
-1
ZLStatisticsMapper.xml
...tics-api/src/main/resources/mapper/ZLStatisticsMapper.xml
+2
-2
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+13
-29
CylinderAreaDataMapper.xml
...-api/src/main/resources/mapper/CylinderAreaDataMapper.xml
+1
-1
TzsUserInfoMapper.xml
...e-ymt-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
6ff3668e
...
...
@@ -94,7 +94,7 @@
ei.legal_person,
ei.use_contact,
ei.contact_phone,
(select count(1) from tzs_user_info u where u.unit_code = ei.use_
unit_
code and u.is_delete = false) as personNum,
(select count(1) from tzs_user_info u where u.unit_code = ei.use_code and u.is_delete = false) as personNum,
(
select
group_concat(concat(a.cert_no,'#',a.expiry_date)) cert_no
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/ZLStatisticsMapper.xml
View file @
6ff3668e
...
...
@@ -32,7 +32,7 @@
FROM
( SELECT org_code FROM privilege_company WHERE company_code = #{screenDto.cityCode} ) AS subquery
INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( subquery.org_code, '%' )
INNER JOIN tzs_user_info tui ON bi.use_
unit_
code = tui.unit_code
INNER JOIN tzs_user_info tui ON bi.use_code = tui.unit_code
WHERE
tui.post LIKE concat ( '%', '6552', '%' )
AND bi.unit_type IS NOT NULL
...
...
@@ -58,7 +58,7 @@
FROM
( SELECT org_code FROM privilege_company WHERE company_code = #{screenDto.cityCode} ) AS subquery
INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( subquery.org_code, '%' )
INNER JOIN tzs_user_info tui ON bi.use_
unit_
code = tui.unit_code
INNER JOIN tzs_user_info tui ON bi.use_code = tui.unit_code
WHERE
bi.unit_type IS NOT NULL
AND tui.post IS NOT NULL
...
...
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 @
6ff3668e
...
...
@@ -17,7 +17,6 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
import
org.bouncycastle.pqc.crypto.newhope.NHOtherInfoGenerator
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.client.RequestOptions
;
...
...
@@ -108,7 +107,7 @@ public class StCommonServiceImpl {
regionModels
.
add
(
r
);
this
.
loopSetChildRegin
(
regionModels
,
r
.
getChildren
());
});
regionCodeRegionMap
=
regionModels
.
stream
().
collect
(
Collectors
.
toMap
(
RegionModel:
:
getRegionCode
,
Function
.
identity
(),
(
k1
,
k2
)->
k2
));
regionCodeRegionMap
=
regionModels
.
stream
().
collect
(
Collectors
.
toMap
(
RegionModel:
:
getRegionCode
,
Function
.
identity
(),
(
k1
,
k2
)
->
k2
));
}
private
void
loopSetChildRegin
(
List
<
RegionModel
>
regionModels
,
Collection
<
RegionModel
>
children
)
{
...
...
@@ -122,14 +121,7 @@ public class StCommonServiceImpl {
public
String
getAndSetOrgCode
(
DPFilterParamDto
dpFilterParamDto
)
{
String
cityCode
=
dpFilterParamDto
.
getCityCode
();
String
orgCode
=
regionCodeOrgCodeMap
.
get
(
cityCode
);
if
(
orgCode
==
null
)
{
orgCode
=
commonMapper
.
getOrgCodeByCompanyCode
(
cityCode
);
if
(
orgCode
!=
null
)
{
regionCodeOrgCodeMap
.
put
(
cityCode
,
orgCode
);
}
}
return
orgCode
;
return
getAndSetOrgCode
(
cityCode
);
}
public
String
getAndSetOrgCode
(
String
cityCode
)
{
...
...
@@ -154,17 +146,13 @@ public class StCommonServiceImpl {
}
public
List
<
RegionModel
>
setRegionIfRootParent
(
DPFilterParamDto
dpFilterParamDto
)
{
List
<
RegionModel
>
regions
=
regionModels
.
parallelStream
().
filter
(
e
->
e
.
getParentRegionCode
()
!=
null
&&
(
e
.
getParentRegionCode
().
toString
()).
equals
(
dpFilterParamDto
.
getCityCode
())).
collect
(
Collectors
.
toList
());
// 陕西省时需要在地图返回独立的地级市:韩城、杨凌、西咸
if
(
dpFilterParamDto
.
getCityCode
().
equals
(
TZSCommonConstant
.
SHAN_XI_REGION_CODE
))
{
List
<
RegionModel
>
independentRegions
=
ReginStepEnum
.
enum2RegionList
(
"map"
);
regions
.
addAll
(
independentRegions
);
}
return
regions
;
String
regionCode
=
dpFilterParamDto
.
getCityCode
();
return
setRegionIfRootParent
(
regionCode
);
}
/**
* 获取指定区域下的子区域
*
* @param regionCode 行政区划
* @return List<RegionModel>
*/
...
...
@@ -181,30 +169,26 @@ public class StCommonServiceImpl {
/**
* 获取指定区域下的子区域,独立地市及区县级不再下钻,直接返回当前区域信息
*
* @param
dpFilterParamDto 行政区划过滤条件
* @param dpFilterParamDto 行政区划过滤条件
* @return List<RegionModel>
*/
public
List
<
RegionModel
>
setRegionIfRootParentAndNoAccessIf3Level
(
DPFilterParamDto
dpFilterParamDto
)
{
String
regionCode
=
dpFilterParamDto
.
getCityCode
();
// 独立地市、区县级别时(level=3),直接返回当前区域信息,不在显示街道
if
((
Arrays
.
stream
(
ReginStepEnum
.
values
())).
anyMatch
(
e
->
e
.
getCode
().
equals
(
regionCode
))
||
regionCodeRegionMap
.
get
(
Integer
.
parseInt
(
regionCode
)).
getLevel
().
trim
().
equals
(
REGION_LEVEL_THIRD
)){
return
Collections
.
singletonList
(
regionCodeRegionMap
.
get
(
Integer
.
parseInt
(
regionCode
)));
}
else
{
return
setRegionIfRootParent
(
regionCode
);
}
return
setRegionIfRootParentAndNoAccessIf3Level
(
regionCode
);
}
/**
* 获取指定区域下的子区域,独立地市及区县级不再下钻,直接返回当前区域信息
*
* @param regionCode 行政区划
* @return List<RegionModel>
*/
public
List
<
RegionModel
>
setRegionIfRootParentAndNoAccessIf3Level
(
String
regionCode
)
{
if
(
regionCodeRegionMap
.
get
(
Integer
.
parseInt
(
regionCode
))
!=
null
&&
regionCodeRegionMap
.
get
(
Integer
.
parseInt
(
regionCode
)).
getLevel
().
trim
().
equals
(
REGION_LEVEL_THIRD
))
{
if
(
regionCodeRegionMap
.
get
(
Integer
.
parseInt
(
regionCode
))
!=
null
&&
regionCodeRegionMap
.
get
(
Integer
.
parseInt
(
regionCode
)).
getLevel
().
trim
().
equals
(
REGION_LEVEL_THIRD
))
{
// 区县级别时(level=3),直接返回当前区域信息,不在显示街道
return
Collections
.
singletonList
(
regionCodeRegionMap
.
get
(
Integer
.
parseInt
(
regionCode
)));
}
else
if
((
Arrays
.
stream
(
ReginStepEnum
.
values
())).
anyMatch
(
e
->
e
.
getCode
().
equals
(
regionCode
)))
{
}
else
if
((
Arrays
.
stream
(
ReginStepEnum
.
values
())).
anyMatch
(
e
->
e
.
getCode
().
equals
(
regionCode
)))
{
// 独立地市,直接返回当前区域信息,不在显示街道
return
ReginStepEnum
.
getOne
(
regionCode
);
}
else
{
...
...
@@ -249,7 +233,8 @@ public class StCommonServiceImpl {
boolMust
.
must
(
QueryBuilders
.
termQuery
(
"EQU_STATE"
,
EquimentEnum
.
ZAIYONG
.
getCode
()));
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
builder
.
query
(
boolMust
);
TermsAggregationBuilder
aggregationBuilder
=
AggregationBuilders
.
terms
(
"count_by_equ_list_code"
).
field
(
"EQU_LIST_CODE"
);
// 默认size为10 ,数据库有脏数据,所以需要多查询一些
TermsAggregationBuilder
aggregationBuilder
=
AggregationBuilders
.
terms
(
"count_by_equ_list_code"
).
field
(
"EQU_LIST_CODE"
).
size
(
20
);
builder
.
aggregation
(
aggregationBuilder
);
request
.
source
(
builder
);
try
{
...
...
@@ -260,7 +245,7 @@ public class StCommonServiceImpl {
// 压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
if
(
bucket
.
getKeyAsString
().
equals
(
EQU_LIST_CYLINDER
))
{
countMap
.
put
(
bucket
.
getKeyAsString
(),
bucket
.
getDocCount
()
-
cylinderNum
);
}
else
{
}
else
if
(
equipmentCategoryDtos
.
stream
().
anyMatch
(
e
->
e
.
getCode
().
equalsIgnoreCase
(
bucket
.
getKeyAsString
())))
{
countMap
.
put
(
bucket
.
getKeyAsString
(),
bucket
.
getDocCount
());
}
}
...
...
@@ -305,7 +290,6 @@ public class StCommonServiceImpl {
}
private
long
countCompanyForCertDateTemporary
(
DPFilterParamDto
dpFilterParamDto
)
{
String
orgCode
=
this
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
// 临期6个月
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/CylinderAreaDataMapper.xml
View file @
6ff3668e
...
...
@@ -147,7 +147,7 @@
count(1)
FROM
tz_base_enterprise_info u
RIGHT JOIN tzs_user_info ui ON ui.unit_code = u.use_
unit_
code
RIGHT JOIN tzs_user_info ui ON ui.unit_code = u.use_code
WHERE
u.data_sources = '陕西省内企业'
AND u.unit_type LIKE'%充装单位%'
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
6ff3668e
...
...
@@ -55,7 +55,7 @@
tzs_user_info tui,
tz_base_enterprise_info bi
WHERE
tui.unit_code = bi.use_
unit_
code
tui.unit_code = bi.use_code
and tui.post LIKE concat ( '%', #{post}, '%' )
and ((bi.supervise_org_code != '50' and bi.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (bi.supervise_org_code = '50' and bi.office_region LIKE CONCAT ('%', #{regionCode}, '%')))
and tui.is_delete=false
...
...
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