190 lines
8.8 KiB
XML
190 lines
8.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.ruoyi.bas.srgvmap.mapper.WcsSrgvMapMapper">
|
|
|
|
<resultMap type="WcsSrgvMap" id="WcsSrgvMapResult">
|
|
<result property="guid" column="guid" />
|
|
<result property="x" column="x" />
|
|
<result property="y" column="y" />
|
|
<result property="z" column="z" />
|
|
<result property="axy" column="axy" />
|
|
<result property="value" column="value" />
|
|
<result property="ux" column="ux" />
|
|
<result property="uy" column="uy" />
|
|
<result property="uz" column="uz" />
|
|
<result property="uxy" column="uxy" />
|
|
<result property="spaceName" column="space_name" />
|
|
<result property="remark" column="remark" />
|
|
<result property="cargoSpaceId" column="cargo_space_id" />
|
|
<result property="theRow" column="the_row" />
|
|
<result property="theColumn" column="the_column" />
|
|
<result property="theLayer" column="the_layer" />
|
|
<result property="siteId" column="site_id" />
|
|
<result property="plcRow" column="plc_row" />
|
|
<result property="plcColumn" column="plc_column" />
|
|
<result property="plcLayer" column="plc_layer" />
|
|
<result property="warehouse" column="warehouse" />
|
|
<result property="spaceArea" column="space_area" />
|
|
</resultMap>
|
|
|
|
<sql id="selectWcsSrgvMapVo">
|
|
select guid, x, y, z, axy, value, ux, uy, uz, uxy, space_name, remark, cargo_space_id, the_row, the_column, the_layer, site_id, plc_row, plc_column, plc_layer, warehouse, space_area from wcs_srgv_map
|
|
</sql>
|
|
|
|
<select id="selectWcsSrgvMapList" parameterType="WcsSrgvMap" resultMap="WcsSrgvMapResult">
|
|
<include refid="selectWcsSrgvMapVo"/>
|
|
<where>
|
|
<if test="guid != null and guid != ''"> and guid = #{guid}</if>
|
|
<if test="x != null "> and x = #{x}</if>
|
|
<if test="y != null "> and y = #{y}</if>
|
|
<if test="z != null "> and z = #{z}</if>
|
|
<if test="axy != null and axy != ''"> and axy = #{axy}</if>
|
|
<if test="value != null "> and value = #{value}</if>
|
|
<if test="ux != null "> and ux = #{ux}</if>
|
|
<if test="uy != null "> and uy = #{uy}</if>
|
|
<if test="uz != null "> and uz = #{uz}</if>
|
|
<if test="uxy != null and uxy != ''"> and uxy = #{uxy}</if>
|
|
<if test="spaceName != null and spaceName != ''"> and space_name like concat('%', #{spaceName}, '%')</if>
|
|
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
|
<if test="theRow != null "> and the_row = #{theRow}</if>
|
|
<if test="theColumn != null "> and the_column = #{theColumn}</if>
|
|
<if test="theLayer != null "> and the_layer = #{theLayer}</if>
|
|
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
|
<if test="plcRow != null "> and plc_row = #{plcRow}</if>
|
|
<if test="plcColumn != null "> and plc_column = #{plcColumn}</if>
|
|
<if test="plcLayer != null "> and plc_layer = #{plcLayer}</if>
|
|
<if test="warehouse != null and warehouse != ''"> and warehouse = #{warehouse}</if>
|
|
<if test="spaceArea != null and spaceArea != ''"> and space_area = #{spaceArea}</if>
|
|
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectWcsSrgvMapByGuid" parameterType="String" resultMap="WcsSrgvMapResult">
|
|
<include refid="selectWcsSrgvMapVo"/>
|
|
where guid = #{guid}
|
|
</select>
|
|
|
|
<select id="selectWcsSrgvMapBySiteId" parameterType="String" resultMap="WcsSrgvMapResult">
|
|
<include refid="selectWcsSrgvMapVo"/>
|
|
where site_id = #{siteId}
|
|
</select>
|
|
|
|
<insert id="insertWcsSrgvMap" parameterType="WcsSrgvMap">
|
|
insert into wcs_srgv_map
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="guid != null and guid != ''">guid,</if>
|
|
<if test="x != null">x,</if>
|
|
<if test="y != null">y,</if>
|
|
<if test="z != null">z,</if>
|
|
<if test="axy != null">axy,</if>
|
|
<if test="value != null">value,</if>
|
|
<if test="ux != null">ux,</if>
|
|
<if test="uy != null">uy,</if>
|
|
<if test="uz != null">uz,</if>
|
|
<if test="uxy != null">uxy,</if>
|
|
<if test="spaceName != null">space_name,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
|
<if test="theRow != null">the_row,</if>
|
|
<if test="theColumn != null">the_column,</if>
|
|
<if test="theLayer != null">the_layer,</if>
|
|
<if test="siteId != null">site_id,</if>
|
|
<if test="plcRow != null">plc_row,</if>
|
|
<if test="plcColumn != null">plc_column,</if>
|
|
<if test="plcLayer != null">plc_layer,</if>
|
|
<if test="warehouse != null">warehouse,</if>
|
|
<if test="spaceArea != null">space_area,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="guid != null and guid != ''">#{guid},</if>
|
|
<if test="x != null">#{x},</if>
|
|
<if test="y != null">#{y},</if>
|
|
<if test="z != null">#{z},</if>
|
|
<if test="axy != null">#{axy},</if>
|
|
<if test="value != null">#{value},</if>
|
|
<if test="ux != null">#{ux},</if>
|
|
<if test="uy != null">#{uy},</if>
|
|
<if test="uz != null">#{uz},</if>
|
|
<if test="uxy != null">#{uxy},</if>
|
|
<if test="spaceName != null">#{spaceName},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
|
<if test="theRow != null">#{theRow},</if>
|
|
<if test="theColumn != null">#{theColumn},</if>
|
|
<if test="theLayer != null">#{theLayer},</if>
|
|
<if test="siteId != null">#{siteId},</if>
|
|
<if test="plcRow != null">#{plcRow},</if>
|
|
<if test="plcColumn != null">#{plcColumn},</if>
|
|
<if test="plcLayer != null">#{plcLayer},</if>
|
|
<if test="warehouse != null">#{warehouse},</if>
|
|
<if test="spaceArea != null">#{spaceArea},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateWcsSrgvMap" parameterType="WcsSrgvMap">
|
|
update wcs_srgv_map
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="x != null">x = #{x},</if>
|
|
<if test="y != null">y = #{y},</if>
|
|
<if test="z != null">z = #{z},</if>
|
|
<if test="axy != null">axy = #{axy},</if>
|
|
<if test="value != null">value = #{value},</if>
|
|
<if test="ux != null">ux = #{ux},</if>
|
|
<if test="uy != null">uy = #{uy},</if>
|
|
<if test="uz != null">uz = #{uz},</if>
|
|
<if test="uxy != null">uxy = #{uxy},</if>
|
|
<if test="spaceName != null">space_name = #{spaceName},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
|
<if test="theRow != null">the_row = #{theRow},</if>
|
|
<if test="theColumn != null">the_column = #{theColumn},</if>
|
|
<if test="theLayer != null">the_layer = #{theLayer},</if>
|
|
<if test="siteId != null">site_id = #{siteId},</if>
|
|
<if test="plcRow != null">plc_row = #{plcRow},</if>
|
|
<if test="plcColumn != null">plc_column = #{plcColumn},</if>
|
|
<if test="plcLayer != null">plc_layer = #{plcLayer},</if>
|
|
<if test="warehouse != null">warehouse = #{warehouse},</if>
|
|
<if test="spaceArea != null">space_area = #{spaceArea},</if>
|
|
</trim>
|
|
where guid = #{guid}
|
|
</update>
|
|
|
|
<delete id="deleteWcsSrgvMapByGuid" parameterType="String">
|
|
delete from wcs_srgv_map where guid = #{guid}
|
|
</delete>
|
|
|
|
<delete id="deleteWcsSrgvMapByGuids" parameterType="String">
|
|
delete from wcs_srgv_map where guid in
|
|
<foreach item="guid" collection="array" open="(" separator="," close=")">
|
|
#{guid}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<select id="selectNotInsite" resultMap="WcsSrgvMapResult">
|
|
SELECT
|
|
|
|
*
|
|
FROM
|
|
wcs_srgv_map
|
|
WHERE
|
|
remark = #{cache}
|
|
AND plc_layer = #{floor}
|
|
|
|
<if test="sites != null and sites.size() > 0">
|
|
AND site_id NOT IN
|
|
<foreach collection="sites" item="site" separator="," open="(" close=")">
|
|
#{site}
|
|
</foreach>
|
|
|
|
</if>
|
|
<if test="sites == null or sites.size() == 0">
|
|
AND 1=1
|
|
</if>
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|