|
|
@@ -392,15 +392,15 @@ class OrderSuperLoss extends Api
|
|
|
$data['warehousing_num'] = $cp_data[0]['cp_sl'];
|
|
|
$data['warehousing_date'] = substr($cp_data[0]['jjcp_sj'],0,10);
|
|
|
//查出进入超节损的工序,有上报产量的工序就进入超节损
|
|
|
- $gxh_sql = "SELECT sczl_gxh FROM
|
|
|
- (SELECT sczl_gxh FROM 设备_产量计酬 WHERE sczl_gdbh = '{$order}' AND sczl_yjno = '{$params['yjno']}'
|
|
|
- UNION SELECT sczl_gxh FROM db_sczl WHERE sczl_gdbh = '{$order}' AND sczl_yjno = '{$params['yjno']}') AS combined_result";
|
|
|
- $gxh_arr = Db::query($gxh_sql);
|
|
|
-// $gxh_arr = \db('工单_工艺资料')
|
|
|
-// ->where('Gy0_gdbh',$order)
|
|
|
-// ->where('Gy0_yjno',$params['yjno'])
|
|
|
-// ->field('Gy0_gxh as sczl_gxh')
|
|
|
-// ->select();
|
|
|
+// $gxh_sql = "SELECT sczl_gxh FROM
|
|
|
+// (SELECT sczl_gxh FROM 设备_产量计酬 WHERE sczl_gdbh = '{$order}' AND sczl_yjno = '{$params['yjno']}'
|
|
|
+// UNION SELECT sczl_gxh FROM db_sczl WHERE sczl_gdbh = '{$order}' AND sczl_yjno = '{$params['yjno']}') AS combined_result";
|
|
|
+// $gxh_arr = Db::query($gxh_sql);
|
|
|
+ $gxh_arr = \db('工单_工艺资料')
|
|
|
+ ->where('Gy0_gdbh',$order)
|
|
|
+ ->where('Gy0_yjno',$params['yjno'])
|
|
|
+ ->field('Gy0_gxh as sczl_gxh')
|
|
|
+ ->select();
|
|
|
$gxh_values = array_column($gxh_arr, 'sczl_gxh');
|
|
|
foreach ($gxh_values as $k=>$v){
|
|
|
if ((int)$v < 10){
|