ProductService.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. <?php
  2. namespace App\Service;
  3. use App\Model\BasicType;
  4. use App\Model\Depart;
  5. use App\Model\Employee;
  6. use App\Model\Product;
  7. use App\Model\ProductCategory;
  8. use App\Model\ProductInfo;
  9. use App\Model\ProductIntroduction;
  10. use App\Model\ProductInventory;
  11. use App\Model\ProductPriceDetail;
  12. use App\Model\ProductRange;
  13. use Illuminate\Support\Facades\DB;
  14. /**
  15. * 产品管理
  16. */
  17. class ProductService extends Service
  18. {
  19. /**
  20. * 产品分类编辑
  21. * @param $data
  22. * @param $user
  23. * @return array
  24. */
  25. public function productCategoryEdit($data,$user){
  26. list($status,$msg) = $this->productCategoryRule($data,$user,false);
  27. if(!$status) return [$status,$msg];
  28. $update = $msg['data'][0];
  29. $model = new ProductCategory();
  30. $model->where('id',$data['id'])->update($update);
  31. return [true,''];
  32. }
  33. /**
  34. * 产品分类新增
  35. * @param $data
  36. * @param $user
  37. * @return array
  38. */
  39. public function productCategoryAdd($data,$user){
  40. list($status,$msg) = $this->productCategoryRule($data,$user);
  41. if(!$status) return [$status,$msg];
  42. ProductCategory::insert($msg['data']);
  43. return [true,''];
  44. }
  45. /**
  46. * 产品分类删除
  47. * @param $data
  48. * @return array
  49. */
  50. public function productCategoryDel($data){
  51. if($this->isEmpty($data,'id')) return [false,'请选择数据!'];
  52. $bool = Product::where('del_time',0)
  53. ->where('product_category_id',$data['id'])
  54. ->exists();
  55. if($bool) return [false,'产品分类下已添加产品,操作失败'];
  56. try {
  57. DB::beginTransaction();
  58. ProductCategory::where('id',$data['id'])->update([
  59. 'del_time' => time()
  60. ]);
  61. DB::commit();
  62. }catch (\Exception $exception){
  63. DB::rollBack();
  64. return [false,$exception->getMessage()];
  65. }
  66. return [true,''];
  67. }
  68. /**
  69. * 产品分类列表
  70. * @param $data
  71. * @param $user
  72. * @return array
  73. */
  74. public function productCategoryList($data,$user){
  75. $model = new ProductCategory(['userData' => $user, 'search' => $data]);
  76. $model = $model->where('del_time',0)
  77. ->select('title','id','parent_id')
  78. ->orderby('id','desc');
  79. if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
  80. $list = $this->limit($model,'',$data);
  81. return [true, $list];
  82. }
  83. /**
  84. * 产品分类参数规则
  85. * @param $data
  86. * @param $is_add
  87. * @return array
  88. */
  89. public function productCategoryRule($data,$user, $is_add = true){
  90. if($this->isEmpty($data,'data')) return [false,'数据不能为空!'];
  91. //所属部门 以及 顶级部门
  92. if(empty($data['depart_id'])) $data['depart_id'] = $this->getDepart($user);
  93. $data['top_depart_id'] = $user['depart_map'][$data['depart_id']] ?? 0;
  94. $title = array_column($data['data'],'title');
  95. $title = array_map(function($val) {
  96. return $val !== null ? $val : 0;
  97. }, $title);
  98. $title_count = array_count_values($title);
  99. foreach ($title as $value){
  100. if(empty($value)) return [false,'名称不能为空!'];
  101. if($title_count[$value] > 1) return [false,'名称不能重复'];
  102. }
  103. foreach ($data['data'] as $key => $value){
  104. $data['data'][$key]['upd_time'] = time();
  105. if($is_add){
  106. $parent_id = 0;
  107. if(! empty($value['parent_id'])) {
  108. $bool = Product::where('del_time',0)
  109. ->where('product_category_id',$value['parent_id'])
  110. ->exists();
  111. if($bool) {
  112. $title = ProductCategory::where('id',$value['parent_id'])->select('title')->value('title');
  113. return [false,'产品分类:'. $title .'下已添加产品,不允许添加子分类'];
  114. }
  115. $parent_id = $value['parent_id'];
  116. }
  117. $data['data'][$key]['parent_id'] = $parent_id;
  118. $data['data'][$key]['crt_time'] = time();
  119. $data['data'][$key]['depart_id'] = $data['depart_id'];
  120. $data['data'][$key]['top_depart_id'] = $data['top_depart_id'];
  121. $bool = ProductCategory::where('title',$value['title'])
  122. ->where('top_depart_id',$data['top_depart_id'])
  123. ->where('del_time',0)
  124. ->exists();
  125. }else{
  126. if($this->isEmpty($data,'id')) return [false,'id不能为空!'];
  127. $bool = ProductCategory::where('title',$value['title'])
  128. ->where('top_depart_id',$data['top_depart_id'])
  129. ->where('id','<>',$data['id'])
  130. ->where('del_time',0)
  131. ->exists();
  132. }
  133. if($bool) return [false,'分类名称不能重复'];
  134. }
  135. return [true, $data];
  136. }
  137. /**
  138. * 产品编辑
  139. * @param $data
  140. * @param $user
  141. * @return array
  142. */
  143. public function productEdit($data,$user){
  144. list($status,$msg) = $this->productRule($data, $user, false);
  145. if(!$status) return [$status,$msg];
  146. try {
  147. DB::beginTransaction();
  148. $model = Product::where('id',$data['id'])->first();
  149. $model->product_category_id = $data['product_category_id'] ?? 0;
  150. $model->title = $data['title'];
  151. $model->code = $data['code'] ?? '';
  152. $model->size = $data['size'] ?? '';
  153. $model->unit = $data['unit'] ?? 0;
  154. $model->bar_code = $data['bar_code'] ?? '';
  155. $model->cost = $data['cost'] ?? 0;
  156. $model->retail_price = $data['retail_price'] ?? 0;
  157. $model->mark = $data['mark'] ?? '';
  158. $model->state = $data['state'] ?? 0;
  159. $model->save();
  160. $time = time();
  161. ProductIntroduction::where('product_id',$data['id'])
  162. ->where('del_time',0)
  163. ->update(['del_time' => $time]);
  164. if(! empty($data['introduction'])){
  165. $models = new ProductIntroduction();
  166. $models->product_id = $model->id;
  167. $models->introduction = $data['introduction'];
  168. $models->save();
  169. }
  170. ProductInfo::where('del_time',0)
  171. ->where('product_id',$data['id'])
  172. ->update(['del_time' => $time]);
  173. if(! empty($data['img'])){
  174. $insert = [];
  175. foreach ($data['img'] as $value){
  176. $insert[] = [
  177. 'product_id' => $model->id,
  178. 'file' => $value['url'],
  179. 'type' => ProductInfo::type_one,
  180. 'name' => $value['name'],
  181. 'crt_time' => $time,
  182. ];
  183. }
  184. ProductInfo::insert($insert);
  185. }
  186. if(! empty($data['file'])){
  187. $insert = [];
  188. foreach ($data['file'] as $value){
  189. $insert[] = [
  190. 'product_id' => $model->id,
  191. 'file' => $value['url'],
  192. 'type' => ProductInfo::type_two,
  193. 'name' => $value['name'],
  194. 'crt_time' => $time,
  195. ];
  196. }
  197. ProductInfo::insert($insert);
  198. }
  199. ProductRange::where('del_time',0)
  200. ->where('product_id',$data['id'])
  201. ->update(['del_time' => $time]);
  202. if(! empty($data['depart'])){
  203. $insert = [];
  204. foreach ($data['depart'] as $value){
  205. $insert[] = [
  206. 'product_id' => $model->id,
  207. 'depart_id' => $value,
  208. 'type' => ProductRange::type_one,
  209. 'crt_time' => $time,
  210. ];
  211. }
  212. ProductRange::insert($insert);
  213. }
  214. if(! empty($data['employee'])){
  215. $insert = [];
  216. foreach ($data['employee'] as $value){
  217. $insert[] = [
  218. 'product_id' => $model->id,
  219. 'employee_id' => $value,
  220. 'type' => ProductRange::type_two,
  221. 'crt_time' => $time,
  222. ];
  223. }
  224. ProductRange::insert($insert);
  225. }
  226. ProductPriceDetail::where('del_time',0)
  227. ->where('product_id',$data['id'])
  228. ->update(['del_time' => $time]);
  229. if(! empty($data['product_price'])){
  230. $insert = [];
  231. foreach ($data['product_price'] as $value){
  232. $insert[] = [
  233. 'product_id' => $model->id,
  234. 'basic_type_id' => $value['basic_type_id'],
  235. 'price' => $value['price'],
  236. 'crt_time' => $time,
  237. ];
  238. }
  239. ProductPriceDetail::insert($insert);
  240. }
  241. DB::commit();
  242. }catch (\Exception $exception){
  243. DB::rollBack();
  244. return [false,$exception->getMessage()];
  245. }
  246. return [true,''];
  247. }
  248. /**
  249. * 产品新增
  250. * @param $data
  251. * @param $user
  252. * @return array
  253. */
  254. public function productAdd($data,$user){
  255. list($status,$msg) = $this->productRule($data, $user);
  256. if(!$status) return [$status,$msg];
  257. try {
  258. DB::beginTransaction();
  259. $model = new Product();
  260. $model->product_category_id = $data['product_category_id'] ?? 0;
  261. $model->title = $data['title'];
  262. $model->code = $data['code'] ?? '';
  263. $model->size = $data['size'] ?? '';
  264. $model->unit = $data['unit'] ?? 0;
  265. $model->bar_code = $data['bar_code'] ?? '';
  266. $model->cost = $data['cost'] ?? 0;
  267. $model->retail_price = $data['retail_price'] ?? 0;
  268. $model->mark = $data['mark'] ?? '';
  269. $model->state = $data['state'] ?? 0;
  270. $model->crt_id = $user['id'];
  271. $model->depart_id = $data['depart_id'] ?? 0;
  272. $model->top_depart_id = $data['top_depart_id'] ?? 0;
  273. $model->save();
  274. $time = time();
  275. if(! empty($data['introduction'])){
  276. $models = new ProductIntroduction();
  277. $models->product_id = $model->id;
  278. $models->introduction = $data['introduction'];
  279. $models->save();
  280. }
  281. if(! empty($data['img'])){
  282. $insert = [];
  283. foreach ($data['img'] as $value){
  284. $insert[] = [
  285. 'product_id' => $model->id,
  286. 'file' => $value['url'],
  287. 'type' => ProductInfo::type_one,
  288. 'name' => $value['name'],
  289. 'crt_time' => $time,
  290. ];
  291. }
  292. ProductInfo::insert($insert);
  293. }
  294. if(! empty($data['file'])){
  295. $insert = [];
  296. foreach ($data['file'] as $value){
  297. $insert[] = [
  298. 'product_id' => $model->id,
  299. 'file' => $value['url'],
  300. 'type' => ProductInfo::type_two,
  301. 'name' => $value['name'],
  302. 'crt_time' => $time,
  303. ];
  304. }
  305. ProductInfo::insert($insert);
  306. }
  307. if(! empty($data['depart'])){
  308. $insert = [];
  309. foreach ($data['depart'] as $value){
  310. $insert[] = [
  311. 'product_id' => $model->id,
  312. 'depart_id' => $value,
  313. 'type' => ProductRange::type_one,
  314. 'crt_time' => $time,
  315. ];
  316. }
  317. ProductRange::insert($insert);
  318. }
  319. if(! empty($data['employee'])){
  320. $insert = [];
  321. foreach ($data['employee'] as $value){
  322. $insert[] = [
  323. 'product_id' => $model->id,
  324. 'employee_id' => $value,
  325. 'type' => ProductRange::type_two,
  326. 'crt_time' => $time,
  327. ];
  328. }
  329. ProductRange::insert($insert);
  330. }
  331. if(! empty($data['product_price'])){
  332. $insert = [];
  333. foreach ($data['product_price'] as $value){
  334. $insert[] = [
  335. 'product_id' => $model->id,
  336. 'basic_type_id' => $value['basic_type_id'],
  337. 'price' => $value['price'],
  338. 'crt_time' => $time,
  339. ];
  340. }
  341. ProductPriceDetail::insert($insert);
  342. }
  343. DB::commit();
  344. }catch (\Exception $exception){
  345. DB::rollBack();
  346. return [false,$exception->getMessage()];
  347. }
  348. return [true,''];
  349. }
  350. /**
  351. * 产品删除
  352. * @param $data
  353. * @return array
  354. */
  355. public function productDel($data){
  356. if($this->isEmpty($data,'id')) return [false,'请选择数据!'];
  357. try {
  358. DB::beginTransaction();
  359. $time = time();
  360. Product::where('del_time',0)->where('id',$data['id'])->update(['del_time' => $time]);
  361. ProductIntroduction::where('product_id',$data['id'])
  362. ->where('del_time',0)
  363. ->update(['del_time' => $time]);
  364. ProductInfo::where('del_time',0)
  365. ->where('product_id',$data['id'])
  366. ->update(['del_time' => $time]);
  367. ProductRange::where('del_time',0)
  368. ->where('product_id',$data['id'])
  369. ->update(['del_time' => $time]);
  370. ProductPriceDetail::where('del_time',0)
  371. ->where('product_id',$data['id'])
  372. ->update(['del_time' => $time]);
  373. DB::commit();
  374. }catch (\Exception $exception){
  375. DB::rollBack();
  376. return [false,$exception->getMessage()];
  377. }
  378. return [true,''];
  379. }
  380. /**
  381. * 产品详情
  382. * @param $data
  383. * @param $user
  384. * @return array
  385. */
  386. public function productDetail($data,$user){
  387. if($this->isEmpty($data,'id')) return [false,'请选择数据!'];
  388. $customer = Product::where('del_time',0)
  389. ->where('id',$data['id'])
  390. ->first();
  391. if(empty($customer)) return [false,'产品不存在或已被删除'];
  392. $customer = $customer->toArray();
  393. $category = ProductCategory::where('id',$customer['product_category_id'])
  394. ->value('title');
  395. $customer['product_category_title'] = $category;
  396. $customer['introduction'] = "";
  397. $in = ProductIntroduction::where('del_time',0)
  398. ->where('product_id',$data['id'])
  399. ->first();
  400. if(! empty($in)) $customer['introduction'] = $in->introduction;
  401. $detail = ProductPriceDetail::where('del_time',0)
  402. ->where('product_id',$data['id'])
  403. ->select('product_id','basic_type_id','price')
  404. ->get()->toArray();
  405. $title_map = BasicType::whereIn('id',array_column($detail,'basic_type_id'))
  406. ->pluck('title','id')
  407. ->toArray();
  408. //是否总公司
  409. $is_main = EmployeeService::isMain($user['id']);
  410. $customer['product_price'] = [];
  411. //展示金额
  412. foreach ($detail as $value){
  413. if(! $is_main){
  414. $top_depart = $user['depart_top'][0] ?? [];
  415. if($top_depart['basic_type_id'] != $value['basic_type_id']){
  416. $is_show = 0;
  417. }else{
  418. $is_show = 1;
  419. }
  420. }else{
  421. $is_show = 1;
  422. }
  423. $customer['product_price'][] = [
  424. 'basic_type_id' => $value['basic_type_id'],
  425. 'basic_type_title' => $title_map[$value['basic_type_id']] ?? '',
  426. 'price' => $value['price'],
  427. 'is_show' => $is_show,
  428. ];
  429. }
  430. //单位
  431. $title = BasicType::where('id',$customer['unit'])->value('title');
  432. $customer['unit_name'] = $title;
  433. $customer['img'] = $customer['file'] = $customer['depart'] = $customer['employee'] = [];
  434. $customer_info = ProductInfo::where('del_time',0)
  435. ->where('product_id',$customer['id'])
  436. ->select('id','product_id','file','type','name')
  437. ->get()->toArray();
  438. foreach ($customer_info as $value){
  439. $tmp = [
  440. 'url' => $value['file'],
  441. 'name' => $value['name'],
  442. ];
  443. if($value['type'] == ProductInfo::type_one){
  444. $customer['img'][] = $tmp;
  445. }elseif ($value['type'] == ProductInfo::type_two){
  446. $customer['file'][] = $tmp;
  447. }
  448. }
  449. $customer_range = ProductRange::where('del_time',0)
  450. ->where('product_id',$customer['id'])
  451. ->select('id','product_id','depart_id','type','employee_id')
  452. ->get()->toArray();
  453. $emp_map = Employee::whereIn('id',array_unique(array_merge_recursive([$customer['crt_id']],array_column($customer_range,'employee_id'))))
  454. ->pluck('emp_name','id')
  455. ->toArray();
  456. $depart_map = Depart::whereIn('id',array_unique(array_column($customer_range,'depart_id')))
  457. ->pluck('title','id')
  458. ->toArray();
  459. foreach ($customer_range as $value){
  460. if($value['type'] == ProductRange::type_one){
  461. $tmp = [
  462. 'id' => $value['depart_id'],
  463. 'name' => $depart_map[$value['depart_id']],
  464. ];
  465. $customer['depart'][] = $tmp;
  466. }elseif ($value['type'] == ProductRange::type_two){
  467. $tmp = [
  468. 'id' => $value['employee_id'],
  469. 'name' => $emp_map[$value['employee_id']] ?? '',
  470. ];
  471. $customer['employee'][] = $tmp;
  472. }
  473. }
  474. $customer['crt_name'] = $emp_map[$customer['crt_id']] ?? '';
  475. $customer['crt_time'] = $customer['crt_time'] ? date("Y-m-d H:i:s",$customer['crt_time']): '';
  476. return [true, $customer];
  477. }
  478. /**
  479. * 产品列表
  480. * @param $data
  481. * @param $user
  482. * @return array
  483. */
  484. public function productList($data,$user){
  485. $model = new Product(['userData' => $user, 'search' => $data]);
  486. $model = $model->where('del_time',0)
  487. ->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','state','crt_id','crt_time','mark','depart_id','top_depart_id')
  488. ->orderby('id', 'desc');
  489. if($user['id'] != Employee::SPECIAL_ADMIN ) {
  490. $user_id = $user['id'];
  491. $depart_id = $user['depart_range'];
  492. $product_id = ProductRange::where('del_time',0)
  493. ->where(function ($query) use($user_id, $depart_id) {
  494. $query->where('employee_id',$user_id)
  495. ->orWhereIn('depart_id', $depart_id);
  496. })->select('product_id')->get()
  497. ->toArray();
  498. $product_id = array_unique(array_column($product_id,'product_id'));
  499. //可见范围
  500. $model->when(! empty($sales_order_id), function ($query) use ($product_id) {
  501. return $query->orWhereIn('id', $product_id);
  502. });
  503. }
  504. if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
  505. if(isset($data['state'])) $model->where('state', $data['state']);
  506. $list = $this->limit($model,'',$data);
  507. $list = $this->fillData($list,$user);
  508. return [true, $list];
  509. }
  510. /**
  511. * 产品参数规则
  512. * @param $data
  513. * @param $is_add
  514. * @return array
  515. */
  516. public function productRule(&$data, $user, $is_add = true){
  517. if(empty($data['title'])) return [false,'产品名称不能为空'];
  518. if(empty($data['product_category_id'])) return [false,'产品分类不能为空'];
  519. if(empty($data['code'])) return [false,'产品编码不能为空'];
  520. if(empty($data['cost'])) return [false,'成本不能为空'];
  521. $res = $this->checkNumber($data['cost']);
  522. if(! $res) return [false,'成本请输入不超过两位小数并且大于0的数值'];
  523. if(empty($data['retail_price'])) return [false,'零售价不能为空'];
  524. $res = $this->checkNumber($data['retail_price']);
  525. if(! $res) return [false,'零售价格请输入不超过两位小数并且大于0的数值'];
  526. //所属部门 以及 顶级部门
  527. if(empty($data['depart_id'])) $data['depart_id'] = $this->getDepart($user);
  528. $data['top_depart_id'] = $user['depart_map'][$data['depart_id']] ?? 0;
  529. if($is_add){
  530. $bool = Product::whereRaw("(binary code = '{$data['code']}' OR title = '{$data['title']}')")
  531. ->where('del_time',0)
  532. ->exists();
  533. }else{
  534. if(empty($data['id'])) return [false,'ID不能为空'];
  535. $bool = Product::whereRaw("(binary code = '{$data['code']}' OR title = '{$data['title']}')")
  536. ->where('id','<>',$data['id'])
  537. ->where('del_time',0)
  538. ->exists();
  539. }
  540. if($bool) return [false,'产品名称或编码不能重复'];
  541. return [true, $data];
  542. }
  543. /**
  544. * 拼接数据
  545. * @param $data
  546. * @return array
  547. */
  548. public function fillData($data, $user){
  549. if(empty($data['data'])) return $data;
  550. $emp = Employee::whereIn('id',array_unique(array_column($data['data'],'crt_id')))
  551. ->pluck('emp_name','id')
  552. ->toArray();
  553. $category = ProductCategory::whereIn('id',array_unique(array_column($data['data'],'product_category_id')))
  554. ->pluck('title','id')
  555. ->toArray();
  556. $detail = ProductPriceDetail::where('del_time',0)
  557. ->where('product_id',array_unique(array_column($data['data'],'id')))
  558. ->select('product_id','basic_type_id','price')
  559. ->get()->toArray();
  560. $basic_map = BasicType::whereIn('id',array_unique(array_merge_recursive(array_column($data['data'],'unit'),array_column($detail,'basic_type_id'))))
  561. ->pluck('title','id')
  562. ->toArray();
  563. $detail_map = [];
  564. foreach ($detail as $value){
  565. $detail_map[$value['product_id']] = $value;
  566. }
  567. //是否总公司
  568. $is_main = EmployeeService::isMain($user['id']);
  569. $top_depart = $user['depart_top'][0] ?? [];
  570. foreach ($data['data'] as $key => $value){
  571. $tmp = [];
  572. if(isset($detail_map[$value['id']])){
  573. $d = $detail_map[$value['id']];
  574. foreach ($d as $v){
  575. //不是总公司 不是公司设置的金额 就不展示
  576. if(! $is_main && ($top_depart['basic_type_id'] != $v['basic_type_id'])) continue;
  577. $tmp[] = [
  578. 'basic_type_id' => $value['basic_type_id'],
  579. 'basic_type_title' => $basic_map[$value['basic_type_id']] ?? '',
  580. 'price' => $value['price'],
  581. ];
  582. }
  583. }
  584. $data['data'][$key]['product_price'] = $tmp;
  585. $data['data'][$key]['crt_time'] = $value['crt_time'] ? date('Y-m-d H:i:s',$value['crt_time']) : '';
  586. $data['data'][$key]['crt_name'] = $emp[$value['crt_id']] ?? '';
  587. $data['data'][$key]['product_category_name'] = $category[$value['product_category_id']] ?? '';
  588. $data['data'][$key]['state_name'] = Product::$state[$value['state']] ?? '';
  589. $data['data'][$key]['unit_name'] = $basic_map[$value['unit']] ?? '';
  590. }
  591. return $data;
  592. }
  593. }