|
|
|
@ -28,19 +28,19 @@
|
|
|
|
|
AND iccb.workPlaceCode LIKE concat('%', #{workPlaceCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != '' and code != null">
|
|
|
|
|
AND iccb.code LIKE concat('%', #{code}, '%')
|
|
|
|
|
AND iccb.code LIKE concat( #{code}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="billNo != null and billNo != ''">
|
|
|
|
|
AND iccb.billNo LIKE concat('%', #{billNo}, '%')
|
|
|
|
|
AND iccb.billNo LIKE concat(#{billNo}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="relId != null and relId != ''">
|
|
|
|
|
AND iccb.relId = #{relId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromType != null and fromType != ''">
|
|
|
|
|
AND iccb.fromType LIKE concat('%', #{fromType}, '%')
|
|
|
|
|
AND iccb.fromType LIKE concat( #{fromType}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromCorp != null and fromCorp != ''">
|
|
|
|
|
AND iccb.fromCorp LIKE concat('%', #{fromCorp}, '%')
|
|
|
|
|
AND iccb.fromCorp LIKE concat( #{fromCorp}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
group by iccb.id
|
|
|
|
@ -48,17 +48,32 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="filterNotRelCode" resultType="com.glxp.api.entity.collect.IoCollectCodeBackup">
|
|
|
|
|
select * from io_collect_code_backup a where EXISTS(
|
|
|
|
|
select * from basic_products b where LEFT(a.code, 7) = b.nameCode and packLevel >1
|
|
|
|
|
) and not EXISTS (select 1 from rel_code_detail c where c.parentCode = a.code)
|
|
|
|
|
<if test="fromCorp != null and fromCorp != ''">
|
|
|
|
|
AND iccb.fromCorp LIKE concat('%', #{fromCorp}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
SELECT a.*
|
|
|
|
|
FROM io_collect_code_backup a
|
|
|
|
|
WHERE EXISTS (
|
|
|
|
|
-- 子查询:检查是否存在满足条件的 basic_products 记录
|
|
|
|
|
SELECT 1
|
|
|
|
|
FROM basic_products b
|
|
|
|
|
WHERE LEFT(a.code, 7) = b.nameCode
|
|
|
|
|
AND b.packLevel > 1
|
|
|
|
|
)
|
|
|
|
|
AND NOT EXISTS (
|
|
|
|
|
-- 子查询:检查是否不存在满足条件的 rel_code_detail 记录
|
|
|
|
|
SELECT 1
|
|
|
|
|
FROM rel_code_detail c
|
|
|
|
|
WHERE c.parentCode = a.code
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
<select id="filterlargePackage" resultType="com.glxp.api.entity.collect.IoCollectCodeBackup">
|
|
|
|
|
select * from io_collect_code_backup a where EXISTS(
|
|
|
|
|
select * from basic_products b where LEFT(a.code, 7) = b.nameCode and packLevel >1
|
|
|
|
|
SELECT a.*
|
|
|
|
|
FROM io_collect_code_backup a
|
|
|
|
|
WHERE EXISTS (
|
|
|
|
|
-- 子查询:检查是否存在满足条件的 basic_products 记录
|
|
|
|
|
SELECT 1
|
|
|
|
|
FROM basic_products b
|
|
|
|
|
WHERE LEFT(a.code, 7) = b.nameCode
|
|
|
|
|
AND b.packLevel > 1
|
|
|
|
|
)
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|