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
97a291e1
Commit
97a291e1
authored
Jul 03, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.报检设备增加过滤-只有已纳管才能做业务,修改公平es,需要监管存数据
parent
f88096f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
59 deletions
+11
-59
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+11
-59
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
97a291e1
...
...
@@ -1175,26 +1175,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
if
(!
ValidationUtil
.
isEmpty
(
type
)
&&
type
.
contains
(
"个人主体"
))
{
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
companyCode
);
}
// 默认条件【STATUS==="" || null】
BoolQueryBuilder
meBuilder
=
QueryBuilders
.
boolQuery
();
meBuilder
.
should
(
QueryBuilders
.
matchQuery
(
"STATUS"
,
"已认领"
));
meBuilder
.
should
(
QueryBuilders
.
boolQuery
().
mustNot
(
QueryBuilders
.
existsQuery
(
"STATUS"
)));
meBuilder
.
should
(
QueryBuilders
.
boolQuery
().
must
(
QueryBuilders
.
matchPhraseQuery
(
"STATUS"
,
""
)));
meBuilder
.
minimumShouldMatch
(
1
);
boolMust
.
must
(
meBuilder
);
// DATA_SOURCE 为“jg”的数据(从监管新加的设备)
// 20240314 提出的监管业务不要让企业用户选到之前一码通认领或补录的设备,让从监管业务中去新增
BoolQueryBuilder
dBuilder
=
QueryBuilders
.
boolQuery
();
dBuilder
.
must
(
QueryBuilders
.
prefixQuery
(
"DATA_SOURCE"
,
"jg"
));
boolMust
.
must
(
dBuilder
);
// 设备状态
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"EQU_STATE"
)))
{
String
param
=
QueryParser
.
escape
(
map
.
getLong
(
"EQU_STATE"
).
toString
());
boolMust
.
must
(
QueryBuilders
.
matchQuery
(
"EQU_STATE"
,
param
));
}
// 使用单位 //安装改造维修单位
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_UNIT_CREDIT_CODE"
))
&&
!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USC_UNIT_CREDIT_CODE"
)))
{
BoolQueryBuilder
ubuilder
=
QueryBuilders
.
boolQuery
();
...
...
@@ -1282,7 +1262,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
/**
* 过滤条件去掉流程中的设备
* 过滤条件去掉流程中的设备
,
*
* @param boolMust 条件
*/
...
...
@@ -1291,6 +1271,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
if
(
records
!=
null
&&
!
records
.
isEmpty
())
{
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"SEQUENCE_NBR.keyword"
,
records
));
}
// 只有纳管的设备才能做业务 TODO
boolMust
.
must
(
QueryBuilders
.
termsQuery
(
"IS_INTO_MANAGEMENT"
,
true
));
}
private
Set
<
String
>
getEquipInFlowing
()
{
...
...
@@ -1298,47 +1280,17 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
private
void
fillAddress
(
List
<
JSONObject
>
list
)
{
// 获取所有设备的Id
List
<
String
>
equIds
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
list
))
{
equIds
=
list
.
stream
().
map
(
item
->
item
.
get
(
SEQUENCE_NBR
).
toString
()).
collect
(
Collectors
.
toList
());
}
if
(!
ValidationUtil
.
isEmpty
(
equIds
))
{
// 查询设备地址
List
<
IdxBizJgUseInfo
>
useInfoListByEquIds
=
this
.
getUseInfoListByEquIds
(
equIds
);
Map
<
String
,
String
>
equAddressMap
=
new
HashMap
<>();
if
(!
ValidationUtil
.
isEmpty
(
useInfoListByEquIds
))
{
equAddressMap
=
useInfoListByEquIds
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizJgUseInfo:
:
getRecord
,
useInfo
->
{
String
fulladdress
=
""
;
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getProvinceName
()))
{
fulladdress
+=
useInfo
.
getProvinceName
();
}
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCityName
()))
{
fulladdress
+=
useInfo
.
getCityName
();
}
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getCountyName
()))
{
fulladdress
+=
useInfo
.
getCountyName
();
}
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getStreetName
()))
{
fulladdress
+=
useInfo
.
getStreetName
();
}
if
(!
ValidationUtil
.
isEmpty
(
useInfo
.
getAddress
()))
{
fulladdress
+=
useInfo
.
getAddress
();
}
return
fulladdress
;
}
)
);
}
// 更新设备使用情况和设备地址
for
(
JSONObject
item
:
list
)
{
String
fullAddress
=
equAddressMap
.
get
(
item
.
getString
(
SEQUENCE_NBR
));
item
.
put
(
"ADDRESS"
,
!
ValidationUtil
.
isEmpty
(
fullAddress
)
?
fullAddress
:
""
);
}
for
(
JSONObject
item
:
list
)
{
item
.
put
(
"ADDRESS"
,
this
.
removeSplitLine
(
item
));
}
}
private
Object
removeSplitLine
(
JSONObject
item
)
{
String
fullAddress
=
item
.
getString
(
"USE_PLACE"
)
+
item
.
getString
(
"ADDRESS"
);
fullAddress
=
fullAddress
.
replace
(
"/"
,
""
)
;
return
fullAddress
;
}
private
List
<
IdxBizJgUseInfo
>
getUseInfoListByEquIds
(
List
<
String
>
equIds
)
{
QueryWrapper
<
IdxBizJgUseInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
in
(
IdxBizJgUseInfo:
:
getRecord
,
equIds
);
...
...
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