Commit 130b3072 authored by chenzhao's avatar chenzhao

增加列表属地监管筛选条件

parent fce10494
......@@ -35,20 +35,16 @@
<if test="dto.useUnitCode != null and dto.useUnitCode != ''">
and tjvi.use_unit_credit_code = #{dto.useUnitCode}
</if>
<if test="dto.dataType == 'supervision' ">
<choose>
<when test="client == 'jgAudit'">
<if test="dto.dataType == 'supervision' and client == 'jgAudit' ">
AND tjvi.receive_company_code = #{dto.useUnitCreditCode}
</when>
<otherwise>
and tjvi.org_branch_code like concat(#{dto.orgBranchCode}, '%')
</otherwise>
</choose>
AND tjvi.status <![CDATA[<>]]> '使用单位待提交'
</if>
<if test="dto.dataType == 'company' ">
and tjvi.use_unit_credit_code = #{dto.useUnitCreditCode}
</if>
<if test="dto.orgBranchCode != null and dto.orgBranchCode != ''">
and tjvi.org_branch_code like concat(#{dto.orgBranchCode}, '%')
</if>
</where>
order by
<if test="sort != null">
......
......@@ -72,6 +72,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
public static final String EQU_CATEGORY = "equCategory";
public static final String EQU_DEFINE = "equDefine";
public static final String PROJECT_CONTRAPTION_NO = "projectContraptionNo";
public static final String ORG_BRANCH_CODE = "orgBranchCode";
// 设备基本信息表单id
private static final String EQUIP_INFO_FORM_ID = "equipInfo";
@Resource
......@@ -171,6 +172,8 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
String projectContraption = params.get(PROJECT_CONTRAPTION);
// 工程装置编号
String projectContraptionNo = params.get(PROJECT_CONTRAPTION_NO);
//属地监管部门code
String orgBranchCode = params.get(ORG_BRANCH_CODE);
// 设备类别code
String equCategory = params.get(EQU_CATEGORY);
// 设备类品种code
......@@ -191,6 +194,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
.eq(!ValidationUtil.isEmpty(equCategory), IdxBizJgProjectContraption::getEquCategory, equCategory)
.eq(!ValidationUtil.isEmpty(equDefine), IdxBizJgProjectContraption::getEquDefine, equDefine)
.like(!ValidationUtil.isEmpty(projectContraption), IdxBizJgProjectContraption::getProjectContraption, projectContraption)
.like(!ValidationUtil.isEmpty(orgBranchCode), 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)
......
......@@ -2582,6 +2582,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if(companyLevel.equals(BaseController.COMPANY_TYPE_SUPERVISION)){
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(company.getString("orgCode")) + "*"));
}
// 增加监管端查询, 查询规则看到本级及之下的设备
if(!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))){
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(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