工艺组成上道工序、下道工序判断修改
This commit is contained in:
parent
5374c2f32e
commit
8b661d5e7b
@ -70,28 +70,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="findPreProcess" parameterType="ProRouteProcess" resultMap="ProRouteProcessResult">
|
<select id="findPreProcess" parameterType="ProRouteProcess" resultMap="ProRouteProcessResult">
|
||||||
<include refid="selectProRouteProcessVo"/>
|
<include refid="selectProRouteProcessVo"/>
|
||||||
where route_id = #{routeId}
|
where route_id = #{routeId}
|
||||||
AND order_num < (
|
<choose>
|
||||||
SELECT order_num
|
<when test="orderNum != null "> and order_num < #{orderNum}</when>
|
||||||
FROM pro_route_process
|
<otherwise>
|
||||||
WHERE route_id = #{routeId}
|
AND order_num < (
|
||||||
<if test="processId != null "> and process_id = #{processId}</if>
|
SELECT order_num
|
||||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
FROM pro_route_process
|
||||||
AND order_num = #{orderNum} limit 1
|
WHERE route_id = #{routeId} limit 1
|
||||||
)
|
)
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
ORDER BY order_num DESC LIMIT 1
|
ORDER BY order_num DESC LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findNextProcess" parameterType="ProRouteProcess" resultMap="ProRouteProcessResult">
|
<select id="findNextProcess" parameterType="ProRouteProcess" resultMap="ProRouteProcessResult">
|
||||||
<include refid="selectProRouteProcessVo"/>
|
<include refid="selectProRouteProcessVo"/>
|
||||||
where route_id = #{routeId}
|
where route_id = #{routeId}
|
||||||
AND order_num > (
|
<choose>
|
||||||
SELECT order_num
|
<when test="orderNum != null "> and order_num > #{orderNum}</when>
|
||||||
FROM pro_route_process
|
<otherwise>
|
||||||
WHERE route_id = #{routeId}
|
AND order_num > (
|
||||||
<if test="processId != null "> and process_id = #{processId}</if>
|
SELECT order_num
|
||||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
FROM pro_route_process
|
||||||
AND order_num = #{orderNum} limit 1
|
WHERE route_id = #{routeId} limit 1
|
||||||
)
|
)
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
ORDER BY order_num ASC LIMIT 1
|
ORDER BY order_num ASC LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user