Commit 8bf01b23 authored by suhuiguang's avatar suhuiguang

1.移转变更bug修改

parent 45030d1e
......@@ -8,7 +8,8 @@
</update>
<select id="getListPage" resultType="java.util.Map">
select crt.sequence_nbr as sequenceNbr,
select * from
(select crt.sequence_nbr as sequenceNbr,
crt.audit_status as auditStatus,
crt.reg_date as regDate,
crt.use_unit_name as useUnitName,
......@@ -34,14 +35,13 @@
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on crteq.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on crteq.equ_id = use.RECORD
<where>
and crt.is_delete = 0
<if test="dto.equCategory != null and dto.equCategory != ''">
and jri.EQU_CATEGORY = #{dto.equCategory}
</if>
<if test="dto.auditStatus != null and dto.auditStatus != ''">
and crt.audit_status = #{dto.auditStatus}
and crt.audit_status like concat('%', #{dto.auditStatus},'%')
</if>
<if test="dto.equCode != null and dto.equCode != ''">
and jri.EQU_CODE like concat('%',#{dto.equCode},'%')
......@@ -58,11 +58,72 @@
<if test="type == 'company'">
AND crt.use_unit_credit_code = #{dto.unitCode}
</if>
<if test="currentUserId != null and currentUserId != '' ">
or (crt.transfer_to_user_ids like concat('%',#{currentUserId},'%') and crt.is_delete = 0)
<if test="dto.applyNo != null and dto.applyNo != ''">
and crt.apply_no like concat('%',#{dto.applyNo},'%')
</if>
<if test="dto.productName != null and dto.productName != ''">
and jri.PRODUCT_NAME like concat('%',#{dto.productName},'%')
</if>
</where>
order by crt.rec_date desc
union
select crt.sequence_nbr as sequenceNbr,
crt.audit_status as auditStatus,
crt.reg_date as regDate,
crt.use_unit_name as useUnitName,
crt.status,
crt.receive_org_name as receiveOrgName,
crt.apply_no as applyNo,
crt.next_executor_ids AS nextExecutorIds,
crt.promoter,
crt.rec_date as recDate,
crt.instance_id as instanceId,
crt.use_registration_code as useRegistrationCode,
crt.next_execute_user_ids as nextExecuteUserIds,
crt.create_user_id as createUserId,
crt.full_address as allAddress,
crt.next_task_id as nextTaskId,
use.USE_UNIT_NAME as useUnitName,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
crteq.equ_id as equipId
from tzs_jg_change_registration_transfer crt
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on crteq.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on crteq.equ_id = use.RECORD
<where>
and crt.is_delete = 0
AND crt.transfer_to_user_ids like concat('%',#{currentUserId},'%')
<if test="dto.equCategory != null and dto.equCategory != ''">
and jri.EQU_CATEGORY = #{dto.equCategory}
</if>
<if test="dto.auditStatus != null and dto.auditStatus != ''">
and crt.audit_status = concat('%',#{dto.auditStatus},'%')
</if>
<if test="dto.equCode != null and dto.equCode != ''">
and jri.EQU_CODE like concat('%',#{dto.equCode},'%')
</if>
<if test="dto.useUnitCreditCode != null and dto.useUnitCreditCode != ''">
and crt.use_unit_credit_code = #{dto.useUnitCreditCode}
</if>
<if test="dto.receiveOrgCode != null and dto.receiveOrgCode != ''">
and crt.receive_company_code = #{dto.receiveOrgCode}
</if>
<if test="type == 'supervision'">
AND crt.receive_company_code = #{dto.unitCode}
</if>
<if test="type == 'company'">
AND crt.use_unit_credit_code = #{dto.unitCode}
</if>
<if test="dto.applyNo != null and dto.applyNo != ''">
and crt.apply_no like concat('%',#{dto.applyNo},'%')
</if>
<if test="dto.productName != null and dto.productName != ''">
and jri.PRODUCT_NAME like concat('%',#{dto.productName},'%')
</if>
</where>)
order by recDate desc
</select>
</mapper>
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