扫二维码签名;入库单号规则;
This commit is contained in:
@@ -831,4 +831,53 @@
|
||||
WHERE in_order_number = #{inOrderNumber}
|
||||
</select>
|
||||
|
||||
<!-- 跨4张入库单表查询指定前缀+组织+仓库的所有入库单号(取最大序号+1,防止删单后单号重复) -->
|
||||
<select id="getMaxStockInOrderByPrefixAndOrgAndWarehouse" resultType="java.lang.String">
|
||||
SELECT in_order_number FROM reserve_stock_in_order
|
||||
WHERE in_order_number LIKE concat(#{prefix}, '%')
|
||||
AND del_flag = 1
|
||||
<if test="organizationId != null">
|
||||
AND organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT in_order_number FROM reservation_stock_in_order
|
||||
WHERE in_order_number LIKE concat(#{prefix}, '%')
|
||||
AND del_flag = 1
|
||||
<if test="organizationId != null">
|
||||
AND organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT in_order_number FROM execution_stock_in_order
|
||||
WHERE in_order_number LIKE concat(#{prefix}, '%')
|
||||
AND del_flag = 1
|
||||
<if test="organizationId != null">
|
||||
AND organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT in_order_number FROM NGWL_TEST_WMS.stock_in_order
|
||||
WHERE in_order_number LIKE concat(#{prefix}, '%')
|
||||
AND del_flag = 1
|
||||
<if test="organizationId != null">
|
||||
AND organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null">
|
||||
AND warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user