BI大屏单表查询修改
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
-- =============================================================================
|
||||
-- 达梦 DM8:仓储运输(单表,可重复执行)
|
||||
-- 接口:GET /biReport/warehouseTransport
|
||||
-- 执行顺序:删除历史多表/旧快照 → 建 BI_WAREHOUSE_TRANSPORT_SNAPSHOT → 示例 INSERT
|
||||
-- PAYLOAD_JSON 与 WarehouseTransportSituationVO 字段名一致;应用取 UPDATE_TIME 最新一条。
|
||||
-- =============================================================================
|
||||
|
||||
DROP TABLE IF EXISTS BI_WTS_CUSTOMER_RANK;
|
||||
DROP TABLE IF EXISTS BI_WTS_TIME_SERIES;
|
||||
DROP TABLE IF EXISTS BI_WAREHOUSE_TRANSPORT_METRIC;
|
||||
DROP TABLE IF EXISTS BI_WAREHOUSE_TRANSPORT_SNAPSHOT;
|
||||
|
||||
CREATE TABLE BI_WAREHOUSE_TRANSPORT_SNAPSHOT (
|
||||
ID BIGINT IDENTITY(1,1) NOT NULL,
|
||||
PAYLOAD_JSON CLOB NOT NULL,
|
||||
CREATE_TIME DATETIME DEFAULT NULL,
|
||||
UPDATE_TIME DATETIME DEFAULT NULL,
|
||||
REMARK VARCHAR(500) DEFAULT NULL,
|
||||
PRIMARY KEY (ID)
|
||||
);
|
||||
CREATE INDEX IDX_BI_WTS_SNAP_UPD ON BI_WAREHOUSE_TRANSPORT_SNAPSHOT(UPDATE_TIME);
|
||||
COMMENT ON TABLE BI_WAREHOUSE_TRANSPORT_SNAPSHOT IS '仓储运输-整包 JSON 快照';
|
||||
|
||||
INSERT INTO BI_WAREHOUSE_TRANSPORT_SNAPSHOT (PAYLOAD_JSON, CREATE_TIME, UPDATE_TIME)
|
||||
VALUES (
|
||||
'{"warehouseDistributionOnTimeRate":99.2,"currentYearOrders":525440,"currentQuarterOrders":225120,"currentMonthOrders":23560,"warehouseOrderTrend":[100,93,85,70,98,88],"throughput":[10,14,23,10,13,19],"currentMonthTurnoverRate":3,"currentYearTurnoverRate":4,"inventoryTurnoverTrend":[10,14,23,22,13,17],"totalTransportIncome":5850,"orderCount":856,"transportTrips":533,"annualTransportVolume":15,"transportOrderTotal":4325,"crossBorderTransportOrder":2400,"domesticTransportOrder":2300,"transportTripsTrend":[100,140,230,100,130,192],"vehicleUtilizationRate":[600,460,350,470,450,620],"warehouseDockSyncRate":[100,98,87,78,97,86],"customerContributionRank":{"customerName":["客户A","客户B","客户C","客户D","客户E"],"customerAmount":[147,150,170,160,180]}}',
|
||||
SYSDATE,
|
||||
SYSDATE
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user