|
|
@@ -83,20 +83,9 @@ class ProcessDocument extends Api
|
|
|
}
|
|
|
|
|
|
$where = array();
|
|
|
- $where['Gd_gdbh'] = $order;
|
|
|
- $product = db('工单_基本资料')
|
|
|
- ->where($where)
|
|
|
- ->field('成品代号')
|
|
|
- ->find();
|
|
|
- if (empty($product)){
|
|
|
- $this->success('请求成功');
|
|
|
- }
|
|
|
- $map =array();
|
|
|
- $map['product_number'] = rtrim($product['成品代号']);
|
|
|
- if ($params['peijian'] > 0){
|
|
|
- $map['peijian'] = $params['peijian'];
|
|
|
- }
|
|
|
- $res = Db::connect('db2')->name('qr_history')->where($map)->order('id desc')->field('data,update')->find();
|
|
|
+ //印件代号
|
|
|
+ $where['product_number'] = $params['yjdh'];
|
|
|
+ $res = Db::connect('db2')->name('qr_history')->where($where)->order('id desc')->field('data,update')->find();
|
|
|
$result = array();
|
|
|
$result['update'] = '暂无';
|
|
|
$result['data'] = '';
|
|
|
@@ -143,19 +132,8 @@ class ProcessDocument extends Api
|
|
|
$data = [];
|
|
|
$data['department'] = $department;
|
|
|
$data['data'] = substr($params['data'],0,-1);
|
|
|
- $where = array();
|
|
|
- $where['Gd_gdbh'] = $params['order'];
|
|
|
- $product = db('工单_基本资料')
|
|
|
- ->where($where)
|
|
|
- ->field('成品代号')
|
|
|
- ->find();
|
|
|
-
|
|
|
- $data['product_number'] = rtrim($product['成品代号']);
|
|
|
+ $data['product_number'] = rtrim($params['yjdh']);
|
|
|
$map['product_number'] = $data['product_number'];
|
|
|
- $map['department'] = $department;
|
|
|
- if ($params['peijian']){
|
|
|
- $map['peijian'] = $params['peijian'];
|
|
|
- }
|
|
|
$data['update'] = date('Y-m-d H:i:s');
|
|
|
$data['ip'] =$ip;
|
|
|
$isNull = Db::connect('db2')->name('qr_history')->where($map)->find();
|