diff --git a/.changeset/dirty-tomatoes-grab.md b/.changeset/dirty-tomatoes-grab.md new file mode 100644 index 000000000..630efb812 --- /dev/null +++ b/.changeset/dirty-tomatoes-grab.md @@ -0,0 +1,5 @@ +--- +"@hera/plugin-rental": patch +--- + +二期出入库查询视图调整 diff --git a/packages/plugins/@hera/plugin-rental/src/server/sqls/view_records_contracts.sql b/packages/plugins/@hera/plugin-rental/src/server/sqls/view_records_contracts.sql index f57cbd7a4..9e3cd147d 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/sqls/view_records_contracts.sql +++ b/packages/plugins/@hera/plugin-rental/src/server/sqls/view_records_contracts.sql @@ -3,6 +3,8 @@ CREATE OR REPLACE VIEW SELECT c.id AS contract_id, r.id AS record_id, + r.createdAt, + r.updatedAt, CAST('c_' || rc.id AS VARCHAR) AS id, rc.id AS rc_id, -- 页面更新中间表存根联/回根联用 rc.movement, @@ -26,6 +28,8 @@ UNION ALL SELECT NULL AS contract_id, r.id AS record_id, + r.createdAt, + r.updatedAt, CAST('r_' || r.id AS VARCHAR) AS id, NULL AS rc_id, ( @@ -38,7 +42,7 @@ SELECT p3.id AS project_id, rc.has_receipt, rc.has_stub, - '2' AS record_category + '3' AS record_category FROM records r LEFT JOIN record_contract rc ON rc.record_id = r.id