|
|
@@ -381,23 +381,23 @@ class GluingReport extends Api
|
|
|
$data = \db('设备_糊盒报工采集')->where('sczl_jtbh',$machine)->order('UID desc')->find();
|
|
|
$list = [];
|
|
|
$row = [];
|
|
|
- if (!empty($data['工单编号'])){
|
|
|
+ if (!empty($data['sczl_gdbh'])){
|
|
|
$endTime = \db('工单_工艺资料')
|
|
|
- ->where('Gy0_gdbh',$data['工单编号'])
|
|
|
- ->where('Gy0_yjno',$data['印件号'])
|
|
|
- ->where('Gy0_gxh',$data['工序号'])
|
|
|
+ ->where('Gy0_gdbh',$data['sczl_gdbh'])
|
|
|
+ ->where('Gy0_yjno',$data['sczl_yjno'])
|
|
|
+ ->where('Gy0_gxh',$data['sczl_gxh'])
|
|
|
->find();
|
|
|
- $list['工单编号'] = $data['工单编号'];
|
|
|
+ $list['工单编号'] = $data['sczl_gdbh'];
|
|
|
if (!empty($endTime)){
|
|
|
- $list['印件号'] = $data['印件号'];
|
|
|
- $name = \db('工单_基本资料')->where('Gd_Gdbh',$data['工单编号'])->value('成品名称');
|
|
|
- $code = \db('工单_基本资料')->where('Gd_Gdbh',$data['工单编号'])->value('成品代号');
|
|
|
+ $list['印件号'] = $data['sczl_yjno'];
|
|
|
+ $name = \db('工单_基本资料')->where('Gd_Gdbh',$data['sczl_gdbh'])->value('成品名称');
|
|
|
+ $code = \db('工单_基本资料')->where('Gd_Gdbh',$data['sczl_gdbh'])->value('成品代号');
|
|
|
$list['产品名称'] = rtrim($name);
|
|
|
$list['产品代号'] = rtrim($code);
|
|
|
- $list['工序名称'] = $data['工序名称'];
|
|
|
+ $list['工序名称'] = $data['sczl_gxh'];
|
|
|
}
|
|
|
- $list['状态'] = rtrim($data['当前状态']);
|
|
|
- $list['开工时间'] = $data['开工时间'];
|
|
|
+ $list['状态'] = rtrim($data['status']);
|
|
|
+ $list['开工时间'] = $data['sczl_kgsj'];
|
|
|
}else{
|
|
|
$list['工单编号'] = '';
|
|
|
$list['印件号'] = 0;
|
|
|
@@ -410,6 +410,7 @@ class GluingReport extends Api
|
|
|
$list['班组编号'] = rtrim($data['sczl_bzbh']);
|
|
|
$idList = explode(',',$data['班组ID']);
|
|
|
foreach ($idList as $k=>$v){
|
|
|
+ $row[$k] = [];
|
|
|
$class = \db('设备_糊盒班组资料')
|
|
|
->where('id',$v)
|
|
|
->field("role,rate,bh1,bh2,bh3,bh4,bh5,bh6,bh7,bh8,bh9,bh10,bh11,bh12,bh13,bh14,bh15")
|
|
|
@@ -418,7 +419,7 @@ class GluingReport extends Api
|
|
|
for ($i=1;$i<16;$i++) {
|
|
|
if ($class['bh' . $i] != '' && $class['bh' . $i] != '000000') {
|
|
|
$name = \db('人事_基本资料')->where('员工编号', $class['bh' . $i])->field('rtrim(员工姓名) as 姓名')->find();
|
|
|
- $row[$i] = [
|
|
|
+ $row[$k][] = [
|
|
|
'编号' => $class['bh' . $i],
|
|
|
'姓名' => $name['姓名'],
|
|
|
'比例' => $class['rate'],
|