Commit dd742092 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_bugfix' into develop_tzs_register

parents a1adcaef 9ee2ba82
......@@ -192,14 +192,15 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
.eq(BaseController.COMPANY_TYPE_COMPANY.equals(companyLevel) && CompanyTypeEnum.CONSTRUCTION.getName().equals(companyType), IdxBizJgProjectContraption::getUscUnitCreditCode, companyCode)
.eq(BaseController.COMPANY_TYPE_COMPANY.equals(companyLevel) && CompanyTypeEnum.USE.getName().equals(companyType), IdxBizJgProjectContraption::getUseUnitCreditCode, companyCode)
.eq(BaseController.COMPANY_TYPE_COMPANY.equals(companyLevel) && CompanyTypeEnum.INDIVIDUAL.getName().equals(companyType), IdxBizJgProjectContraption::getUseUnitCreditCode, companyCode.split("_").length > 1 ? companyCode.split("_")[1] : companyCode)
// 监管机构按照属地监管部门orgCode进行过滤
// 监管机构按照属地监管部门orgCode进行过滤【最大数据集合】
.likeRight(ValidationUtil.isEmpty(useRegDetail) && BaseController.COMPANY_TYPE_SUPERVISION.equals(companyLevel), IdxBizJgProjectContraption::getOrgCode, company.getOrgCode())
.eq(!ValidationUtil.isEmpty(params.get(IS_INTO_MANAGEMENT)), IdxBizJgProjectContraption::getIsIntoManagement, isIntoManagement)
.eq(!ValidationUtil.isEmpty(useRegistrationCode), IdxBizJgProjectContraption::getUseRegistrationCode, useRegistrationCode)
.eq(!ValidationUtil.isEmpty(equCategory), IdxBizJgProjectContraption::getEquCategory, equCategory)
.eq(!ValidationUtil.isEmpty(equDefine), IdxBizJgProjectContraption::getEquDefine, equDefine)
.like(!ValidationUtil.isEmpty(projectContraption), IdxBizJgProjectContraption::getProjectContraption, projectContraption)
.eq(!ValidationUtil.isEmpty(orgBranchCode), IdxBizJgProjectContraption::getOrgCode, orgBranchCode)
.eq(!ValidationUtil.isEmpty(orgBranchCode) && BaseController.COMPANY_TYPE_COMPANY.equals(companyLevel), IdxBizJgProjectContraption::getOrgCode, orgBranchCode) // 企业 等于匹配
.likeRight(!ValidationUtil.isEmpty(orgBranchCode) && BaseController.COMPANY_TYPE_SUPERVISION.equals(companyLevel), IdxBizJgProjectContraption::getOrgCode, orgBranchCode) // 监管 右模糊匹配
.like(!ValidationUtil.isEmpty(projectContraptionNo), IdxBizJgProjectContraption::getProjectContraptionNo, projectContraptionNo)
.isNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.TRUE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode)
.isNotNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.FALSE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode)
......
......@@ -2596,8 +2596,12 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
// 增加监管端查询, 查询规则看到本级及之下的设备
if(!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))){
if(companyLevel.equals(BaseController.COMPANY_TYPE_SUPERVISION)) { // 监管 右模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(company.getString("ORG_BRANCH_CODE")) + "*"));
} else { // 企业 等于查询
boolMust.must(QueryBuilders.termQuery("ORG_BRANCH_CODE.keyword", map.getString("ORG_BRANCH_CODE")));
}
}
builder.query(boolMust);
builder.sort("REC_DATE", SortOrder.DESC);
builder.from((pageNumber - 1) * size);
......
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