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/basic/SysWorkplaceQueueMapper.xml

46 lines
2.1 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.basic.SysWorkplaceQueueMapper">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.SysWorkplaceQueue">
<!--@mbg.generated-->
<!--@Table sys_workplace_queue-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="workPlaceIdFk" jdbcType="BIGINT" property="workPlaceIdFk"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
<result column="updateUser" jdbcType="VARCHAR" property="updateUser"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, code, `name`, workPlaceIdFk, remark, createTime, updateTime, `createUser`, updateUser
</sql>
<select id="filterList" resultType="com.glxp.api.res.basic.SysWorkplaceQueueResponse">
select sq.*,
basic_products.cpmctymc productName,
COALESCE(basic_products.bzgg, basic_products.ggxh) as productSpec
from sys_workplace_queue sq
left join io_split_fifo_code isfc on isfc.workPlaceQueueCode = sq.code
left join basic_udirel bu on isfc.relId = bu.id
left join basic_products ON basic_products.uuid = bu.uuid
<where>
<if test="key != null and key != ''">
AND (
sq.code like concat('%', #{key}, '%')
or sq.name like concat('%', #{key}, '%')
)
</if>
<if test=" workPlaceIdFk != null and workPlaceIdFk != ''">
AND workPlaceIdFk = #{workPlaceIdFk}
</if>
</where>
GROUP BY sq.code
ORDER BY sq.code
</select>
</mapper>