Commit a1b63147 authored by tianyiming's avatar tianyiming

一码通checkCode方法优化

parent dbbb9212
......@@ -101,27 +101,27 @@
</update>
<select id="checkCode" resultType="java.util.Map">
SELECT
<if test="equCode != null and equCode != ''">
(SELECT COUNT ( 1 ) FROM idx_biz_jg_register_info ibjri
LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjoi."RECORD" = ibjri."RECORD"
WHERE ibjri."EQU_CODE" = #{equCode} and ibjoi."CLAIM_STATUS" = '已认领'
<if test="type != 'save' ">
and ibjri."RECORD" != #{record}
</if>
) AS equCode,
</if>
SELECT 1
<if test="useOrgCode != null and useOrgCode != ''">
(SELECT COUNT ( 1 ) FROM idx_biz_jg_register_info ibjri
,(SELECT COUNT ( 1 ) FROM idx_biz_jg_register_info ibjri
LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjoi."RECORD" = ibjri."RECORD"
WHERE ibjri."USE_ORG_CODE" = #{useOrgCode} and ibjoi."CLAIM_STATUS" = '已认领'
<if test="type != 'save'">
and ibjri."RECORD" != #{record}
</if>
) AS useOrgCode,
) AS useOrgCode
</if>
<if test="equCode != null and equCode != ''">
,(SELECT COUNT ( 1 ) FROM idx_biz_jg_register_info ibjri
LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjoi."RECORD" = ibjri."RECORD"
WHERE ibjri."EQU_CODE" = #{equCode} and ibjoi."CLAIM_STATUS" = '已认领'
<if test="type != 'save' ">
and ibjri."RECORD" != #{record}
</if>
) AS equCode
</if>
<if test="code96333 != null and code96333 != ''">
(SELECT COUNT ( 1 ) FROM idx_biz_jg_other_info ibjoi WHERE ibjoi."CODE96333" = #{code96333} and ibjoi."CLAIM_STATUS" = '已认领'
,(SELECT COUNT ( 1 ) FROM idx_biz_jg_other_info ibjoi WHERE ibjoi."CODE96333" = #{code96333} and ibjoi."CLAIM_STATUS" = '已认领'
<if test="type != 'save'">
and ibjoi."RECORD" != #{record}
</if>
......
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