|
@@ -26,11 +26,15 @@ class companylogic extends baselogic
|
|
|
['name' => 'openid', 'title' => 'openid', 'require' => true, 'type' => 'string'],
|
|
|
],
|
|
|
'getinfobyid' => [
|
|
|
- ['name' => 'id', 'title' => 'id', 'require' => true, 'type' => 'string'],
|
|
|
+ ['name' => 'id', 'title' => 'id', 'require' => true, 'type' => 'numeric'],
|
|
|
],
|
|
|
'updatebyid' => [
|
|
|
- ['name' => 'id', 'title' => 'id', 'require' => true, 'type' => 'string'],
|
|
|
+ ['name' => 'id', 'title' => 'id', 'require' => true, 'type' => 'numeric'],
|
|
|
],
|
|
|
+ 'getinfowitchinventbyid'=>[
|
|
|
+ ['name' => 'id', 'title' => 'id', 'require' => true, 'type' => 'numeric'],
|
|
|
+ ['name' => 'activestate', 'title' => 'activestate', 'regex' => '/[0|1|2]{1}/'],
|
|
|
+ ]
|
|
|
];
|
|
|
return $list;
|
|
|
}
|
|
@@ -98,7 +102,11 @@ class companylogic extends baselogic
|
|
|
return backarr(0, "无数据");
|
|
|
}
|
|
|
$m_i = new inventmodel();
|
|
|
- $ilist = $m_i->getlist(['company_id' => $info['id'], "*", 1, 0]);
|
|
|
+ $where = ['company_id' => $info['id']];
|
|
|
+ if(isset($arr['activestate'])){
|
|
|
+ $where['active_state'] = $arr['activestate'];
|
|
|
+ }
|
|
|
+ $ilist = $m_i->getlist($where, "*", 1, 0);
|
|
|
$info['invent_list'] = $ilist;
|
|
|
return backarr(1, "获取成功", $info);
|
|
|
}
|