增加收货重
This commit is contained in:
@@ -1004,6 +1004,7 @@ CREATE TABLE `prc_order_bill` (
|
||||
`customer_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '客户名称',
|
||||
`pieces` int(11) DEFAULT NULL COMMENT '件数',
|
||||
`actual_weight` decimal(10,3) DEFAULT NULL COMMENT '实际重量KG',
|
||||
`receive_weight` decimal(10,3) DEFAULT NULL COMMENT '收货重KG(上游TAB_ORDER.WEIGHT)',
|
||||
`volume` decimal(12,4) DEFAULT NULL COMMENT '体积m3',
|
||||
`volume_weight` decimal(10,3) DEFAULT NULL COMMENT '材积重KG',
|
||||
`pkg_length` decimal(10,2) DEFAULT NULL COMMENT '长CM',
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user