Commit 01821f11 authored by 刘林's avatar 刘林

fix(jyjc):检验检测--首检应该是在设备未走使用登记之前的检验

parent 8aa9fd23
......@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.enums.JYJCBusinessTypeEnum;
import com.yeejoin.amos.boot.module.jyjc.api.entity.*;
import com.yeejoin.amos.boot.module.jyjc.api.enums.*;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper;
......@@ -1242,7 +1243,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);
this.setFilterOfInFlowing(boolMust, map.getString("EQU_LIST_CODE"), map.getString("inspectionType"));
builder.query(boolMust);
builder.sort("REC_DATE", SortOrder.DESC);
builder.from((pageNumber - 1) * size);
......@@ -1282,12 +1283,16 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
*
* @param boolMust 条件
*/
private void setFilterOfInFlowing(BoolQueryBuilder boolMust) {
private void setFilterOfInFlowing(BoolQueryBuilder boolMust,String equListCode, String inspectionType) {
Set<String> records = this.getEquipInFlowing();
if (records != null && !records.isEmpty()) {
boolMust.mustNot(QueryBuilders.termsQuery("SEQUENCE_NBR.keyword", records));
}
// 只有纳管的设备才能做业务 TODO
if ("5000".equals(equListCode) && JYJCBusinessTypeEnum.SCJY.getCode().equals(inspectionType)) {
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", false));
}
// 只有纳管的设备才能做业务
boolMust.must(QueryBuilders.existsQuery("IS_INTO_MANAGEMENT"));
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", true));
}
......
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