|
|
@@ -695,12 +695,16 @@ class WorkOrderVerification extends Api
|
|
|
if (!isset($params['order']) || empty($params['order'])){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
+ if (!isset($params['yjno']) || empty($params['yjno'])){
|
|
|
+ $this->error('参数错误');
|
|
|
+ }
|
|
|
$where['Gd_gdbh'] = $params['order'];
|
|
|
$where['行号'] = 1;
|
|
|
//工单基本资料
|
|
|
$info = db('工单_基本资料')->where($where)->field('rtrim(成品代号) as code,rtrim(成品名称) as name')->find();
|
|
|
//工艺资料
|
|
|
$option['Gy0_gdbh'] = $params['order'];
|
|
|
+ $option['Gy0_yjno'] = $params['yjno'];
|
|
|
$gyInfo = db('工单_工艺资料')
|
|
|
->where($option)
|
|
|
->where(function ($query) {
|
|
|
@@ -732,17 +736,22 @@ class WorkOrderVerification extends Api
|
|
|
if (!isset($params['order']) || empty($params['order'])){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
+ if (!isset($params['yjno']) || empty($params['yjno'])){
|
|
|
+ $this->error('参数错误');
|
|
|
+ }
|
|
|
if (!isset($params['gxNo']) || empty($params['gxNo'])){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
- $total = db('设备_产量计酬')->where('sczl_gdbh',$params['order'])->order('sczl_num')->column('distinct(sczl_num)');
|
|
|
+ $total = db('设备_产量计酬')->where('sczl_gdbh',$params['order'])->where('sczl_gdbh',$params['yjno'])->order('sczl_num')->column('distinct(sczl_num)');
|
|
|
$where['sczl_gxh'] = (int)$params['gxNo'];
|
|
|
$where['sczl_gdbh'] = $params['order'];
|
|
|
+ $where['sczl_yjno'] = $params['yjno'];
|
|
|
//机器设备数据
|
|
|
$process = db('设备_产量计酬')->where($where)->order('sczl_num')->column('distinct(sczl_num)');
|
|
|
//手工数据
|
|
|
$option['qczl_gdbh'] = $params['order'];
|
|
|
$option['qczl_gxh'] = (int)$params['gxNo'];
|
|
|
+ $option['qczl_yjno'] = $params['yjno'];
|
|
|
$handProcess = db('db_qczl')->where($option)->field('qczl_num,qczl_NumDesc1,qczl_NumDesc2,qczl_NumDesc3,qczl_NumDesc4,qczl_NumDesc5,qczl_NumDesc6,qczl_NumDesc7,qczl_NumDesc8')->select();
|
|
|
// 提取数据
|
|
|
$result = array();
|