现场wms使用优化

This commit is contained in:
liuhanqing
2026-01-23 14:46:47 +08:00
parent f9ecde29fc
commit 695a065dc0
31 changed files with 1389 additions and 48 deletions

View File

@@ -184,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and locked = 'N'
and warehouse_id = #{warehouseId}
and roadway_id = #{roadwayId}
and cargo_hight = #{cargoHight}
<if test="cargoHight !=null and cargoHight != ''">and cargo_hight = #{cargoHight}</if>"
<if test="thePlatoon != null">and the_platoon = #{thePlatoon}</if>
<if test="rule1 != null and theFloor != null">and the_floor &lt; #{theFloor}</if>
<if test="rule2 != null and theFloor != null">and the_floor &gt;= #{theFloor}</if>

View File

@@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectInStockinDetailVo">
select
isd.stockin_detail_id, isd.stockin_guid, isd.stockin_id, isd.lot_no, isd.product_guid,
isd.product_id, isd.quantity, isd.quantity_x, isd.quantity_j, isd.price, bp.cargo_no, isd.remark,
isd.product_id, isd.quantity, (CAST(isd.quantity AS INT) - CAST(isd.scan_num AS INT)) as quantity_x, isd.quantity_j, isd.price, bp.cargo_no, isd.remark,
isd.assign_num, isd.assign_num_x, isd.assign_num_j, isd.print_date, isd.stock_status,
isd.supplier_id, isd.customer_id, bp.unit, bp.spec, isd.spare1, isd.spare2, isd.spare3, isd.spare4,
isd.spare5, isd.spare6, isd.scan_num, isd.scan_num_x, isd.scan_num_j,
@@ -94,8 +94,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare2 != null and spare2 != ''"> and isd.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and isd.spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and isd.spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and isd.spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and isd.spare6 = #{spare6}</if>
<if test="spare5 != null and spare5 != ''"> and isd.spare5 like concat('%',#{spare5},'%') </if>
<if test="spare6 != null and spare6 != ''"> and isd.spare6 like concat('%',#{spare6},'%') </if>
<if test="spare7 != null and spare7 != ''"> and isd.spare7 like concat('%',#{spare7},'%') </if>
<if test="spare9 != null and spare9 != ''"> and isd.spare9 like concat('%',#{spare9},'%') </if>
<if test="scanNum != null and scanNum != ''"> and isd.scan_num = #{scanNum}</if>
<if test="scanNumX != null and scanNumX != ''"> and isd.scan_num_x = #{scanNumX}</if>
<if test="scanNumJ != null and scanNumJ != ''"> and isd.scan_num_j = #{scanNumJ}</if>

View File

@@ -142,6 +142,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="dateStart != null and dateStart != ''"> and mj.create_time &gt;= #{dateStart}</if>
<if test="dateEnd != null and dateEnd != ''"> and mj.create_time &lt;= #{dateEnd}</if>
<if test="warehouseIdList != null and warehouseIdList.size() > 0">
and bs.warehouse_id in
<foreach collection="warehouseIdList" open="(" close=")" item="it" separator=",">
#{it}
</foreach>
</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>

View File

@@ -48,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="roadwayId" column="roadway_id" />
<result property="theType" column="the_type" />
<result property="theTypeName" column="the_type_name" />
<result property="deptName" column="dept_name" />
</resultMap>
<sql id="selectViewHandAllotStockVo">
@@ -56,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
the_column,
the_floor,
the_type,
the_type_name from view_hand_allot_stock vhat
the_type_name,dept_name from view_hand_allot_stock vhat
</sql>
<select id="selectViewHandAllotStockList" parameterType="ViewHandAllotStock" resultMap="ViewHandAllotStockResult">

View File

@@ -99,8 +99,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
order by create_time asc
</where>
order by create_time asc
</select>
<select id="selectViewInJobFlowByJobDetailId" parameterType="String" resultMap="ViewInJobFlowResult">

View File

@@ -0,0 +1,109 @@
<?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.search.traycodeStatic.mapper.ViewTraycodeStaticMapper">
<resultMap type="ViewTraycodeStatic" id="ViewTraycodeStaticResult">
<result property="warehouseId" column="warehouse_id" />
<result property="warehouseName" column="warehouse_name" />
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="cargoSpaceName" column="cargo_space_name" />
<result property="roadwayId" column="roadway_id" />
<result property="thePlatoon" column="the_platoon" />
<result property="theColumn" column="the_column" />
<result property="theFloor" column="the_floor" />
<result property="trayCode" column="tray_code" />
<result property="model" column="model" />
<result property="deptName" column="dept_name" />
<result property="inDate" column="in_date" />
</resultMap>
<sql id="selectViewTraycodeStaticVo">
select warehouse_id, warehouse_name, cargo_space_id, cargo_space_name, roadway_id, the_platoon, the_column, the_floor, tray_code, model, dept_name, in_date from view_traycode_static
</sql>
<select id="selectViewTraycodeStaticList" parameterType="ViewTraycodeStatic" resultMap="ViewTraycodeStaticResult">
<include refid="selectViewTraycodeStaticVo"/>
<where>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
<if test="thePlatoon != null "> and the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and the_column = #{theColumn}</if>
<if test="theFloor != null "> and the_floor = #{theFloor}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="inDate != null and inDate != ''"> and in_date = #{inDate}</if>
</where>
</select>
<select id="selectViewTraycodeStaticByWarehouseId" parameterType="String" resultMap="ViewTraycodeStaticResult">
<include refid="selectViewTraycodeStaticVo"/>
where warehouse_id = #{warehouseId}
</select>
<insert id="insertViewTraycodeStatic" parameterType="ViewTraycodeStatic">
insert into view_traycode_static
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehouseId != null">warehouse_id,</if>
<if test="warehouseName != null">warehouse_name,</if>
<if test="cargoSpaceId != null">cargo_space_id,</if>
<if test="cargoSpaceName != null">cargo_space_name,</if>
<if test="roadwayId != null">roadway_id,</if>
<if test="thePlatoon != null">the_platoon,</if>
<if test="theColumn != null">the_column,</if>
<if test="theFloor != null">the_floor,</if>
<if test="trayCode != null">tray_code,</if>
<if test="model != null">model,</if>
<if test="deptName != null">dept_name,</if>
<if test="inDate != null">in_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warehouseId != null">#{warehouseId},</if>
<if test="warehouseName != null">#{warehouseName},</if>
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
<if test="cargoSpaceName != null">#{cargoSpaceName},</if>
<if test="roadwayId != null">#{roadwayId},</if>
<if test="thePlatoon != null">#{thePlatoon},</if>
<if test="theColumn != null">#{theColumn},</if>
<if test="theFloor != null">#{theFloor},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="model != null">#{model},</if>
<if test="deptName != null">#{deptName},</if>
<if test="inDate != null">#{inDate},</if>
</trim>
</insert>
<update id="updateViewTraycodeStatic" parameterType="ViewTraycodeStatic">
update view_traycode_static
<trim prefix="SET" suffixOverrides=",">
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
<if test="cargoSpaceName != null">cargo_space_name = #{cargoSpaceName},</if>
<if test="roadwayId != null">roadway_id = #{roadwayId},</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="trayCode != null">tray_code = #{trayCode},</if>
<if test="model != null">model = #{model},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="inDate != null">in_date = #{inDate},</if>
</trim>
where warehouse_id = #{warehouseId}
</update>
<delete id="deleteViewTraycodeStaticByWarehouseId" parameterType="String">
delete from view_traycode_static where warehouse_id = #{warehouseId}
</delete>
<delete id="deleteViewTraycodeStaticByWarehouseIds" parameterType="String">
delete from view_traycode_static where warehouse_id in
<foreach item="warehouseId" collection="array" open="(" separator="," close=")">
#{warehouseId}
</foreach>
</delete>
</mapper>

View File

@@ -349,6 +349,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from bas_stock bs
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id and bs.tray_code = bcs.tray_code
left join bas_warehouse bw on bcs.warehouse_id = bw.warehouse_id
left join bas_product bp on bs.product_id = bp.product_id
WHERE bcs.status = '2'
<if test="model != null and model != ''">
and (bs.model = #{model} or bs.model is null or bs.model = '')
@@ -381,7 +382,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and bs.power like concat('%',#{power},'%')
</if>
<if test="productName != null and productName != ''">
and bs.product_name like concat('%',#{productName},'%')
and bp.product_name like concat('%',#{productName},'%')
</if>
<if test="warehouseIdList != null and warehouseIdList.size() > 0">
and bs.warehouse_id in
@@ -392,4 +393,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectCountByTrayCodeAndWarehouseId" resultType="java.lang.Integer">
select count(1) from bas_stock where tray_code = #{trayCode} and warehouse_id = #{warehouseId}
</select>
</mapper>