$date ], [ 'tray' => $ret['tray'], 'lot' => $ret['lot'], 'active' => 1 ] ); // 修改tray_map表的date_log $date_log = json_decode($ret['date_log'], true); foreach ($date_log as $k => $v) { if ($v['flow_process_code'] == $current_process_code) { $date_log[$k]['beginTime'] = $date; $date_log[$k]['device_code'] = $param['device_code']; break; } } Db::update( 'hf_mes_production_tray_map', [ 'date_log' => json_encode($date_log, JSON_UNESCAPED_UNICODE) ], [ 'tray' => $ret['tray'], 'lot' => $ret['lot'], 'active' => 1 ] ); } catch (Exception $e) { throw new Exception($e->getMessage()); } return ''; } }