|
|
@@ -24,6 +24,9 @@ class Product extends Api
|
|
|
$this->success('产品_基本资料');
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 产品资料
|
|
|
+ */
|
|
|
/**
|
|
|
* 新增产品资料
|
|
|
*/
|
|
|
@@ -180,9 +183,9 @@ class Product extends Api
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取产品工艺列表
|
|
|
+ * 获取产品部件列表
|
|
|
*/
|
|
|
- public function ProductGyList()
|
|
|
+ public function ProductPartList()
|
|
|
{
|
|
|
if (Request::instance()->isGet() == false){
|
|
|
$this->error('非法请求');
|
|
|
@@ -192,10 +195,10 @@ class Product extends Api
|
|
|
$where = [];
|
|
|
|
|
|
if (!empty($params['search'])){
|
|
|
- $where['gy_name'] = array('like','%'.$params['search'].'%');
|
|
|
+ $where['part_name'] = array('like','%'.$params['search'].'%');
|
|
|
}
|
|
|
if (!empty($params['product_code'])){
|
|
|
- $where['product_code'] = $params['product_code'];
|
|
|
+ $where['product_code'] = array('like','%'.$params['product_code'].'%');
|
|
|
}
|
|
|
$limit = $params['limit'];
|
|
|
if (empty($limit)){
|
|
|
@@ -205,17 +208,16 @@ class Product extends Api
|
|
|
if (empty($pages)){
|
|
|
$pages = 1;
|
|
|
}
|
|
|
- $list = \db('产品_工艺资料')->whereNull('mod_rq')->where($where)->page($pages)->limit($limit)->order('id desc')->select();
|
|
|
- $count = \db('产品_工艺资料')->whereNull('mod_rq')->where($where)->page($pages)->limit($limit)->count();
|
|
|
+ $list = \db('产品_部件资料')->whereNull('mod_rq')->where($where)->page($pages)->limit($limit)->order('id desc')->select();
|
|
|
+ $count = \db('产品_部件资料')->whereNull('mod_rq')->where($where)->page($pages)->limit($limit)->count();
|
|
|
|
|
|
$this->success('获取成功', ['list' => $list, 'count' => $count]);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取产品部件列表
|
|
|
+ * 获取产品工艺列表
|
|
|
*/
|
|
|
- public function ProductPartList()
|
|
|
+ public function ProductGyList()
|
|
|
{
|
|
|
if (Request::instance()->isGet() == false){
|
|
|
$this->error('非法请求');
|
|
|
@@ -225,10 +227,10 @@ class Product extends Api
|
|
|
$where = [];
|
|
|
|
|
|
if (!empty($params['search'])){
|
|
|
- $where['part_name'] = array('like','%'.$params['search'].'%');
|
|
|
+ $where['gy_name'] = array('like','%'.$params['search'].'%');
|
|
|
}
|
|
|
if (!empty($params['product_code'])){
|
|
|
- $where['product_code'] = array('like','%'.$params['product_code'].'%');
|
|
|
+ $where['product_code'] = $params['product_code'];
|
|
|
}
|
|
|
$limit = $params['limit'];
|
|
|
if (empty($limit)){
|
|
|
@@ -238,11 +240,14 @@ class Product extends Api
|
|
|
if (empty($pages)){
|
|
|
$pages = 1;
|
|
|
}
|
|
|
- $list = \db('产品_部件资料')->whereNull('mod_rq')->where($where)->page($pages)->limit($limit)->order('id desc')->select();
|
|
|
- $count = \db('产品_部件资料')->whereNull('mod_rq')->where($where)->page($pages)->limit($limit)->count();
|
|
|
+ $list = \db('产品_工艺资料')->whereNull('mod_rq')->where($where)->page($pages)->limit($limit)->order('id desc')->select();
|
|
|
+ $count = \db('产品_工艺资料')->whereNull('mod_rq')->where($where)->page($pages)->limit($limit)->count();
|
|
|
|
|
|
$this->success('获取成功', ['list' => $list, 'count' => $count]);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
}
|