@newpeak/barista-cli 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +714 -0
- package/README.ja.md +708 -0
- package/README.md +68 -0
- package/README.vi.md +714 -0
- package/dist/commands/liberica/calendar/index.d.ts +3 -0
- package/dist/commands/liberica/calendar/index.d.ts.map +1 -0
- package/dist/commands/liberica/calendar/index.js +11 -0
- package/dist/commands/liberica/calendar/index.js.map +1 -0
- package/dist/commands/liberica/calendar/list.d.ts +3 -0
- package/dist/commands/liberica/calendar/list.d.ts.map +1 -0
- package/dist/commands/liberica/calendar/list.js +181 -0
- package/dist/commands/liberica/calendar/list.js.map +1 -0
- package/dist/commands/liberica/calendar/set.d.ts +3 -0
- package/dist/commands/liberica/calendar/set.d.ts.map +1 -0
- package/dist/commands/liberica/calendar/set.js +120 -0
- package/dist/commands/liberica/calendar/set.js.map +1 -0
- package/dist/commands/liberica/client-contacts/create.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/create.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/create.js +132 -0
- package/dist/commands/liberica/client-contacts/create.js.map +1 -0
- package/dist/commands/liberica/client-contacts/delete.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/delete.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/delete.js +139 -0
- package/dist/commands/liberica/client-contacts/delete.js.map +1 -0
- package/dist/commands/liberica/client-contacts/get.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/get.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/get.js +92 -0
- package/dist/commands/liberica/client-contacts/get.js.map +1 -0
- package/dist/commands/liberica/client-contacts/index.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/index.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/index.js +17 -0
- package/dist/commands/liberica/client-contacts/index.js.map +1 -0
- package/dist/commands/liberica/client-contacts/list.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/list.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/list.js +92 -0
- package/dist/commands/liberica/client-contacts/list.js.map +1 -0
- package/dist/commands/liberica/client-contacts/update.d.ts +3 -0
- package/dist/commands/liberica/client-contacts/update.d.ts.map +1 -0
- package/dist/commands/liberica/client-contacts/update.js +156 -0
- package/dist/commands/liberica/client-contacts/update.js.map +1 -0
- package/dist/commands/liberica/dict-types/get.d.ts +3 -0
- package/dist/commands/liberica/dict-types/get.d.ts.map +1 -0
- package/dist/commands/liberica/dict-types/get.js +62 -0
- package/dist/commands/liberica/dict-types/get.js.map +1 -0
- package/dist/commands/liberica/dict-types/index.d.ts +3 -0
- package/dist/commands/liberica/dict-types/index.d.ts.map +1 -0
- package/dist/commands/liberica/dict-types/index.js +13 -0
- package/dist/commands/liberica/dict-types/index.js.map +1 -0
- package/dist/commands/liberica/dict-types/list.d.ts +3 -0
- package/dist/commands/liberica/dict-types/list.d.ts.map +1 -0
- package/dist/commands/liberica/dict-types/list.js +91 -0
- package/dist/commands/liberica/dict-types/list.js.map +1 -0
- package/dist/commands/liberica/dict-types/update.d.ts +3 -0
- package/dist/commands/liberica/dict-types/update.d.ts.map +1 -0
- package/dist/commands/liberica/dict-types/update.js +127 -0
- package/dist/commands/liberica/dict-types/update.js.map +1 -0
- package/dist/commands/liberica/dicts/create.d.ts +3 -0
- package/dist/commands/liberica/dicts/create.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/create.js +157 -0
- package/dist/commands/liberica/dicts/create.js.map +1 -0
- package/dist/commands/liberica/dicts/delete.d.ts +3 -0
- package/dist/commands/liberica/dicts/delete.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/delete.js +106 -0
- package/dist/commands/liberica/dicts/delete.js.map +1 -0
- package/dist/commands/liberica/dicts/get.d.ts +3 -0
- package/dist/commands/liberica/dicts/get.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/get.js +69 -0
- package/dist/commands/liberica/dicts/get.js.map +1 -0
- package/dist/commands/liberica/dicts/index.d.ts +3 -0
- package/dist/commands/liberica/dicts/index.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/index.js +17 -0
- package/dist/commands/liberica/dicts/index.js.map +1 -0
- package/dist/commands/liberica/dicts/list.d.ts +3 -0
- package/dist/commands/liberica/dicts/list.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/list.js +88 -0
- package/dist/commands/liberica/dicts/list.js.map +1 -0
- package/dist/commands/liberica/dicts/update.d.ts +3 -0
- package/dist/commands/liberica/dicts/update.d.ts.map +1 -0
- package/dist/commands/liberica/dicts/update.js +112 -0
- package/dist/commands/liberica/dicts/update.js.map +1 -0
- package/dist/commands/liberica/index.d.ts.map +1 -1
- package/dist/commands/liberica/index.js +22 -0
- package/dist/commands/liberica/index.js.map +1 -1
- package/dist/commands/liberica/materials/create.d.ts.map +1 -1
- package/dist/commands/liberica/materials/create.js +35 -9
- package/dist/commands/liberica/materials/create.js.map +1 -1
- package/dist/commands/liberica/operations/active.d.ts +3 -0
- package/dist/commands/liberica/operations/active.d.ts.map +1 -0
- package/dist/commands/liberica/operations/active.js +152 -0
- package/dist/commands/liberica/operations/active.js.map +1 -0
- package/dist/commands/liberica/operations/batch-delete.d.ts +3 -0
- package/dist/commands/liberica/operations/batch-delete.d.ts.map +1 -0
- package/dist/commands/liberica/operations/batch-delete.js +130 -0
- package/dist/commands/liberica/operations/batch-delete.js.map +1 -0
- package/dist/commands/liberica/operations/copy.d.ts +3 -0
- package/dist/commands/liberica/operations/copy.d.ts.map +1 -0
- package/dist/commands/liberica/operations/copy.js +137 -0
- package/dist/commands/liberica/operations/copy.js.map +1 -0
- package/dist/commands/liberica/operations/create.d.ts +3 -0
- package/dist/commands/liberica/operations/create.d.ts.map +1 -0
- package/dist/commands/liberica/operations/create.js +212 -0
- package/dist/commands/liberica/operations/create.js.map +1 -0
- package/dist/commands/liberica/operations/deactive.d.ts +3 -0
- package/dist/commands/liberica/operations/deactive.d.ts.map +1 -0
- package/dist/commands/liberica/operations/deactive.js +152 -0
- package/dist/commands/liberica/operations/deactive.js.map +1 -0
- package/dist/commands/liberica/operations/delete.d.ts +3 -0
- package/dist/commands/liberica/operations/delete.d.ts.map +1 -0
- package/dist/commands/liberica/operations/delete.js +128 -0
- package/dist/commands/liberica/operations/delete.js.map +1 -0
- package/dist/commands/liberica/operations/get.d.ts +3 -0
- package/dist/commands/liberica/operations/get.d.ts.map +1 -0
- package/dist/commands/liberica/operations/get.js +93 -0
- package/dist/commands/liberica/operations/get.js.map +1 -0
- package/dist/commands/liberica/operations/index.d.ts +3 -0
- package/dist/commands/liberica/operations/index.d.ts.map +1 -0
- package/dist/commands/liberica/operations/index.js +25 -0
- package/dist/commands/liberica/operations/index.js.map +1 -0
- package/dist/commands/liberica/operations/list.d.ts +3 -0
- package/dist/commands/liberica/operations/list.d.ts.map +1 -0
- package/dist/commands/liberica/operations/list.js +141 -0
- package/dist/commands/liberica/operations/list.js.map +1 -0
- package/dist/commands/liberica/operations/update.d.ts +3 -0
- package/dist/commands/liberica/operations/update.d.ts.map +1 -0
- package/dist/commands/liberica/operations/update.js +208 -0
- package/dist/commands/liberica/operations/update.js.map +1 -0
- package/dist/commands/liberica/orgs/index.d.ts.map +1 -1
- package/dist/commands/liberica/orgs/index.js.map +1 -1
- package/dist/commands/liberica/stock/__tests__/ledger.test.d.ts +2 -0
- package/dist/commands/liberica/stock/__tests__/ledger.test.d.ts.map +1 -0
- package/dist/commands/liberica/stock/__tests__/ledger.test.js +41 -0
- package/dist/commands/liberica/stock/__tests__/ledger.test.js.map +1 -0
- package/dist/commands/liberica/stock/__tests__/list.test.d.ts +2 -0
- package/dist/commands/liberica/stock/__tests__/list.test.d.ts.map +1 -0
- package/dist/commands/liberica/stock/__tests__/list.test.js +39 -0
- package/dist/commands/liberica/stock/__tests__/list.test.js.map +1 -0
- package/dist/commands/liberica/stock/index.d.ts +3 -0
- package/dist/commands/liberica/stock/index.d.ts.map +1 -0
- package/dist/commands/liberica/stock/index.js +11 -0
- package/dist/commands/liberica/stock/index.js.map +1 -0
- package/dist/commands/liberica/stock/ledger.d.ts +3 -0
- package/dist/commands/liberica/stock/ledger.d.ts.map +1 -0
- package/dist/commands/liberica/stock/ledger.js +154 -0
- package/dist/commands/liberica/stock/ledger.js.map +1 -0
- package/dist/commands/liberica/stock/list.d.ts +3 -0
- package/dist/commands/liberica/stock/list.d.ts.map +1 -0
- package/dist/commands/liberica/stock/list.js +127 -0
- package/dist/commands/liberica/stock/list.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/create.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/create.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/create.js +129 -0
- package/dist/commands/liberica/supplier-contacts/create.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/delete.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/delete.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/delete.js +88 -0
- package/dist/commands/liberica/supplier-contacts/delete.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/get.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/get.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/get.js +84 -0
- package/dist/commands/liberica/supplier-contacts/get.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/index.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/index.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/index.js +17 -0
- package/dist/commands/liberica/supplier-contacts/index.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/list.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/list.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/list.js +98 -0
- package/dist/commands/liberica/supplier-contacts/list.js.map +1 -0
- package/dist/commands/liberica/supplier-contacts/update.d.ts +3 -0
- package/dist/commands/liberica/supplier-contacts/update.d.ts.map +1 -0
- package/dist/commands/liberica/supplier-contacts/update.js +136 -0
- package/dist/commands/liberica/supplier-contacts/update.js.map +1 -0
- package/dist/commands/liberica/users/create.d.ts.map +1 -1
- package/dist/commands/liberica/users/create.js +1 -0
- package/dist/commands/liberica/users/create.js.map +1 -1
- package/dist/commands/liberica/warehouses/create.d.ts +3 -0
- package/dist/commands/liberica/warehouses/create.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/create.js +196 -0
- package/dist/commands/liberica/warehouses/create.js.map +1 -0
- package/dist/commands/liberica/warehouses/delete.d.ts +3 -0
- package/dist/commands/liberica/warehouses/delete.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/delete.js +111 -0
- package/dist/commands/liberica/warehouses/delete.js.map +1 -0
- package/dist/commands/liberica/warehouses/disable.d.ts +3 -0
- package/dist/commands/liberica/warehouses/disable.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/disable.js +173 -0
- package/dist/commands/liberica/warehouses/disable.js.map +1 -0
- package/dist/commands/liberica/warehouses/enable.d.ts +3 -0
- package/dist/commands/liberica/warehouses/enable.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/enable.js +173 -0
- package/dist/commands/liberica/warehouses/enable.js.map +1 -0
- package/dist/commands/liberica/warehouses/get.d.ts +3 -0
- package/dist/commands/liberica/warehouses/get.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/get.js +90 -0
- package/dist/commands/liberica/warehouses/get.js.map +1 -0
- package/dist/commands/liberica/warehouses/index.d.ts +3 -0
- package/dist/commands/liberica/warehouses/index.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/index.js +23 -0
- package/dist/commands/liberica/warehouses/index.js.map +1 -0
- package/dist/commands/liberica/warehouses/list.d.ts +3 -0
- package/dist/commands/liberica/warehouses/list.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/list.js +101 -0
- package/dist/commands/liberica/warehouses/list.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/create.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/create.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/create.js +199 -0
- package/dist/commands/liberica/warehouses/locations/create.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/delete.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/delete.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/delete.js +115 -0
- package/dist/commands/liberica/warehouses/locations/delete.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/disable.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/disable.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/disable.js +173 -0
- package/dist/commands/liberica/warehouses/locations/disable.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/enable.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/enable.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/enable.js +173 -0
- package/dist/commands/liberica/warehouses/locations/enable.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/get.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/get.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/get.js +73 -0
- package/dist/commands/liberica/warehouses/locations/get.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/index.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/index.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/index.js +21 -0
- package/dist/commands/liberica/warehouses/locations/index.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/list.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/list.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/list.js +104 -0
- package/dist/commands/liberica/warehouses/locations/list.js.map +1 -0
- package/dist/commands/liberica/warehouses/locations/update.d.ts +3 -0
- package/dist/commands/liberica/warehouses/locations/update.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/locations/update.js +128 -0
- package/dist/commands/liberica/warehouses/locations/update.js.map +1 -0
- package/dist/commands/liberica/warehouses/update.d.ts +3 -0
- package/dist/commands/liberica/warehouses/update.d.ts.map +1 -0
- package/dist/commands/liberica/warehouses/update.js +143 -0
- package/dist/commands/liberica/warehouses/update.js.map +1 -0
- package/dist/core/api/client.d.ts +62 -0
- package/dist/core/api/client.d.ts.map +1 -1
- package/dist/core/api/client.js +1203 -104
- package/dist/core/api/client.js.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/types/calendar.d.ts +28 -0
- package/dist/types/calendar.d.ts.map +1 -0
- package/dist/types/calendar.js +2 -0
- package/dist/types/calendar.js.map +1 -0
- package/dist/types/client-contact.d.ts +65 -0
- package/dist/types/client-contact.d.ts.map +1 -0
- package/dist/types/client-contact.js +4 -0
- package/dist/types/client-contact.js.map +1 -0
- package/dist/types/dict.d.ts +97 -0
- package/dist/types/dict.d.ts.map +1 -0
- package/dist/types/dict.js +2 -0
- package/dist/types/dict.js.map +1 -0
- package/dist/types/index.d.ts +9 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/location.d.ts +53 -0
- package/dist/types/location.d.ts.map +1 -0
- package/dist/types/location.js +2 -0
- package/dist/types/location.js.map +1 -0
- package/dist/types/operation.d.ts +66 -0
- package/dist/types/operation.d.ts.map +1 -0
- package/dist/types/operation.js +2 -0
- package/dist/types/operation.js.map +1 -0
- package/dist/types/stock.d.ts +133 -0
- package/dist/types/stock.d.ts.map +1 -0
- package/dist/types/stock.js +3 -0
- package/dist/types/stock.js.map +1 -0
- package/dist/types/supplier-contact.d.ts +65 -0
- package/dist/types/supplier-contact.d.ts.map +1 -0
- package/dist/types/supplier-contact.js +4 -0
- package/dist/types/supplier-contact.js.map +1 -0
- package/dist/types/warehouse.d.ts +68 -0
- package/dist/types/warehouse.d.ts.map +1 -0
- package/dist/types/warehouse.js +2 -0
- package/dist/types/warehouse.js.map +1 -0
- package/docs/commands/REFERENCE.md +24 -4
- package/docs/commands/liberica/calendar/DESIGN.md +333 -0
- package/docs/commands/liberica/client-contacts/create.md +152 -0
- package/docs/commands/liberica/client-contacts/delete.md +123 -0
- package/docs/commands/liberica/client-contacts/get.md +133 -0
- package/docs/commands/liberica/client-contacts/list.md +143 -0
- package/docs/commands/liberica/client-contacts/update.md +158 -0
- package/docs/commands/liberica/locations/create.md +195 -0
- package/docs/commands/liberica/locations/list.md +171 -0
- package/docs/commands/liberica/stock/ledger.md +209 -0
- package/docs/commands/liberica/stock/list.md +165 -0
- package/docs/commands/liberica/supplier-contacts/create.md +152 -0
- package/docs/commands/liberica/supplier-contacts/delete.md +123 -0
- package/docs/commands/liberica/supplier-contacts/get.md +133 -0
- package/docs/commands/liberica/supplier-contacts/list.md +143 -0
- package/docs/commands/liberica/supplier-contacts/update.md +158 -0
- package/docs/commands/liberica/warehouses/create.md +222 -0
- package/docs/commands/liberica/warehouses/list.md +184 -0
- package/package.json +1 -1
- package/src/commands/liberica/calendar/index.ts +13 -0
- package/src/commands/liberica/calendar/list.ts +214 -0
- package/src/commands/liberica/calendar/set.ts +130 -0
- package/src/commands/liberica/client-contacts/create.ts +115 -0
- package/src/commands/liberica/client-contacts/delete.ts +140 -0
- package/src/commands/liberica/client-contacts/get.ts +103 -0
- package/src/commands/liberica/client-contacts/index.ts +19 -0
- package/src/commands/liberica/client-contacts/list.ts +118 -0
- package/src/commands/liberica/client-contacts/update.ts +137 -0
- package/src/commands/liberica/dict-types/get.ts +74 -0
- package/src/commands/liberica/dict-types/index.ts +15 -0
- package/src/commands/liberica/dict-types/list.ts +118 -0
- package/src/commands/liberica/dict-types/update.ts +134 -0
- package/src/commands/liberica/dicts/create.ts +175 -0
- package/src/commands/liberica/dicts/delete.ts +107 -0
- package/src/commands/liberica/dicts/get.ts +80 -0
- package/src/commands/liberica/dicts/index.ts +19 -0
- package/src/commands/liberica/dicts/list.ts +114 -0
- package/src/commands/liberica/dicts/update.ts +116 -0
- package/src/commands/liberica/index.ts +22 -0
- package/src/commands/liberica/materials/create.ts +32 -9
- package/src/commands/liberica/operations/active.ts +153 -0
- package/src/commands/liberica/operations/batch-delete.ts +131 -0
- package/src/commands/liberica/operations/copy.ts +138 -0
- package/src/commands/liberica/operations/create.ts +223 -0
- package/src/commands/liberica/operations/deactive.ts +152 -0
- package/src/commands/liberica/operations/delete.ts +128 -0
- package/src/commands/liberica/operations/design.md +587 -0
- package/src/commands/liberica/operations/get.ts +112 -0
- package/src/commands/liberica/operations/index.ts +27 -0
- package/src/commands/liberica/operations/list.ts +180 -0
- package/src/commands/liberica/operations/update.ts +218 -0
- package/src/commands/liberica/orgs/index.ts +0 -1
- package/src/commands/liberica/stock/index.ts +13 -0
- package/src/commands/liberica/stock/ledger.ts +159 -0
- package/src/commands/liberica/stock/list.ts +128 -0
- package/src/commands/liberica/supplier-contacts/create.ts +120 -0
- package/src/commands/liberica/supplier-contacts/delete.ts +88 -0
- package/src/commands/liberica/supplier-contacts/get.ts +94 -0
- package/src/commands/liberica/supplier-contacts/index.ts +19 -0
- package/src/commands/liberica/supplier-contacts/list.ts +130 -0
- package/src/commands/liberica/supplier-contacts/update.ts +127 -0
- package/src/commands/liberica/users/create.ts +1 -0
- package/src/commands/liberica/warehouses/create.ts +204 -0
- package/src/commands/liberica/warehouses/delete.ts +112 -0
- package/src/commands/liberica/warehouses/disable.ts +174 -0
- package/src/commands/liberica/warehouses/enable.ts +174 -0
- package/src/commands/liberica/warehouses/get.ts +101 -0
- package/src/commands/liberica/warehouses/index.ts +25 -0
- package/src/commands/liberica/warehouses/list.ts +136 -0
- package/src/commands/liberica/warehouses/locations/create.ts +209 -0
- package/src/commands/liberica/warehouses/locations/delete.ts +116 -0
- package/src/commands/liberica/warehouses/locations/disable.ts +174 -0
- package/src/commands/liberica/warehouses/locations/enable.ts +174 -0
- package/src/commands/liberica/warehouses/locations/get.ts +84 -0
- package/src/commands/liberica/warehouses/locations/index.ts +23 -0
- package/src/commands/liberica/warehouses/locations/list.ts +140 -0
- package/src/commands/liberica/warehouses/locations/update.ts +135 -0
- package/src/commands/liberica/warehouses/update.ts +142 -0
- package/src/core/api/client.ts +1493 -78
- package/src/index.ts +1 -3
- package/src/types/calendar.ts +36 -0
- package/src/types/client-contact.ts +78 -0
- package/src/types/dict.ts +121 -0
- package/src/types/index.ts +9 -4
- package/src/types/location.ts +66 -0
- package/src/types/operation.ts +72 -0
- package/src/types/stock.ts +161 -0
- package/src/types/supplier-contact.ts +78 -0
- package/src/types/warehouse.ts +82 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# barista liberica locations list
|
|
2
|
+
|
|
3
|
+
List warehouse locations with pagination.
|
|
4
|
+
|
|
5
|
+
## 2.1 Command Metadata
|
|
6
|
+
|
|
7
|
+
| Field | Value |
|
|
8
|
+
|------|-----|
|
|
9
|
+
| Full Command | `barista liberica locations list` |
|
|
10
|
+
| Description | List warehouse locations with pagination |
|
|
11
|
+
| HTTP Method | GET |
|
|
12
|
+
| Requires Authentication | Yes |
|
|
13
|
+
| Supports Dry-Run | No |
|
|
14
|
+
|
|
15
|
+
## 2.2 Backend API Reference
|
|
16
|
+
|
|
17
|
+
### Controller Location
|
|
18
|
+
```
|
|
19
|
+
coffee-liberica-end/
|
|
20
|
+
└── facade/liberica-facade-enterprise/
|
|
21
|
+
└── src/main/java/com/newpeak/liberica/facade/enterprise/controller/stock/
|
|
22
|
+
└── EnterpriseWarehouseLocationController.java
|
|
23
|
+
└── page(@GetResource(path = "/page"))
|
|
24
|
+
└── public ResponseData<PageResult<MasterWarehouseLocationResponse>> page(
|
|
25
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
26
|
+
@ParameterObject MasterWarehouseLocationRequest masterWarehouseLocationRequest
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Request DTO Location
|
|
31
|
+
```
|
|
32
|
+
coffee-liberica-end/
|
|
33
|
+
└── business/liberica-business-master/master-api/
|
|
34
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/request/
|
|
35
|
+
└── MasterWarehouseLocationRequest.java
|
|
36
|
+
├── warehouseId: Long
|
|
37
|
+
├── warehouseLocationCode: String
|
|
38
|
+
├── warehouseLocationName: String
|
|
39
|
+
├── statusFlag: Integer
|
|
40
|
+
└── remark: String
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Response DTO Location
|
|
44
|
+
```
|
|
45
|
+
coffee-liberica-end/
|
|
46
|
+
└── business/liberica-business-master/master-api/
|
|
47
|
+
└── src/main/java/com/newpeak/liberica/master/api/pojo/response/
|
|
48
|
+
└── MasterWarehouseLocationResponse.java
|
|
49
|
+
├── warehouseLocationId: Long
|
|
50
|
+
├── warehouseId: Long
|
|
51
|
+
├── warehouseLocationCode: String
|
|
52
|
+
├── warehouseLocationName: String
|
|
53
|
+
├── statusFlag: Integer (1=enable, 2=disable)
|
|
54
|
+
└── remark: String
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 2.3 CLI Parameter Design
|
|
58
|
+
|
|
59
|
+
### Command Structure
|
|
60
|
+
```
|
|
61
|
+
barista liberica locations list [options]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Global Options
|
|
65
|
+
| Option | Type | Description |
|
|
66
|
+
|------|------|------|
|
|
67
|
+
| `--env` | string | Target environment (dev\|test\|prod-cn\|prod-jp) |
|
|
68
|
+
| `--tenant` | string | Tenant code |
|
|
69
|
+
| `--json` | boolean | JSON output |
|
|
70
|
+
|
|
71
|
+
### Command Options
|
|
72
|
+
| Option | Short | Type | Required | Default | Description | Maps to Query Param |
|
|
73
|
+
|------|--------|------|------|--------|------|-------------|
|
|
74
|
+
| --page | -p | number | No | 1 | Page number (CLI 1-based) | pageNo (0-based) |
|
|
75
|
+
| --size | -s | number | No | 20 | Page size | pageSize |
|
|
76
|
+
| --warehouse-id | -w | string | No | - | Filter by parent warehouse ID | warehouseId |
|
|
77
|
+
| --status | — | number | No | - | Status filter (1=enable, 2=disable) | statusFlag |
|
|
78
|
+
| --keyword | -k | string | No | - | Keyword search (warehouseLocationName and warehouseLocationCode) | warehouseLocationName / warehouseLocationCode |
|
|
79
|
+
|
|
80
|
+
## 2.4 Field Mapping Table
|
|
81
|
+
|
|
82
|
+
| CLI Parameter | Query Param / DTO Field | Type Conversion | Validation Rule |
|
|
83
|
+
|---------|---------|----------|----------|
|
|
84
|
+
| --page / -p | pageNo | number, CLI page - 1 | >= 0 |
|
|
85
|
+
| --size / -s | pageSize | number | > 0 |
|
|
86
|
+
| --warehouse-id / -w | warehouseId | string | - |
|
|
87
|
+
| --status | statusFlag | number | 1 or 2 |
|
|
88
|
+
| --keyword / -k | warehouseLocationName / warehouseLocationCode | Direct | max=255 |
|
|
89
|
+
|
|
90
|
+
## 2.5 Error Code Reference
|
|
91
|
+
|
|
92
|
+
### ExceptionEnum Location
|
|
93
|
+
```
|
|
94
|
+
coffee-liberica-end/
|
|
95
|
+
└── business/liberica-business-master/master-api/
|
|
96
|
+
└── src/main/java/com/newpeak/liberica/master/api/exception/enums/
|
|
97
|
+
└── MasterWarehouseLocationExceptionEnum.java
|
|
98
|
+
├── MASTER_WAREHOUSE_LOCATION_NOT_EXIST("01001380001", "租户仓位不存在")
|
|
99
|
+
├── MASTER_WAREHOUSE_LOCATION_CODE_FORMAT_CANNOT_EMPTY("01001380002", "仓位编码规则不能为空")
|
|
100
|
+
└── MASTER_WAREHOUSE_LOCATION_CODE_FORMAT_NOT_CORRECT("01001380003", "仓位编码规则格式不正确")
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Known Error Codes
|
|
104
|
+
| Error Code | Error Message | Trigger Condition |
|
|
105
|
+
|--------|----------|----------|
|
|
106
|
+
| 01001380001 | Location does not exist | Detail query with non-existent ID |
|
|
107
|
+
|
|
108
|
+
## 2.6 Permission Check
|
|
109
|
+
|
|
110
|
+
| Check Item | Location | Description |
|
|
111
|
+
|--------|------|------|
|
|
112
|
+
| Page Query | No specific permission code on `@GetResource(path = "/page")` | Available to authenticated users |
|
|
113
|
+
|
|
114
|
+
## 2.7 Implementation Notes
|
|
115
|
+
|
|
116
|
+
1. **Pagination**: CLI uses 1-based page numbers. API uses 0-based. Convert: `pageNo = options.page - 1`.
|
|
117
|
+
2. **Response Fields**: Backend returns `rows`, `pageNo`, `pageSize`, `totalRows`. Do NOT use `records` or `total`.
|
|
118
|
+
3. **Warehouse Filter**: `--warehouse-id` is optional but commonly used to list locations within a specific warehouse.
|
|
119
|
+
4. **Keyword Search**: When `--keyword` is provided, send it as both `warehouseLocationName` and `warehouseLocationCode` query params.
|
|
120
|
+
5. **BigInteger IDs**: `warehouseLocationId` and `warehouseId` in response rows must be kept as `string` in TypeScript.
|
|
121
|
+
6. **Table Output**: Default columns: Location ID, Warehouse ID, Code, Name, Status.
|
|
122
|
+
7. **JSON Output**: When `--json` is used, wrap response with standardized pagination object.
|
|
123
|
+
|
|
124
|
+
## 2.8 Example Usage
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# List all locations (first page, 20 per page)
|
|
128
|
+
barista liberica locations list
|
|
129
|
+
|
|
130
|
+
# List locations for a specific warehouse
|
|
131
|
+
barista liberica locations list --warehouse-id "1234567890123456789"
|
|
132
|
+
|
|
133
|
+
# List with pagination
|
|
134
|
+
barista liberica locations list --warehouse-id "1234567890123456789" --page 2 --size 50
|
|
135
|
+
|
|
136
|
+
# Filter by status
|
|
137
|
+
barista liberica locations list --status 1
|
|
138
|
+
|
|
139
|
+
# Keyword search
|
|
140
|
+
barista liberica locations list --keyword "A-01"
|
|
141
|
+
|
|
142
|
+
# JSON output
|
|
143
|
+
barista liberica locations list --json
|
|
144
|
+
|
|
145
|
+
# Combine filters
|
|
146
|
+
barista liberica locations list \
|
|
147
|
+
--warehouse-id "1234567890123456789" \
|
|
148
|
+
--page 1 \
|
|
149
|
+
--size 10 \
|
|
150
|
+
--status 1 \
|
|
151
|
+
--keyword "Shelf" \
|
|
152
|
+
--json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## 2.9 API Path
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
GET /api/enterprise/purchases/warehouse/location/page
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Query Parameters:**
|
|
162
|
+
```
|
|
163
|
+
?pageNo=0&pageSize=20&warehouseId=1234567890123456789&statusFlag=1&warehouseLocationCode=Shelf&warehouseLocationName=Shelf
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Headers:**
|
|
167
|
+
```
|
|
168
|
+
Authorization: <token> (No "Bearer " prefix)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Note**: Do NOT include `X-TENANT-ID` header. Tenant is extracted from JWT token.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# 命令名称: barista liberica stock ledger
|
|
2
|
+
|
|
3
|
+
## 2.1 命令元数据
|
|
4
|
+
|
|
5
|
+
| 字段 | 值 |
|
|
6
|
+
|------|-----|
|
|
7
|
+
| 完整命令 | `barista liberica stock ledger` |
|
|
8
|
+
| 功能描述 | 查询出入库台账(分页列表+汇总) |
|
|
9
|
+
| HTTP方法 | GET |
|
|
10
|
+
| 是否需要认证 | 是 |
|
|
11
|
+
| 是否支持dry-run | 否 |
|
|
12
|
+
|
|
13
|
+
## 2.2 后端接口引用
|
|
14
|
+
|
|
15
|
+
### Controller位置
|
|
16
|
+
```
|
|
17
|
+
coffee-liberica-end/
|
|
18
|
+
└── facade/liberica-facade-enterprise/
|
|
19
|
+
└── src/main/java/com/newpeak/liberica/facade/enterprise/controller/master/
|
|
20
|
+
└── MasterStockController.java
|
|
21
|
+
├── commonStockJourneyPage(@GetResource(path = "/journey/page"))
|
|
22
|
+
│ └── public ResponseData<PageResult<StockJourneyResponse>> commonStockJourneyPage(
|
|
23
|
+
│ @RequestHeader("X-TENANT-ID") Long tenantId,
|
|
24
|
+
│ @ParameterObject StockJourneyQueryRequest stockJourneyQueryRequest
|
|
25
|
+
│ )
|
|
26
|
+
└── commonStockJourneyPageSummary(@GetResource(path = "/journey/page/summary"))
|
|
27
|
+
└── public ResponseData<StockJourneySummaryResponse> commonStockJourneyPageSummary(
|
|
28
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
29
|
+
@ParameterObject StockJourneyQueryRequest stockJourneyQueryRequest
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Request DTO位置
|
|
34
|
+
```
|
|
35
|
+
coffee-liberica-end/
|
|
36
|
+
└── business/liberica-business-stock/stock-api/
|
|
37
|
+
└── src/main/java/com/newpeak/liberica/stock/api/pojo/request/
|
|
38
|
+
└── StockJourneyQueryRequest.java
|
|
39
|
+
├── stockId: Long
|
|
40
|
+
├── stockFormCode: String
|
|
41
|
+
├── stockType: String
|
|
42
|
+
├── stockFlag: String
|
|
43
|
+
├── warehouseCode: String
|
|
44
|
+
├── materialCode: String
|
|
45
|
+
├── materialName: String
|
|
46
|
+
├── materialType: String
|
|
47
|
+
├── color: String
|
|
48
|
+
├── lotNo: String
|
|
49
|
+
├── lotCode: String
|
|
50
|
+
├── sourceType: String
|
|
51
|
+
├── sourceCode: String
|
|
52
|
+
├── stockDate: Date
|
|
53
|
+
├── stockDateCriteria: DateRange
|
|
54
|
+
└── postingMonth: Date
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Response DTO位置
|
|
58
|
+
|
|
59
|
+
**列表项 DTO:**
|
|
60
|
+
```
|
|
61
|
+
coffee-liberica-end/
|
|
62
|
+
└── business/liberica-business-stock/stock-api/
|
|
63
|
+
└── src/main/java/com/newpeak/liberica/stock/api/pojo/response/
|
|
64
|
+
└── StockJourneyResponse.java
|
|
65
|
+
├── stockId: Long
|
|
66
|
+
├── stockFormCode: String
|
|
67
|
+
├── stockType: String
|
|
68
|
+
├── stockFlag: String
|
|
69
|
+
├── warehouseCode: String
|
|
70
|
+
├── materialCode: String
|
|
71
|
+
├── materialNo: String
|
|
72
|
+
├── materialName: String
|
|
73
|
+
├── materialType: String
|
|
74
|
+
├── color: String
|
|
75
|
+
├── longX: BigDecimal
|
|
76
|
+
├── wideY: BigDecimal
|
|
77
|
+
├── highZ: BigDecimal
|
|
78
|
+
├── sourceCode: String
|
|
79
|
+
├── sourceType: String
|
|
80
|
+
├── lotCode: String
|
|
81
|
+
├── lotNo: String
|
|
82
|
+
├── supplierLotNo: String
|
|
83
|
+
├── inboundCount: BigDecimal
|
|
84
|
+
├── outboundCount: BigDecimal
|
|
85
|
+
├── materialUomCode: String
|
|
86
|
+
├── unitPrice: BigDecimal
|
|
87
|
+
├── localCurrency: String
|
|
88
|
+
├── inboundAmount: BigDecimal
|
|
89
|
+
├── outboundAmount: BigDecimal
|
|
90
|
+
├── inboundDate: Date
|
|
91
|
+
├── stockDate: Date
|
|
92
|
+
├── outboundDate: Date
|
|
93
|
+
├── postingMonth: Date
|
|
94
|
+
└── remark: String
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**汇总 DTO:**
|
|
98
|
+
```
|
|
99
|
+
coffee-liberica-end/
|
|
100
|
+
└── business/liberica-business-stock/stock-api/
|
|
101
|
+
└── src/main/java/com/newpeak/liberica/stock/api/pojo/response/
|
|
102
|
+
└── StockJourneySummaryResponse.java
|
|
103
|
+
├── totalInboundCount: BigDecimal
|
|
104
|
+
├── totalOutboundCount: BigDecimal
|
|
105
|
+
├── totalInboundAmount: BigDecimal
|
|
106
|
+
└── totalOutboundAmount: BigDecimal
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## 2.3 CLI参数设计
|
|
110
|
+
|
|
111
|
+
### 命令结构
|
|
112
|
+
```bash
|
|
113
|
+
barista liberica stock ledger [options]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 全局选项
|
|
117
|
+
| 选项 | 类型 | 说明 |
|
|
118
|
+
|------|------|------|
|
|
119
|
+
| `--env` | string | 目标环境(dev/test/prod-cn/prod-jp) |
|
|
120
|
+
| `--tenant` | string | 租户代码(仅Liberica) |
|
|
121
|
+
| `--dry-run` | boolean | 预览模式 |
|
|
122
|
+
| `--json` | boolean | JSON输出 |
|
|
123
|
+
|
|
124
|
+
### 命令选项
|
|
125
|
+
| 选项 | 短选项 | 类型 | 必填 | 默认值 | 说明 | 对应DTO字段 |
|
|
126
|
+
|------|--------|------|------|--------|------|-------------|
|
|
127
|
+
| `--stock-id` | | string | 否 | - | 出入库ID | stockId |
|
|
128
|
+
| `--stock-form-code` | | string | 否 | - | 出入库单编码 | stockFormCode |
|
|
129
|
+
| `--stock-type` | | string | 否 | - | 出入库单类型 | stockType |
|
|
130
|
+
| `--stock-flag` | | string | 否 | - | 出入库标志(inbound/outbound) | stockFlag |
|
|
131
|
+
| `--warehouse-code` | -w | string | 否 | - | 仓库编码 | warehouseCode |
|
|
132
|
+
| `--material-code` | -m | string | 否 | - | 物料编码 | materialCode |
|
|
133
|
+
| `--material-name` | | string | 否 | - | 物料名称(支持模糊查询) | materialName |
|
|
134
|
+
| `--material-type` | -t | string | 否 | - | 物料规格 | materialType |
|
|
135
|
+
| `--color` | -c | string | 否 | - | 颜色 | color |
|
|
136
|
+
| `--lot-no` | -l | string | 否 | - | 批次号 | lotNo |
|
|
137
|
+
| `--lot-code` | | string | 否 | - | 系统批次号 | lotCode |
|
|
138
|
+
| `--source-type` | | string | 否 | - | 源单类型 | sourceType |
|
|
139
|
+
| `--source-code` | | string | 否 | - | 源单编码 | sourceCode |
|
|
140
|
+
| `--start-date` | | string | 否 | - | 出入库开始日期(YYYY-MM-DD) | stockDateCriteria.startDate |
|
|
141
|
+
| `--end-date` | | string | 否 | - | 出入库结束日期(YYYY-MM-DD) | stockDateCriteria.endDate |
|
|
142
|
+
| `--posting-month` | | string | 否 | - | 记账年月(YYYY-MM) | postingMonth |
|
|
143
|
+
| `--summary` | | boolean | 否 | false | 仅显示汇总数据 | 控制输出模式 |
|
|
144
|
+
| `--page` | -p | number | 否 | 1 | 页码 | pageNo |
|
|
145
|
+
| `--size` | -s | number | 否 | 20 | 每页条数 | pageSize |
|
|
146
|
+
|
|
147
|
+
## 2.4 字段映射表
|
|
148
|
+
|
|
149
|
+
| CLI参数 | DTO字段 | 类型转换 | 验证规则 |
|
|
150
|
+
|---------|---------|----------|----------|
|
|
151
|
+
| --stock-id | stockId | string→Long | 后端BigInteger,CLI使用string |
|
|
152
|
+
| --stock-form-code | stockFormCode | 直接传递 | - |
|
|
153
|
+
| --stock-type | stockType | 直接传递 | enum: STOCK_TYPE |
|
|
154
|
+
| --stock-flag | stockFlag | 直接传递 | enum: STOCK_FLAG |
|
|
155
|
+
| --warehouse-code | warehouseCode | 直接传递 | - |
|
|
156
|
+
| --material-code | materialCode | 直接传递 | - |
|
|
157
|
+
| --material-name | materialName | 直接传递 | - |
|
|
158
|
+
| --material-type | materialType | 直接传递 | - |
|
|
159
|
+
| --color | color | 直接传递 | - |
|
|
160
|
+
| --lot-no | lotNo | 直接传递 | - |
|
|
161
|
+
| --lot-code | lotCode | 直接传递 | - |
|
|
162
|
+
| --source-type | sourceType | 直接传递 | enum: source_type |
|
|
163
|
+
| --source-code | sourceCode | 直接传递 | - |
|
|
164
|
+
| --start-date | stockDateCriteria.startDate | string→Date | yyyy-MM-dd |
|
|
165
|
+
| --end-date | stockDateCriteria.endDate | string→Date | yyyy-MM-dd |
|
|
166
|
+
| --posting-month | postingMonth | string→Date | yyyy-MM |
|
|
167
|
+
| --page | pageNo | number-1 | 0-based分页 |
|
|
168
|
+
| --size | pageSize | number | >0 |
|
|
169
|
+
|
|
170
|
+
## 2.5 错误码引用
|
|
171
|
+
|
|
172
|
+
### ExceptionEnum位置
|
|
173
|
+
```
|
|
174
|
+
coffee-liberica-end/
|
|
175
|
+
└── business/liberica-business-stock/stock-api/
|
|
176
|
+
└── src/main/java/com/newpeak/liberica/stock/api/exception/enums/
|
|
177
|
+
├── StockJourneyExceptionEnum.java
|
|
178
|
+
│ ├── STOCK_JOURNEY_NOT_EXIST("...001", "租户出入库台账不存在")
|
|
179
|
+
│ └── CAN_NOT_DELETE_MATERIAL_WITH_USED_IN_STOCK("...002", "物料已在库存中使用,不能删除")
|
|
180
|
+
├── MasterStockExceptionEnum.java
|
|
181
|
+
│ ├── MASTER_STOCK_NOT_EXIST("...001", "租户库存不存在")
|
|
182
|
+
│ └── MASTER_STOCK_OUT_LOT_NOT_ENOUGH("...002", "租户成品出库单{}余量不够")
|
|
183
|
+
└── MasterWarehouseStockExceptionEnum.java
|
|
184
|
+
└── MASTER_WAREHOUSE_STOCK_NOT_EXIST("...001", "租户仓库库存不存在")
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### 已知错误码示例
|
|
188
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
189
|
+
|--------|----------|----------|
|
|
190
|
+
| ...001 | 租户出入库台账不存在 | 查询的台账记录不存在 |
|
|
191
|
+
| ...001 | 租户库存不存在 | 查询的库存记录不存在 |
|
|
192
|
+
| ...002 | 租户成品出库单{}余量不够 | 出库操作余量不足 |
|
|
193
|
+
|
|
194
|
+
## 2.6 权限检查
|
|
195
|
+
|
|
196
|
+
| 检查项 | 位置 | 说明 |
|
|
197
|
+
|--------|------|------|
|
|
198
|
+
| 菜单权限 | `MasterStockController` 类上的 `@Menu` 注解 | `stock_journey` 菜单,要求 `tenantStock` 角色 |
|
|
199
|
+
| 接口访问 | Controller方法无单独 `@GetResource(requiredPermission = true)` | 通过菜单角色控制 |
|
|
200
|
+
|
|
201
|
+
## 2.7 实现要点
|
|
202
|
+
|
|
203
|
+
1. **双接口调用**:默认模式同时调用 `/journey/page/summary` 和 `/journey/page`,先显示汇总再显示列表
|
|
204
|
+
2. **Summary模式**:当传入 `--summary` 时,仅调用 `/journey/page/summary`,不请求列表数据
|
|
205
|
+
3. **分页转换**:CLI page 1 对应 API pageNo 0
|
|
206
|
+
4. **ID类型**:stockId 后端为 Long/BigInteger,CLI 统一使用 string 类型避免精度丢失
|
|
207
|
+
5. **日期格式**:--posting-month 使用 yyyy-MM 格式,转换为 Date 类型
|
|
208
|
+
6. **stockFlag映射**:inbound 对应入库记录,outbound 对应出库记录;后端 StockJourneyResponse 根据 inboundCount 是否为空自动推断 stockFlag
|
|
209
|
+
7. **输出格式**:默认表格输出,--json 返回结构化 JSON;汇总数据和列表数据在 JSON 中分层返回
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# 命令名称: barista liberica stock list
|
|
2
|
+
|
|
3
|
+
## 2.1 命令元数据
|
|
4
|
+
|
|
5
|
+
| 字段 | 值 |
|
|
6
|
+
|------|-----|
|
|
7
|
+
| 完整命令 | `barista liberica stock list` |
|
|
8
|
+
| 功能描述 | 查询带仓库的库存列表(分页) |
|
|
9
|
+
| HTTP方法 | GET |
|
|
10
|
+
| 是否需要认证 | 是 |
|
|
11
|
+
| 是否支持dry-run | 否 |
|
|
12
|
+
|
|
13
|
+
## 2.2 后端接口引用
|
|
14
|
+
|
|
15
|
+
### Controller位置
|
|
16
|
+
```
|
|
17
|
+
coffee-liberica-end/
|
|
18
|
+
└── facade/liberica-facade-enterprise/
|
|
19
|
+
└── src/main/java/com/newpeak/liberica/facade/enterprise/controller/master/
|
|
20
|
+
└── MasterStockController.java
|
|
21
|
+
└── commonStockWithWarehousePage(@GetResource(path = "/page/withWarehouse"))
|
|
22
|
+
└── public ResponseData<PageResult<MasterWarehouseStockResponse>> commonStockWithWarehousePage(
|
|
23
|
+
@RequestHeader("X-TENANT-ID") Long tenantId,
|
|
24
|
+
@ParameterObject MasterStockQueryRequest masterStockQueryRequest
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Request DTO位置
|
|
29
|
+
```
|
|
30
|
+
coffee-liberica-end/
|
|
31
|
+
└── business/liberica-business-stock/stock-api/
|
|
32
|
+
└── src/main/java/com/newpeak/liberica/stock/api/pojo/request/
|
|
33
|
+
└── MasterStockQueryRequest.java
|
|
34
|
+
├── warehouseCode: String
|
|
35
|
+
├── materialCode: String
|
|
36
|
+
├── materialNo: String
|
|
37
|
+
├── materialName: String
|
|
38
|
+
├── materialType: String
|
|
39
|
+
├── lotNo: String
|
|
40
|
+
├── color: String
|
|
41
|
+
├── longX: BigDecimal
|
|
42
|
+
├── wideY: BigDecimal
|
|
43
|
+
├── highZ: BigDecimal
|
|
44
|
+
├── sourceType: String
|
|
45
|
+
├── sourceCode: String
|
|
46
|
+
├── stockId: Long
|
|
47
|
+
├── excludeZeroStock: boolean (default = false)
|
|
48
|
+
└── stockDateCriteria: DateRange
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Response DTO位置
|
|
52
|
+
```
|
|
53
|
+
coffee-liberica-end/
|
|
54
|
+
└── business/liberica-business-stock/stock-api/
|
|
55
|
+
└── src/main/java/com/newpeak/liberica/stock/api/pojo/response/
|
|
56
|
+
└── MasterWarehouseStockResponse.java
|
|
57
|
+
├── warehouseCode: String
|
|
58
|
+
├── materialCode: String
|
|
59
|
+
├── materialName: String
|
|
60
|
+
├── materialType: String
|
|
61
|
+
├── color: String
|
|
62
|
+
├── stockCount: BigDecimal
|
|
63
|
+
├── unitPrice: BigDecimal
|
|
64
|
+
├── stockAmount: BigDecimal
|
|
65
|
+
└── lastStockDate: Date
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## 2.3 CLI参数设计
|
|
69
|
+
|
|
70
|
+
### 命令结构
|
|
71
|
+
```bash
|
|
72
|
+
barista liberica stock list [options]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 全局选项
|
|
76
|
+
| 选项 | 类型 | 说明 |
|
|
77
|
+
|------|------|------|
|
|
78
|
+
| `--env` | string | 目标环境(dev/test/prod-cn/prod-jp) |
|
|
79
|
+
| `--tenant` | string | 租户代码(仅Liberica) |
|
|
80
|
+
| `--dry-run` | boolean | 预览模式 |
|
|
81
|
+
| `--json` | boolean | JSON输出 |
|
|
82
|
+
|
|
83
|
+
### 命令选项
|
|
84
|
+
| 选项 | 短选项 | 类型 | 必填 | 默认值 | 说明 | 对应DTO字段 |
|
|
85
|
+
|------|--------|------|------|--------|------|-------------|
|
|
86
|
+
| `--warehouse-code` | -w | string | 否 | - | 仓库编码 | warehouseCode |
|
|
87
|
+
| `--material-code` | -m | string | 否 | - | 物料编码 | materialCode |
|
|
88
|
+
| `--material-no` | -n | string | 否 | - | 物料号码 | materialNo |
|
|
89
|
+
| `--material-name` | | string | 否 | - | 物料名称(支持模糊查询) | materialName |
|
|
90
|
+
| `--material-type` | -t | string | 否 | - | 规格型号 | materialType |
|
|
91
|
+
| `--lot-no` | -l | string | 否 | - | 批次号 | lotNo |
|
|
92
|
+
| `--color` | -c | string | 否 | - | 颜色 | color |
|
|
93
|
+
| `--long-x` | | number | 否 | - | 长 | longX |
|
|
94
|
+
| `--wide-y` | | number | 否 | - | 宽 | wideY |
|
|
95
|
+
| `--high-z` | | number | 否 | - | 高 | highZ |
|
|
96
|
+
| `--source-type` | | string | 否 | - | 源单类型 | sourceType |
|
|
97
|
+
| `--source-code` | | string | 否 | - | 源单编码 | sourceCode |
|
|
98
|
+
| `--stock-id` | | string | 否 | - | 库存ID | stockId |
|
|
99
|
+
| `--exclude-zero-stock` | | boolean | 否 | false | 不包含零库存 | excludeZeroStock |
|
|
100
|
+
| `--start-date` | | string | 否 | - | 出入库开始日期(YYYY-MM-DD) | stockDateCriteria.startDate |
|
|
101
|
+
| `--end-date` | | string | 否 | - | 出入库结束日期(YYYY-MM-DD) | stockDateCriteria.endDate |
|
|
102
|
+
| `--page` | -p | number | 否 | 1 | 页码 | pageNo |
|
|
103
|
+
| `--size` | -s | number | 否 | 20 | 每页条数 | pageSize |
|
|
104
|
+
|
|
105
|
+
## 2.4 字段映射表
|
|
106
|
+
|
|
107
|
+
| CLI参数 | DTO字段 | 类型转换 | 验证规则 |
|
|
108
|
+
|---------|---------|----------|----------|
|
|
109
|
+
| --warehouse-code | warehouseCode | 直接传递 | - |
|
|
110
|
+
| --material-code | materialCode | 直接传递 | - |
|
|
111
|
+
| --material-no | materialNo | 直接传递 | - |
|
|
112
|
+
| --material-name | materialName | 直接传递 | - |
|
|
113
|
+
| --material-type | materialType | 直接传递 | - |
|
|
114
|
+
| --lot-no | lotNo | 直接传递 | - |
|
|
115
|
+
| --color | color | 直接传递 | - |
|
|
116
|
+
| --long-x | longX | string→BigDecimal | - |
|
|
117
|
+
| --wide-y | wideY | string→BigDecimal | - |
|
|
118
|
+
| --high-z | highZ | string→BigDecimal | - |
|
|
119
|
+
| --source-type | sourceType | 直接传递 | - |
|
|
120
|
+
| --source-code | sourceCode | 直接传递 | - |
|
|
121
|
+
| --stock-id | stockId | string→Long | 后端BigInteger,CLI使用string |
|
|
122
|
+
| --exclude-zero-stock | excludeZeroStock | 直接传递 | boolean |
|
|
123
|
+
| --start-date | stockDateCriteria.startDate | string→Date | yyyy-MM-dd |
|
|
124
|
+
| --end-date | stockDateCriteria.endDate | string→Date | yyyy-MM-dd |
|
|
125
|
+
| --page | pageNo | number-1 | 0-based分页 |
|
|
126
|
+
| --size | pageSize | number | >0 |
|
|
127
|
+
|
|
128
|
+
## 2.5 错误码引用
|
|
129
|
+
|
|
130
|
+
### ExceptionEnum位置
|
|
131
|
+
```
|
|
132
|
+
coffee-liberica-end/
|
|
133
|
+
└── business/liberica-business-stock/stock-api/
|
|
134
|
+
└── src/main/java/com/newpeak/liberica/stock/api/exception/enums/
|
|
135
|
+
├── MasterStockExceptionEnum.java
|
|
136
|
+
│ ├── MASTER_STOCK_NOT_EXIST("...001", "租户库存不存在")
|
|
137
|
+
│ └── MASTER_STOCK_OUT_LOT_NOT_ENOUGH("...002", "租户成品出库单{}余量不够")
|
|
138
|
+
├── MasterWarehouseStockExceptionEnum.java
|
|
139
|
+
│ └── MASTER_WAREHOUSE_STOCK_NOT_EXIST("...001", "租户仓库库存不存在")
|
|
140
|
+
└── StockJourneyExceptionEnum.java
|
|
141
|
+
├── STOCK_JOURNEY_NOT_EXIST("...001", "租户出入库台账不存在")
|
|
142
|
+
└── CAN_NOT_DELETE_MATERIAL_WITH_USED_IN_STOCK("...002", "物料已在库存中使用,不能删除")
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 已知错误码示例
|
|
146
|
+
| 错误码 | 错误消息 | 触发条件 |
|
|
147
|
+
|--------|----------|----------|
|
|
148
|
+
| ...001 | 租户库存不存在 | 查询的库存记录不存在 |
|
|
149
|
+
| ...001 | 租户仓库库存不存在 | 查询的仓库库存记录不存在 |
|
|
150
|
+
| ...002 | 租户成品出库单{}余量不够 | 出库操作余量不足 |
|
|
151
|
+
|
|
152
|
+
## 2.6 权限检查
|
|
153
|
+
|
|
154
|
+
| 检查项 | 位置 | 说明 |
|
|
155
|
+
|--------|------|------|
|
|
156
|
+
| 菜单权限 | `MasterStockController` 类上的 `@Menu` 注解 | `inventory_query` 菜单,要求 `tenantStock` 角色 |
|
|
157
|
+
| 接口访问 | Controller方法无单独 `@GetResource(requiredPermission = true)` | 通过菜单角色控制 |
|
|
158
|
+
|
|
159
|
+
## 2.7 实现要点
|
|
160
|
+
|
|
161
|
+
1. **分页转换**:CLI page 1 对应 API pageNo 0
|
|
162
|
+
2. **ID类型**:stockId 后端为 Long/BigInteger,CLI 统一使用 string 类型避免精度丢失
|
|
163
|
+
3. **日期范围**:--start-date 和 --end-date 组合为 DateRange 对象传递
|
|
164
|
+
4. **输出格式**:默认表格输出(cli-table3),--json 返回结构化 JSON
|
|
165
|
+
5. **零库存过滤**:excludeZeroStock 默认为 false,传入 true 时过滤掉 stockCount=0 的记录
|