wang jun 3 years ago
parent
commit
b2bb77b8b3

+ 1 - 1
application/app/controller/Appointment.php

@@ -27,7 +27,7 @@ class Appointment extends BaseController
         $l_a = new appointmentlogic();
         $result = $l_a->getinfobyid($param);
         if (!$result['status']) {
-            return backjson2(0, $result['msg']);
+            return backjson2(0, $result['msg'],$result['data']);
         }
         return backjson2(200, 'success', $result['data']);
     }

+ 5 - 2
application/app/logic/appointmentlogic.php

@@ -48,7 +48,7 @@ class appointmentlogic extends baselogic
         }
         $m_a = new appointmentmodel();
         $where = ['id' => $arr['id']];
-        $field = ['name', 'sfzid', 'telno', 'signurl', 'oprdate', 'ispay', 'isuse', 'payorderno'];
+        $field = ['name', 'sfzid', 'telno', 'signurl', 'oprdate', 'ispay', 'isuse', 'payorderno', 'id'];
         $info = $m_a->getInfo($where, $field);
         if (empty($info)) {
             return backarr(0, "无申请数据");
@@ -57,7 +57,10 @@ class appointmentlogic extends baselogic
             return backarr(0, "未支付");
         }
         if ($info['isuse']) {
-            return backarr(0, "已使用");
+            $aid = $info['id'];
+            $m_t = new tubemodel();
+            $tinfo = $m_t->getInfo(['appointment_id' => $aid], ['oprtime']);
+            return backarr(0, "已使用", ['id' => $aid, 'oprtime' => $tinfo['oprtime']]);
         }
         return backarr(1, "查询成功", $info);
     }