Commit cdf4d0e3 authored by suhuiguang's avatar suhuiguang

fix(jyjc): 报检规则4.0开发

1.公用长输管道报检去掉约束 2.大小写过滤
parent 9f5e7d43
...@@ -1513,11 +1513,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec ...@@ -1513,11 +1513,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
} }
// 设备类别 // 设备类别
if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY_CODE"))) {
boolMust.must(QueryBuilders.termQuery("EQU_CATEGORY_CODE", QueryParser.escape(map.getString("EQU_CATEGORY_CODE").toLowerCase()))); boolMust.must(QueryBuilders.termQuery("EQU_CATEGORY_CODE", QueryParser.escape(map.getString("EQU_CATEGORY_CODE"))));
} }
// 设备类别编码 // 设备类别编码
if (!ObjectUtils.isEmpty(map.getString("EQU_DEFINE_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_DEFINE_CODE"))) {
boolMust.must(QueryBuilders.termQuery("EQU_DEFINE_CODE", QueryParser.escape(map.getString("EQU_DEFINE_CODE").toLowerCase()))); boolMust.must(QueryBuilders.termQuery("EQU_DEFINE_CODE", QueryParser.escape(map.getString("EQU_DEFINE_CODE"))));
} }
// 地市 // 地市
......
...@@ -30,7 +30,7 @@ public enum ApplicationFormTypeEnum { ...@@ -30,7 +30,7 @@ public enum ApplicationFormTypeEnum {
YZBG("YZBG", "DJ_YZ"),//移装变更登记 YZBG("YZBG", "DJ_YZ"),//移装变更登记
DWBG("DWBG", "DJ_DW"),//单位变更登记 DWBG("DWBG", "DJ_DW"),//单位变更登记
JY("JY", ""), JY("JY", ""),
JG("JG", ""),// 检验结果 JG("SE", ""),// 检验结果
ZX("ZX", "BF_YZ"),//电梯(设备)移装注销 ZX("ZX", "BF_YZ"),//电梯(设备)移装注销
BF("BF", "BF_ZX"),//电梯(设备)报废注销 BF("BF", "BF_ZX"),//电梯(设备)报废注销
GMBG("GMBG", "DJ_GM"),//更名变更 GMBG("GMBG", "DJ_GM"),//更名变更
......
...@@ -264,62 +264,49 @@ ...@@ -264,62 +264,49 @@
<select id="queryJgProjectContraptionPage" <select id="queryJgProjectContraptionPage"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption"> resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption">
select select
* pc.*
from from
( idx_biz_jg_project_contraption pc
select where
pc.*, 1=1
(select count(distinct ibjui.record) from idx_biz_jg_use_info ibjui, idx_biz_jg_inspection_detection_info di where ibjui."RECORD" = di."RECORD" and ibjui.project_contraption_id=pc.sequence_nbr and di."INSPECT_TYPE" <![CDATA[<>]]> '') as inspectNum, <if test="params.equList != null and params.equList != ''">
(select count(1) from idx_biz_jg_use_info ibjui where ibjui.project_contraption_id= pc.sequence_nbr) as totalNum and pc.equ_list= #{params.equList}
from </if>
idx_biz_jg_project_contraption pc <if test="params.equCategory != null and params.equCategory != ''">
where and pc.equ_category= #{params.equCategory}
1=1 </if>
<if test="params.equList != null and params.equList != ''"> <if test="params.equDefine != null and params.equDefine != ''">
and pc.equ_list= #{params.equList} and pc.equ_define= #{params.equDefine}
</if> </if>
<if test="params.equCategory != null and params.equCategory != ''"> <if test="params.city != null and params.city != ''">
and pc.equ_category= #{params.equCategory} and pc.city= #{params.city}
</if> </if>
<if test="params.equDefine != null and params.equDefine != ''"> <if test="params.county != null and params.county != ''">
and pc.equ_define= #{params.equDefine} and pc.county= #{params.county}
</if> </if>
<if test="params.city != null and params.city != ''"> <choose>
and pc.city= #{params.city} <when test="params.inspectionType == 'AZJDJY'">
</if> and pc.usc_unit_credit_code=#{companyCode}
<if test="params.county != null and params.county != ''"> and pc.is_into_management = true
and pc.county= #{params.county} and (pc.use_registration_code is null or pc.use_registration_code = '' )
</if> </when>
<choose> <otherwise>
<when test="params.inspectionType == 'AZJDJY'"> <choose>
and pc.usc_unit_credit_code=#{companyCode} <when test="params.equCategory == '8300'">
and pc.is_into_management = true and pc.use_unit_credit_code=#{companyCode}
and (pc.use_registration_code is null or pc.use_registration_code = '' ) and pc.is_into_management = true
</when> and pc.use_registration_code <![CDATA[<>]]> ''
<otherwise> </when>
<choose> <otherwise>
<when test="params.equCategory == '8300'"> and pc.use_unit_credit_code=#{companyCode}
and pc.use_unit_credit_code=#{companyCode} and pc.is_into_management = true
and pc.is_into_management = true </otherwise>
and pc.use_registration_code <![CDATA[<>]]> '' </choose>
</when> </otherwise>
<otherwise> </choose>
and pc.use_unit_credit_code=#{companyCode} and not EXISTS (SELECt 1 FROM tz_jyjc_inspection_application a where a.status='6611' and a.application_unit_code=#{companyCode} and a.project_contraption_id = pc.sequence_nbr)
and pc.is_into_management = true and (pc.project_contraption_parent_id is null or pc.project_contraption_parent_id = '')
</otherwise> order by pc.sequence_nbr desc
</choose>
</otherwise>
</choose>
and not EXISTS (SELECt 1 FROM tz_jyjc_inspection_application a where a.status='6611' and a.application_unit_code=#{companyCode} and a.project_contraption_id = pc.sequence_nbr)
and (pc.project_contraption_parent_id is null or pc.project_contraption_parent_id = '')
) s
<where>
<if test="params.inspectionType == 'DQJY' and params.equCategory != '8300'">
s.inspectNum = s.totalNum
and s.inspectNum > 0
</if>
</where>
</select> </select>
<select id="selectEquipListByExport" resultType="java.util.Map"> <select id="selectEquipListByExport" resultType="java.util.Map">
......
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