初始化

This commit is contained in:
张怡蓉
2025-12-23 13:36:18 +08:00
commit d427ebf6d0
1232 changed files with 239447 additions and 0 deletions

View File

@@ -0,0 +1,221 @@
<?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.cargoSpace.mapper.BasCargoSpaceMapper">
<resultMap type="com.ruoyi.bas.cargoSpace.domain.BasCargoSpace" id="BasCargoSpaceResult">
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="warehouseName" column="warehouse_name" />
<result property="roadwayId" column="roadway_id" />
<result property="cargoAreaId" column="cargo_area_id" />
<result property="theType" column="the_type" />
<result property="theTypeName" column="the_type_name" />
<result property="cargoSpaceName" column="cargo_space_name" />
<result property="thePlatoon" column="the_platoon" />
<result property="theColumn" column="the_column" />
<result property="theFloor" column="the_floor" />
<result property="status" column="status" />
<result property="locked" column="locked" />
<result property="trayCode" column="tray_code" />
<result property="cargoHight" column="cargo_hight" />
<result property="issDouble" column="iss_double" />
<result property="groupCodingNo" column="group_coding_no" />
<result property="groupCoding" column="group_coding" />
<result property="cargoSpaceLogo" column="cargo_space_logo" />
<result property="thisCargoArea" column="this_cargo_area" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="quantity" column="quantity" />
</resultMap>
<sql id="selectBasCargoSpaceVo">
select
bcs.cargo_space_id,
bcs.warehouse_id,
bcs.roadway_id,
bcs.cargo_area_id,
bcs.the_type,
bcs.the_type_name,
bcs.cargo_space_name,
bcs.the_platoon,
bcs.the_column,
bcs.the_floor,
bcs.status,
bcs.locked,
bcs.tray_code,
bcs.cargo_hight,
bcs.iss_double,
bcs.group_coding_no,
bcs.group_coding,
bcs.cargo_space_logo,
bcs.this_cargo_area,
bw.warehouse_name
from bas_cargo_space bcs
left join bas_warehouse bw on bcs.warehouse_id = bw.warehouse_id
</sql>
<select id="selectBasCargoSpaceList" resultMap="BasCargoSpaceResult">
<include refid="selectBasCargoSpaceVo"/>
<where>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bcs.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id = #{cargoAreaId}</if>
<if test="theType != null and theType != ''"> and bcs.the_type = #{theType}</if>
<if test="theTypeName != null and theTypeName != ''"> and bcs.the_type_name like concat('%', #{theTypeName}, '%')</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
<if test="trayCode != null and trayCode != ''"> and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight = #{cargoHight}</if>
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double = #{issDouble}</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="thisCargoArea != null and thisCargoArea != ''"> and bcs.this_cargo_area = #{thisCargoArea}</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
order by the_platoon,the_floor,the_column
</select>
<select id="selectBasCargoSpaceByCargoSpaceId" parameterType="String" resultMap="BasCargoSpaceResult">
<include refid="selectBasCargoSpaceVo"/>
where cargo_space_id = #{cargoSpaceId}
</select>
<insert id="insertBasCargoSpace" parameterType="BasCargoSpace">
insert into bas_cargo_space
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cargoSpaceId != null">cargo_space_id,</if>
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
<if test="roadwayId != null">roadway_id,</if>
<if test="cargoAreaId != null">cargo_area_id,</if>
<if test="theType != null">the_type,</if>
<if test="theTypeName != null">the_type_name,</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''">cargo_space_name,</if>
<if test="thePlatoon != null">the_platoon,</if>
<if test="theColumn != null">the_column,</if>
<if test="theFloor != null">the_floor,</if>
<if test="status != null and status != ''">status,</if>
<if test="locked != null and locked != ''">locked,</if>
<if test="trayCode != null">tray_code,</if>
<if test="cargoHight != null">cargo_hight,</if>
<if test="issDouble != null">iss_double,</if>
<if test="groupCodingNo != null">group_coding_no,</if>
<if test="groupCoding != null">group_coding,</if>
<if test="cargoSpaceLogo != null">cargo_space_logo,</if>
<if test="thisCargoArea != null">this_cargo_area,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
<if test="roadwayId != null">#{roadwayId},</if>
<if test="cargoAreaId != null">#{cargoAreaId},</if>
<if test="theType != null">#{theType},</if>
<if test="theTypeName != null">#{theTypeName},</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''">#{cargoSpaceName},</if>
<if test="thePlatoon != null">#{thePlatoon},</if>
<if test="theColumn != null">#{theColumn},</if>
<if test="theFloor != null">#{theFloor},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="locked != null and locked != ''">#{locked},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="cargoHight != null">#{cargoHight},</if>
<if test="issDouble != null">#{issDouble},</if>
<if test="groupCodingNo != null">#{groupCodingNo},</if>
<if test="groupCoding != null">#{groupCoding},</if>
<if test="cargoSpaceLogo != null">#{cargoSpaceLogo},</if>
<if test="thisCargoArea != null">#{thisCargoArea},</if>
</trim>
</insert>
<update id="updateBasCargoSpace" parameterType="BasCargoSpace">
update bas_cargo_space
<trim prefix="SET" suffixOverrides=",">
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
<if test="cargoAreaId != null">cargo_area_id = #{cargoAreaId},</if>
<if test="theType != null">the_type = #{theType},</if>
<if test="theTypeName != null">the_type_name = #{theTypeName},</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''">cargo_space_name = #{cargoSpaceName},</if>
<if test="thePlatoon != null">the_platoon = #{thePlatoon},</if>
<if test="theColumn != null">the_column = #{theColumn},</if>
<if test="theFloor != null">the_floor = #{theFloor},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="locked != null and locked != ''">locked = #{locked},</if>
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="cargoHight != null">cargo_hight = #{cargoHight},</if>
<if test="issDouble != null">iss_double = #{issDouble},</if>
<if test="groupCodingNo != null">group_coding_no = #{groupCodingNo},</if>
<if test="groupCoding != null">group_coding = #{groupCoding},</if>
<if test="cargoSpaceLogo != null">cargo_space_logo = #{cargoSpaceLogo},</if>
<if test="thisCargoArea != null">this_cargo_area = #{thisCargoArea},</if>
</trim>
where cargo_space_id = #{cargoSpaceId}
</update>
<delete id="deleteBasCargoSpaceByCargoSpaceId" parameterType="String">
delete from bas_cargo_space where cargo_space_id = #{cargoSpaceId}
</delete>
<delete id="deleteBasCargoSpaceByCargoSpaceIds" parameterType="String">
delete from bas_cargo_space where cargo_space_id in
<foreach item="cargoSpaceId" collection="array" open="(" separator="," close=")">
#{cargoSpaceId}
</foreach>
</delete>
<select id="selectStatusCount" resultType="java.util.Map">
SELECT
status,
COUNT(*) as count
FROM bas_cargo_space
GROUP BY status
</select>
<select id="selectEmptyCargoSpaceByWarehouseId" resultType="com.ruoyi.bas.cargoSpace.domain.BasCargoSpace">
SELECT TOP 1 cargo_space_id as cargoSpaceId
FROM bas_cargo_space
WHERE status = '1'
and locked = 'N'
<if test="warehouseId != null">
and warehouse_id = #{warehouseId}
</if>
<if test="roadwayId != null">
and roadway_id = #{roadwayId}
</if>
ORDER BY the_platoon, the_floor,the_column
</select>
<select id="selectBasCargoSpaceListByRoadway" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
select bcs.cargo_space_id, bcs.warehouse_id, bcs.roadway_id, bcs.cargo_space_name,
bcs.the_platoon, bcs.the_column, bcs.the_floor, bcs.status, bcs.locked, bs.tray_code, bs.product_id,
bp.product_name,bs.spare6,bs.quantity,bs.spare7
from bas_stock bs,bas_cargo_space bcs,bas_roadway br,bas_product bp
where bs.cargo_space_id = bcs.cargo_space_id
and br.roadway_id = bcs.roadway_id
and bp.product_id = bs.product_id
and br.out_locked = 'N'
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
<if test="trayCode != null and trayCode != ''"> and bs.tray_code like concat('%', #{trayCode}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and bs.spare7 = #{spare7}</if>
<if test="spare6 != null and spare6 != ''"> and bs.spare6 like concat('%', #{spare6}, '%')</if>
<if test="productId != null and productId != ''"> and bs.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
</select>
</mapper>