74 lines
2.8 KiB
XML
74 lines
2.8 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.nflg.wms.repository.mapper.WmsWarehouseMapper">
|
|
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
|
|
select w.*,di.name as factory_name
|
|
from wms_warehouse w
|
|
left join dictionary_item di on w.factory_id=di.id
|
|
<where>
|
|
<if test="request.enable != null">
|
|
and w.enable=#{request.enable}
|
|
</if>
|
|
<if test="request.no != null and request.no != ''">
|
|
and w.no ilike concat('%',#{request.no},'%')
|
|
</if>
|
|
<if test="request.name != null and request.name != ''">
|
|
and w.name ilike concat('%',#{request.name},'%')
|
|
</if>
|
|
<if test="request.factoryNo != null and request.factoryNo != ''">
|
|
and di.code ilike concat('%',#{request.factoryNo},'%')
|
|
</if>
|
|
</where>
|
|
order by w.id desc
|
|
</select>
|
|
|
|
<select id="getList" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
|
|
select w.*,di.name as factory_name
|
|
from wms_warehouse w
|
|
left join dictionary_item di on w.factory_id=di.id
|
|
where w.id in
|
|
<foreach item="item" collection="ids" separator="," open="(" close=")">
|
|
#{item}
|
|
</foreach>
|
|
order by w.id desc
|
|
</select>
|
|
|
|
<select id="searchNonPage" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
|
|
select w.*,di.name as factory_name
|
|
from wms_warehouse w
|
|
left join dictionary_item di on w.factory_id=di.id
|
|
<where>
|
|
<if test="request.no != null and request.no != ''">
|
|
and w.no ilike concat('%',#{request.no},'%')
|
|
</if>
|
|
<if test="request.name != null and request.name != ''">
|
|
and w.name ilike concat('%',#{request.name},'%')
|
|
</if>
|
|
</where>
|
|
order by w.id desc
|
|
</select>
|
|
|
|
<select id="getEnableList" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
|
|
select w.*, di.name as factory_name
|
|
from wms_warehouse w
|
|
left join dictionary_item di on w.factory_id = di.id
|
|
where w.enable
|
|
<if test="factoryNo!=null and factoryNo!=''">
|
|
and di.code=#{factoryNo}
|
|
</if>
|
|
order by di.code,w.no
|
|
</select>
|
|
|
|
<select id="getListByIds" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
|
|
select w.*, di.name as factory_name
|
|
from wms_warehouse w
|
|
left join dictionary_item di on w.factory_id = di.id
|
|
where w.id in
|
|
<foreach item="item" collection="list" separator="," open="(" close=")">
|
|
#{item}
|
|
</foreach>
|
|
order by w.id desc
|
|
</select>
|
|
</mapper>
|