@newpeak/barista-cli 0.1.7 → 0.1.9

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.
Files changed (306) hide show
  1. package/README.md +10 -10
  2. package/dist/commands/liberica/calendar/index.d.ts +3 -0
  3. package/dist/commands/liberica/calendar/index.d.ts.map +1 -0
  4. package/dist/commands/liberica/calendar/index.js +11 -0
  5. package/dist/commands/liberica/calendar/index.js.map +1 -0
  6. package/dist/commands/liberica/calendar/list.d.ts +3 -0
  7. package/dist/commands/liberica/calendar/list.d.ts.map +1 -0
  8. package/dist/commands/liberica/calendar/list.js +181 -0
  9. package/dist/commands/liberica/calendar/list.js.map +1 -0
  10. package/dist/commands/liberica/calendar/set.d.ts +3 -0
  11. package/dist/commands/liberica/calendar/set.d.ts.map +1 -0
  12. package/dist/commands/liberica/calendar/set.js +120 -0
  13. package/dist/commands/liberica/calendar/set.js.map +1 -0
  14. package/dist/commands/liberica/client-contacts/create.d.ts +3 -0
  15. package/dist/commands/liberica/client-contacts/create.d.ts.map +1 -0
  16. package/dist/commands/liberica/client-contacts/create.js +132 -0
  17. package/dist/commands/liberica/client-contacts/create.js.map +1 -0
  18. package/dist/commands/liberica/client-contacts/delete.d.ts +3 -0
  19. package/dist/commands/liberica/client-contacts/delete.d.ts.map +1 -0
  20. package/dist/commands/liberica/client-contacts/delete.js +139 -0
  21. package/dist/commands/liberica/client-contacts/delete.js.map +1 -0
  22. package/dist/commands/liberica/client-contacts/get.d.ts +3 -0
  23. package/dist/commands/liberica/client-contacts/get.d.ts.map +1 -0
  24. package/dist/commands/liberica/client-contacts/get.js +92 -0
  25. package/dist/commands/liberica/client-contacts/get.js.map +1 -0
  26. package/dist/commands/liberica/client-contacts/index.d.ts +3 -0
  27. package/dist/commands/liberica/client-contacts/index.d.ts.map +1 -0
  28. package/dist/commands/liberica/client-contacts/index.js +17 -0
  29. package/dist/commands/liberica/client-contacts/index.js.map +1 -0
  30. package/dist/commands/liberica/client-contacts/list.d.ts +3 -0
  31. package/dist/commands/liberica/client-contacts/list.d.ts.map +1 -0
  32. package/dist/commands/liberica/client-contacts/list.js +92 -0
  33. package/dist/commands/liberica/client-contacts/list.js.map +1 -0
  34. package/dist/commands/liberica/client-contacts/update.d.ts +3 -0
  35. package/dist/commands/liberica/client-contacts/update.d.ts.map +1 -0
  36. package/dist/commands/liberica/client-contacts/update.js +156 -0
  37. package/dist/commands/liberica/client-contacts/update.js.map +1 -0
  38. package/dist/commands/liberica/dict-types/get.d.ts +3 -0
  39. package/dist/commands/liberica/dict-types/get.d.ts.map +1 -0
  40. package/dist/commands/liberica/dict-types/get.js +62 -0
  41. package/dist/commands/liberica/dict-types/get.js.map +1 -0
  42. package/dist/commands/liberica/dict-types/index.d.ts +3 -0
  43. package/dist/commands/liberica/dict-types/index.d.ts.map +1 -0
  44. package/dist/commands/liberica/dict-types/index.js +13 -0
  45. package/dist/commands/liberica/dict-types/index.js.map +1 -0
  46. package/dist/commands/liberica/dict-types/list.d.ts +3 -0
  47. package/dist/commands/liberica/dict-types/list.d.ts.map +1 -0
  48. package/dist/commands/liberica/dict-types/list.js +91 -0
  49. package/dist/commands/liberica/dict-types/list.js.map +1 -0
  50. package/dist/commands/liberica/dict-types/update.d.ts +3 -0
  51. package/dist/commands/liberica/dict-types/update.d.ts.map +1 -0
  52. package/dist/commands/liberica/dict-types/update.js +127 -0
  53. package/dist/commands/liberica/dict-types/update.js.map +1 -0
  54. package/dist/commands/liberica/dicts/create.d.ts +3 -0
  55. package/dist/commands/liberica/dicts/create.d.ts.map +1 -0
  56. package/dist/commands/liberica/dicts/create.js +157 -0
  57. package/dist/commands/liberica/dicts/create.js.map +1 -0
  58. package/dist/commands/liberica/dicts/delete.d.ts +3 -0
  59. package/dist/commands/liberica/dicts/delete.d.ts.map +1 -0
  60. package/dist/commands/liberica/dicts/delete.js +106 -0
  61. package/dist/commands/liberica/dicts/delete.js.map +1 -0
  62. package/dist/commands/liberica/dicts/get.d.ts +3 -0
  63. package/dist/commands/liberica/dicts/get.d.ts.map +1 -0
  64. package/dist/commands/liberica/dicts/get.js +69 -0
  65. package/dist/commands/liberica/dicts/get.js.map +1 -0
  66. package/dist/commands/liberica/dicts/index.d.ts +3 -0
  67. package/dist/commands/liberica/dicts/index.d.ts.map +1 -0
  68. package/dist/commands/liberica/dicts/index.js +17 -0
  69. package/dist/commands/liberica/dicts/index.js.map +1 -0
  70. package/dist/commands/liberica/dicts/list.d.ts +3 -0
  71. package/dist/commands/liberica/dicts/list.d.ts.map +1 -0
  72. package/dist/commands/liberica/dicts/list.js +88 -0
  73. package/dist/commands/liberica/dicts/list.js.map +1 -0
  74. package/dist/commands/liberica/dicts/update.d.ts +3 -0
  75. package/dist/commands/liberica/dicts/update.d.ts.map +1 -0
  76. package/dist/commands/liberica/dicts/update.js +112 -0
  77. package/dist/commands/liberica/dicts/update.js.map +1 -0
  78. package/dist/commands/liberica/index.d.ts.map +1 -1
  79. package/dist/commands/liberica/index.js +20 -0
  80. package/dist/commands/liberica/index.js.map +1 -1
  81. package/dist/commands/liberica/materials/create.d.ts.map +1 -1
  82. package/dist/commands/liberica/materials/create.js +13 -6
  83. package/dist/commands/liberica/materials/create.js.map +1 -1
  84. package/dist/commands/liberica/materials/update.js +1 -1
  85. package/dist/commands/liberica/materials/update.js.map +1 -1
  86. package/dist/commands/liberica/mould/get.d.ts +3 -0
  87. package/dist/commands/liberica/mould/get.d.ts.map +1 -0
  88. package/dist/commands/liberica/mould/get.js +90 -0
  89. package/dist/commands/liberica/mould/get.js.map +1 -0
  90. package/dist/commands/liberica/mould/index.d.ts +3 -0
  91. package/dist/commands/liberica/mould/index.d.ts.map +1 -0
  92. package/dist/commands/liberica/mould/index.js +15 -0
  93. package/dist/commands/liberica/mould/index.js.map +1 -0
  94. package/dist/commands/liberica/mould/list.d.ts +3 -0
  95. package/dist/commands/liberica/mould/list.d.ts.map +1 -0
  96. package/dist/commands/liberica/mould/list.js +114 -0
  97. package/dist/commands/liberica/mould/list.js.map +1 -0
  98. package/dist/commands/liberica/mould/set-status.d.ts +3 -0
  99. package/dist/commands/liberica/mould/set-status.d.ts.map +1 -0
  100. package/dist/commands/liberica/mould/set-status.js +84 -0
  101. package/dist/commands/liberica/mould/set-status.js.map +1 -0
  102. package/dist/commands/liberica/mould/stock-in.d.ts +3 -0
  103. package/dist/commands/liberica/mould/stock-in.d.ts.map +1 -0
  104. package/dist/commands/liberica/mould/stock-in.js +160 -0
  105. package/dist/commands/liberica/mould/stock-in.js.map +1 -0
  106. package/dist/commands/liberica/operations/active.d.ts +3 -0
  107. package/dist/commands/liberica/operations/active.d.ts.map +1 -0
  108. package/dist/commands/liberica/operations/active.js +152 -0
  109. package/dist/commands/liberica/operations/active.js.map +1 -0
  110. package/dist/commands/liberica/operations/batch-delete.d.ts +3 -0
  111. package/dist/commands/liberica/operations/batch-delete.d.ts.map +1 -0
  112. package/dist/commands/liberica/operations/batch-delete.js +130 -0
  113. package/dist/commands/liberica/operations/batch-delete.js.map +1 -0
  114. package/dist/commands/liberica/operations/copy.d.ts +3 -0
  115. package/dist/commands/liberica/operations/copy.d.ts.map +1 -0
  116. package/dist/commands/liberica/operations/copy.js +137 -0
  117. package/dist/commands/liberica/operations/copy.js.map +1 -0
  118. package/dist/commands/liberica/operations/create.d.ts +3 -0
  119. package/dist/commands/liberica/operations/create.d.ts.map +1 -0
  120. package/dist/commands/liberica/operations/create.js +212 -0
  121. package/dist/commands/liberica/operations/create.js.map +1 -0
  122. package/dist/commands/liberica/operations/deactive.d.ts +3 -0
  123. package/dist/commands/liberica/operations/deactive.d.ts.map +1 -0
  124. package/dist/commands/liberica/operations/deactive.js +152 -0
  125. package/dist/commands/liberica/operations/deactive.js.map +1 -0
  126. package/dist/commands/liberica/operations/delete.d.ts +3 -0
  127. package/dist/commands/liberica/operations/delete.d.ts.map +1 -0
  128. package/dist/commands/liberica/operations/delete.js +128 -0
  129. package/dist/commands/liberica/operations/delete.js.map +1 -0
  130. package/dist/commands/liberica/operations/get.d.ts +3 -0
  131. package/dist/commands/liberica/operations/get.d.ts.map +1 -0
  132. package/dist/commands/liberica/operations/get.js +93 -0
  133. package/dist/commands/liberica/operations/get.js.map +1 -0
  134. package/dist/commands/liberica/operations/index.d.ts +3 -0
  135. package/dist/commands/liberica/operations/index.d.ts.map +1 -0
  136. package/dist/commands/liberica/operations/index.js +25 -0
  137. package/dist/commands/liberica/operations/index.js.map +1 -0
  138. package/dist/commands/liberica/operations/list.d.ts +3 -0
  139. package/dist/commands/liberica/operations/list.d.ts.map +1 -0
  140. package/dist/commands/liberica/operations/list.js +141 -0
  141. package/dist/commands/liberica/operations/list.js.map +1 -0
  142. package/dist/commands/liberica/operations/update.d.ts +3 -0
  143. package/dist/commands/liberica/operations/update.d.ts.map +1 -0
  144. package/dist/commands/liberica/operations/update.js +208 -0
  145. package/dist/commands/liberica/operations/update.js.map +1 -0
  146. package/dist/commands/liberica/stock/__tests__/ledger.test.d.ts +2 -0
  147. package/dist/commands/liberica/stock/__tests__/ledger.test.d.ts.map +1 -0
  148. package/dist/commands/liberica/stock/__tests__/ledger.test.js +41 -0
  149. package/dist/commands/liberica/stock/__tests__/ledger.test.js.map +1 -0
  150. package/dist/commands/liberica/stock/__tests__/list.test.d.ts +2 -0
  151. package/dist/commands/liberica/stock/__tests__/list.test.d.ts.map +1 -0
  152. package/dist/commands/liberica/stock/__tests__/list.test.js +39 -0
  153. package/dist/commands/liberica/stock/__tests__/list.test.js.map +1 -0
  154. package/dist/commands/liberica/stock/index.d.ts +3 -0
  155. package/dist/commands/liberica/stock/index.d.ts.map +1 -0
  156. package/dist/commands/liberica/stock/index.js +11 -0
  157. package/dist/commands/liberica/stock/index.js.map +1 -0
  158. package/dist/commands/liberica/stock/ledger.d.ts +3 -0
  159. package/dist/commands/liberica/stock/ledger.d.ts.map +1 -0
  160. package/dist/commands/liberica/stock/ledger.js +154 -0
  161. package/dist/commands/liberica/stock/ledger.js.map +1 -0
  162. package/dist/commands/liberica/stock/list.d.ts +3 -0
  163. package/dist/commands/liberica/stock/list.d.ts.map +1 -0
  164. package/dist/commands/liberica/stock/list.js +127 -0
  165. package/dist/commands/liberica/stock/list.js.map +1 -0
  166. package/dist/commands/liberica/supplier-contacts/create.d.ts +3 -0
  167. package/dist/commands/liberica/supplier-contacts/create.d.ts.map +1 -0
  168. package/dist/commands/liberica/supplier-contacts/create.js +129 -0
  169. package/dist/commands/liberica/supplier-contacts/create.js.map +1 -0
  170. package/dist/commands/liberica/supplier-contacts/delete.d.ts +3 -0
  171. package/dist/commands/liberica/supplier-contacts/delete.d.ts.map +1 -0
  172. package/dist/commands/liberica/supplier-contacts/delete.js +88 -0
  173. package/dist/commands/liberica/supplier-contacts/delete.js.map +1 -0
  174. package/dist/commands/liberica/supplier-contacts/get.d.ts +3 -0
  175. package/dist/commands/liberica/supplier-contacts/get.d.ts.map +1 -0
  176. package/dist/commands/liberica/supplier-contacts/get.js +84 -0
  177. package/dist/commands/liberica/supplier-contacts/get.js.map +1 -0
  178. package/dist/commands/liberica/supplier-contacts/index.d.ts +3 -0
  179. package/dist/commands/liberica/supplier-contacts/index.d.ts.map +1 -0
  180. package/dist/commands/liberica/supplier-contacts/index.js +17 -0
  181. package/dist/commands/liberica/supplier-contacts/index.js.map +1 -0
  182. package/dist/commands/liberica/supplier-contacts/list.d.ts +3 -0
  183. package/dist/commands/liberica/supplier-contacts/list.d.ts.map +1 -0
  184. package/dist/commands/liberica/supplier-contacts/list.js +98 -0
  185. package/dist/commands/liberica/supplier-contacts/list.js.map +1 -0
  186. package/dist/commands/liberica/supplier-contacts/update.d.ts +3 -0
  187. package/dist/commands/liberica/supplier-contacts/update.d.ts.map +1 -0
  188. package/dist/commands/liberica/supplier-contacts/update.js +136 -0
  189. package/dist/commands/liberica/supplier-contacts/update.js.map +1 -0
  190. package/dist/core/api/client.d.ts +63 -0
  191. package/dist/core/api/client.d.ts.map +1 -1
  192. package/dist/core/api/client.js +1050 -65
  193. package/dist/core/api/client.js.map +1 -1
  194. package/dist/index.js +1 -1
  195. package/dist/types/calendar.d.ts +28 -0
  196. package/dist/types/calendar.d.ts.map +1 -0
  197. package/dist/types/calendar.js +2 -0
  198. package/dist/types/calendar.js.map +1 -0
  199. package/dist/types/client-contact.d.ts +65 -0
  200. package/dist/types/client-contact.d.ts.map +1 -0
  201. package/dist/types/client-contact.js +4 -0
  202. package/dist/types/client-contact.js.map +1 -0
  203. package/dist/types/dict.d.ts +97 -0
  204. package/dist/types/dict.d.ts.map +1 -0
  205. package/dist/types/dict.js +2 -0
  206. package/dist/types/dict.js.map +1 -0
  207. package/dist/types/index.d.ts +7 -0
  208. package/dist/types/index.d.ts.map +1 -1
  209. package/dist/types/index.js +1 -0
  210. package/dist/types/index.js.map +1 -1
  211. package/dist/types/material.d.ts +1 -1
  212. package/dist/types/material.d.ts.map +1 -1
  213. package/dist/types/mould-stock-in.d.ts +70 -0
  214. package/dist/types/mould-stock-in.d.ts.map +1 -0
  215. package/dist/types/mould-stock-in.js +3 -0
  216. package/dist/types/mould-stock-in.js.map +1 -0
  217. package/dist/types/mould.d.ts +61 -0
  218. package/dist/types/mould.d.ts.map +1 -0
  219. package/dist/types/mould.js +2 -0
  220. package/dist/types/mould.js.map +1 -0
  221. package/dist/types/operation.d.ts +66 -0
  222. package/dist/types/operation.d.ts.map +1 -0
  223. package/dist/types/operation.js +2 -0
  224. package/dist/types/operation.js.map +1 -0
  225. package/dist/types/stock.d.ts +133 -0
  226. package/dist/types/stock.d.ts.map +1 -0
  227. package/dist/types/stock.js +3 -0
  228. package/dist/types/stock.js.map +1 -0
  229. package/dist/types/supplier-contact.d.ts +65 -0
  230. package/dist/types/supplier-contact.d.ts.map +1 -0
  231. package/dist/types/supplier-contact.js +4 -0
  232. package/dist/types/supplier-contact.js.map +1 -0
  233. package/docs/commands/REFERENCE.md +24 -4
  234. package/docs/commands/liberica/calendar/DESIGN.md +333 -0
  235. package/docs/commands/liberica/client-contacts/create.md +152 -0
  236. package/docs/commands/liberica/client-contacts/delete.md +123 -0
  237. package/docs/commands/liberica/client-contacts/get.md +133 -0
  238. package/docs/commands/liberica/client-contacts/list.md +143 -0
  239. package/docs/commands/liberica/client-contacts/update.md +158 -0
  240. package/docs/commands/liberica/stock/ledger.md +209 -0
  241. package/docs/commands/liberica/stock/list.md +165 -0
  242. package/docs/commands/liberica/supplier-contacts/create.md +152 -0
  243. package/docs/commands/liberica/supplier-contacts/delete.md +123 -0
  244. package/docs/commands/liberica/supplier-contacts/get.md +133 -0
  245. package/docs/commands/liberica/supplier-contacts/list.md +143 -0
  246. package/docs/commands/liberica/supplier-contacts/update.md +158 -0
  247. package/package.json +1 -1
  248. package/src/commands/liberica/calendar/index.ts +13 -0
  249. package/src/commands/liberica/calendar/list.ts +214 -0
  250. package/src/commands/liberica/calendar/set.ts +130 -0
  251. package/src/commands/liberica/client-contacts/create.ts +115 -0
  252. package/src/commands/liberica/client-contacts/delete.ts +140 -0
  253. package/src/commands/liberica/client-contacts/get.ts +103 -0
  254. package/src/commands/liberica/client-contacts/index.ts +19 -0
  255. package/src/commands/liberica/client-contacts/list.ts +118 -0
  256. package/src/commands/liberica/client-contacts/update.ts +137 -0
  257. package/src/commands/liberica/dict-types/get.ts +74 -0
  258. package/src/commands/liberica/dict-types/index.ts +15 -0
  259. package/src/commands/liberica/dict-types/list.ts +118 -0
  260. package/src/commands/liberica/dict-types/update.ts +134 -0
  261. package/src/commands/liberica/dicts/create.ts +175 -0
  262. package/src/commands/liberica/dicts/delete.ts +107 -0
  263. package/src/commands/liberica/dicts/get.ts +80 -0
  264. package/src/commands/liberica/dicts/index.ts +19 -0
  265. package/src/commands/liberica/dicts/list.ts +114 -0
  266. package/src/commands/liberica/dicts/update.ts +116 -0
  267. package/src/commands/liberica/index.ts +20 -0
  268. package/src/commands/liberica/materials/create.ts +13 -5
  269. package/src/commands/liberica/materials/update.ts +1 -1
  270. package/src/commands/liberica/mould/get.ts +111 -0
  271. package/src/commands/liberica/mould/index.ts +17 -0
  272. package/src/commands/liberica/mould/list.ts +157 -0
  273. package/src/commands/liberica/mould/set-status.ts +99 -0
  274. package/src/commands/liberica/mould/stock-in.ts +165 -0
  275. package/src/commands/liberica/operations/active.ts +153 -0
  276. package/src/commands/liberica/operations/batch-delete.ts +131 -0
  277. package/src/commands/liberica/operations/copy.ts +138 -0
  278. package/src/commands/liberica/operations/create.ts +223 -0
  279. package/src/commands/liberica/operations/deactive.ts +152 -0
  280. package/src/commands/liberica/operations/delete.ts +128 -0
  281. package/src/commands/liberica/operations/design.md +587 -0
  282. package/src/commands/liberica/operations/get.ts +112 -0
  283. package/src/commands/liberica/operations/index.ts +27 -0
  284. package/src/commands/liberica/operations/list.ts +180 -0
  285. package/src/commands/liberica/operations/update.ts +218 -0
  286. package/src/commands/liberica/stock/index.ts +13 -0
  287. package/src/commands/liberica/stock/ledger.ts +159 -0
  288. package/src/commands/liberica/stock/list.ts +128 -0
  289. package/src/commands/liberica/supplier-contacts/create.ts +120 -0
  290. package/src/commands/liberica/supplier-contacts/delete.ts +88 -0
  291. package/src/commands/liberica/supplier-contacts/get.ts +94 -0
  292. package/src/commands/liberica/supplier-contacts/index.ts +19 -0
  293. package/src/commands/liberica/supplier-contacts/list.ts +130 -0
  294. package/src/commands/liberica/supplier-contacts/update.ts +127 -0
  295. package/src/core/api/client.ts +1238 -17
  296. package/src/index.ts +1 -1
  297. package/src/types/calendar.ts +36 -0
  298. package/src/types/client-contact.ts +78 -0
  299. package/src/types/dict.ts +121 -0
  300. package/src/types/index.ts +7 -0
  301. package/src/types/material.ts +1 -1
  302. package/src/types/mould-stock-in.ts +82 -0
  303. package/src/types/mould.ts +74 -0
  304. package/src/types/operation.ts +72 -0
  305. package/src/types/stock.ts +161 -0
  306. package/src/types/supplier-contact.ts +78 -0
