TagGood.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <?php
  2. namespace app\admin\controller;
  3. use app\admin\model\OrderTag;
  4. use app\admin\model\Pay;
  5. use app\admin\model\QrdInfo;
  6. use app\admin\model\TagLog;
  7. use think\App;
  8. use think\facade\Db;use think\facade\Validate;
  9. class TagGood extends Base{
  10. // public $novalidate=['*'];
  11. public function __construct(App $app) {parent::__construct($app);}
  12. //新建标签
  13. public function create(){
  14. $post = $this->post;
  15. $type = isset($post['type'])&& $post['type']!="" ? intval($post['type']) :"";
  16. if($type==''){
  17. return error_show(1004,"参数 type 不能未空");
  18. }
  19. if($post['relaComNo']!=""){
  20. $companyNo = isset($post['relaComNo'])&& $post['relaComNo']!="" ? trim($post['relaComNo']) :"";
  21. }else{
  22. $companyNo = isset($post['companyNo'])&& $post['companyNo']!="" ? trim($post['companyNo']) :"";
  23. }
  24. if($companyNo==''){
  25. return error_show(1004,"参数 companyNo 不能未空");
  26. }
  27. $tagName =isset($post['tag_name'])&&$post['tag_name']!='' ? trim($post['tag_name']):"";
  28. if($tagName==''){
  29. return error_show(1004,"参数 tag_name 不能未空");
  30. }
  31. $isT =Db::name("order_tag")->where(["type"=>$type,"companyNo"=>$companyNo,"tag_name"=>$tagName,"is_del"=>0])
  32. ->findOrEmpty();
  33. if(!empty($isT)){
  34. return error_show(1004,"标签名称已存在");
  35. }
  36. $tagData=[
  37. "type"=>$type,
  38. "tag_name"=>$tagName,
  39. "status"=>1,
  40. "companyNo"=>$companyNo,
  41. "apply_id"=>$this->uid,
  42. "apply_name"=>$this->uname,
  43. "addtime"=>date("Y-m-d H:i:s"),
  44. "updatetime"=>date("Y-m-d H:i:s")
  45. ];
  46. $ins=Db::name("order_tag")->insert($tagData);
  47. return $ins?app_show(0,"标签新建成功"): error_show(1004,"标签新建失败");
  48. }
  49. //标签列表翻页
  50. public function list(){
  51. $page = isset($this->post['page'])&&$this->post['page']!=''?intval($this->post['page']):1;
  52. $size = isset($this->post['size'])&&$this->post['size']!=''?intval($this->post['size']):15;
  53. $type = isset($this->post['type'])&&$this->post['type']!=''?intval($this->post['type']):'';
  54. $status = isset($this->post['status'])&&$this->post['status']!==''?intval($this->post['status']):'';
  55. if(isset($this->post['relaComNo']) && $this->post['relaComNo']!=""){
  56. $companyNo = isset($this->post['relaComNo'])&& $this->post['relaComNo']!="" ? trim($this->post['relaComNo']) :"";
  57. }else{
  58. $companyNo = isset($this->post['companyNo'])&& $this->post['companyNo']!="" ? trim($this->post['companyNo']) :"";
  59. }
  60. $condition =[["is_del","=",0]];
  61. $roleid = $this->roleid;
  62. $check = checkRole($roleid,'101');
  63. if($check){
  64. $condition[]=["apply_id","=",$this->uid];
  65. }
  66. if($type!=''){
  67. $condition[]=["type","=",$type];
  68. }
  69. if($status!==''){
  70. $condition[]=["status","=",$status];
  71. }
  72. $tagName =isset($this->post['tag_name'])&&$this->post['tag_name']!='' ? trim($this->post['tag_name']):"";
  73. if($tagName!=''){
  74. $condition[]=["tag_name","like","%$tagName%"];
  75. }
  76. if($companyNo!=''){
  77. $condition[]=["companyNo","=",$companyNo];
  78. }
  79. $count =Db::name("order_tag")->where($condition)->count();
  80. $total=ceil($count/$size);
  81. $page = $page>=$total ? intval($total):$page;
  82. $list =Db::name("order_tag")->where($condition)->page($page,$size)->order("addtime desc")->select()->toArray();
  83. $comNo=array_column($list,"companyNo");
  84. $ComArr=Db::connect("mysql_sys")->name("headquarters")->where(["code"=>$comNo])->column("name","code");
  85. foreach ($list as &$item){
  86. $item['companyName']=$ComArr[$item['companyNo']]??"";
  87. }
  88. return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
  89. }
  90. //根据条件筛选合适的标签数据
  91. public function query(){
  92. $type = isset($this->post['type'])&&$this->post['type']!=''?intval($this->post['type']):'';
  93. $condition =[["is_del","=",0]];
  94. if($type!=''){
  95. $condition[]=["type","=",$type];
  96. }
  97. if($this->post['relaComNo']!=""){
  98. $companyNo = isset($this->post['relaComNo'])&& $this->post['relaComNo']!="" ? trim($this->post['relaComNo']) :"";
  99. }else{
  100. $companyNo = isset($this->post['companyNo'])&& $this->post['companyNo']!="" ? trim($this->post['companyNo']) :"";
  101. }
  102. if($companyNo!=''){
  103. $condition[]=["companyNo","=",$companyNo];
  104. }
  105. $tagName =isset($this->post['tag_name'])&&$this->post['tag_name']!='' ? trim($this->post['tag_name']):"";
  106. if($tagName!=''){
  107. $condition[]=["tag_name","like","%$tagName%"];
  108. }
  109. $status = isset($this->post['status'])&&$this->post['status']!==''?intval($this->post['status']):'';
  110. if($status!==''){
  111. $condition[]=["status","=",$status];
  112. }
  113. $list =Db::name("order_tag")->where($condition)->order("addtime desc")->select()->toArray();
  114. return app_show(0,"获取成功",$list);
  115. }
  116. //启禁用状态
  117. public function status(){
  118. $id =isset($this->post['id'])&&$this->post['id']!=''?intval($this->post['id']):'';
  119. if($id==''){
  120. return error_show(1004,"参数 id 不能为空");
  121. }
  122. $taginfo =Db::name("order_tag")->find(["id"=>$id]);
  123. if($taginfo==false){
  124. return error_show(1004,"标签数据不存在");
  125. }
  126. $status=isset($this->post['status'])&&$this->post['status']!==''?intval($this->post['status']):'';
  127. if($status===''){
  128. return error_show(1004,"参数 status 不能为空");
  129. }
  130. $update =["status"=>$status,"updatetime"=>date("Y-m-d H:i:s")];
  131. $up =Db::name("order_tag")->where($taginfo)->update($update);
  132. return $up?app_show(0,"标签更新成功"): error_show(1004,"标签更新失败");
  133. }
  134. //编辑标签名称类型数据
  135. public function save(){
  136. $id =isset($this->post['id'])&&$this->post['id']!=''?intval($this->post['id']):'';
  137. if($id==''){
  138. return error_show(1004,"参数 id 不能为空");
  139. }
  140. $taginfo =Db::name("order_tag")->where(["id"=>$id,"is_del"=>0])->find();
  141. if($taginfo==false){
  142. return error_show(1004,"标签数据不存在");
  143. }
  144. $tagName=isset($this->post['tag_name'])&&$this->post['tag_name']!=''?trim($this->post['tag_name']):'';
  145. if($tagName===''){
  146. return error_show(1004,"参数 tag_name 不能为空");
  147. }
  148. $type=isset($this->post['type'])&&$this->post['type']!=''?intval($this->post['type']):'';
  149. if($type==''){
  150. return error_show(1004,"参数 type 不能为空");
  151. }
  152. $tag =Db::name("order_tag")->where([['tag_name',"=",$tagName],['companyNo',"=",$taginfo['companyNo']],
  153. ['type',"=",$type], ["id","<>",$id],["is_del","=",0]])->find();
  154. if($tag!=false){
  155. return error_show(1004,"标签名称已存在");
  156. }
  157. $update =["type"=>$type,"tag_name"=>$tagName,"updatetime"=>date("Y-m-d H:i:s")];
  158. $up =Db::name("order_tag")->where($taginfo)->update($update);
  159. return $up?app_show(0,"标签更新成功"): error_show(1004,"标签更新失败");
  160. }
  161. //删除标签
  162. public function delete(){
  163. $id =isset($this->post['id'])&&$this->post['id']!=''?intval($this->post['id']):'';
  164. if($id==''){
  165. return error_show(1004,"参数 id 不能为空");
  166. }
  167. $taginfo =Db::name("order_tag")->find(["id"=>$id]);
  168. if($taginfo==false){
  169. return error_show(1004,"标签数据不存在");
  170. }
  171. $update=["is_del"=>1,"updatetime"=>date("Y-m-d H:i:s")];
  172. $up =Db::name("order_tag")->where($taginfo)->update($update);
  173. return $up?app_show(0,"标签删除成功"): error_show(1004,"标签删除失败");
  174. }
  175. //单号添加标签
  176. public function AddTag(){
  177. $tagid =isset($this->post["tag_id"]) && $this->post["tag_id"]!=""?intval($this->post["tag_id"]) :"";
  178. if($tagid==""){
  179. return error_show(1004,"参数 tag_id 不能为空");
  180. }
  181. $taginfo =Db::name("order_tag")->where(["id"=>$tagid,"is_del"=>0])->find();
  182. if($taginfo==false){
  183. return error_show(1005,"标签数据不存在");
  184. }
  185. if($taginfo['status']==0){
  186. return error_show(1005,"标签已禁用");
  187. }
  188. $code =isset($this->post['code']) &&$this->post["code"]!="" ? trim($this->post["code"]):"";
  189. if($code==''){
  190. return error_show(1004,"参数 code 不能为空");
  191. }
  192. // $taglog =TagLog::where(["tag_id"=>$tagid,"code"=>$code,"status"=>1])->findOrEmpty();
  193. $total_fee =isset($this->post['total_fee']) &&$this->post["total_fee"]!=="" ? floatval($this->post["total_fee"]):"";
  194. if($total_fee==''){
  195. return error_show(1004,"参数 total_fee 不能为空");
  196. }
  197. $tagimg=isset($this->post["tag_img"]) && $this->post["tag_img"]!=""?$this->post["tag_img"]:"";
  198. $tag_remark=isset($this->post["tag_remark"]) && $this->post["tag_remark"]!=""?$this->post["tag_remark"]:"";
  199. Db::startTrans();
  200. try{
  201. if($taginfo['type']==1 || $taginfo['type']==2){
  202. $this->payTag($taginfo['type'],$code,$total_fee);
  203. }
  204. if($taginfo['type']==3|| $taginfo['type']==4){
  205. $this->qrdTag($taginfo['type'],$code,$total_fee);
  206. }
  207. $tagdata=[
  208. "code"=>$code,
  209. "tag_id"=>$tagid,
  210. "creater"=>$this->uname,
  211. "createrid"=>$this->uid,
  212. "tag_fee"=>$total_fee,
  213. "tag_img"=>$tagimg,
  214. "tag_remark"=>$tag_remark,
  215. "status"=>1,
  216. "addtime"=>date("Y-m-d H:i:s"),
  217. "updatetime"=>date("Y-m-d H:i:s")
  218. ];
  219. $in =Db::name("tag_log")->insert($tagdata);
  220. if($in==false) throw new \Exception("标签日志新建失败");
  221. Db::commit();
  222. return app_show(0,"标签添加成功");
  223. }catch (\Exception $e){
  224. Db::rollback();
  225. return error_show(1004,$e->getMessage());
  226. }
  227. }
  228. //标签废弃
  229. public function checkTag(){
  230. $param= $this->request->post(["logid"=>''],"post","trim");
  231. $loginfo = TagLog::where("id",$param['logid'])->findOrEmpty();
  232. if($loginfo->isEmpty())$this->error('未找到标签关联数据');
  233. $tag = OrderTag::where("id",$loginfo->tag_id)->findOrEmpty();
  234. if($tag->isEmpty())$this->error('未找到标签信息数据');
  235. TagLog::startTrans();
  236. $message="";
  237. try{
  238. if($tag['type']==1 || $tag['type']==2){
  239. $message="对账单{$loginfo->code}{$tag->tag_name}";
  240. $this->payReTag($tag['type'],$loginfo->code,$loginfo->tag_fee);
  241. }
  242. if($tag['type']==3|| $tag['type']==4){
  243. $message="销售单{$loginfo->code}{$tag->tag_name}";
  244. $this->qrdReTag($tag['type'],$loginfo->code,$loginfo->tag_fee);
  245. }
  246. $loginfo->status=0;
  247. $loginfo->id=null;
  248. TagLog::create($loginfo->toArray());
  249. }catch (\Exception $exception){
  250. TagLog::rollback();
  251. $this->error($exception->getMessage());
  252. }
  253. TagLog::commit();
  254. $this->success("{$message}数据标签解除");
  255. }
  256. //解除标签
  257. public function returnTag(){
  258. $param= $this->request->post(['orderCode'=>'',"type"=>""],'post','trim');
  259. $valid =Validate::rule(["orderCode|订单编号"=>"require","type|标签类型"=>"require|number|in:1,2,3,4"]);
  260. if($valid->check($param)==false)$this->error($valid->getError());
  261. $loginfo = TagLog::withJoin(["tagInfo"])->where(['code'=>$param['orderCode'],"tag_log.status"=>[1,2],
  262. 'tagInfo.type'=>$param['type']])->order("tag_log.id","desc")->findOrEmpty();
  263. if($loginfo->isEmpty())$this->error('未找到标签关联数据');
  264. TagLog::startTrans();
  265. $message='';
  266. try{
  267. if($loginfo['type']==1 || $loginfo['type']==2){
  268. $message="对账单{$loginfo->code}{$loginfo->tag_name}";
  269. $fee= $this->payReTag($loginfo['type'],$loginfo->code);
  270. }
  271. if($loginfo['type']==3|| $loginfo['type']==4){
  272. $message="销售单{$loginfo->code}{$loginfo->tag_name}";
  273. $fee= $this->qrdReTag($loginfo['type'],$loginfo->code);
  274. }
  275. $loginfo['status']=0;
  276. $loginfo['tag_fee']=$fee;
  277. unset($loginfo['addtime'],$loginfo['updatetime']);
  278. $loginfo->id=null;
  279. $loginfo->apply_id=$this->uid;
  280. $loginfo->apply_name=$this->uname;
  281. TagLog::create($loginfo->toArray());
  282. }catch (\Exception $exception){
  283. TagLog::rollback();
  284. $this->error($exception->getMessage());
  285. }
  286. TagLog::commit();
  287. $this->success("{$message}数据标签解除");
  288. }
  289. /**
  290. * @param $tagId 标签类型 1 付款2回票
  291. * @param $code 对账单编号
  292. * @param $total_fee 标签金额
  293. * @return \think\response\Json|void
  294. * @throws \think\db\exception\DbException
  295. */
  296. private function payTag($tagId,$code,$total_fee){
  297. $pay=Db::name("pay")->where(["payNo"=>$code,"is_del"=>0])->findOrEmpty();
  298. if(empty($pay)){
  299. throw new \Exception('未找到对账单数据');
  300. }
  301. $update=["updatetime"=>date("Y-m-d H:i:s")];
  302. if($tagId==1){
  303. if($pay['wpay_fee']+$pay['pay_tag_fee']<$total_fee){
  304. throw new \Exception('对账单未付金额不足');
  305. }
  306. $update['wpay_fee']=$pay['wpay_fee']+$pay['pay_tag_fee']-$total_fee;
  307. $status = $update['wpay_fee']==0 &&$pay['pay_fee']==0 ? 3:($pay['apay_fee']==0?1:2);
  308. $update['pay_tag_fee'] =$pay['pay_tag_fee']+ $total_fee;
  309. $update['pay_status'] = $status;
  310. $update['pay_tag'] = 1;
  311. }
  312. if($tagId==2){
  313. if($pay['winv_fee']+$pay['inv_tag_fee']<$total_fee){
  314. throw new \Exception('对账单未开票金额不足');
  315. }
  316. $update['winv_fee']=$pay['winv_fee']+$pay['inv_tag_fee']-$total_fee;
  317. $status = $update['winv_fee']==0 &&$pay['inv_fee']==0 ? 3:($pay['ainv_fee']==0?1:2);
  318. $update['inv_tag_fee'] =$pay['inv_tag_fee']+ $total_fee;
  319. $update['inv_status'] = $status;
  320. $update['inv_tag'] = 1;
  321. }
  322. $resulr= Db::name("pay")->where($pay)->update($update);
  323. if($resulr==false) throw new \Exception('对账单更新失败');
  324. }
  325. /**解除标签
  326. * @param $tagId 标签类型 1 付款2回票
  327. * @param $code 对账单编号
  328. * @param $total_fee 标签金额
  329. * @return \think\response\Json|void
  330. * @throws \think\db\exception\DbException
  331. */
  332. private function payReTag($tagId,$code){
  333. $pay=Pay::where(['payNo'=>$code,'is_del'=>0])->findOrEmpty();
  334. if($pay->isEmpty())throw new \Exception("未找到对账单数据");
  335. $fee=0;
  336. if($tagId==1){
  337. if($pay['pay_tag_fee']<0)throw new \Exception('对账单付款标签金额不足');
  338. $fee=$pay->pay_tag_fee;
  339. $pay->wpay_fee=$pay->wpay_fee+$pay->pay_tag_fee;
  340. $pay->pay_tag_fee=0;
  341. $pay->pay_status = $pay->wpay_fee==0 && $pay->pay_fee==0?3:($pay->apay_fee==0?1:2);
  342. $pay->pay_tag=0;
  343. }
  344. if($tagId==2){
  345. if($pay['inv_tag_fee']<0)throw new \Exception('对账单回票标签金额不足');
  346. $fee=$pay->inv_tag_fee;
  347. $pay->winv_fee=$pay->winv_fee+$pay->inv_tag_fee;
  348. $pay->inv_tag_fee=0;
  349. $pay->inv_status = $pay->winv_fee==0 && $pay->inv_fee==0?3:($pay->ainv_fee==0?1:2);
  350. $pay->inv_tag=0;
  351. }
  352. $resulr= $pay->save();
  353. if($resulr==false)throw new \Exception("对账单更新失败");
  354. return $fee;
  355. }
  356. /**
  357. * @param $tagId 标签类型 3 回款4开票
  358. * @param $code 销售单编号
  359. * @param $total_fee 标签金额
  360. * @return \think\response\Json|void
  361. * @throws \think\db\exception\DbException
  362. */
  363. private function qrdTag($tagId,$code,$total_fee){
  364. $qrd=Db::name("qrd_info")->where(["sequenceNo"=>$code,"is_del"=>0])->findOrEmpty();
  365. if(empty($qrd)){
  366. throw new \Exception('未找到销售单数据');
  367. }
  368. $update=["updatetime"=>date("Y-m-d H:i:s")];
  369. if($tagId==3){
  370. if($qrd['wpay_fee']+$qrd['pay_tag_fee']<$total_fee){
  371. throw new \Exception('销售单未付金额不足');
  372. }
  373. $update['wpay_fee']=$qrd['wpay_fee']+$qrd['pay_tag_fee']-$total_fee;
  374. $status = $update['wpay_fee']==0 &&$qrd['pay_fee']==0 ? 3:($qrd['apay_fee']==0?1:2);
  375. $update['pay_tag_fee'] =$qrd['pay_tag_fee']+ $total_fee;
  376. $update['pay_status'] = $status;
  377. $update['pay_tag'] = 1;
  378. }
  379. if($tagId==4){
  380. if($qrd['winv_fee']+$qrd['inv_tag_fee']<$total_fee){
  381. throw new \Exception('销售单未开票金额不足');
  382. }
  383. $update['winv_fee']=$qrd['winv_fee']+$qrd['inv_tag_fee']-$total_fee;
  384. $status = $update['winv_fee']==0 &&$qrd['inv_fee']==0 ? 3:($qrd['ainv_fee']==0?1:2);
  385. $update['inv_tag_fee'] = $qrd['inv_tag_fee']+$total_fee;
  386. $update['inv_status'] = $status;
  387. $update['inv_tag'] = 1;
  388. }
  389. $resulr= Db::name("qrd_info")->where($qrd)->update($update);
  390. if($resulr==false) throw new \Exception('标签添加失败');
  391. }
  392. /** 解除标签销售单
  393. * @param $tagId 标签类型 3 回款4开票
  394. * @param $code 销售单编号
  395. * @param $total_fee 标签金额
  396. * @return \think\response\Json|void
  397. * @throws \think\db\exception\DbException
  398. */
  399. private function qrdReTag($tagId,$code){
  400. $qrd=QrdInfo::where(['sequenceNo'=>$code,'is_del'=>0])->findOrEmpty();
  401. if($qrd->isEmpty())throw new \Exception('未找到销售单数据');
  402. $fee =0 ;
  403. if($tagId==3){
  404. if($qrd->pay_tag_fee<0)throw new \Exception('销售单回款标签金额不足');
  405. $fee =$qrd->pay_tag_fee ;
  406. $qrd->wpay_fee=$qrd->wpay_fee+$qrd->pay_tag_fee;
  407. $qrd->pay_tag_fee=0;
  408. $qrd->pay_status = $qrd->wpay_fee==0 && $qrd->pay_fee==0?3:($qrd->apay_fee==0?1:2);
  409. $qrd->pay_tag=0;
  410. }
  411. if($tagId==4){
  412. if($qrd->inv_tag_fee<0)throw new \Exception('销售单开票标签金额不足');
  413. $fee =$qrd->inv_tag_fee ;
  414. $qrd->winv_fee=$qrd->winv_fee+$qrd->inv_tag_fee;
  415. $qrd->inv_tag_fee=0;
  416. $qrd->inv_status = $qrd->winv_fee==0 && $qrd->inv_fee==0?3:($qrd->ainv_fee==0?1:2);
  417. $qrd->inv_tag=0;
  418. }
  419. $resulr= $qrd->save();
  420. if($resulr==false)throw new \Exception('销售单更新失败');
  421. return $fee;
  422. }
  423. public function logList(){
  424. $param = $this->request->param(["betweenTime"=>[],"customerNo"=>"","supplierNo"=>"",'companyNo'=>'',
  425. "type"=>'',"status"=>"","orderCode"=>"","creater"=>"","order_type"=>0,"size"=>10,"page"=>1],"post","trim");
  426. $sbtable = $param['order_type']==2?'payInfo':'orderInfo';
  427. $where=[["tagInfo.type","in",$param['order_type']==2?[1,2]:[3,4]],["{$sbtable}.is_del","=",0],["tagInfo.is_del",'=',0]];
  428. empty($param['betweenTime'])?:$where[]=["tag_log.addtime","between",$param['betweenTime']];
  429. if($param['order_type']==1)$param['customerNo']==""?:$where[]=["{$sbtable}.customerNo","like","%{$param['customerNo']}%"];
  430. if($param['order_type']==2)$param['supplierNo']==""?:$where[]=["{$sbtable}.supplierNo","like","%{$param['supplierNo']}%"];
  431. $param['companyNo']==""?:$where[]=["{$sbtable}.companyNo","like","%{$param['companyNo']}%"];
  432. $param['type']==''?:$where[]=["tagInfo.type","=",$param['type']];
  433. $param['status']===""?:$where[]=["tag_log.status","=",$param['status']];
  434. $param['orderCode']==""?:$where[]=["code","like","%{$param['orderCode']}%"];
  435. $param['creater']==""?:$where[]=["creater","like","%{$param['creater']}%"];
  436. $model =new TagLog();
  437. $list = $model->withJoin(["tagInfo",$sbtable],"left")->where($where)
  438. ->order("id","desc")
  439. ->paginate(["list_rows"=>$param['size'],"page"=>$param['page']]);
  440. $this->success("获取成功",["list"=>$list->items(),"count"=>$list->total()]);
  441. }
  442. }