添加库区管理和货位管理
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
<?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.warehouse.mapper.BasWarehouseMapper">
|
||||
|
||||
<resultMap type="BasWarehouse" id="BasWarehouseResult">
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseNo" column="warehouse_no" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="address" column="address" />
|
||||
<result property="cDesc" column="c_desc" />
|
||||
<result property="warehouseKind" column="warehouse_kind" />
|
||||
<result property="warehouseType" column="warehouse_type" />
|
||||
<result property="isCurrent" column="is_current" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasWarehouseVo">
|
||||
select warehouse_id, warehouse_no, project_no, warehouse_name, address, c_desc, warehouse_kind, warehouse_type, is_current from bas_warehouse
|
||||
</sql>
|
||||
|
||||
<select id="selectBasWarehouseList" parameterType="BasWarehouse" resultMap="BasWarehouseResult">
|
||||
<include refid="selectBasWarehouseVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''"> and warehouse_no = #{warehouseNo}</if>
|
||||
<if test="projectNo != null and projectNo != ''"> and project_no = #{projectNo}</if>
|
||||
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="cDesc != null and cDesc != ''"> and c_desc = #{cDesc}</if>
|
||||
<if test="warehouseKind != null and warehouseKind != ''"> and warehouse_kind = #{warehouseKind}</if>
|
||||
<if test="warehouseType != null and warehouseType != ''"> and warehouse_type = #{warehouseType}</if>
|
||||
<if test="isCurrent != null and isCurrent != ''"> and is_current = #{isCurrent}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasWarehouseByWarehouseId" parameterType="String" resultMap="BasWarehouseResult">
|
||||
<include refid="selectBasWarehouseVo"/>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasWarehouse" parameterType="BasWarehouse">
|
||||
insert into bas_warehouse
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''">warehouse_no,</if>
|
||||
<if test="projectNo != null">project_no,</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="cDesc != null">c_desc,</if>
|
||||
<if test="warehouseKind != null">warehouse_kind,</if>
|
||||
<if test="warehouseType != null">warehouse_type,</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">is_current,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''">#{warehouseNo},</if>
|
||||
<if test="projectNo != null">#{projectNo},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="cDesc != null">#{cDesc},</if>
|
||||
<if test="warehouseKind != null">#{warehouseKind},</if>
|
||||
<if test="warehouseType != null">#{warehouseType},</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">#{isCurrent},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasWarehouse" parameterType="BasWarehouse">
|
||||
update bas_warehouse
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseNo != null and warehouseNo != ''">warehouse_no = #{warehouseNo},</if>
|
||||
<if test="projectNo != null">project_no = #{projectNo},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="cDesc != null">c_desc = #{cDesc},</if>
|
||||
<if test="warehouseKind != null">warehouse_kind = #{warehouseKind},</if>
|
||||
<if test="warehouseType != null">warehouse_type = #{warehouseType},</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">is_current = #{isCurrent},</if>
|
||||
</trim>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasWarehouseByWarehouseId" parameterType="String">
|
||||
delete from bas_warehouse where warehouse_id = #{warehouseId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasWarehouseByWarehouseIds" parameterType="String">
|
||||
delete from bas_warehouse where warehouse_id in
|
||||
<foreach item="warehouseId" collection="array" open="(" separator="," close=")">
|
||||
#{warehouseId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user