@@ -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 的记录
@@ -0,0 +1,152 @@
1
+ # barista liberica supplier-contacts create
2
+
3
+ 创建供应商联系人。
4
+
5
+ ## 2.1 命令元数据
6
+
7
+ | 字段 | 值 |
8
+ |------|-----|
9
+ | 完整命令 | `barista liberica supplier-contacts create` |
10
+ | 功能描述 | 添加新供应商联系人 |
11
+ | HTTP方法 | POST |
12
+ | 是否需要认证 | ✅ 是 |
13
+ | 是否支持dry-run | ✅ 是 |
14
+
15
+ ## 2.2 后端接口引用
16
+
17
+ ### Controller位置
18
+ ```
19
+ coffee-liberica-end/
20
+ └── facade/liberica-facade-enterprise/
21
+ └── src/main/java/com/newpeak/liberica/facade/enterprise/controller/purchases/
22
+ └── EnterpriseSupplierContactController.java
23
+ └── add(@PostResource(path = "/add", requiredPermission = true, requirePermissionCode = "ADD_MASTER_SUPPLIER_CONTACT"))
24
+ └── public ResponseData<MasterSupplierContactResponse> add(
25
+ @RequestHeader("X-TENANT-ID") Long tenantId,
26
+ @RequestBody @Validated(BaseRequest.add.class) MasterSupplierContactRequest masterSupplierContactRequest
27
+ )
28
+ ```
29
+
30
+ ### Request DTO位置
31
+ ```
32
+ coffee-liberica-end/
33
+ └── business/liberica-business-master/master-api/
34
+ └── src/main/java/com/newpeak/liberica/master/api/pojo/request/
35
+ └── MasterSupplierContactRequest.java
36
+ ├── supplierId: Long (@NotNull)
37
+ ├── supplierContactName: String (@NotBlank, max=255)
38
+ ├── supplierContactPhone: String (max=256)
39
+ ├── supplierContactTelephone: String (max=256)
40
+ ├── supplierContactEmail: String (max=512)
41
+ ├── supplierContactSex: String (max=255)
42
+ ├── supplierContactBirthday: Date
43
+ ├── supplierContactQq: String (max=512)
44
+ ├── supplierContactWechat: String (max=512)
45
+ ├── supplierContactAddress: String (max=512)
46
+ ├── defaultFlag: String (@NotBlank, max=1)
47
+ └── remark: String (max=255)
48
+ ```
49
+
50
+ ### Response DTO位置
51
+ ```
52
+ coffee-liberica-end/
53
+ └── business/liberica-business-master/master-api/
54
+ └── src/main/java/com/newpeak/liberica/master/api/pojo/response/
55
+ └── MasterSupplierContactResponse.java
56
+ └── (同 get 接口)
57
+ ```
58
+
59
+ ## 2.3 CLI参数设计
60
+
61
+ ### 命令结构
62
+ ```
63
+ barista liberica supplier-contacts create [options]
64
+ ```
65
+
66
+ ### 全局选项
67
+ | 选项 | 类型 | 说明 |
68
+ |------|------|------|
69
+ | `--env` | string | 目标环境(dev\|test\|prod-cn\|prod-jp) |
70
+ | `--tenant` | string | 租户代码 |
71
+ | `--dry-run` | boolean | 预览模式 |
72
+ | `--json` | boolean | JSON输出 |
73
+
74
+ ### 命令选项
75
+ | 选项 | 短选项 | 类型 | 必填 | 默认值 | 说明 | 对应DTO字段 |
76
+ |------|--------|------|------|--------|------|-------------|
77
+ | --supplier-id | -s | string | ✅ | - | 供应商ID | supplierId |
78
+ | --name | -n | string | ✅ | - | 姓名 | supplierContactName |
79
+ | --phone | -p | string | ⬜ | - | 手机号 | supplierContactPhone |
80
+ | --telephone | -t | string | ⬜ | - | 座机号 | supplierContactTelephone |
81
+ | --email | -e | string | ⬜ | - | 电子邮箱 | supplierContactEmail |
82
+ | --sex | -x | string | ⬜ | - | 性别 | supplierContactSex |
83
+ | --birthday | -b | string | ⬜ | - | 生日(YYYY-MM-DD) | supplierContactBirthday |
84
+ | --qq | -q | string | ⬜ | - | QQ号 | supplierContactQq |
85
+ | --wechat | -w | string | ⬜ | - | 微信号 | supplierContactWechat |
86
+ | --address | -a | string | ⬜ | - | 详细地址 | supplierContactAddress |
87
+ | --default | -d | boolean | ⬜ | N | 是否默认联系人 | defaultFlag |
88
+ | --remark | -r | string | ⬜ | - | 备注 | remark |
89
+
90
+ ## 2.4 字段映射表
91
+
92
+ | CLI参数 | DTO字段 | 类型转换 | 验证规则 |
93
+ |---------|---------|----------|----------|
94
+ | --supplier-id / -s | supplierId | string→Long | @NotNull |
95
+ | --name / -n | supplierContactName | 直接传递 | @NotBlank, max=255 |
96
+ | --phone / -p | supplierContactPhone | 直接传递 | max=256 |
97
+ | --telephone / -t | supplierContactTelephone | 直接传递 | max=256 |
98
+ | --email / -e | supplierContactEmail | 直接传递 | max=512 |
99
+ | --sex / -x | supplierContactSex | 直接传递 | max=255 |
100
+ | --birthday / -b | supplierContactBirthday | string→Date | yyyy-MM-dd |
101
+ | --qq / -q | supplierContactQq | 直接传递 | max=512 |
102
+ | --wechat / -w | supplierContactWechat | 直接传递 | max=512 |
103
+ | --address / -a | supplierContactAddress | 直接传递 | max=512 |
104
+ | --default / -d | defaultFlag | boolean→Y/N | @NotBlank, max=1 |
105
+ | --remark / -r | remark | 直接传递 | max=255 |
106
+
107
+ ## 2.5 错误码引用
108
+
109
+ ### ExceptionEnum位置
110
+ ```
111
+ coffee-liberica-end/
112
+ └── business/liberica-business-master/master-api/
113
+ └── src/main/java/com/newpeak/liberica/master/api/exception/enums/
114
+ └── MasterSupplierContactExceptionEnum.java
115
+ ```
116
+
117
+ ### 已知错误码
118
+ | 错误码 | 错误消息 | 触发条件 |
119
+ |--------|----------|----------|
120
+ | 01001XXX001 | 租户供应商联系人不存在 | 供应商ID不存在 |
121
+ | 01001XXX... | 相关验证错误 | 字段验证失败 |
122
+
123
+ ## 2.6 权限检查
124
+
125
+ | 检查项 | 位置 | 说明 |
126
+ |--------|------|------|
127
+ | PermissionConstants | `ADD_MASTER_SUPPLIER_CONTACT` | 添加供应商联系人需要此权限 |
128
+ | 注解 | `@PostResource(requirePermissionCode = "ADD_MASTER_SUPPLIER_CONTACT")` | Controller方法上 |
129
+
130
+ ## 2.7 实现要点
131
+
132
+ 1. **必填参数**:--supplier-id 和 --name 必须指定
133
+ 2. **defaultFlag**:--default 不指定时默认为 "N",指定时为 "Y"
134
+ 3. **dry-run 模式**:预览模式下只显示将要发送的数据,不实际调用 API
135
+ 4. **输出格式**:成功后显示创建的联系人信息
136
+ 5. **错误处理**:字段验证错误显示友好提示
137
+
138
+ ## 2.8 示例用法
139
+
140
+ ```bash
141
+ # 创建供应商联系人(dry-run 预览)
142
+ barista liberica supplier-contacts create --supplier-id 123 --name "张三" --phone "13800138000" --dry-run
143
+
144
+ # 实际创建
145
+ barista liberica supplier-contacts create --supplier-id 123 --name "张三" --phone "13800138000" --email "zhang@example.com"
146
+
147
+ # 创建默认联系人
148
+ barista liberica supplier-contacts create --supplier-id 123 --name "李四" --default --address "北京市朝阳区xxx"
149
+
150
+ # JSON 输出
151
+ barista liberica supplier-contacts create --supplier-id 123 --name "张三" --json
152
+ ```
@@ -0,0 +1,123 @@
1
+ # barista liberica supplier-contacts delete
2
+
3
+ 删除供应商联系人。
4
+
5
+ ## 2.1 命令元数据
6
+
7
+ | 字段 | 值 |
8
+ |------|-----|
9
+ | 完整命令 | `barista liberica supplier-contacts delete <contact-id>` |
10
+ | 功能描述 | 删除供应商联系人 |
11
+ | HTTP方法 | POST |
12
+ | 是否需要认证 | ✅ 是 |
13
+ | 是否支持dry-run | ✅ 是(默认) |
14
+
15
+ ## 2.2 后端接口引用
16
+
17
+ ### Controller位置
18
+ ```
19
+ coffee-liberica-end/
20
+ └── facade/liberica-facade-enterprise/
21
+ └── src/main/java/com/newpeak/liberica/facade/enterprise/controller/purchases/
22
+ └── EnterpriseSupplierContactController.java
23
+ └── delete(@PostResource(path = "/delete", requiredPermission = true, requirePermissionCode = "DEL_MASTER_SUPPLIER_CONTACT"))
24
+ └── public ResponseData<?> delete(
25
+ @RequestHeader("X-TENANT-ID") Long tenantId,
26
+ @RequestBody @Validated(BaseRequest.delete.class) MasterSupplierContactRequest masterSupplierContactRequest
27
+ )
28
+ ```
29
+
30
+ ### Request DTO位置
31
+ ```
32
+ coffee-liberica-end/
33
+ └── business/liberica-business-master/master-api/
34
+ └── src/main/java/com/newpeak/liberica/master/api/pojo/request/
35
+ └── MasterSupplierContactRequest.java
36
+ └── supplierContactId: Long (@NotNull on delete)
37
+ ```
38
+
39
+ ### Response DTO位置
40
+ ```
41
+ coffee-liberica-end/
42
+ └── business/liberica-business-master/master-api/
43
+ └── src/main/java/com/newpeak/liberica/master/api/pojo/response/
44
+ └── SuccessResponseData<?>
45
+ └── 无具体数据
46
+ ```
47
+
48
+ ## 2.3 CLI参数设计
49
+
50
+ ### 命令结构
51
+ ```
52
+ barista liberica supplier-contacts delete <contact-id> [options]
53
+ ```
54
+
55
+ ### 位置参数
56
+ | 参数 | 类型 | 必填 | 说明 |
57
+ |------|------|------|------|
58
+ | contact-id | string | ✅ | 供应商联系人ID |
59
+
60
+ ### 全局选项
61
+ | 选项 | 类型 | 说明 |
62
+ |------|------|------|
63
+ | `--env` | string | 目标环境(dev\|test\|prod-cn\|prod-jp) |
64
+ | `--tenant` | string | 租户代码 |
65
+ | `--dry-run` | boolean | 预览模式(默认开启) |
66
+ | `--force` | boolean | 跳过确认,直接执行删除 |
67
+ | `--json` | boolean | JSON输出 |
68
+
69
+ ## 2.4 字段映射表
70
+
71
+ | CLI参数 | DTO字段 | 类型转换 | 验证规则 |
72
+ |---------|---------|----------|----------|
73
+ | <contact-id> | supplierContactId | string→Long | @NotNull |
74
+
75
+ ## 2.5 错误码引用
76
+
77
+ ### ExceptionEnum位置
78
+ ```
79
+ coffee-liberica-end/
80
+ └── business/liberica-business-master/master-api/
81
+ └── src/main/java/com/newpeak/liberica/master/api/exception/enums/
82
+ └── MasterSupplierContactExceptionEnum.java
83
+ └── MASTER_SUPPLIER_CONTACT_NOT_EXIST("01001XXX001", "租户供应商联系人不存在")
84
+ ```
85
+
86
+ ### 已知错误码
87
+ | 错误码 | 错误消息 | 触发条件 |
88
+ |--------|----------|----------|
89
+ | 01001XXX001 | 租户供应商联系人不存在 | contact-id 不存在或不属于当前租户 |
90
+
91
+ ## 2.6 权限检查
92
+
93
+ | 检查项 | 位置 | 说明 |
94
+ |--------|------|------|
95
+ | PermissionConstants | `DEL_MASTER_SUPPLIER_CONTACT` | 删除供应商联系人需要此权限 |
96
+ | 注解 | `@PostResource(requirePermissionCode = "DEL_MASTER_SUPPLIER_CONTACT")` | Controller方法上 |
97
+
98
+ ## 2.7 实现要点
99
+
100
+ 1. **位置参数**:contact-id 必须指定
101
+ 2. **默认 dry-run**:不带 --force 时默认是 dry-run 模式,只预览不执行
102
+ 3. **--force 确认**:实际删除前必须显式指定 --force
103
+ 4. **输出格式**:预览模式显示将要删除的联系人信息,确认后显示删除结果
104
+ 5. **错误处理**:联系人不存在时显示友好错误信息
105
+
106
+ ## 2.8 示例用法
107
+
108
+ ```bash
109
+ # 预览删除(默认 dry-run)
110
+ barista liberica supplier-contacts delete 12345
111
+ # 输出: 🔍 Dry-Run 模式:不会实际删除
112
+ # 将删除联系人: 张三 (ID: 12345)
113
+ # 添加 --force 选项以确认删除
114
+
115
+ # 确认删除
116
+ barista liberica supplier-contacts delete 12345 --force
117
+
118
+ # JSON 预览
119
+ barista liberica supplier-contacts delete 12345 --json
120
+
121
+ # JSON 确认删除
122
+ barista liberica supplier-contacts delete 12345 --force --json
123
+ ```
@@ -0,0 +1,133 @@
1
+ # barista liberica supplier-contacts get
2
+
3
+ 获取单个供应商联系人详情。
4
+
5
+ ## 2.1 命令元数据
6
+
7
+ | 字段 | 值 |
8
+ |------|-----|
9
+ | 完整命令 | `barista liberica supplier-contacts get <contact-id>` |
10
+ | 功能描述 | 获取单个供应商联系人详情 |
11
+ | HTTP方法 | GET |
12
+ | 是否需要认证 | ✅ 是 |
13
+ | 是否支持dry-run | ⬜ 否 |
14
+
15
+ ## 2.2 后端接口引用
16
+
17
+ ### Controller位置
18
+ ```
19
+ coffee-liberica-end/
20
+ └── facade/liberica-facade-enterprise/
21
+ └── src/main/java/com/newpeak/liberica/facade/enterprise/controller/purchases/
22
+ └── EnterpriseSupplierContactController.java
23
+ └── detail(@GetResource(path = "/detail"))
24
+ └── public ResponseData<MasterSupplierContactResponse> detail(
25
+ @RequestHeader("X-TENANT-ID") Long tenantId,
26
+ MasterSupplierContactRequest masterSupplierContactRequest
27
+ )
28
+ ```
29
+
30
+ ### Request DTO位置
31
+ ```
32
+ coffee-liberica-end/
33
+ └── business/liberica-business-master/master-api/
34
+ └── src/main/java/com/newpeak/liberica/master/api/pojo/request/
35
+ └── MasterSupplierContactRequest.java
36
+ └── supplierContactId: Long (@NotNull on detail)
37
+ ```
38
+
39
+ ### Response DTO位置
40
+ ```
41
+ coffee-liberica-end/
42
+ └── business/liberica-business-master/master-api/
43
+ └── src/main/java/com/newpeak/liberica/master/api/pojo/response/
44
+ └── MasterSupplierContactResponse.java
45
+ ├── supplierContactId: Long
46
+ ├── supplierId: Long
47
+ ├── supplierContactName: String
48
+ ├── supplierContactPhone: String
49
+ ├── supplierContactTelephone: String
50
+ ├── supplierContactEmail: String
51
+ ├── supplierContactSex: String
52
+ ├── supplierContactBirthday: Date
53
+ ├── supplierContactQq: String
54
+ ├── supplierContactWechat: String
55
+ ├── supplierContactAddress: String
56
+ ├── defaultFlag: String (Y/N)
57
+ ├── remark: String
58
+ ├── createTime: String
59
+ └── updateTime: String
60
+ ```
61
+
62
+ ## 2.3 CLI参数设计
63
+
64
+ ### 命令结构
65
+ ```
66
+ barista liberica supplier-contacts get <contact-id> [options]
67
+ ```
68
+
69
+ ### 位置参数
70
+ | 参数 | 类型 | 必填 | 说明 |
71
+ |------|------|------|------|
72
+ | contact-id | string | ✅ | 供应商联系人ID (supplierContactId) |
73
+
74
+ ### 全局选项
75
+ | 选项 | 类型 | 说明 |
76
+ |------|------|------|
77
+ | `--env` | string | 目标环境(dev\|test\|prod-cn\|prod-jp) |
78
+ | `--tenant` | string | 租户代码 |
79
+ | `--json` | boolean | JSON输出 |
80
+
81
+ ### 命令选项
82
+ | 选项 | 短选项 | 类型 | 必填 | 默认值 | 说明 |
83
+ |------|--------|------|------|--------|------|
84
+ | — | — | — | — | — | 此命令无额外选项,ID 通过位置参数传入 |
85
+
86
+ ## 2.4 字段映射表
87
+
88
+ | CLI参数 | DTO字段 | 类型转换 | 验证规则 |
89
+ |---------|---------|----------|----------|
90
+ | <contact-id> (位置参数) | supplierContactId | string→Long | @NotNull, 必须为正整数 |
91
+
92
+ ## 2.5 错误码引用
93
+
94
+ ### ExceptionEnum位置
95
+ ```
96
+ coffee-liberica-end/
97
+ └── business/liberica-business-master/master-api/
98
+ └── src/main/java/com/newpeak/liberica/master/api/exception/enums/
99
+ └── MasterSupplierContactExceptionEnum.java
100
+ └── MASTER_SUPPLIER_CONTACT_NOT_EXIST("01001XXX001", "租户供应商联系人不存在")
101
+ ```
102
+
103
+ ### 已知错误码
104
+ | 错误码 | 错误消息 | 触发条件 |
105
+ |--------|----------|----------|
106
+ | 01001XXX001 | 租户供应商联系人不存在 | contact-id 不存在或不属于当前租户 |
107
+
108
+ ## 2.6 权限检查
109
+
110
+ | 检查项 | 位置 | 说明 |
111
+ |--------|------|------|
112
+ | 注解 | `@GetResource(path = "/detail")` | 无 requiredPermission |
113
+
114
+ ## 2.7 实现要点
115
+
116
+ 1. **位置参数**:`get` 命令使用 `<contact-id>` 位置参数指定联系人ID
117
+ 2. **错误处理**:联系人不存在时抛出 `MASTER_SUPPLIER_CONTACT_NOT_EXIST`,CLI 显示友好错误信息
118
+ 3. **tenantId来源**:来自 X-TENANT-ID header,后端自动按租户隔离数据
119
+ 4. **输出格式**:表格形式展示联系人详情,或 JSON 格式
120
+
121
+ ## 2.8 示例用法
122
+
123
+ ```bash
124
+ # 获取联系人详情
125
+ barista liberica supplier-contacts get 12345
126
+
127
+ # JSON 输出
128
+ barista liberica supplier-contacts get 12345 --json
129
+
130
+ # 联系人不存在
131
+ barista liberica supplier-contacts get 99999
132
+ # 输出: Error: 租户供应商联系人不存在 (01001XXX001)
133
+ ```