request->get(); $where = []; $where['mainId'] = $this->mainId; if (isset($get['status']) && is_numeric($get['status'])) { $status = $get['status']; $where['status'] = $status; } $list = WorkClass::getWorkList($where); util::success(['list' => $list]); } //新建工单 shish 20220319 public function actionCreate() { $post = Yii::$app->request->post(); $post['mainId'] = $this->mainId ?? 0; $post['sjId'] = $this->sjId ?? 0; $post['shopId'] = $this->shopId ?? 0; $orderSn = orderSn::getWorkSn(); $post['orderSn'] = $orderSn; $work = WorkClass::add($post, true); util::success(['info' => $work]); } }