|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.glxp.api.dao.collect.IoCollectCodeMapper">
|
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.collect.IoCollectCodeResponse">
|
|
|
|
|
SELECT icc.*,sw.workplaceName,
|
|
|
|
|
SELECT iccb.*,sw.workplaceName,
|
|
|
|
|
COALESCE(thr_bustype_origin.name, basic_bussiness_type.name) as busTypeName,
|
|
|
|
|
bp.nameCode,
|
|
|
|
|
bp.cpmctymc,
|
|
|
|
@ -10,29 +10,29 @@
|
|
|
|
|
bp.zczbhhzbapzbh,
|
|
|
|
|
bp.ylqxzcrbarmc,
|
|
|
|
|
bp.manufactory
|
|
|
|
|
from io_collect_code icc
|
|
|
|
|
left join sys_workplace sw on sw.workplaceId = icc.workPlaceCode
|
|
|
|
|
left join thr_bustype_origin on icc.busType = thr_bustype_origin.action
|
|
|
|
|
left join basic_bussiness_type on icc.busType = basic_bussiness_type.action
|
|
|
|
|
left join basic_udirel bu on icc.relId = bu.id
|
|
|
|
|
from io_collect_code_backup iccb
|
|
|
|
|
left join sys_workplace sw on sw.workplaceId = iccb.workPlaceCode
|
|
|
|
|
left join thr_bustype_origin on iccb.busType = thr_bustype_origin.action
|
|
|
|
|
left join basic_bussiness_type on iccb.busType = basic_bussiness_type.action
|
|
|
|
|
left join basic_udirel bu on iccb.relId = bu.id
|
|
|
|
|
left join basic_products bp on bu.uuid = bp.uuid
|
|
|
|
|
<where>
|
|
|
|
|
<if test="workPlaceCode != '' and workPlaceCode != null">
|
|
|
|
|
AND icc.workPlaceCode LIKE concat('%', #{workPlaceCode}, '%')
|
|
|
|
|
AND iccb.workPlaceCode LIKE concat('%', #{workPlaceCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != '' and code != null">
|
|
|
|
|
AND icc.code LIKE concat('%', #{code}, '%')
|
|
|
|
|
AND iccb.code LIKE concat('%', #{code}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="billNo != null and billNo != ''">
|
|
|
|
|
AND icc.billNo LIKE concat('%', #{billNo}, '%')
|
|
|
|
|
AND iccb.billNo LIKE concat('%', #{billNo}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromType != null and fromType != ''">
|
|
|
|
|
AND icc.fromType LIKE concat('%', #{fromType}, '%')
|
|
|
|
|
AND iccb.fromType LIKE concat('%', #{fromType}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="fromCorp != null and fromCorp != ''">
|
|
|
|
|
AND icc.fromCorp LIKE concat('%', #{fromCorp}, '%')
|
|
|
|
|
AND iccb.fromCorp LIKE concat('%', #{fromCorp}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
group by icc.id
|
|
|
|
|
group by iccb.id
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|