You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-wms-java/src/main/resources/mybatis/mapper/inout/IoSplitCodeMapper.xml

61 lines
2.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.inout.IoSplitCodeMapper">
12 months ago
<select id="filterList" parameterType="com.glxp.api.req.inout.IoSplitCodeRequest"
resultType="com.glxp.api.entity.inout.IoSplitCodeEntity">
SELECT isc.*,bp.cpmctymc productName,sw.workplaceName,COALESCE(thr_bustype_origin.name, basic_bussiness_type.name) as busTypeName,COALESCE(bp.bzgg, bp.ggxh) as ggxh,bp.measname,
COALESCE(bp.ylqxzcrbarmc, bp.manufactory) as manufactory,bp.ybbm
11 months ago
FROM io_split_code isc
left join basic_products bp on bp.nameCode = isc.nameCode
left join sys_workplace sw on sw.workplaceId = isc.workPlaceCode
11 months ago
left join thr_bustype_origin on isc.action = thr_bustype_origin.action
left join basic_bussiness_type on isc.action = basic_bussiness_type.action
12 months ago
<where>
11 months ago
isc.remainCount > 0
12 months ago
<if test="code != '' and code != null">
AND code LIKE #{code}
</if>
<if test="relId != null">
AND relId = #{relId}
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode = #{nameCode}
</if>
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="supId != null">
AND supId = #{supId}
</if>
<if test="invCode != null">
AND invCode = #{invCode}
</if>
<if test="supId != null">
AND supId = #{supId}
</if>
<if test="productType != null">
AND productType = #{productType}
</if>
11 months ago
<if test=" workPlaceCode != null">
12 months ago
AND workPlaceCode = #{workPlaceCode}
</if>
<if test=" productName != null and productName != ''">
AND bp.cpmctymc = #{productName}
</if>
<if test="keywords != null and keywords != ''">
and (isc.workPlaceCode like concat('%', #{keywords}, '%')
or isc.nameCode like concat('%', #{keywords}, '%')
or isc.batchNo like concat('%', #{keywords}, '%')
or isc.supId like concat('%', #{keywords}, '%')
or bp.cpmctymc like concat('%', #{keywords}, '%')
or bp.bzgg like concat('%', #{keywords}, '%')
or bp.ggxh like concat('%', #{keywords}, '%')
or isc.invCode like concat('%', #{keywords}, '%'))
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND date_format(isc.createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d')
</if>
12 months ago
</where>
</select>
</mapper>