功能重构开发0130

This commit is contained in:
2026-01-30 10:20:32 +08:00
parent e5926e82fd
commit 86ecbf0e78
8 changed files with 121 additions and 270 deletions

View File

@@ -194,9 +194,9 @@
resultType="com.zg.project.wisdom.domain.vo.StockStatisticVO">
SELECT
IFNULL(SUM(ri.real_qty * ri.ht_dj), 0) AS total_amount,
COUNT(DISTINCT ri.pcode) AS location_count,
IFNULL(SUM(ri.real_qty), 0) AS total_quantity
IFNULL(SUM(ri.real_qty * ri.ht_dj), 0) AS totalAmount,
COUNT(DISTINCT ri.pcode) AS locationCount,
IFNULL(SUM(ri.real_qty), 0) AS totalQuantity
FROM rk_info ri
<where>
ri.exec_status = 1

View File

@@ -96,9 +96,9 @@
-- 小仓
wh.warehouse_name AS warehouse_name,
-- 大仓
pwh.warehouse_code AS parent_warehouse_code,
pwh.warehouse_name AS parent_warehouse_name,
-- ✅ 大仓(直接取小仓行里的父仓字段)
wh.parent_warehouse_code AS parent_warehouse_code,
wh.parent_warehouse_name AS parent_warehouse_name,
ct.team_name AS team_name
@@ -108,12 +108,8 @@
LEFT JOIN stock_in_type sit ON rr.operation_type = sit.type_code
LEFT JOIN stock_out_type sot ON rr.operation_type = sot.type_code
-- 小仓
LEFT JOIN warehouse_info wh ON rr.cangku = wh.warehouse_code
-- 大仓
LEFT JOIN warehouse_info pwh ON wh.parent_warehouse_code = pwh.warehouse_code
LEFT JOIN construction_team ct
ON rr.team_code = ct.team_code
AND ct.is_delete = '0'
@@ -670,6 +666,17 @@
AND is_delete = '0'
</select>
<select id="countPreOutRecordByBillNo"
parameterType="java.lang.String"
resultType="java.lang.Integer">
SELECT COUNT(1)
FROM rk_record
WHERE bill_no = #{billNo}
AND biz_type = '1' <!-- 仅统计出库记录 -->
AND exec_status = '0' <!-- 预出库 -->
AND is_delete = '0'
</select>
<update id="updateBorrowReturnRecordById">
UPDATE rk_record
SET