Commit 390f9ce6 authored by suhuiguang's avatar suhuiguang

1.增加过滤流动时起重机械可做首检

parent 09f26209
......@@ -1344,7 +1344,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
String test = QueryParser.escape(map.getString("USE_INNER_CODE"));
boolMust.must(QueryBuilders.matchPhraseQuery("USE_INNER_CODE", test));
}
this.setFilterOfInFlowing(boolMust, map.getString("EQU_LIST_CODE"), map.getString("inspectionType"));
this.setFilterOfInFlowing(boolMust, map.getString("EQU_LIST_CODE"), map.getString("inspectionType"), map.getString("EQU_CATEGORY_CODE"));
builder.query(boolMust);
builder.sort("REC_DATE", SortOrder.DESC);
builder.from((pageNumber - 1) * size);
......@@ -1383,13 +1383,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
* 过滤条件去掉流程中的设备,
*
* @param boolMust 条件
* @param equCategoryCode
*/
private void setFilterOfInFlowing(BoolQueryBuilder boolMust, String equListCode, String inspectionType) {
private void setFilterOfInFlowing(BoolQueryBuilder boolMust, String equListCode, String inspectionType, String equCategoryCode) {
Set<String> records = this.getEquipInFlowing();
if (records != null && !records.isEmpty()) {
boolMust.mustNot(QueryBuilders.termsQuery("SEQUENCE_NBR.keyword", records));
}
if ("5000".equals(equListCode) && JYJCBusinessTypeEnum.SCJY.getCode().equals(inspectionType)) {
// 流动时起重机械及厂车可直接做首检
if (("5000".equals(equListCode) || "4400".equals(equCategoryCode)) && JYJCBusinessTypeEnum.SCJY.getCode().equals(inspectionType)) {
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", false));
} else {
BoolQueryBuilder shouldBuilder = QueryBuilders.boolQuery();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment