|
|
@@ -341,7 +341,7 @@ class Facility extends Api
|
|
|
FROM
|
|
|
`工单_工艺资料` AS a
|
|
|
JOIN `工单_印件资料` AS d ON a.Gy0_gdbh = d.Yj_Gdbh AND d.yj_Yjno = a.Gy0_yjno
|
|
|
- JOIN `工单_基本资料` AS b ON b.Gd_gdbh = a.Gy0_gdbh AND b.Gd_cpdh = d.yj_Yjdh
|
|
|
+ JOIN `工单_基本资料` AS b ON b.Gd_gdbh = a.Gy0_gdbh
|
|
|
LEFT JOIN `设备_产量计酬` AS e ON e.sczl_gdbh = a.Gy0_gdbh AND e.sczl_yjno = a.Gy0_yjno AND e.sczl_gxh = a.Gy0_gxh
|
|
|
WHERE
|
|
|
b.gd_statu = '2-生产中'
|
|
|
@@ -2129,7 +2129,7 @@ class Facility extends Api
|
|
|
];
|
|
|
$list = \db('工单_印件资料')
|
|
|
->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();
|
|
|
if (empty($list)){
|
|
|
$this->success('未找到印件资料');
|
|
|
@@ -2154,27 +2154,28 @@ class Facility extends Api
|
|
|
if (empty($param['gdbh'])){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
+// $sys_bh = \db('dic_lzde')->where('适用机型',$param['machine'])->value('sys_bh');
|
|
|
$list = \db('工单_工艺资料')
|
|
|
->where('Gy0_gdbh',$param['gdbh'])
|
|
|
->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')
|
|
|
->select();
|
|
|
if (empty($list)){
|
|
|
$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){
|
|
|
if ((int)$value['gxh'] < 10){
|
|
|
$value['gxh'] = '0'.$value['gxh'];
|
|
|
@@ -2184,9 +2185,10 @@ class Facility extends Api
|
|
|
}else{
|
|
|
$list[$key]['name'] = $value['gxh'].'-'.$value['gxmc'].'【'.$value['add_gxmc'].'】';
|
|
|
}
|
|
|
- unset($list[$key]['gxmc'],$list[$key]['add_gxmc']);
|
|
|
- $list[$key]['time'] = $time;
|
|
|
+ unset( $list[$key]['add_gxmc']);
|
|
|
+// $list[$key]['time'] = $time;
|
|
|
}
|
|
|
+// $list['sys_bh'] = $sys_bh;
|
|
|
$this->success('成功',$list);
|
|
|
}
|
|
|
|
|
|
@@ -2299,7 +2301,16 @@ class Facility extends Api
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //日产量上报班组信息批量修改
|
|
|
+ /**
|
|
|
+ * 日产量上报班组信息批量修改
|
|
|
+ * @return void
|
|
|
+ * @throws \think\Exception
|
|
|
+ * @throws \think\db\exception\BindParamException
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
+ * @throws \think\exception\PDOException
|
|
|
+ */
|
|
|
public function YieldTeamEdit()
|
|
|
{
|
|
|
if ($this->request->isGet() === false){
|