|
@@ -2129,7 +2129,7 @@ class Facility extends Api
|
|
|
];
|
|
];
|
|
|
$list = \db('工单_印件资料')
|
|
$list = \db('工单_印件资料')
|
|
|
->where($where)
|
|
->where($where)
|
|
|
- ->field('rtrim(yj_Yjno) as yjno,rtrim(yj_yjmc) as yjmc')
|
|
|
|
|
|
|
+ ->field('rtrim(yj_Yjno) as yjno,rtrim(yj_yjmc) as yjmc,rtrim(yj_ls) as ls')
|
|
|
->select();
|
|
->select();
|
|
|
if (empty($list)){
|
|
if (empty($list)){
|
|
|
$this->success('未找到印件资料');
|
|
$this->success('未找到印件资料');
|
|
@@ -2154,28 +2154,28 @@ class Facility extends Api
|
|
|
if (empty($param['gdbh'])){
|
|
if (empty($param['gdbh'])){
|
|
|
$this->error('参数错误');
|
|
$this->error('参数错误');
|
|
|
}
|
|
}
|
|
|
- $sys_bh = \db('dic_lzde')->where('适用机型',$param['machine'])->value('sys_bh');
|
|
|
|
|
|
|
+// $sys_bh = \db('dic_lzde')->where('适用机型',$param['machine'])->value('sys_bh');
|
|
|
$list = \db('工单_工艺资料')
|
|
$list = \db('工单_工艺资料')
|
|
|
->where('Gy0_gdbh',$param['gdbh'])
|
|
->where('Gy0_gdbh',$param['gdbh'])
|
|
|
->where('Gy0_yjno',$param['yjno'])
|
|
->where('Gy0_yjno',$param['yjno'])
|
|
|
- ->where('Gy0_sbbh','like','%'.$param['machine'].'%')
|
|
|
|
|
|
|
+// ->where('Gy0_sbbh','like','%'.$param['machine'].'%')
|
|
|
->field('rtrim(Gy0_gxh) as gxh,rtrim(Gy0_gxmc) as gxmc,rtrim(Add_gxmc) as add_gxmc')
|
|
->field('rtrim(Gy0_gxh) as gxh,rtrim(Gy0_gxmc) as gxmc,rtrim(Add_gxmc) as add_gxmc')
|
|
|
->select();
|
|
->select();
|
|
|
if (empty($list)){
|
|
if (empty($list)){
|
|
|
$this->success('未获取工序');
|
|
$this->success('未获取工序');
|
|
|
}
|
|
}
|
|
|
- $time = \db('设备_产量计酬')
|
|
|
|
|
- ->where('sczl_gdbh',$param['gdbh'])
|
|
|
|
|
- ->where('sczl_yjno',$param['yjno'])
|
|
|
|
|
- ->where('sczl_jtbh','like','%'.$param['machine'].'%')
|
|
|
|
|
- ->order('UniqId desc')
|
|
|
|
|
- ->value('sczl_sj2');
|
|
|
|
|
- $newTime = date('Y-m-d H:i:s');
|
|
|
|
|
- if ($newTime > date('Y-m-d 08:30:00') && $newTime < date('Y-m-d 20:30:00') && $time < date('Y-m-d 08:30:00')){
|
|
|
|
|
- $time = date('Y-m-d 08:30:00');
|
|
|
|
|
- }elseif ($newTime > date('Y-m-d 20:30:00') && $time < date('Y-m-d 20:30:00')){
|
|
|
|
|
- $time = date('Y-m-d 20:30:00');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// $time = \db('设备_产量计酬')
|
|
|
|
|
+// ->where('sczl_gdbh',$param['gdbh'])
|
|
|
|
|
+// ->where('sczl_yjno',$param['yjno'])
|
|
|
|
|
+// ->where('sczl_jtbh','like','%'.$param['machine'].'%')
|
|
|
|
|
+// ->order('UniqId desc')
|
|
|
|
|
+// ->value('sczl_sj2');
|
|
|
|
|
+// $newTime = date('Y-m-d H:i:s');
|
|
|
|
|
+// if ($newTime > date('Y-m-d 08:30:00') && $newTime < date('Y-m-d 20:30:00') && $time < date('Y-m-d 08:30:00')){
|
|
|
|
|
+// $time = date('Y-m-d 08:30:00');
|
|
|
|
|
+// }elseif ($newTime > date('Y-m-d 20:30:00') && $time < date('Y-m-d 20:30:00')){
|
|
|
|
|
+// $time = date('Y-m-d 20:30:00');
|
|
|
|
|
+// }
|
|
|
foreach ($list as $key=>$value){
|
|
foreach ($list as $key=>$value){
|
|
|
if ((int)$value['gxh'] < 10){
|
|
if ((int)$value['gxh'] < 10){
|
|
|
$value['gxh'] = '0'.$value['gxh'];
|
|
$value['gxh'] = '0'.$value['gxh'];
|
|
@@ -2186,9 +2186,9 @@ class Facility extends Api
|
|
|
$list[$key]['name'] = $value['gxh'].'-'.$value['gxmc'].'【'.$value['add_gxmc'].'】';
|
|
$list[$key]['name'] = $value['gxh'].'-'.$value['gxmc'].'【'.$value['add_gxmc'].'】';
|
|
|
}
|
|
}
|
|
|
unset($list[$key]['gxmc'],$list[$key]['add_gxmc']);
|
|
unset($list[$key]['gxmc'],$list[$key]['add_gxmc']);
|
|
|
- $list[$key]['time'] = $time;
|
|
|
|
|
|
|
+// $list[$key]['time'] = $time;
|
|
|
}
|
|
}
|
|
|
- $list['sys_bh'] = $sys_bh;
|
|
|
|
|
|
|
+// $list['sys_bh'] = $sys_bh;
|
|
|
$this->success('成功',$list);
|
|
$this->success('成功',$list);
|
|
|
}
|
|
}
|
|
|
|
|
|