feat(oms,wms): 出库业务单反审——已出库/已审核单据回退已创建

- 新增 POST /reservationStockOutOrderApi/reverseAudit,按issueStatus(2-已审核/4-已出库)判断可反审
- 主单回退已创建并打reverseStatus标记,进【已反审】tab(list status=-2),重新审核通过自动复位
- 执行单/明细软删+reverseFlag=1,预约库存调整记录软删
- WMS新增/stockOutOrderApi/omsReverseExecutionOrder:已出库还原实物库存+推OMS,未出库仅还原分配占用,WMS无数据幂等成功
- W出库/拣货/复核/交接单软删+reverseFlag=1,列表支持delFlag=2&reverseFlag=1【已反审】tab
- 四页面新增归档详情接口getReverseInfo*
- 生成出库异常记录【反审记录】(abnormalType=3,前缀FSYC)
- 需先执行SQL: 20260908两个反审脚本(OMS库+WMS库)
This commit is contained in:
rcx
2026-09-09 15:20:13 +08:00
parent 139a3a82da
commit 715883f1d4
56 changed files with 970 additions and 44 deletions
@@ -117,6 +117,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="businessPriceWay" column="BUSINESS_PRICE_WAY" />
<result property="discount" column="DISCOUNT" />
<result property="totalOutboundQuantity" column="TOTAL_OUTBOUND_QUANTITY" />
<result property="reverseStatus" column="REVERSE_STATUS" />
<result property="reverseBy" column="REVERSE_BY" />
<result property="reverseByName" column="REVERSE_BY_NAME" />
<result property="reverseTime" column="REVERSE_TIME" />
<result property="reverseRemark" column="REVERSE_REMARK" />
</resultMap>
@@ -136,7 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
,a.reservation_audit_id,a.issue_name,a.issue_id,a.issue_time,a.issue_status,a.tms_order_number,
a.DIRECTOR_NAME ,a.DIRECTOR_PHONE,a.DIRECTOR_ID,a.RESERVATION_ORDER_SOURCE,a.OUTBOUND_TIME,a.RETURN_QUANTITY,a.DELIVERY_NAME,a.CUSTOMER_NUMBER,a.INVOICE_NUMBER,a.RETURN_ORDER_NUMBER,a.TOTAL_AMOUNT,
a.ROUTE,a.PUSH_TIME,a.PUSH_STATUS,a.PUSH_BY,a.PUSH_BY_NAME,a.execution_out_order_number,a.LINE_CODE,a.LINE_NAME,a.SHUTTLE_NO,
a.TOTAL_WAREHOUSE_RENT,a.BUSINESS_CHARGE_TYPE,a.BUSINESS_PRICE_WAY,a.DISCOUNT
a.TOTAL_WAREHOUSE_RENT,a.BUSINESS_CHARGE_TYPE,a.BUSINESS_PRICE_WAY,a.DISCOUNT,
a.REVERSE_STATUS,a.REVERSE_BY,a.REVERSE_BY_NAME,a.REVERSE_TIME,a.REVERSE_REMARK
</sql>
@@ -178,11 +184,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 出库状态: 3-部分分配 4-已分配 5-拣货中 6-波次中 7-拣货完成 8-复核中-->
and a.status IN (3, 4, 5, 6, 7, 8)
</when>
<when test="status == -2 "> <!-- 已反审 -->
<!-- 反审后单据回退为 1-已创建 且打上反审标记, 与【已创建】页签互斥 -->
and a.status = 1 and a.reverse_status = 1
</when>
<when test="status == 1 "> <!-- 已创建: 排除已反审的单据(已划归【已反审】页签) -->
and a.status = 1 and (a.reverse_status is null or a.reverse_status = 0)
</when>
<otherwise>
and a.status = #{status}
</otherwise>
</choose>
</if>
<if test="reverseStatus != null ">
and a.reverse_status = #{reverseStatus}
</if>
<!-- 出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-拣货中 6-波次中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 -->
<if test="gtStatus != null ">
and a.status &gt; #{gtStatus}