contract_api.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. /*
  2. * @description: 合同管理 相关API
  3. * @Author: CP
  4. * @Date: 2020-10-26 15:27:04
  5. * @FilePath: \construction_management\web\api\contract_api.go
  6. */
  7. package api
  8. import (
  9. "fmt"
  10. "github.com/kataras/iris/v12"
  11. "go.mod/lib"
  12. "go.mod/models"
  13. "go.mod/services"
  14. "go.mod/web/utils"
  15. "go.mod/web/viewmodels"
  16. )
  17. type ContractApi struct {
  18. //框架-web应用上下文环境
  19. Ctx iris.Context
  20. // // 需要用的service
  21. ServiceTree services.TreeService
  22. ServiceContract services.ContractService
  23. // ServiceLogin services.LoginService
  24. // ServiceProject services.ProjectService
  25. }
  26. // @Summary 获得合同目录和标段
  27. // @Tags 合同管理
  28. // @Description 获得合同目录和标段
  29. // @Accept json
  30. // @Produce json
  31. // @Param bidsectionType path string true "标段类型0合同1安全2质量"
  32. // @Success 200 {object} viewmodels.FolderContract "{code:0成功,-1参数类错误,data:viewmodels.ProjectAccount,msg:错误信息}"
  33. // @Router /api/contract/folder [get]
  34. func (c *ContractApi) GetFolder() {
  35. bidTypeData, err := c.ServiceTree.ValidRuleBidsectionType(c.Ctx)
  36. if err != nil {
  37. ErrMsg := utils.FormValidError(err)
  38. c.Ctx.JSON(iris.Map{"code": -1, "msg": ErrMsg})
  39. return
  40. }
  41. // 获得项目ID
  42. projectId, err := utils.GetProjectId(c.Ctx)
  43. if err != nil {
  44. c.Ctx.JSON(iris.Map{"code": -1, "msg": err})
  45. return
  46. }
  47. // 获得项目账号ID
  48. // projectAccountId, err := utils.GetProjectAccountId(c.Ctx)
  49. // if err != nil {
  50. // c.Ctx.JSON(iris.Map{"code": -1, "msg": err})
  51. // return
  52. // }
  53. account := c.Ctx.Values().Get("account").(*models.CmProjectAccount)
  54. // 获得层级文件夹
  55. FolderData := c.ServiceTree.GetAllContract(projectId, account, bidTypeData.BidsectionType)
  56. c.Ctx.JSON(iris.Map{
  57. "code": 0,
  58. "msg": "",
  59. "data": FolderData,
  60. })
  61. }
  62. // @Summary 获得标段收入-项目节信息
  63. // @Tags 合同管理-收入合同
  64. // @Description 未设置合同项目节 返回项目节模板信息
  65. // @Accept json
  66. // @Produce json
  67. // @Security ApiKeyAuth
  68. // @Param bidsectionId path string true "标段ID"
  69. // @Success 200 {object} viewmodels.TreeSectionContract "{code:0成功,-1参数类错误,data:viewmodels.TreeSectionContract,msg:错误信息}"
  70. // @Router /api/contract/income/section/all [get]
  71. func (c *ContractApi) GetIncomeSectionAll() {
  72. sectionData := viewmodels.TreeSectionContract{}
  73. err := c.Ctx.ReadForm(&sectionData)
  74. if err != nil {
  75. c.Ctx.JSON(iris.Map{"code": -1, "msg": "ReadJSON转换异常,请检查参数"})
  76. return
  77. }
  78. if sectionData.BidsectionId == "" {
  79. c.Ctx.JSON(iris.Map{"code": -1, "msg": "ReadJSON转换异常,请检查参数"})
  80. return
  81. }
  82. bidsectionId, err := utils.GetDecryptId(sectionData.BidsectionId)
  83. if err != nil {
  84. c.Ctx.JSON(iris.Map{"code": -1, "msg": "ReadJSON转换异常,请检查参数"})
  85. return
  86. }
  87. // 项目ID
  88. projectIdInt, err := utils.GetProjectId(c.Ctx)
  89. if err != nil {
  90. c.Ctx.JSON(iris.Map{"code": -1, "msg": err})
  91. return
  92. }
  93. //获得合同项目节
  94. sectionTree := c.ServiceContract.GetSecionTree(bidsectionId, projectIdInt, 0)
  95. // 1.未设置了项目节
  96. if len(sectionTree.Children) == 0 {
  97. // 返回项目节2个基础模板
  98. templateTree1 := lib.NewItemSection().TemplateTree1
  99. templateTree2 := lib.NewItemSection().TemplateTree2
  100. c.Ctx.JSON(iris.Map{
  101. "code": 0,
  102. "msg": "",
  103. "isTemplate": 1,
  104. "sectionTemplate1": templateTree1,
  105. "sectionTemplate2": templateTree2,
  106. })
  107. return
  108. //2.项目节已设置
  109. } else {
  110. // 2.已设置项目节
  111. c.Ctx.JSON(iris.Map{
  112. "code": 0,
  113. "msg": "",
  114. "isTemplate": 0,
  115. "sectionTree": sectionTree,
  116. })
  117. return
  118. // 返回项目相关所有信息
  119. }
  120. }
  121. // @Summary 单个合同和项目节
  122. // @Tags 合同管理-收入合同
  123. // @Description 获得合同详情和项目节详情
  124. // @Accept json
  125. // @Produce json
  126. // @Security ApiKeyAuth
  127. // @Param id path string true "项目节ID"
  128. // @Param bidsectionId path string true "标段ID"
  129. // @Success 200 {object} viewmodels.TreeSectionContract "{code:0成功,-1参数类错误,isContract:是否有合同(包含孩子们),section:viewmodels.TreeSectionContract,msg:错误信息}"
  130. // @Router /api/contract/income [get]
  131. func (c *ContractApi) GetIncome() {
  132. // 1.规则验证
  133. sectionData, err := c.ServiceContract.ValidRuleGet(c.Ctx)
  134. if err != nil {
  135. c.Ctx.JSON(iris.Map{"code": -1, "msg": err})
  136. return
  137. }
  138. // 2.项目ID
  139. projectId, err := utils.GetProjectId(c.Ctx)
  140. if err != nil {
  141. c.Ctx.JSON(iris.Map{"code": -1, "msg": err})
  142. return
  143. }
  144. // 3.标段ID
  145. bidsectionId, err := utils.GetDecryptId(sectionData.BidsectionId)
  146. if err != nil {
  147. c.Ctx.JSON(iris.Map{"code": -1, "msg": err})
  148. return
  149. }
  150. // 4.树ID
  151. treeId, err := utils.GetDecryptId(sectionData.Id)
  152. if err != nil {
  153. c.Ctx.JSON(iris.Map{"code": -1, "msg": err})
  154. return
  155. }
  156. // 获得项目节详情
  157. section := c.ServiceContract.Get(treeId, bidsectionId, projectId, 0)
  158. // 该项目节 子树下是否有合同
  159. isContract := true
  160. contractList := c.ServiceContract.GetSectionTreeContract(section.Attribution, bidsectionId, projectId, 0)
  161. if len(contractList) == 0 {
  162. isContract = false
  163. }
  164. // 获得合同详情
  165. contractId, _ := utils.GetDecryptId(section.ContractId)
  166. contract := &viewmodels.Contracts{}
  167. if contractId != 0 {
  168. contract = c.ServiceContract.GetContract(contractId)
  169. }
  170. c.Ctx.JSON(iris.Map{
  171. "code": 0,
  172. "msg": "",
  173. "section": section,
  174. "isContract": isContract, //该项目节(包含子孙)下是否有合同
  175. "contract": contract,
  176. })
  177. }
  178. // @Summary 新增合同
  179. // @Tags 合同管理-收入合同
  180. // @Description 新增合同
  181. // @Accept json
  182. // @Produce json
  183. // @Security ApiKeyAuth
  184. // @Param treeId path string true "项目节ID"
  185. // @Param bidsectionId path string true "标段ID"
  186. // @Param code path string true "合同编号"
  187. // @Param name path string true "合同名称"
  188. // @Param contractsType path int true "合同类型(1)"
  189. // @Param price path string true "合同金额"
  190. // @Success 200 {object} viewmodels.TreeSectionContract "{code:0成功,-1参数类错误,msg:错误信息}"
  191. // @Router /api/contract/income/create [post]
  192. func (c *ContractApi) PostIncomeCreate() {
  193. // 验证参数
  194. contractData, err := c.ServiceContract.ValidRuleContractAdd(c.Ctx)
  195. if err != nil {
  196. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  197. return
  198. }
  199. // 项目ID
  200. projectIdInt, err := utils.GetProjectId(c.Ctx)
  201. if err != nil {
  202. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  203. return
  204. }
  205. // 标段ID
  206. bidsectionId, err := utils.GetDecryptId(contractData.BidsectionId)
  207. if err != nil {
  208. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  209. return
  210. }
  211. // 项目节ID
  212. treeId, err := utils.GetDecryptId(contractData.TreeId)
  213. if err != nil {
  214. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  215. return
  216. }
  217. // 可优化-事务问题
  218. // 先添加项目节
  219. // 1.新建合同,项目层级必须在第二层以下,当第一层没有孩子可以添加合同
  220. sectionData := &viewmodels.TreeSectionContract{}
  221. sectionData.Id = contractData.TreeId
  222. sectionData.Name = " "
  223. sectionResult, err := c.ServiceContract.ContractSectionAdd(sectionData, bidsectionId, projectIdInt, 0)
  224. if err != nil {
  225. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  226. return
  227. }
  228. fmt.Println("dddd")
  229. // 在添加合同
  230. err = c.ServiceContract.Add(contractData, projectIdInt, bidsectionId, sectionResult.Id)
  231. if err != nil {
  232. // 需要删除项目节-有问题
  233. c.ServiceContract.SectionDelete(sectionResult.Id, bidsectionId, projectIdInt, 0)
  234. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  235. return
  236. }
  237. // 获得项目节
  238. sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt, 0)
  239. // 合同ID
  240. contractId, _ := utils.GetDecryptId(sectionDetail.ContractId)
  241. contractDetail := c.ServiceContract.GetContract(contractId)
  242. c.Ctx.JSON(iris.Map{
  243. "code": 0,
  244. "msg": "新增成功",
  245. "contract": contractDetail,
  246. })
  247. }
  248. // @Summary 编辑合同
  249. // @Tags 合同管理-收入合同
  250. // @Description 编辑合同
  251. // @Accept json
  252. // @Produce json
  253. // @Security ApiKeyAuth
  254. // @Param id path string true "合同ID"
  255. // @Param treeId path string true "项目节ID"
  256. // @Param bidsectionId path string true "标段ID"
  257. // @Param content path string true "合同内容"
  258. // @Param name path string true "合同名称"
  259. // @Param price path string true "合同金额"
  260. // @Param partyA path string true "甲方"
  261. // @Param partyASigner path string true "甲方签约人"
  262. // @Param partyB path string true "已方"
  263. // @Param partyBSigner path string true "已方签约人"
  264. // @Param signerTime path string true "签约时间"
  265. // @Param remarks path string true "备注"
  266. // @Success 200 {object} viewmodels.TreeSectionContract "{code:0成功,-1参数类错误,msg:错误信息}"
  267. // @Router /api/contract/income/update [post]
  268. func (c *ContractApi) PostIncomeUpdate() {
  269. // 验证参数
  270. contractData, err := c.ServiceContract.ValidRuleContractEdi(c.Ctx)
  271. if err != nil {
  272. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  273. return
  274. }
  275. // 项目ID
  276. projectIdInt, err := utils.GetProjectId(c.Ctx)
  277. if err != nil {
  278. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  279. return
  280. }
  281. // 标段ID
  282. bidsectionId, err := utils.GetDecryptId(contractData.BidsectionId)
  283. if err != nil {
  284. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  285. return
  286. }
  287. // 项目节ID
  288. treeId, err := utils.GetDecryptId(contractData.TreeId)
  289. if err != nil {
  290. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  291. return
  292. }
  293. err = c.ServiceContract.Update(contractData, projectIdInt, bidsectionId, treeId)
  294. if err != nil {
  295. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  296. return
  297. }
  298. //2.请求当前项目信息
  299. // 1.验证项目节ID
  300. sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt, 0)
  301. // 合同ID
  302. contractId, _ := utils.GetDecryptId(sectionDetail.ContractId)
  303. contractDetail := c.ServiceContract.GetContract(contractId)
  304. c.Ctx.JSON(iris.Map{
  305. "code": 0,
  306. "msg": "编辑成功",
  307. "section": sectionDetail,
  308. "contract": contractDetail,
  309. })
  310. }
  311. // @Summary 删除合同
  312. // @Tags 合同管理-收入合同
  313. // @Description 删除合同
  314. // @Accept json
  315. // @Produce json
  316. // @Security ApiKeyAuth
  317. // @Param id path string true "合同ID"
  318. // @Param treeId path string true "项目节ID"
  319. // @Param bidsectionId path string true "标段ID"
  320. // @Success 200 {object} viewmodels.TreeSectionContract "{code:0成功,-1参数类错误,msg:错误信息}"
  321. // @Router /api/contract [delete]
  322. func (c *ContractApi) Delete() {
  323. // 验证参数
  324. contractData, err := c.ServiceContract.ValidRuleContractDel(c.Ctx)
  325. if err != nil {
  326. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  327. return
  328. }
  329. // 项目ID
  330. projectIdInt, err := utils.GetProjectId(c.Ctx)
  331. if err != nil {
  332. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  333. return
  334. }
  335. // 标段ID
  336. bidsectionId, err := utils.GetDecryptId(contractData.BidsectionId)
  337. if err != nil {
  338. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  339. return
  340. }
  341. // 项目节ID
  342. treeId, err := utils.GetDecryptId(contractData.TreeId)
  343. if err != nil {
  344. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  345. return
  346. }
  347. // 合同ID
  348. id, err := utils.GetDecryptId(contractData.Id)
  349. if err != nil {
  350. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  351. return
  352. }
  353. // 删除合同
  354. err = c.ServiceContract.Delete(projectIdInt, bidsectionId, treeId, id)
  355. if err != nil {
  356. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  357. return
  358. }
  359. //2.请求当前项目信息--需求变更 删除合同要删除项目节,不需要返回项目节信息
  360. // 1.验证项目节ID
  361. // sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt, 0)
  362. c.Ctx.JSON(iris.Map{"code": 0, "msg": "删除成功", "section": ""})
  363. }
  364. // @Summary 关闭合同
  365. // @Tags 合同管理
  366. // @Description 关闭合同
  367. // @Accept json
  368. // @Produce json
  369. // @Security ApiKeyAuth
  370. // @Param id path string true "合同ID"
  371. // @Param treeId path string true "项目节ID"
  372. // @Param bidsectionId path string true "标段ID"
  373. // @Success 200 {object} viewmodels.TreeSectionContract "{code:0成功,-1参数类错误,msg:错误信息}"
  374. // @Router /api/contract/close [post]
  375. func (c *ContractApi) PostClose() {
  376. // 验证参数
  377. contractData, err := c.ServiceContract.ValidRuleContractDel(c.Ctx)
  378. if err != nil {
  379. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  380. return
  381. }
  382. // 项目ID
  383. projectIdInt, err := utils.GetProjectId(c.Ctx)
  384. if err != nil {
  385. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  386. return
  387. }
  388. // 标段ID
  389. bidsectionId, err := utils.GetDecryptId(contractData.BidsectionId)
  390. if err != nil {
  391. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  392. return
  393. }
  394. // 项目节ID
  395. treeId, err := utils.GetDecryptId(contractData.TreeId)
  396. if err != nil {
  397. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  398. return
  399. }
  400. // 合同ID
  401. id, err := utils.GetDecryptId(contractData.Id)
  402. if err != nil {
  403. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  404. return
  405. }
  406. err = c.ServiceContract.Close(projectIdInt, bidsectionId, treeId, id)
  407. if err != nil {
  408. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  409. return
  410. }
  411. // 1.项目节信息
  412. sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt, 0)
  413. c.Ctx.JSON(iris.Map{"code": 0, "msg": "关闭成功", "section": sectionDetail})
  414. }
  415. // @Summary 解锁合同
  416. // @Tags 合同管理
  417. // @Description 解锁合同
  418. // @Accept json
  419. // @Produce json
  420. // @Security ApiKeyAuth
  421. // @Param id path string true "合同ID"
  422. // @Param treeId path string true "项目节ID"
  423. // @Param bidsectionId path string true "标段ID"
  424. // @Success 200 {object} viewmodels.TreeSectionContract "{code:0成功,-1参数类错误,msg:错误信息}"
  425. // @Router /api/contract/unlock [post]
  426. func (c *ContractApi) PostUnlock() {
  427. // 验证参数
  428. contractData, err := c.ServiceContract.ValidRuleContractDel(c.Ctx)
  429. if err != nil {
  430. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  431. return
  432. }
  433. // 项目ID
  434. projectIdInt, err := utils.GetProjectId(c.Ctx)
  435. if err != nil {
  436. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  437. return
  438. }
  439. // 标段ID
  440. bidsectionId, err := utils.GetDecryptId(contractData.BidsectionId)
  441. if err != nil {
  442. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  443. return
  444. }
  445. // 项目节ID
  446. treeId, err := utils.GetDecryptId(contractData.TreeId)
  447. if err != nil {
  448. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  449. return
  450. }
  451. // 合同ID
  452. id, err := utils.GetDecryptId(contractData.Id)
  453. if err != nil {
  454. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  455. return
  456. }
  457. err = c.ServiceContract.Unlock(projectIdInt, bidsectionId, treeId, id)
  458. if err != nil {
  459. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  460. return
  461. }
  462. // 1.项目节信息
  463. sectionDetail := c.ServiceContract.Get(treeId, bidsectionId, projectIdInt, 0)
  464. c.Ctx.JSON(iris.Map{"code": 0, "msg": "解锁成功", "section": sectionDetail})
  465. }
  466. // @Summary 合同概述
  467. // @Tags 合同管理
  468. // @Description 合同概述
  469. // @Accept json
  470. // @Produce json
  471. // @Security ApiKeyAuth
  472. // @Param bidsectionId path string true "标段ID"
  473. // @Success 200 {object} viewmodels.TreeSectionContract "{code:0成功,-1参数类错误,msg:错误信息}"
  474. // @Router /api/contract/survey [get]
  475. func (c *ContractApi) GetSurvey() {
  476. sectionData := viewmodels.Contracts{}
  477. err := c.Ctx.ReadForm(&sectionData)
  478. if err != nil {
  479. c.Ctx.JSON(iris.Map{"code": -1, "msg": "ReadJSON转换异常,请检查参数"})
  480. return
  481. }
  482. err = sectionData.ValidateBidsectionId()
  483. if err != nil {
  484. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  485. return
  486. }
  487. // 标段ID
  488. bidsectionId, err := utils.GetDecryptId(sectionData.BidsectionId)
  489. if err != nil {
  490. c.Ctx.JSON(iris.Map{"code": -1, "msg": "ReadJSON转换异常,请检查参数"})
  491. return
  492. }
  493. // 项目ID
  494. projectId, err := utils.GetProjectId(c.Ctx)
  495. if err != nil {
  496. c.Ctx.JSON(iris.Map{"code": -1, "msg": err})
  497. return
  498. }
  499. // 账号ID
  500. accountId, err := utils.GetProjectAccountId(c.Ctx)
  501. if err != nil {
  502. c.Ctx.JSON(iris.Map{"code": -1, "msg": fmt.Sprintf("%s", err)})
  503. return
  504. }
  505. // 缓存标段ID-用于权限
  506. key := fmt.Sprintf("pm_%d_%d", projectId, accountId)
  507. lib.NewRedis().SetBidsectionIdByCache(key, bidsectionId)
  508. incomeData := c.ServiceContract.GetSurvey(bidsectionId, projectId, 1)
  509. expenditureData := c.ServiceContract.GetSurvey(bidsectionId, projectId, 2)
  510. data := map[string]interface{}{
  511. "incomeData": incomeData,
  512. "expenditureData": expenditureData,
  513. }
  514. c.Ctx.JSON(iris.Map{
  515. "code": 0,
  516. "msg": "",
  517. "data": data,
  518. })
  519. }