feat: add outbound WCS retry dispatch

This commit is contained in:
zgw
2026-07-16 10:02:45 +08:00
parent aa6728e52b
commit 9158a5fa54
18 changed files with 845 additions and 91 deletions

View File

@@ -0,0 +1,62 @@
<?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.out.dense.mapper.DenseLaneMapper">
<select id="isCurrentOutermost" resultType="java.lang.Integer">
select case
when source_space.warehouse_id != '03'
or source_space.group_coding is null
or ltrim(rtrim(source_space.group_coding)) = '' then 1
when not exists
(
select 1
from bas_cargo_space occupied
cross apply
(
select min(lane_space.the_column) as min_column,
max(lane_space.the_column) as max_column
from bas_cargo_space lane_space
where lane_space.warehouse_id = source_space.warehouse_id
and lane_space.group_coding = source_space.group_coding
and lane_space.the_floor = source_space.the_floor
) lane_boundary
where occupied.warehouse_id = source_space.warehouse_id
and occupied.group_coding = source_space.group_coding
and occupied.the_floor = source_space.the_floor
and occupied.cargo_space_id != source_space.cargo_space_id
and occupied.status in ('2', '3', '4')
and occupied.tray_code is not null
and ltrim(rtrim(occupied.tray_code)) != ''
and
(
(isnull(area_config.direction_type, '1') = '1'
and occupied.the_column &gt; source_space.the_column)
or (area_config.direction_type = '2'
and occupied.the_column &lt; source_space.the_column)
or (area_config.direction_type = '3'
and case
when occupied.the_column - lane_boundary.min_column
&lt;= lane_boundary.max_column - occupied.the_column
then occupied.the_column - lane_boundary.min_column
else lane_boundary.max_column - occupied.the_column
end
&lt; case
when source_space.the_column - lane_boundary.min_column
&lt;= lane_boundary.max_column - source_space.the_column
then source_space.the_column - lane_boundary.min_column
else lane_boundary.max_column - source_space.the_column
end)
)
) then 1
else 0
end
from bas_cargo_space source_space
left join bas_cargo_area_config area_config
on area_config.warehouse_id = source_space.warehouse_id
and area_config.cargo_area_code = source_space.this_cargo_area
and area_config.is_active = '1'
where source_space.cargo_space_id = #{cargoSpaceId}
</select>
</mapper>