unknown 1 неделя назад
Родитель
Сommit
ab9e319dbd
1 измененных файлов с 23 добавлено и 0 удалено
  1. 23 0
      application/api/controller/WorkOrder.php

+ 23 - 0
application/api/controller/WorkOrder.php

@@ -5750,4 +5750,27 @@ class WorkOrder extends Api
         return $response;
         return $response;
     }
     }
 
 
+
+    /**
+     * 获取产品款式列表
+     * @return \think\response\Json
+     * @throws \think\db\exception\DataNotFoundException
+     */
+    public function getProductStyleList()
+    {
+        if (!$this->request->isGet()) {
+            $this->error('请求方式错误');
+        }
+
+        $list = db('产品_基本资料')
+            ->whereNotNull('product_type')
+            ->where('product_type', '<>', '')
+            ->field('product_type')
+            ->distinct(true)
+            ->order('product_type asc')
+            ->column('product_type');
+
+        $this->success('成功', $list);
+    }
+
 }
 }