supplier.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. package api
  2. import (
  3. "box-cost/db/model"
  4. "box-cost/db/repo"
  5. "box-cost/log"
  6. "errors"
  7. "fmt"
  8. "sync"
  9. "time"
  10. "github.com/gin-gonic/gin"
  11. "go.mongodb.org/mongo-driver/bson"
  12. "go.mongodb.org/mongo-driver/bson/primitive"
  13. "go.mongodb.org/mongo-driver/mongo"
  14. "go.mongodb.org/mongo-driver/mongo/options"
  15. )
  16. // 供应商管理
  17. func Supplier(r *GinRouter) {
  18. // 创建供应商
  19. r.POSTJWT("/supplier/create", CreateSupplier)
  20. // 获取供应商详情
  21. r.GETJWT("/supplier/detail/:id", GetSupplier)
  22. // 获取供应商列表
  23. r.GETJWT("/supplier/list", GetSuppliers)
  24. // 更新供应商
  25. r.POSTJWT("/supplier/update", UpdateSupplier)
  26. // 删除供应商
  27. r.POSTJWT("/supplier/delete/:id", DelSupplier)
  28. // 获取供应商列表
  29. r.GETJWT("/plan/supplier/list", GetPlanSuppliers)
  30. // 供应商获取自己的单据列表
  31. r.GETJWT("/supplier/bill/list", SupplierBillList)
  32. // 供应商接单
  33. r.POSTJWT("/supplier/bill/ack", SupplierBillAck)
  34. // 单据分配给供应商
  35. r.GETJWT("/supplier/bill/alloc", SupplierBillAlloc)
  36. }
  37. const (
  38. PURCHASE_BILL_TYPE = "purchase"
  39. PRODUCE_BILL_TYPE = "produce"
  40. PRODUCT_BILL_TYPE = "product"
  41. )
  42. type SupplierSmsTempInfo struct {
  43. Product string // 产品名+数量
  44. SerialNumber string
  45. Phone string
  46. }
  47. func genSupplierSmsTemp(billId primitive.ObjectID, billType string, apictx *ApiSession) (*SupplierSmsTempInfo, error) {
  48. productName := ""
  49. supplierId := primitive.NilObjectID
  50. serialNumber := ""
  51. if billType == PURCHASE_BILL_TYPE {
  52. purchase := &model.PurchaseBill{}
  53. found, err := repo.RepoSeachDoc(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
  54. CollectName: repo.CollectionBillPurchase,
  55. Query: repo.Map{"_id": billId},
  56. Project: []string{"productName", "supplierId", "serialNumber", "isAck"},
  57. }, purchase)
  58. if !found || err != nil {
  59. return nil, errors.New("未找到该订单")
  60. }
  61. // 已经接单不发送提醒
  62. if *purchase.IsAck {
  63. return nil, errors.New("该供应商已经接单")
  64. }
  65. serialNumber = purchase.SerialNumber
  66. productName = purchase.ProductName
  67. supplierId = purchase.SupplierId
  68. }
  69. if billType == PRODUCE_BILL_TYPE {
  70. produce := &model.ProduceBill{}
  71. found, err := repo.RepoSeachDoc(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
  72. CollectName: repo.CollectionBillProduce,
  73. Query: repo.Map{"_id": billId},
  74. Project: []string{"productName", "supplierId", "serialNumber", "isAck"},
  75. }, produce)
  76. if !found || err != nil {
  77. return nil, errors.New("未找到该订单")
  78. }
  79. // 已经接单不发送提醒
  80. if *produce.IsAck {
  81. return nil, errors.New("该供应商已经接单")
  82. }
  83. serialNumber = produce.SerialNumber
  84. productName = produce.ProductName
  85. supplierId = produce.SupplierId
  86. }
  87. if billType == PRODUCT_BILL_TYPE {
  88. product := &model.ProductBill{}
  89. found, err := repo.RepoSeachDoc(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
  90. CollectName: repo.CollectionBillProduct,
  91. Query: repo.Map{"_id": billId},
  92. Project: []string{"productName", "supplierId", "serialNumber", "isAck"},
  93. }, product)
  94. if !found || err != nil {
  95. return nil, errors.New("未找到该订单")
  96. }
  97. // 已经接单不发送提醒
  98. if *product.IsAck {
  99. return nil, errors.New("该供应商已经接单")
  100. }
  101. serialNumber = product.SerialNumber
  102. productName = product.ProductName
  103. supplierId = product.SupplierId
  104. }
  105. // 查询供应商信息
  106. user, err := getUserById(apictx, supplierId)
  107. if user == nil || err != nil {
  108. return nil, errors.New("未找到该供应商信息")
  109. }
  110. if len(user.Phone) != 11 {
  111. return nil, errors.New("手机号信息错误")
  112. }
  113. return &SupplierSmsTempInfo{
  114. Product: fmt.Sprintf("%s。<%s>", productName, "成都永红印务"),
  115. SerialNumber: serialNumber,
  116. Phone: user.Phone,
  117. }, nil
  118. }
  119. // 把订单分配给供应商
  120. // purchase produce product
  121. // id为订单id
  122. // /supplier/bill/alloc?id=xxx&type=purchase
  123. func SupplierBillAlloc(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  124. // ?验证当前账户是否可发送订单
  125. userId, _ := primitive.ObjectIDFromHex(apictx.User.Parent)
  126. user, err1 := getUserById(apictx, userId)
  127. if err1 != nil {
  128. return nil, errors.New("用户错误")
  129. }
  130. if !isSender(user.Roles) {
  131. return nil, errors.New("没有发送权限")
  132. }
  133. billId, _ := primitive.ObjectIDFromHex(c.Query("id"))
  134. if billId.IsZero() {
  135. return nil, errors.New("订单id不正确")
  136. }
  137. billType := c.Query("type")
  138. billTypes := []string{"purchase", "produce", "product"}
  139. flagType := false
  140. for _, bt := range billTypes {
  141. if bt == billType {
  142. flagType = true
  143. break
  144. }
  145. }
  146. if !flagType {
  147. return nil, errors.New("订单类型错误")
  148. }
  149. result := &mongo.UpdateResult{}
  150. var err error
  151. switch billType {
  152. case PURCHASE_BILL_TYPE:
  153. // result, err = repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, billId.Hex(), &model.PurchaseBill{IsSend: true, SendTime: time.Now()})
  154. result, err = repo.RepoUpdateSetDoc1(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, billId.Hex(), &model.PurchaseBill{IsSend: true, SendTime: time.Now()}, &repo.RecordLogReq{
  155. Path: c.Request.URL.Path,
  156. UserInfo: user,
  157. TargetId: billId.Hex(),
  158. Type: "send",
  159. })
  160. case PRODUCE_BILL_TYPE:
  161. // result, err = repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillProduce, billId.Hex(), &model.ProduceBill{IsSend: true, SendTime: time.Now()})
  162. result, err = repo.RepoUpdateSetDoc1(apictx.CreateRepoCtx(), repo.CollectionBillProduce, billId.Hex(), &model.ProduceBill{IsSend: true, SendTime: time.Now()}, &repo.RecordLogReq{
  163. Path: c.Request.URL.Path,
  164. UserInfo: user,
  165. TargetId: billId.Hex(),
  166. Type: "send",
  167. })
  168. case PRODUCT_BILL_TYPE:
  169. // result, err = repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillProduct, billId.Hex(), &model.ProductBill{IsSend: true, SendTime: time.Now()})
  170. result, err = repo.RepoUpdateSetDoc1(apictx.CreateRepoCtx(), repo.CollectionBillProduct, billId.Hex(), &model.ProductBill{IsSend: true, SendTime: time.Now()}, &repo.RecordLogReq{
  171. Path: c.Request.URL.Path,
  172. UserInfo: user,
  173. TargetId: billId.Hex(),
  174. Type: "send",
  175. })
  176. default:
  177. return result, nil
  178. }
  179. if err == nil {
  180. // 给供应商发送通知短信
  181. smsInfo, err := genSupplierSmsTemp(billId, billType, apictx)
  182. fmt.Println(smsInfo)
  183. if err == nil {
  184. var wg sync.WaitGroup
  185. wg.Add(1)
  186. go SendSmsNotify(smsInfo.Phone, &SupplierSmsReq{smsInfo.Product, smsInfo.SerialNumber}, &wg)
  187. // err = SendSmsNotify1(smsInfo.Phone, &SupplierSmsReq{smsInfo.Product, smsInfo.SerialNumber})
  188. wg.Wait()
  189. }
  190. }
  191. return result, err
  192. }
  193. // 供应商-接单
  194. // purchase produce product
  195. // POST /supplier/bill/ack
  196. // {"id":xxxx,"type":"purchase"}
  197. type SupplierBillAckReq struct {
  198. Type string
  199. Id primitive.ObjectID
  200. }
  201. func SupplierBillAck(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  202. userId, _ := primitive.ObjectIDFromHex(apictx.User.Parent)
  203. form := SupplierBillAckReq{}
  204. err := c.ShouldBindJSON(&form)
  205. if err != nil {
  206. return nil, errors.New("参数错误")
  207. }
  208. billType := form.Type
  209. id := form.Id
  210. _id := form.Id.Hex()
  211. if id.IsZero() {
  212. return nil, errors.New("id为空")
  213. }
  214. if userId.IsZero() {
  215. return nil, errors.New("非法用户")
  216. }
  217. // purchase produce product
  218. billTypes := []string{"purchase", "produce", "product"}
  219. flagType := false
  220. for _, bt := range billTypes {
  221. if bt == billType {
  222. flagType = true
  223. break
  224. }
  225. }
  226. if !flagType {
  227. return nil, errors.New("订单类型错误")
  228. }
  229. user, _ := getUserById(apictx, userId)
  230. isAck := true
  231. switch billType {
  232. case "purchase":
  233. // return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, _id, &model.PurchaseBill{IsAck: &isAck, AckTime: time.Now()})
  234. return repo.RepoUpdateSetDoc1(apictx.CreateRepoCtx(), repo.CollectionBillPurchase, _id, &model.PurchaseBill{IsAck: &isAck, AckTime: time.Now()}, &repo.RecordLogReq{
  235. Path: c.Request.URL.Path,
  236. UserInfo: user,
  237. TargetId: _id,
  238. Type: "take",
  239. })
  240. case "produce":
  241. // return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillProduce, _id, &model.ProduceBill{IsAck: &isAck, AckTime: time.Now()})
  242. return repo.RepoUpdateSetDoc1(apictx.CreateRepoCtx(), repo.CollectionBillProduce, _id, &model.ProduceBill{IsAck: &isAck, AckTime: time.Now()}, &repo.RecordLogReq{
  243. Path: c.Request.URL.Path,
  244. UserInfo: user,
  245. TargetId: _id,
  246. Type: "take",
  247. })
  248. case "product":
  249. // return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionBillProduct, _id, &model.ProductBill{IsAck: &isAck, AckTime: time.Now()})
  250. return repo.RepoUpdateSetDoc1(apictx.CreateRepoCtx(), repo.CollectionBillProduct, _id, &model.ProductBill{IsAck: &isAck, AckTime: time.Now()}, &repo.RecordLogReq{
  251. Path: c.Request.URL.Path,
  252. UserInfo: user,
  253. TargetId: _id,
  254. Type: "take",
  255. })
  256. default:
  257. return nil, errors.New("更新类型错误")
  258. }
  259. }
  260. // 供应商-订单列表
  261. // purchase produce product
  262. // /supplier/bill/list?type=purchase&query={"status":"created"}
  263. func SupplierBillList(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  264. userId, _ := primitive.ObjectIDFromHex(apictx.User.Parent)
  265. billType := c.Query("type")
  266. page, size, query := UtilQueryPageSize(c)
  267. if userId.IsZero() {
  268. return nil, errors.New("非法用户")
  269. }
  270. // purchase produce product
  271. billTypes := []string{"purchase", "produce", "product"}
  272. flagType := false
  273. for _, bt := range billTypes {
  274. if bt == billType {
  275. flagType = true
  276. break
  277. }
  278. }
  279. if !flagType {
  280. return nil, errors.New("订单类型错误")
  281. }
  282. query["supplierId"] = userId
  283. query["isSend"] = true
  284. if _productName, ok := query["productName"]; ok {
  285. delete(query, "productName")
  286. query["productName"] = bson.M{"$regex": _productName.(string)}
  287. }
  288. collectName := ""
  289. switch billType {
  290. case "purchase":
  291. collectName = repo.CollectionBillPurchase
  292. case "produce":
  293. collectName = repo.CollectionBillProduce
  294. case "product":
  295. collectName = repo.CollectionBillProduct
  296. default:
  297. return []map[string]interface{}{}, nil
  298. }
  299. return repo.RepoPageSearch(apictx.CreateRepoCtx(), &repo.PageSearchOptions{
  300. CollectName: collectName,
  301. Page: page,
  302. Size: size,
  303. Query: query,
  304. Sort: bson.D{{Key: "sendTime", Value: -1}, {Key: "createTime", Value: -1}},
  305. })
  306. }
  307. // 创建供应商
  308. func CreateSupplier(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  309. var supplier model.Supplier
  310. err := c.ShouldBindJSON(&supplier)
  311. if err != nil {
  312. fmt.Println(err)
  313. return nil, errors.New("参数错误!")
  314. }
  315. ctx := apictx.CreateRepoCtx()
  316. if supplier.Name == "" {
  317. return nil, errors.New("供应商名为空")
  318. }
  319. if supplier.Address == "" {
  320. return nil, errors.New("供应商地址为空")
  321. }
  322. if supplier.Phone == "" {
  323. return nil, errors.New("供应商联系电话为空")
  324. }
  325. supplier.CreateTime = time.Now()
  326. supplier.UpdateTime = time.Now()
  327. result, err := repo.RepoAddDoc(ctx, repo.CollectionSupplier, &supplier)
  328. return result, err
  329. }
  330. // 获取供应商信息
  331. func GetSupplier(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  332. supplierId := c.Param("id")
  333. id, err := primitive.ObjectIDFromHex(supplierId)
  334. if err != nil {
  335. return nil, errors.New("非法id")
  336. }
  337. var supplier model.Supplier
  338. option := &repo.DocSearchOptions{
  339. CollectName: repo.CollectionSupplier,
  340. Query: repo.Map{"_id": id},
  341. }
  342. found, err := repo.RepoSeachDoc(apictx.CreateRepoCtx(), option, &supplier)
  343. if !found || err != nil {
  344. log.Info(err)
  345. return nil, errors.New("数据未找到")
  346. }
  347. return supplier, nil
  348. }
  349. // 获取供应商列表
  350. func GetSuppliers(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  351. page, size, query := UtilQueryPageSize(c)
  352. if _name, ok := query["name"]; ok {
  353. delete(query, "name")
  354. query["name"] = bson.M{"$regex": _name.(string)}
  355. }
  356. if cate, ok := query["category"]; ok {
  357. delete(query, "category")
  358. query["categorys"] = bson.M{"$in": []string{cate.(string)}}
  359. }
  360. option := &repo.PageSearchOptions{
  361. CollectName: repo.CollectionSupplier,
  362. Query: query,
  363. Page: page,
  364. Size: size,
  365. Sort: bson.M{"createTime": -1},
  366. }
  367. return repo.RepoPageSearch(apictx.CreateRepoCtx(), option)
  368. }
  369. // !暂时弃用
  370. func GetPlanSuppliers(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  371. page, size, query := UtilQueryPageSize(c)
  372. emtyPage := &repo.PageResult{
  373. Total: 0,
  374. Size: size,
  375. Page: page,
  376. List: []map[string]interface{}{},
  377. }
  378. listOut := []map[string]interface{}{}
  379. flag := false
  380. if query["matId"] != nil || query["craftId"] != nil || query["productId"] != nil {
  381. flag = true
  382. }
  383. filtter := repo.Map{}
  384. if _name, ok := query["name"]; ok {
  385. filtter["name"] = bson.M{"$regex": _name.(string)}
  386. }
  387. if cate, ok := query["category"]; ok {
  388. filtter["categorys"] = bson.M{"$in": []string{cate.(string)}}
  389. }
  390. if !flag {
  391. option := &repo.PageSearchOptions{
  392. CollectName: repo.CollectionSupplier,
  393. // Query: repo.Map{"categorys": bson.M{"$in": []string{cate.(string)}}},
  394. Query: filtter,
  395. Page: page,
  396. Size: size,
  397. Sort: bson.M{"createTime": -1},
  398. }
  399. return repo.RepoPageSearch(apictx.CreateRepoCtx(), option)
  400. }
  401. //category =>根据内容查询 供应对应内容的供应商
  402. if query["matId"] != nil {
  403. matId := query["matId"].(string)
  404. if len(matId) < 1 {
  405. return nil, fmt.Errorf("matId(string)为空")
  406. }
  407. id, _ := primitive.ObjectIDFromHex(matId)
  408. ok, list := repo.RepoSeachDocsMap(apictx.CreateRepoCtx(), &repo.DocsSearchOptions{
  409. CollectName: repo.CollectionSupplierMatprice,
  410. Query: repo.Map{"productId": id},
  411. Project: []string{"supplierId"},
  412. })
  413. if !ok {
  414. return emtyPage, nil
  415. }
  416. listOut = list
  417. }
  418. if query["craftId"] != nil {
  419. cratf := &model.Craft{}
  420. ok, _ := repo.RepoSeachDoc(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
  421. Query: repo.Map{"_id": query["craftId"].(string)},
  422. CollectName: repo.CollectionCraft,
  423. }, cratf)
  424. if !ok {
  425. return nil, fmt.Errorf("没有对应的工艺信息")
  426. }
  427. //查询工艺分类
  428. pipleLine := []bson.M{
  429. {
  430. "$lookup": bson.M{
  431. "from": repo.CollectionCraft,
  432. "localField": "productId",
  433. "foreignField": "_id",
  434. "as": "craft_docs",
  435. },
  436. },
  437. {
  438. "$match": bson.M{
  439. "craft_docs.0.category": cratf.Category,
  440. },
  441. },
  442. {
  443. "$project": bson.M{
  444. "craft_docs": 0,
  445. "createTime": 0,
  446. "price": 0,
  447. "productId": 0,
  448. "updateTime": 0,
  449. },
  450. },
  451. }
  452. ctx := apictx.CreateRepoCtx()
  453. colls := ctx.Client.GetCollection(repo.CollectionSupplierCraftprice)
  454. findoptions := &options.AggregateOptions{}
  455. cur, err := colls.Aggregate(ctx.Ctx, pipleLine, findoptions)
  456. if err != nil {
  457. return nil, err
  458. }
  459. defer cur.Close(ctx.Ctx)
  460. err = cur.All(ctx.Ctx, &listOut)
  461. if err != nil {
  462. return nil, err
  463. }
  464. if len(listOut) < 1 {
  465. return emtyPage, nil
  466. }
  467. return listOut, nil
  468. // cratfId := query["craftId"].(string)
  469. // if len(cratfId) < 1 {
  470. // return nil, fmt.Errorf("cratfId(string)为空")
  471. // }
  472. // id, _ := primitive.ObjectIDFromHex(cratfId)
  473. // ok, list := repo.RepoSeachDocsMap(apictx.CreateRepoCtx(), &repo.DocsSearchOptions{
  474. // CollectName: repo.CollectionSupplierCraftprice,
  475. // Query: repo.Map{"craftId": id},
  476. // Project: []string{"supplierId"},
  477. // })
  478. // if !ok {
  479. // return emtyPage, nil
  480. // }
  481. // listOut = list
  482. }
  483. if query["productId"] != nil {
  484. productId := query["productId"].(string)
  485. if len(productId) < 1 {
  486. return nil, fmt.Errorf("productId(string)为空")
  487. }
  488. id, _ := primitive.ObjectIDFromHex(productId)
  489. ok, list := repo.RepoSeachDocsMap(apictx.CreateRepoCtx(), &repo.DocsSearchOptions{
  490. CollectName: repo.CollectionSupplierProductprice,
  491. Query: repo.Map{"productId": id},
  492. Project: []string{"supplierId"},
  493. })
  494. if !ok {
  495. return emtyPage, nil
  496. }
  497. listOut = list
  498. }
  499. //获取供应商列表
  500. suppliers := []primitive.ObjectID{}
  501. suppliersMap := map[string]bool{}
  502. for _, item := range listOut {
  503. if item["supplierId"] != nil {
  504. id, ok := item["supplierId"].(primitive.ObjectID)
  505. if !ok {
  506. continue
  507. }
  508. if !suppliersMap[id.Hex()] {
  509. suppliers = append(suppliers, id)
  510. suppliersMap[id.Hex()] = true
  511. }
  512. }
  513. }
  514. if len(suppliers) < 1 {
  515. return emtyPage, nil
  516. }
  517. filtter["_id"] = bson.M{"$in": suppliers}
  518. option := &repo.PageSearchOptions{
  519. CollectName: repo.CollectionSupplier,
  520. Query: filtter,
  521. // Query: repo.Map{"_id": bson.M{"$in": suppliers}},
  522. Page: page,
  523. Size: size,
  524. Sort: bson.M{"createTime": -1},
  525. }
  526. return repo.RepoPageSearch(apictx.CreateRepoCtx(), option)
  527. }
  528. // 更新供应商
  529. func UpdateSupplier(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  530. var supplier model.Supplier
  531. err := c.ShouldBindJSON(&supplier)
  532. if err != nil {
  533. return nil, errors.New("参数错误")
  534. }
  535. if supplier.Id.Hex() == "" {
  536. return nil, errors.New("id的为空")
  537. }
  538. supplier.UpdateTime = time.Now()
  539. return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionSupplier, supplier.Id.Hex(), &supplier)
  540. }
  541. // 删除供应商
  542. func DelSupplier(c *gin.Context, apictx *ApiSession) (interface{}, error) {
  543. supplierId := c.Param("id")
  544. if supplierId == "" {
  545. return nil, errors.New("id为空")
  546. }
  547. return repo.RepoDeleteDoc(apictx.CreateRepoCtx(), repo.CollectionSupplier, supplierId)
  548. }