<?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.qianwen.smartman.modules.cps.mapper.WarehouseStationMapper">
|
|
<select id="listPage" resultType="com.qianwen.smartman.modules.cps.entity.WarehouseStation">
|
SELECT
|
ws.id,
|
ws.warehouse_code AS warehouseCode,
|
ws.warehouse_name AS warehouseName,
|
wa.name AS warehouseAreaName,
|
wa.code AS warehouseAreaCode,
|
ws.avatar,
|
ws.remark
|
FROM
|
blade_warehouse_station ws
|
LEFT JOIN blade_warehouse_area wa ON ws.area_id = wa.id
|
WHERE
|
ws.is_deleted = 0
|
<if test="areaId != null">
|
and wa.id = #{areaId}
|
</if>
|
|
<if test="keyWord !='' and keyWord !=null">
|
AND ( ws.warehouse_code LIKE CONCAT(#{keyWord},'%') OR warehouse_name LIKE CONCAT(#{keyWord},'%') )
|
</if>
|
ORDER BY ws.create_time DESC,ws.id desc ;
|
|
</select>
|
|
<select id="getWarehouseStationList" resultType="com.qianwen.smartman.modules.cps.vo.WarehouseStationVO">
|
select a.id,b.code warehouseAreaCode
|
from blade_warehouse_station a
|
join blade_warehouse_area b on b.id = a.area_id
|
<where>
|
and a.is_deleted=0
|
and b.is_deleted=0
|
<if test="ids != null and ids.size() > 0">
|
AND a.id IN
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</if>
|
</where>
|
</select>
|
</mapper>
|