Commit e29b6763 authored by chenzhao's avatar chenzhao

属地监管部门增加 筛选限制 企业eq 监管部门查看like

parent 55428ecc
...@@ -74,7 +74,14 @@ ...@@ -74,7 +74,14 @@
AND isn.use_unit_credit_code = #{param.useUnitCreditCode} AND isn.use_unit_credit_code = #{param.useUnitCreditCode}
</if> </if>
<if test="param.orgBranchCode != null and param.orgBranchCode != ''"> <if test="param.orgBranchCode != null and param.orgBranchCode != ''">
<choose>
<when test="client == 'jgAudit'">
AND isn.org_branch_code= #{param.orgBranchCode}
</when>
<otherwise>
AND isn.org_branch_code LIKE concat(#{param.orgBranchCode},'%') AND isn.org_branch_code LIKE concat(#{param.orgBranchCode},'%')
</otherwise>
</choose>
</if> </if>
</if> </if>
<if test="type == 'supervision'"> <if test="type == 'supervision'">
......
...@@ -266,7 +266,16 @@ ...@@ -266,7 +266,16 @@
AND use_unit_credit_code = #{dto.useUnitCode} AND use_unit_credit_code = #{dto.useUnitCode}
</if> </if>
<if test="dto.orgBranchCode != null and dto.orgBranchCode != ''"> <if test="dto.orgBranchCode != null and dto.orgBranchCode != ''">
<choose>
<when test="client == 'jgAudit'">
and supervisionOrgCode = #{dto.orgBranchCode}
</when>
<otherwise>
and supervisionOrgCode like concat(#{dto.orgBranchCode},'%') and supervisionOrgCode like concat(#{dto.orgBranchCode},'%')
</otherwise>
</choose>
</if> </if>
<if test="dto.auditPassDateStart != null and dto.auditPassDateEnd != null"> <if test="dto.auditPassDateStart != null and dto.auditPassDateEnd != null">
AND auditPassDate BETWEEN #{dto.auditPassDateStart} AND #{dto.auditPassDateEnd} AND auditPassDate BETWEEN #{dto.auditPassDateStart} AND #{dto.auditPassDateEnd}
......
...@@ -43,8 +43,14 @@ ...@@ -43,8 +43,14 @@
and tjvi.use_unit_credit_code = #{dto.useUnitCreditCode} and tjvi.use_unit_credit_code = #{dto.useUnitCreditCode}
</if> </if>
<if test="dto.orgBranchCode != null and dto.orgBranchCode != ''"> <if test="dto.orgBranchCode != null and dto.orgBranchCode != ''">
and tjvi.org_branch_code like concat(#{dto.orgBranchCode}, '%') <choose>
</if> <when test="client == 'jgAudit'">
and tjvi.org_branch_code = #{dto.orgBranchCode}
</when>
<otherwise>
and tjvi.org_branch_code LIKE CONCAT(#{dto.orgBranchCode}, '%')
</otherwise>
</choose> </if>
</where> </where>
order by order by
<if test="sort != null"> <if test="sort != null">
......
...@@ -199,7 +199,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP ...@@ -199,7 +199,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
.eq(!ValidationUtil.isEmpty(equCategory), IdxBizJgProjectContraption::getEquCategory, equCategory) .eq(!ValidationUtil.isEmpty(equCategory), IdxBizJgProjectContraption::getEquCategory, equCategory)
.eq(!ValidationUtil.isEmpty(equDefine), IdxBizJgProjectContraption::getEquDefine, equDefine) .eq(!ValidationUtil.isEmpty(equDefine), IdxBizJgProjectContraption::getEquDefine, equDefine)
.like(!ValidationUtil.isEmpty(projectContraption), IdxBizJgProjectContraption::getProjectContraption, projectContraption) .like(!ValidationUtil.isEmpty(projectContraption), IdxBizJgProjectContraption::getProjectContraption, projectContraption)
.like(!ValidationUtil.isEmpty(orgBranchCode), IdxBizJgProjectContraption::getOrgCode, orgBranchCode) .eq(!ValidationUtil.isEmpty(orgBranchCode), IdxBizJgProjectContraption::getOrgCode, orgBranchCode)
.like(!ValidationUtil.isEmpty(projectContraptionNo), IdxBizJgProjectContraption::getProjectContraptionNo, projectContraptionNo) .like(!ValidationUtil.isEmpty(projectContraptionNo), IdxBizJgProjectContraption::getProjectContraptionNo, projectContraptionNo)
.isNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.TRUE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode) .isNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.TRUE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode)
.isNotNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.FALSE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode) .isNotNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.FALSE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode)
......
...@@ -2588,7 +2588,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2588,7 +2588,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
// 增加监管端查询, 查询规则看到本级及之下的设备 // 增加监管端查询, 查询规则看到本级及之下的设备
if(!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))){ if(!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))){
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(map.getString("ORG_BRANCH_CODE")) + "*")); boolMust.must(QueryBuilders.termQuery("ORG_BRANCH_CODE.keyword", map.getString("ORG_BRANCH_CODE")));
} }
builder.query(boolMust); builder.query(boolMust);
builder.sort("REC_DATE", SortOrder.DESC); builder.sort("REC_DATE", SortOrder.DESC);
......
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