处理bug

This commit is contained in:
2025-09-05 15:35:41 +08:00
parent 724d817d59
commit bcd0aa73c0
1 changed files with 20 additions and 15 deletions

View File

@ -391,23 +391,28 @@ class Savemsg extends Base{
// // 添加测试一维码数据
// 添加测试打包数据
$zengjie = Db::connect('zengjie_db');
$records = $zengjie->table('sn_code_all')
->where('batch_id', 'null') // 或者使用 ->whereNull('batch_id')
->orderRaw('NEWID()') // SQL Server的随机排序函数
->limit(10)
->select();
$data['sn_code_all'] = [];
$data['box_serial_number'] = '3ST011527003';
for ($i=0; $i < count($records); $i++) {
$data['sn_code_all'][] = $records[$i]['sn_code'];
}
$data['sn_code_all'] = implode(',',$data['sn_code_all']);
$result = $this->save_box_msg_action($data);
dump($result);
dump($data);
// $zengjie = Db::connect('zengjie_db');
// $records = $zengjie->table('sn_code_all')
// ->where('batch_id', 'null') // 或者使用 ->whereNull('batch_id')
// ->orderRaw('NEWID()') // SQL Server的随机排序函数
// ->limit(10)
// ->select();
// $data['sn_code_all'] = [];
// $data['box_serial_number'] = '3ST011527003';
// for ($i=0; $i < count($records); $i++) {
// $data['sn_code_all'][] = $records[$i]['sn_code'];
// }
// $data['sn_code_all'] = implode(',',$data['sn_code_all']);
// $result = $this->save_box_msg_action($data);
// dump($result);
// dump($data);
// 添加测试打包数据
// return $data;
// '0386737300007235,0039376500007203,0059052100007102,0124589700007184,0032838000007113,0170457400007162,0170448500007207,0170466000006965,0426058900007228,0006613600007105'
}
}