增加收货重

This commit is contained in:
wuweihua
2026-10-13 17:47:22 +08:00
parent 490f5dd213
commit 825663be01
10 changed files with 41 additions and 6 deletions
@@ -0,0 +1,16 @@
-- prc_order_bill.receive_weight from upstream TAB_ORDER.WEIGHT
SET NAMES utf8mb4;
SET @col := (
SELECT COLUMN_NAME FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'prc_order_bill'
AND COLUMN_NAME = 'receive_weight'
LIMIT 1
);
SET @sql := IF(
@col IS NULL,
'ALTER TABLE prc_order_bill ADD COLUMN receive_weight decimal(10,3) DEFAULT NULL COMMENT ''收货重KG(上游TAB_ORDER.WEIGHT)'' AFTER actual_weight',
'SELECT 1'
);
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;